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. By unifying modules, classes, objects, methods, fields, and locals under a single record abstraction, the calculus models inheritance simply as set union. Consequently, composition is inherently commutative, idempotent, and associative, structurally eliminating the multiple-inheritance linearization problem. Its semantics is first-order~\cite{vanemden1976-predicate-logic-semantics, reynolds1972-definitional-interpreters, aczel1977-inductive-definitions}, denotational, and computable by tabling~\cite{tamaki1986-tabled-resolution}, even for cyclic inheritance hierarchies. These three properties extend to the $λ$-calculus, since Böhm tree equivalence~\cite{barendregt1984-lambda-calculus} is fully abstract for the first-iteration approximation of a sublanguage of inheritance-calculus. As a corollary, this establishes a convergence hierarchy $\text{eager} \subsetneq \text{lazy}$~\cite{plotkin1975-call-by-name-call-by-value} $\subsetneq \text{fixpoint}$ among $λ$-calculi sharing the same $λ$-syntax. Inheritance-calculus is distilled from MIXINv2, a practical implementation in which the same code acts as different function colors~\cite{nystrom2015-function-color}; ordinary arithmetic yields the relational semantics of logic programming~\cite{vanemden1976-predicate-logic-semantics}; $\mathtt{this}$ resolves to multiple targets; and programs are immune to nonextensibility in the sense of the Expression Problem~\cite{wadler1998-expression-problem}. This makes inheritance-calculus strictly more expressive than the $λ$-calculus in both common sense and Felleisen's sense~\cite{felleisen1991-expressive-power}.
翻译:正如$λ$-演算使用三个原始概念(抽象、应用、变量)作为函数式编程的基础,继承演算使用三个原始概念(记录、定义、继承)作为声明式编程的基础。通过将模块、类、对象、方法、字段和局部变量统一在单一记录抽象下,该演算将继承简单建模为集合并。因此,组合本质上具有交换性、幂等性和结合性,从结构上消除了多重继承的线性化问题。其语义是一阶的~\cite{vanemden1976-predicate-logic-semantics, reynolds1972-definitional-interpreters, aczel1977-inductive-definitions}、指称性的,并且可通过制表法计算~\cite{tamaki1986-tabled-resolution},即使对于循环继承层次结构也是如此。这三个性质可扩展到$λ$-演算,因为Böhm树等价~\cite{barendregt1984-lambda-calculus}对于继承演算子语言的一阶迭代近似是完全抽象的。作为推论,这在共享相同$λ$-语法的$λ$-演算之间建立了一个收敛层次结构:$\text{eager} \subsetneq \text{lazy}$~\cite{plotkin1975-call-by-name-call-by-value} $\subsetneq \text{fixpoint}$。继承演算源自MIXINv2这一实际实现,其中同一代码充当不同的函数颜色~\cite{nystrom2015-function-color};普通算术可导出逻辑编程的关系语义~\cite{vanemden1976-predicate-logic-semantics};$\mathtt{this}$可解析为多个目标;且程序在表达式问题~\cite{wadler1998-expression-problem}的意义上免受不可扩展性的影响。这使得继承演算在常识意义上和Felleisen的意义上~\cite{felleisen1991-expressive-power}都严格比$λ$-演算更具表达力。