支持多程序语言的静态信息提取方法
CSTR:
作者:
作者单位:

作者简介:

通讯作者:

中图分类号:

TP311.11

基金项目:

国家自然科学基金资助项目(60673035);高等学校博士学科点专项科研基金资助项目(20092302110040)


Retrieval method of static code information for multi-language
Author:
Affiliation:

Fund Project:

  • 摘要
  • |
  • 图/表
  • |
  • 访问统计
  • |
  • 参考文献
  • |
  • 相似文献
  • |
  • 引证文献
  • |
  • 资源附件
  • |
  • 文章评论
    摘要:

    为了满足代码分析对多语言静态信息提取的需求,克服当前构建单语言提取重用率低、过程复杂等不足,采用直接修改GCC特定解析阶段源代码的方法建立统一的提取接口.针对所需静态信息的不同,按GCC内部机制,提出了运行改入点与内部辅助函数重用相结合的提取方法,具体包括类型和函数声明信息的采集、函数体内程序语句的遍历以及多语言统一中间表示的获取,重用了GCC内部高质量代码,从而降低了构建静态信息提取所需的重复开销.通过对比试验表明该方法程序语言解析能力稳定健壮且效率高,能够直接提取大型开源程序的静态信息.

    Abstract:

    There are many requirements for the multilanguage static information retrieval,and it is wasteful and complex to build specific front end for each language.So to meet the need and conquer the weakness we present a method based on GCC source code change to provide a uniform interface for retrieval.According to the static information type and the GCC inside mechanism,this method integrates the specific hook point with the GCC’s internal functions to gather the needed.The details to be collected include: the type and function declaration,the statements traverse and the uniform multilanguage middle-representation.The reusability of this method reduces the duplicated cost of the construction for each language.The comparison experiments shows that this method can efficiently and robustly parse multilanguage and be directly applied to large-scale open source code to retrieve the static information.

    参考文献
    相似文献
    引证文献
引用本文

逄龙,王甜甜,苏小红,马培军.支持多程序语言的静态信息提取方法[J].哈尔滨工业大学学报,2011,43(3):62. DOI:10.11918/j. issn.0367-6234.2011.03.013

复制
相关视频

分享
文章指标
  • 点击次数:
  • 下载次数:
  • HTML阅读次数:
  • 引用次数:
历史
  • 收稿日期:
  • 最后修改日期:
  • 录用日期:
  • 在线发布日期: 2012-04-26
  • 出版日期:
文章二维码