ASDL在lcc中的早期经验
Early Experience with ASDL in lcc
摘要:
抽象数据描述语言(ASDL)是一种用于指定在编译器中间表示中经常发现的树数据结构的语言。ASDL生成器读取ASDL规范并生成代码来构造、读取和写入指定树的实例。使用ASDL允许编译器被分解为通过读写树进行通信的半独立组件。每个组件都可以用不同的语言编写,因为ASDL生成器可以用多种语言生成代码,并且由ASDL生成的代码编写的文件与机器和语言无关。ASDL是国家编译器基础设施项目的一部分,该项目旨在通过使构建高质量的编译器变得更加容易来大幅减少计算机系统研究的开销。本文介绍了划分lcc,一个广泛使用的可重定向的C编译器,分为两个组件,通过ASDL中定义的树进行通信。作为第一次使用ASDL在一个“真正的”编译器,这个经验揭示了很多关于改造现有的编译器使用ASDL所需的努力,所涉及的开销,以及ASDL本身的优点和缺点,其次,lcc。
英文摘要:
The Abstract Syntax Description Language (ASDL) is a language for specifying the tree data structures often found in compiler intermediate representations. The ASDL generator reads an ASDL specification and generates code to construct, read, and write instances of the trees specified. Using ASDL permits a compiler to be decomposed into semi-independent components that communicate by reading and writing trees. Each component can be written in a different language, because the ASDL generator can emit code in several languages, and the files written by ASDL-generated code are machine- and language-independent. ASDL is part of the National Compiler Infrastructure project, which seeks to reduce dramatically the overhead of computer systems research by making it much easier to build high-quality compilers. This paper describes dividing lcc, a widely used retargetable C compiler, into two components that communicate via trees defined in ASDL. As the first use of ASDL in a `real' compiler, this experience reveals much about the effort required to retrofit an existing compiler to use ASDL, the overheads involved, and the strengths and weaknesses of ASDL itself and, secondarily, of lcc.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。