首页> 外文会议>Compiler Construction >Automatic Transformation of Bit-Level C Code to Support Multiple Equivalent Data Layouts
【24h】

Automatic Transformation of Bit-Level C Code to Support Multiple Equivalent Data Layouts

机译:自动转换位级C代码以支持多种等效数据布局

获取原文
获取原文并翻译 | 示例

摘要

Portable low-level C programs must often support multiple equivalent in-memory layouts of data, due to the byte or bit order of the compiler, architecture, or external data formats. Code that makes assumptions about data layout often consists of multiple highly similar pieces of code, each designed to handle a different layout. Writing and maintaining this code is difficult and bug-prone: Because the differences among data layouts are subtle, implicit, and inherently low-level, it is difficult to understand or change the highly similar pieces of code consistently. We have developed a small extension for C that lets programmers write concise declarative descriptions of how different layouts of the same data relate to each other. Programmers then write code assuming only one layout and rely on our translation to generate code for the others. In this work, we describe our declarative language for specifying data layouts, how we perform the automatic translation of C code to equivalent code assuming a different layout, and our success in applying our approach to simplify the code base of some widely available software.
机译:由于编译器的字节或位顺序,体系结构或外部数据格式,可移植的底层C程序通常必须支持多个等效的内存中数据布局。假设数据布局的代码通常由多个高度相似的代码段组成,每个代码段旨在处理不同的布局。编写和维护此代码非常困难且容易出错:由于数据布局之间的差异是微妙的,隐式的,并且本质上是低级的,因此很难一致地理解或更改高度相似的代码。我们为C开发了一个小扩展,使程序员可以编写简洁的声明性描述,以说明同一数据的不同布局如何相互关联。然后,程序员仅假设一种布局编写代码,然后依靠我们的翻译为其他布局生成代码。在这项工作中,我们描述了用于指定数据布局的声明性语言,如何在假定布局不同的情况下将C代码自动转换为等效代码以及如何成功地采用我们的方法来简化一些广泛使用的软件的代码库。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号