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, denotational, and computable by tabling, even for cyclic inheritance hierarchies. These three properties extend to the $λ$-calculus, since Böhm tree equivalence 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; ordinary arithmetic yields the relational semantics of logic programming; $\mathtt{this}$ resolves to multiple targets; and programs are immune to nonextensibility in the sense of the Expression Problem. This makes inheritance-calculus strictly more expressive than the $λ$-calculus in both common sense and Felleisen's sense.


翻译:正如$λ$-演算使用三个原语(抽象、应用、变量)作为函数式编程的基础,继承演算使用三个原语(记录、定义、继承)作为声明式编程的基础。通过将模块、类、对象、方法、字段和局部变量统一到单一记录抽象下,该演算将继承简单地建模为集合的并。因此,组合天然具有交换性、幂等性和结合性,从结构上消除了多重继承的线性化问题。其语义是一阶的、指称的,并且可以通过表格化计算,即使对于循环继承层次结构也是如此。这三个性质可扩展到$λ$-演算,因为Böhm树等价对于继承演算子语言的一次迭代近似是完全抽象的。作为推论,这在共享相同$λ$-语法的$λ$-演算中建立了收敛层次$\text{eager} \subsetneq \text{lazy} \subsetneq \text{fixpoint}$。继承演算源自MIXINv2——一个实际实现,其中相同的代码扮演不同的函数角色;普通算术产生逻辑编程的关系语义;$\mathtt{this}$解析到多个目标;程序在表达式问题的意义上对非扩展性免疫。这使得继承演算在常识和Felleisen意义上都严格比$λ$-演算更具表现力。

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日
伊利诺伊《算法》书籍,集20年之大成,附472页pdf
专知会员服务
65+阅读 · 2020年9月27日
【经典书】算法C语言实现,Algorithms in C. 672页pdf
专知会员服务
82+阅读 · 2020年8月13日
自动结构变分推理,Automatic structured variational inference
专知会员服务
41+阅读 · 2020年2月10日
【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日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
Arxiv
0+阅读 · 6月2日
Arxiv
0+阅读 · 6月1日
Arxiv
0+阅读 · 5月5日
VIP会员
最新内容
学习数据的几何:形状空间分析数学综述
专知会员服务
7+阅读 · 6月17日
定向能反无人机系统最新发展动态
专知会员服务
7+阅读 · 6月17日
从燃煤战舰到算法战争:水面指挥的永恒要求
专知会员服务
6+阅读 · 6月17日
相关资讯
【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日
相关基金
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员