论文标题

使用程序合成来移植操作系统

Towards Porting Operating Systems with Program Synthesis

论文作者

Hu, Jingmei, Lu, Eric, Holland, David A., Kawaguchi, Ming, Chong, Stephen, Seltzer, Margo I.

论文摘要

摩尔定律的终结已经迎来了几十年来未见的多种硬件。因此,操作系统(和系统软件)可移植性正变得越来越重要。同时,程序合成取得了巨大进展。我们着手探索使用现代程序合成来生成操作系统的机器依赖部分的可行性。我们的最终目标是从新机器的描述中自动生成新端口。涉及的问题之一是编写规格,包括机器依赖性操作系统功能和指令集体系结构。我们设计了两种特定于域的语言:用于机器依赖性操作系统功能的机器独立规范和Cassiopea的Alewife,以描述指令集体系结构语义。自动移植还需要实现。我们开发了一个工具链,鉴于Alewife规范和Cassiopea机器描述,它专门针对目标指令集架构的机器独立于规范,并使用自定义的符号执行引擎合成汇编语言的实现。使用这种方法,我们证明了来自两个实际硬件平台的两个预先存在的OSS的140个OS组件成功合成了140个OS组件。我们还开发了几种与OS相关组合合成的优化方法,以提高可伸缩性。我们的语言的有效性和为所有140条规范合成代码的能力是程序合成对机器依赖性OS代码的可行性的证据。但是,仍然存在许多研究挑战。我们还讨论了基于合成的自动化OS移植方法的好处和局限性。

The end of Moore's Law has ushered in a diversity of hardware not seen in decades. Operating system (and system software) portability is accordingly becoming increasingly critical. Simultaneously, there has been tremendous progress in program synthesis. We set out to explore the feasibility of using modern program synthesis to generate the machine-dependent parts of an operating system. Our ultimate goal is to generate new ports automatically from descriptions of new machines. One of the issues involved is writing specifications, both for machine-dependent operating system functionality and for instruction set architectures. We designed two domain-specific languages: Alewife for machine-independent specifications of machine-dependent operating system functionality and Cassiopea for describing instruction set architecture semantics. Automated porting also requires an implementation. We developed a toolchain that, given an Alewife specification and a Cassiopea machine description, specializes the machine-independent specification to the target instruction set architecture and synthesizes an implementation in assembly language with a customized symbolic execution engine. Using this approach, we demonstrate successful synthesis of a total of 140 OS components from two pre-existing OSes for four real hardware platforms. We also developed several optimization methods for OS-related assembly synthesis to improve scalability. The effectiveness of our languages and ability to synthesize code for all 140 specifications is evidence of the feasibility of program synthesis for machine-dependent OS code. However, many research challenges remain; we also discuss the benefits and limitations of our synthesis-based approach to automated OS porting.

扫码加入交流群

加入微信交流群

微信交流群二维码

扫码加入学术交流群,获取更多资源