用于组合编译的正式框架

D. Ancona, E. Zucca
{"title":"用于组合编译的正式框架","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":"{\"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}","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

摘要

我们为组合编译定义了一个通用框架,这意味着通过单独编译和链接单个片段来构建可执行应用程序的能力,而不是对完整的应用程序源代码进行全局编译。更准确地说,孤立地编译源代码片段会生成相应的带有类型信息的二进制片段,正式建模为类型,允许片段的类型安全链接,而无需重新检查代码。我们正式定义了组合编译(而非全局编译)的可靠性和完整性的概念,并展示了链接在实践中如何通过类型上的蕴涵关系来表达。在此基础上,给出了保证组合编译的完整性和健全性的必要条件,并将此条件与主要类型属性进行了比较。此外,我们还证明了这种蕴涵关系通常可以通过类型环境上的蕴涵关系和子类型关系来模块化地表达。我们通过在三个主要示例上实例化框架来说明我们方法的通用性:简单类型lambda演算,其中组合编译问题减少为组合类型推断;轻量级Java,其中生成的二进制代码取决于编译上下文;以及对轻量级Java的扩展,该扩展具有装箱/拆箱机制,以说明该框架如何支持更复杂的链接时二进制代码专门化形式。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
A formal framework for compositional compilation
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.
求助全文
通过发布文献求助,成功后即可免费获取论文全文。 去求助
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术官方微信