首页> 外文期刊>Software >Serializing C intermediate representations for efficient and portable parsing
【24h】

Serializing C intermediate representations for efficient and portable parsing

机译:序列化C中间表示以进行有效且可移植的解析

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

摘要

C static analysis tools often use intermediate representations (IRs) that organize program data in a simple, well-structured manner. However, the C parsers that create IRs are slow, and because they are difficult to write, only a few implementations exist, limiting the languages in which a C static analysis can be written. To solve these problems, we investigate two language-independent, on-disk representations of C IRs: one using XML and the other using an Internet standard binary encoding called eXternal Data Representation (XDR). We benchmark the parsing speeds of both options, finding the XML to be about a factor of 2 slower than parsing C and the XDR over 6 times faster. Furthermore, we show that the XML files are far too large at 19 times the size of C source code, whereas XDR is only 2.2 times the C size. We also demonstrate the portability of our XDR system by presenting a C source code querying tool in Ruby. Our solution and the insights we gained from building it will be useful to analysis authors and other clients of C IRs.
机译:C静态分析工具通常使用中间表示(IR),这些中间表示以简单,结构良好的方式组织程序数据。但是,创建IR的C解析器很慢,并且由于难以编写,因此仅存在几种实现方式,从而限制了可以编写C静态分析的语言。为了解决这些问题,我们研究了C IR的两种独立于语言的磁盘表示形式:一种使用XML,另一种使用称为eXternal Data Representation(XDR)的Internet标准二进制编码。我们对这两个选项的解析速度进行了基准测试,发现XML比解析C和XDR慢约2倍,快了6倍。此外,我们显示XML文件太大,其大小是C源代码的19倍,而XDR仅是C源代码的2.2倍。我们还通过在Ruby中提供一个C源代码查询工具来演示XDR系统的可移植性。我们的解决方案以及从构建该解决方案中获得的见解将对分析CIR的作者和其他客户很有用。

著录项

  • 来源
    《Software》 |2010年第3期|225-238|共14页
  • 作者单位

    Department of Computer Science and Engineering, University of California, San Diego, CA 92093, U.S.A.;

    Department of Computer Science, University of Maryland, College Park, MD 20742, U.S.A.;

    Department of Computer Science, University of Maryland, College Park, MD 20742, U.S.A.;

  • 收录信息 美国《科学引文索引》(SCI);美国《工程索引》(EI);
  • 原文格式 PDF
  • 正文语种 eng
  • 中图分类
  • 关键词

    C; static analysis; intermediate representations; parsing; XML; XDR;

    机译:C;静态分析;中间表示;解析XML;XDR;
  • 入库时间 2022-08-17 13:03:51

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号