A formal framework for compositional compilation

D. Ancona, E. Zucca
{"title":"A formal framework for compositional compilation","authors":"D. Ancona, E. Zucca","doi":"10.1142/9789812770998_0013","DOIUrl":null,"url":null,"abstract":"We define a general framework for compositional compilation, meant as the ability of building an executable application by separate compilation and linking of single fragments, opposed to global compilation of the complete source application code. More precisely, compilation of a source code fragment in isolation generates a corresponding binary fragment equipped with type information, formally modeled as a typing, allowing type safe linking of fragments without re-inspecting code. We formally define a notion of soundness and completeness of compositional compilation w.r.t. global compilation, and show how linking can be in practice expressed by an entailment relation on typings. Then, we provide a sucient condition on such entailment to ensure soundness and completeness of compositional compilation, and compare this condition with the principal typings property. Furthermore, we show that this entailment relation can often be modularly expressed by an entailment relation on type environments and a subtyping relation. We illustrate the generality of our approach by instantiating the framework on three main examples: simply typed lambda calculus, where the problem of compositional compilation reduces to compositional type inference; Featherweight Java, where the generated binary code depends on the compilation context; and an extension of Featherweight Java with a boxing/unboxing mechanism, to illustrate how the framework can also support more sophisticated forms of linking-time binary code specialization.","PeriodicalId":212849,"journal":{"name":"Italian Conference on Theoretical Computer Science","volume":"7 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2007-09-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Italian Conference on Theoretical Computer Science","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1142/9789812770998_0013","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

Abstract

We define a general framework for compositional compilation, meant as the ability of building an executable application by separate compilation and linking of single fragments, opposed to global compilation of the complete source application code. More precisely, compilation of a source code fragment in isolation generates a corresponding binary fragment equipped with type information, formally modeled as a typing, allowing type safe linking of fragments without re-inspecting code. We formally define a notion of soundness and completeness of compositional compilation w.r.t. global compilation, and show how linking can be in practice expressed by an entailment relation on typings. Then, we provide a sucient condition on such entailment to ensure soundness and completeness of compositional compilation, and compare this condition with the principal typings property. Furthermore, we show that this entailment relation can often be modularly expressed by an entailment relation on type environments and a subtyping relation. We illustrate the generality of our approach by instantiating the framework on three main examples: simply typed lambda calculus, where the problem of compositional compilation reduces to compositional type inference; Featherweight Java, where the generated binary code depends on the compilation context; and an extension of Featherweight Java with a boxing/unboxing mechanism, to illustrate how the framework can also support more sophisticated forms of linking-time binary code specialization.
查看原文
分享 分享
微信好友 朋友圈 QQ好友 复制链接
本刊更多论文
用于组合编译的正式框架
我们为组合编译定义了一个通用框架,这意味着通过单独编译和链接单个片段来构建可执行应用程序的能力,而不是对完整的应用程序源代码进行全局编译。更准确地说,孤立地编译源代码片段会生成相应的带有类型信息的二进制片段,正式建模为类型,允许片段的类型安全链接,而无需重新检查代码。我们正式定义了组合编译(而非全局编译)的可靠性和完整性的概念,并展示了链接在实践中如何通过类型上的蕴涵关系来表达。在此基础上,给出了保证组合编译的完整性和健全性的必要条件,并将此条件与主要类型属性进行了比较。此外,我们还证明了这种蕴涵关系通常可以通过类型环境上的蕴涵关系和子类型关系来模块化地表达。我们通过在三个主要示例上实例化框架来说明我们方法的通用性:简单类型lambda演算,其中组合编译问题减少为组合类型推断;轻量级Java,其中生成的二进制代码取决于编译上下文;以及对轻量级Java的扩展,该扩展具有装箱/拆箱机制,以说明该框架如何支持更复杂的链接时二进制代码专门化形式。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 去求助
来源期刊
自引率
0.00%
发文量
0
期刊最新文献
Uniform Circle Formation for Fully Semi-, and Asynchronous Opaque Robots with Lights On the Parametrized Complexity of the s-Club Cluster Edge Deletion Problem On the Domination Number of t-Constrained de Bruijn Graphs Tracing and Preventing Sharing and Mutation System Analysis and Robustness
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
现在去查看 取消
×
提示
确定
0
微信
客服QQ
Book学术公众号 扫码关注我们
反馈
×
意见反馈
请填写您的意见或建议
请填写您的手机或邮箱
已复制链接
已复制链接
快去分享给好友吧!
我知道了
×
扫码分享
扫码分享
Book学术官方微信
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术
文献互助 智能选刊 最新文献 互助须知 联系我们:info@booksci.cn
Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。
Copyright © 2023 Book学术 All rights reserved.
ghs 京公网安备 11010802042870号 京ICP备2023020795号-1