Just as the $λ$-calculus uses three primitives (abstraction, application, variable) as the foundation of functional programming, inheritance-calculus uses three primitives (record, definition, inheritance) as the foundation of declarative programming. It trivially embeds the $λ$-calculus, although the entire semantics rests solely on set theory; as a consequence, all constructs including inheritance are inherently commutative, idempotent, and associative; the linearization problem of multiple inheritance does not arise. This induces a fully abstract semantics of the lazy $λ$-calculus with respect to Böhm tree equivalence~\cite{barendregt1984lambda}. Inheritance-calculus is distilled from MIXINv2, a practical implementation in which we observed further emergent phenomena: the same code acts as different function colors~\cite{nystrom2015color}; ordinary arithmetic yields the relational semantics of logic programming~\cite{vanemden1976semantics}; self-reference resolves to multiple targets; and programs are immune to the Expression Problem~\cite{wadler1998expression}. This makes inheritance-calculus strictly more expressive than the $λ$-calculus in both common sense and Felleisen's sense~\cite{felleisen1991expressive}.
翻译:正如$λ$-演算以三个基本要素(抽象、应用、变量)作为函数式编程的基础,继承演算以三个基本要素(记录、定义、继承)作为声明式编程的基础。它平凡地嵌入了$λ$-演算,尽管其整个语义完全建立在集合论之上;因此,包括继承在内的所有构造本质上都是可交换、幂等且可结合的;多重继承的线性化问题不会出现。这导出了关于Böhm树等价~\cite{barendregt1984lambda}的惰性$λ$-演算的完全抽象语义。继承演算提炼自MIXINv2,这是一个实际实现,我们在其中观察到更多涌现现象:同一代码可作为不同的函数颜色~\cite{nystrom2015color};普通算术产生逻辑编程的关系语义~\cite{vanemden1976semantics};自引用解析为多个目标;且程序对表达式问题~\cite{wadler1998expression}免疫。这使得继承演算无论在常识意义上还是Felleisen意义上~\cite{felleisen1991expressive}都严格比$λ$-演算更具表达力。