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. 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.
翻译:《摩尔法》的结束带来了数十年来从未见过的多种硬件。操作系统(和系统软件)的可移植性因此变得越来越重要。与此同时,在程序合成方面已经取得了巨大的进展。我们开始探索使用现代程序合成的可行性,以产生操作系统的机器依赖部分。我们的最终目标是通过对新机器的描述自动生成新的港口。所涉及的问题之一是为依赖机器的操作系统功能和教学设置结构编写规格。我们设计了两种具体领域的语言:操作系统(和系统软件)的操作系统功能的机器依赖性规格的Aleifie和描述指令设置结构语义的Cassiopea。自动化移植也需要实施。我们开发了一个工具链,根据Alefife规格和Cassiopea机器描述,将机器自成新港口的规格自动生成新港口。使用这种方法,我们成功地综合了四个实际硬件平台的两套前操作系统总共140个操作系统组件。我们还开发了几套系统自动化的自动移植方法,用于说明系统合成合成系统的能力合成流程,从而改进了我们系统合成系统综合系统的能力合成码。