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 classes, methods, objects, and properties 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 fixpoint-computable. These three properties extend to the lazy $λ$-calculus, since Böhm tree equivalence~\cite{barendregt1984lambda} is fully abstract for a sublanguage of inheritance-calculus, except that recursive $λ$-programs that diverge under $β$-reduction may converge under $\mathrm{lfp}(T_P)$. Inheritance-calculus is distilled from MIXINv2, a practical implementation in which 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} 是完全抽象的,唯一的例外是:在 $β$-归约下会发散的递归 $λ$-程序可能在 $\mathrm{lfp}(T_P)$ 下收敛。继承演算提炼自 MIXINv2——一个实用的实现,在该实现中,同一段代码可作为不同的函数颜色~\cite{nystrom2015color};普通算术运算可产生逻辑编程的关系语义~\cite{vanemden1976semantics};自引用可解析到多个目标;且程序对表达式问题~\cite{wadler1998expression} 免疫。这使得继承演算无论在常识意义上还是在 Felleisen 的意义上~\cite{felleisen1991expressive},其表达能力都严格强于 $λ$-演算。

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日
【Java实现遗传算法】162页pdf,Genetic Algorithms in Java Basics
专知会员服务
44+阅读 · 2020年7月19日
自动结构变分推理,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日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
Arxiv
0+阅读 · 2月18日
Arxiv
0+阅读 · 2月16日
Arxiv
0+阅读 · 2月9日
Arxiv
0+阅读 · 2月7日
VIP会员
最新内容
人工智能在战场行动中的演进及伊朗案例
专知会员服务
7+阅读 · 4月18日
美AI公司Anthropic推出网络安全模型“Mythos”
专知会员服务
4+阅读 · 4月18日
【博士论文】面向城市环境的可解释计算机视觉
大语言模型的自改进机制:技术综述与未来展望
《第四代军事特种作战部队选拔与评估》
专知会员服务
3+阅读 · 4月18日
相关资讯
【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日
相关论文
Arxiv
0+阅读 · 2月18日
Arxiv
0+阅读 · 2月16日
Arxiv
0+阅读 · 2月9日
Arxiv
0+阅读 · 2月7日
相关基金
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 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会员