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} \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} \subsetneq \text{fixpoint}$。继承演算提炼自 MIXINv2,这是一个实用的实现,其中相同的代码充当不同的函数颜色~\cite{nystrom2015-function-color};普通算术产生逻辑编程的关系语义~\cite{vanemden1976-predicate-logic-semantics};$\mathtt{this}$ 解析为多个目标;并且程序在表达式问题~\cite{wadler1998-expression-problem} 的意义上对不可扩展性免疫。这使得继承演算无论是在常识意义上还是在 Felleisen 的意义上~\cite{felleisen1991-expressive-power},都严格比 $λ$-演算更具表达力。

0
下载
关闭预览

相关内容

继承是面向对象软件技术当中的一个概念,与多态、封装共为面向对象的三个基本特征。 继承可以使得子类具有父类的属性和方法或者重新定义、追加属性和方法等。
【牛津大学博士论文】可微分编程的结构基础,176页pdf
专知会员服务
26+阅读 · 2023年8月20日
【2023新书】并行算法,Parallel Algorithms ,400页pdf
专知会员服务
72+阅读 · 2023年8月6日
【2023新书】程序证明,Program Proofs,642页pdf
专知会员服务
67+阅读 · 2023年3月29日
【Cell】神经算法推理,Neural algorithmic reasoning
专知会员服务
29+阅读 · 2021年7月16日
伊利诺伊《算法》书籍,集20年之大成,附472页pdf
专知会员服务
65+阅读 · 2020年9月27日
【经典书】算法C语言实现,Algorithms in C. 672页pdf
专知会员服务
82+阅读 · 2020年8月13日
【Java实现遗传算法】162页pdf,Genetic Algorithms in Java Basics
专知会员服务
44+阅读 · 2020年7月19日
【AAAI2021】对比聚类,Contrastive Clustering
专知
26+阅读 · 2021年1月30日
可视化理解四元数,愿你不再掉头发
计算机视觉life
31+阅读 · 2019年1月2日
448页伊利诺伊大学《算法》图书-附下载
专知
15+阅读 · 2018年12月31日
【论文】变分推断(Variational inference)的总结
机器学习研究会
39+阅读 · 2017年11月16日
并行算法演进,从MapReduce到MPI
凡人机器学习
10+阅读 · 2017年11月5日
GAFT:一个使用 Python 实现的遗传算法框架
Python开发者
10+阅读 · 2017年8月1日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Arxiv
0+阅读 · 2月25日
Arxiv
0+阅读 · 2月18日
Arxiv
0+阅读 · 2月16日
Arxiv
0+阅读 · 2月7日
VIP会员
最新内容
《人工智能赋能电磁战》(报告)
专知会员服务
0+阅读 · 25分钟前
【CMU博士论文】迈向可扩展的开放世界三维感知
专知会员服务
0+阅读 · 今天14:06
前馈式三维场景建模
专知会员服务
0+阅读 · 今天14:03
(译文)认知战:以士兵为目标,塑造战略
专知会员服务
2+阅读 · 今天3:12
(中文)认知战的本体论基础(2026报告)
专知会员服务
18+阅读 · 今天1:45
美空军条令(2026):外国对内防御
专知会员服务
3+阅读 · 今天1:32
美国与以色列如何在攻击伊朗中使用人工智能
专知会员服务
7+阅读 · 4月16日
相关资讯
【AAAI2021】对比聚类,Contrastive Clustering
专知
26+阅读 · 2021年1月30日
可视化理解四元数,愿你不再掉头发
计算机视觉life
31+阅读 · 2019年1月2日
448页伊利诺伊大学《算法》图书-附下载
专知
15+阅读 · 2018年12月31日
【论文】变分推断(Variational inference)的总结
机器学习研究会
39+阅读 · 2017年11月16日
并行算法演进,从MapReduce到MPI
凡人机器学习
10+阅读 · 2017年11月5日
GAFT:一个使用 Python 实现的遗传算法框架
Python开发者
10+阅读 · 2017年8月1日
相关论文
相关基金
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员