基于交集类型的Mixin组合合成
Mixin Composition Synthesis based on Intersection Types
AI总结:
提出基于交集类型类型居留的mixin组合合成方法,通过类型转换与仓库构建,实现类与mixin组合的自动合成。
摘要:
我们提出了一种方法,利用交集类型中的类型居留来合成mixin的组合。首先,递归定义的类和mixin(即作用于类的函数)被表示为带有记录的lambda演算中的项。带有记录和记录合并的交集类型被用来为这些项赋予有意义的类型,而无需借助递归类型。其次,带类型的项被转换为一个带类型组合子的仓库。我们展示了带有记录合并的记录类型与带有构造子的交集类型之间的关系。该关系被用来证明转换相对于mixin组合合成的可靠性和部分完备性。此外,我们演示了如何将转换后的仓库和目标类型用作现有框架的输入,该框架通过类型居留在有界组合逻辑中进行组合合成。计算得到的结果是一个由目标类型所类型化、并通过应用于现有类的mixin组合生成的类。
英文摘要:
We present a method for synthesizing compositions of mixins using type inhabitation in intersection types. First, recursively defined classes and mixins, which are functions over classes, are expressed as terms in a lambda calculus with records. Intersection types with records and record-merge are used to assign meaningful types to these terms without resorting to recursive types. Second, typed terms are translated to a repository of typed combinators. We show a relation between record types with record-merge and intersection types with constructors. This relation is used to prove soundness and partial completeness of the translation with respect to mixin composition synthesis. Furthermore, we demonstrate how a translated repository and goal type can be used as input to an existing framework for composition synthesis in bounded combinatory logic via type inhabitation. The computed result is a class typed by the goal type and generated by a mixin composition applied to an existing class.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。