Just as the $λ$-calculus is a pure functional programming language built from three primitives (abstraction, application, variable), we present inheritance-calculus, a pure declarative programming language built from three primitives (mixin, definition, reference). We introduce multi-target $\mathtt{this}$ to solve the problem that inheritance conflicts with modularity, and thereby unify object-oriented and configuration constructs: modules, classes, objects, methods, fields, and locals become a single mixin abstraction, and inheritance becomes simply set union, the deep merge of configuration languages. Consequently, composition is commutative, idempotent, and associative, structurally eliminating the multiple-inheritance linearization problem; the inheritance relation has substitutability; every path of every program can be inherited and extended; every subtree can be split into parts that, inherited together, behave as the whole; and programs have no side effects and cover every input. We call these properties modularity by construction. The calculus has no functions, yet it macro-expresses the lazy $λ$-calculus and is more macro-expressive than it in Felleisen's sense. Its semantics is first-order, denotational, and evaluated by tabling, even for cyclic inheritance hierarchies. Inheritance-calculus is distilled from MIXINv2, an implementation in which the same code acts as different function colors and ordinary arithmetic agrees with the relational semantics of logic programming.


翻译:暂无翻译

0
下载
关闭预览

相关内容

【经典书】算法C语言实现,Algorithms in C. 672页pdf
专知会员服务
82+阅读 · 2020年8月13日
【知识图谱@ACL2020】Knowledge Graphs in Natural Language Processing
专知会员服务
66+阅读 · 2020年7月12日
FlowQA: Grasping Flow in History for Conversational Machine Comprehension
专知会员服务
35+阅读 · 2019年10月18日
Hierarchically Structured Meta-learning
CreateAMind
27+阅读 · 2019年5月22日
Transferring Knowledge across Learning Processes
CreateAMind
29+阅读 · 2019年5月18日
近期语音类前沿论文
深度学习每日摘要
14+阅读 · 2019年3月17日
强推!《PyTorch中文手册》来了
新智元
34+阅读 · 2019年2月14日
A Technical Overview of AI & ML in 2018 & Trends for 2019
待字闺中
18+阅读 · 2018年12月24日
disentangled-representation-papers
CreateAMind
26+阅读 · 2018年9月12日
国家自然科学基金
0+阅读 · 2017年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
12+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
Arxiv
0+阅读 · 10月26日
Arxiv
0+阅读 · 10月11日
VIP会员
最新内容
《面向国防领域的大语言模型基准测试与适配》
专知会员服务
6+阅读 · 10月28日
世界模型入门:从序贯决策到通用智能体
专知会员服务
12+阅读 · 10月24日
军事域更好使用人工智能的实用指南
专知会员服务
11+阅读 · 10月22日
《衡量语言模型中的作战规划能力》
专知会员服务
15+阅读 · 10月20日
相关资讯
Hierarchically Structured Meta-learning
CreateAMind
27+阅读 · 2019年5月22日
Transferring Knowledge across Learning Processes
CreateAMind
29+阅读 · 2019年5月18日
近期语音类前沿论文
深度学习每日摘要
14+阅读 · 2019年3月17日
强推!《PyTorch中文手册》来了
新智元
34+阅读 · 2019年2月14日
A Technical Overview of AI & ML in 2018 & Trends for 2019
待字闺中
18+阅读 · 2018年12月24日
disentangled-representation-papers
CreateAMind
26+阅读 · 2018年9月12日
相关基金
国家自然科学基金
0+阅读 · 2017年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
12+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员