Homeostasis: Design and Implementation of a Self-Stabilizing Compiler

IF 1.5 2区 计算机科学 Q3 COMPUTER SCIENCE, SOFTWARE ENGINEERING ACM Transactions on Programming Languages and Systems Pub Date : 2024-02-23 DOI:10.1145/3649308
Aman Nougrahiya, V. Krishna Nandivada
{"title":"Homeostasis: Design and Implementation of a Self-Stabilizing Compiler","authors":"Aman Nougrahiya, V. Krishna Nandivada","doi":"10.1145/3649308","DOIUrl":null,"url":null,"abstract":"<p>Mainstream compilers perform a multitude of analyses and optimizations on the given input program. Each analysis (such as points-to analysis) may generate a <i>program-abstraction</i> (such as points-to graph). Each optimization is typically composed of multiple alternating phases of <i>inspection</i> of such program-abstractions and <i>transformations</i>\nof the program. Upon transformation of a program, the program-abstractions generated by various analyses may become inconsistent with the modified program. Consequently, the correctness of the downstream inspection (and consequent transformation) phases cannot be ensured until the relevant program-abstractions are <i>stabilized</i>; that is, the program-abstractions are either invalidated or made consistent with the modified program. In general, the existing compiler frameworks do not perform automated stabilization of the program-abstractions and instead leave it to the compiler pass writers to deal with the complex task of identifying the relevant program-abstractions to be stabilized, the points where the stabilization is to be performed, and the exact procedure of stabilization. In this paper, we address these challenges by providing the design and implementation of a novel compiler-design framework called <i>Homeostasis</i>. </p><p><i>Homeostasis</i> automatically captures all the program changes performed by each transformation phase, and later, triggers the required stabilization using the captured information, if needed. We also provide a formal description of <i>Homeostasis</i>\nand a correctness proof thereof. To assess the feasibility of using <i>Homeostasis</i> in compilers of parallel programs, we have implemented our proposed idea in IMOP, a compiler framework for OpenMP C programs. Further, to illustrate the benefits of using <i>Homeostasis</i>, we have implemented a set of standard data-flow passes, and a set of involved optimizations that are used to remove redundant barriers in OpenMP C programs. Implementations of none of these optimizations in IMOP required any additional lines of code for stabilization of the program-abstractions. We present an evaluation in the context of these optimizations and analyses, which demonstrates that <i>Homeostasis</i> is efficient and easy to use.</p>","PeriodicalId":50939,"journal":{"name":"ACM Transactions on Programming Languages and Systems","volume":"31 1","pages":""},"PeriodicalIF":1.5000,"publicationDate":"2024-02-23","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"ACM Transactions on Programming Languages and Systems","FirstCategoryId":"94","ListUrlMain":"https://doi.org/10.1145/3649308","RegionNum":2,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q3","JCRName":"COMPUTER SCIENCE, SOFTWARE ENGINEERING","Score":null,"Total":0}
引用次数: 0

Abstract

Mainstream compilers perform a multitude of analyses and optimizations on the given input program. Each analysis (such as points-to analysis) may generate a program-abstraction (such as points-to graph). Each optimization is typically composed of multiple alternating phases of inspection of such program-abstractions and transformations of the program. Upon transformation of a program, the program-abstractions generated by various analyses may become inconsistent with the modified program. Consequently, the correctness of the downstream inspection (and consequent transformation) phases cannot be ensured until the relevant program-abstractions are stabilized; that is, the program-abstractions are either invalidated or made consistent with the modified program. In general, the existing compiler frameworks do not perform automated stabilization of the program-abstractions and instead leave it to the compiler pass writers to deal with the complex task of identifying the relevant program-abstractions to be stabilized, the points where the stabilization is to be performed, and the exact procedure of stabilization. In this paper, we address these challenges by providing the design and implementation of a novel compiler-design framework called Homeostasis.

Homeostasis automatically captures all the program changes performed by each transformation phase, and later, triggers the required stabilization using the captured information, if needed. We also provide a formal description of Homeostasis and a correctness proof thereof. To assess the feasibility of using Homeostasis in compilers of parallel programs, we have implemented our proposed idea in IMOP, a compiler framework for OpenMP C programs. Further, to illustrate the benefits of using Homeostasis, we have implemented a set of standard data-flow passes, and a set of involved optimizations that are used to remove redundant barriers in OpenMP C programs. Implementations of none of these optimizations in IMOP required any additional lines of code for stabilization of the program-abstractions. We present an evaluation in the context of these optimizations and analyses, which demonstrates that Homeostasis is efficient and easy to use.

查看原文
分享 分享
微信好友 朋友圈 QQ好友 复制链接
本刊更多论文
稳态:自稳定编译器的设计与实现
主流编译器会对给定的输入程序进行大量分析和优化。每项分析(如点到分析)都可能产生一个程序抽象(如点到图)。每次优化通常由多个交替阶段组成,即检查此类程序抽象和转换程序。程序转换时,各种分析生成的程序抽象可能会与修改后的程序不一致。因此,在相关程序抽象稳定之前,下游检查(以及随后的转换)阶段的正确性无法得到保证;也就是说,程序抽象要么失效,要么与修改后的程序保持一致。一般来说,现有的编译器框架并不自动执行程序抽象的稳定化,而是让编译器通证编写者来处理复杂的任务,即确定需要稳定化的相关程序抽象、需要执行稳定化的点以及稳定化的确切过程。在本文中,我们通过设计和实现一种名为 "Homeostasis "的新型编译器设计框架来应对这些挑战。Homeostasis 可自动捕获每个转换阶段执行的所有程序更改,并在需要时利用捕获的信息触发所需的稳定化。我们还提供了 Homeostasis 的形式描述及其正确性证明。为了评估在并行程序编译器中使用 "同态 "的可行性,我们在 IMOP 中实现了我们提出的想法,IMOP 是一个用于 OpenMP C 程序的编译器框架。此外,为了说明使用 "同态 "的好处,我们实施了一组标准数据流传递和一组用于消除 OpenMP C 程序中冗余障碍的相关优化。在 IMOP 中实现这些优化都不需要额外的代码行来稳定程序抽象。我们结合这些优化和分析进行了评估,结果表明 Homeostasis 高效且易于使用。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 去求助
来源期刊
ACM Transactions on Programming Languages and Systems
ACM Transactions on Programming Languages and Systems 工程技术-计算机:软件工程
CiteScore
3.10
自引率
7.70%
发文量
28
审稿时长
>12 weeks
期刊介绍: ACM Transactions on Programming Languages and Systems (TOPLAS) is the premier journal for reporting recent research advances in the areas of programming languages, and systems to assist the task of programming. Papers can be either theoretical or experimental in style, but in either case, they must contain innovative and novel content that advances the state of the art of programming languages and systems. We also invite strictly experimental papers that compare existing approaches, as well as tutorial and survey papers. The scope of TOPLAS includes, but is not limited to, the following subjects: language design for sequential and parallel programming programming language implementation programming language semantics compilers and interpreters runtime systems for program execution storage allocation and garbage collection languages and methods for writing program specifications languages and methods for secure and reliable programs testing and verification of programs
期刊最新文献
Proving Correctness of Parallel Implementations of Transition System Models CFLOBDDs: Context-Free-Language Ordered Binary Decision Diagrams Adversities in Abstract Interpretation: Accommodating Robustness by Abstract Interpretation: ACM Transactions on Programming Languages and Systems: Vol 0, No ja Homeostasis: Design and Implementation of a Self-Stabilizing Compiler Locally Abstract, Globally Concrete Semantics of Concurrent Programming Languages
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
现在去查看 取消
×
提示
确定
0
微信
客服QQ
Book学术公众号 扫码关注我们
反馈
×
意见反馈
请填写您的意见或建议
请填写您的手机或邮箱
已复制链接
已复制链接
快去分享给好友吧!
我知道了
×
扫码分享
扫码分享
Book学术官方微信
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术
文献互助 智能选刊 最新文献 互助须知 联系我们:info@booksci.cn
Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。
Copyright © 2023 Book学术 All rights reserved.
ghs 京公网安备 11010802042870号 京ICP备2023020795号-1