期刊文献+

用抽象语法链表示C程序中的表达式

Representing the express in the C program with abstract syntax link list
下载PDF
导出
摘要 因为缺少解释器,对程序进行自动分析和测试领域中有很多问题难以解决.设计解释器的一个核心问题是如何表示表达式,使其既便于人工检查也便于计算机自动生成和解释执行表达式.传统的表示方式主要针对编译器进行设计,不适合解释器.为此,综合运算符的特性和常见表示方法的优缺点,提出用抽象语法链EOE*表示表达式,给出了相应的提取和解释执行算法,并成功应用于本项目组开发的解释器中. Because of lacking interpreter,many problems are difficult to be solved in the fields of analyzing and testing program automatically.As designing interpreter,one of the core problems is representing and interpreting the express in an adequate manner.With it,we hope that the programs could be checked easily by people or by computer,and the relative algorithms of being created and interpreted could be simple.But most of the classical represent methods of intermediate code are more suitable for compiler and not for interpreter.After discussing the features of the operators and the shortcoming of the classical represent methods,this paper presents that using abstract syntax link list(or EOE* for short) to represent the express.And then we describe the algorithms for fetching and calculating EOE*.We have realized it in our interpreter successfully.
出处 《天津理工大学学报》 2011年第4期59-63,共5页 Journal of Tianjin University of Technology
基金 天津理工大学教学基金(YB08-17)
关键词 解释器 抽象语法链 表达式的表示 表达式的解释执行 interpreter abstract syntax link list represent the express interpret the express
  • 相关文献

参考文献14

  • 1Kenneth C. Louden. Compiler construction principles and practice[M].北京:机械工业出版社,2002.
  • 2蒋立源,康慕宁.编译原理[M].2版.西安:西北工业大学出版社,2001.
  • 3金成植,金英.编译程序设计原理[M].2版.北京:高等教育出版社,2007.
  • 4赵彦博.基于抽象语法树的程序代码抄袭检测技术研究[D].内蒙古:内蒙古师范大学,2010.
  • 5高传平,谈利群,宫云战.基于抽象语法树的代码静态自动测试方法研究[J].北京化工大学学报(自然科学版),2007,34(A01):25-29. 被引量:10
  • 6徐明昌,刘坚.基于抽象语法树的数组越界的静态检测方法[J].计算机工程,2006,32(1):108-109. 被引量:2
  • 7Christopher A Welty. Augmenting abstract syntax trees for program understanding [ EB/OL]. (2002 - 08 - 06 ) [ 2011 - 06 - 09 ] http ://ieeexplore. ieee. org/stamp/stamp, jsp? tp = &arnumber -- 632832.
  • 8Baojiang Cui, Jiansong Li, Tao Guo, et al. Code compari- son system based on abstract syntax tree[ EB/OL]. (2011 - 01 - 31 ) [ 2011 - 06 - 09 ]//http ://ieeexplore. ieee. org/stamp/stamp, jsp? tp = &arnumber =5705174.
  • 9Shizhong Wu, Yongle Hao, Xinyu Gao, et al. Homology detection based on abstract syntax tree combined simple semantics analysis[ EB/OL]. (2010 - 11 - 01 ) [ 2011 - 06- 09 ] http://ieeexplore, ieee. org/stamp/stamp, jsp? tp = &arr,mbe = 5614410.
  • 10李鑫,王甜甜,苏小红,马培军.消除GCC抽象语法树文本中冗余信息的算法研究[J].计算机科学,2008,35(10):170-172. 被引量:8

二级参考文献11

  • 1刘文伟,刘坚.一个重建GCC抽象语法树的方法[J].计算机工程与应用,2004,40(18):125-128. 被引量:7
  • 2王相懂,张毅坤.基于GCC的抽象语法树对C++源程序结构的分析[J].计算机工程与应用,2006,42(23):97-99. 被引量:8
  • 3Power J F. Program annotation in XML: a parse-tree based approach[C]//Proceedings of the Ninth Working Conference on Reverse Engineering. 2002 : 1095-1350
  • 4Antoniol G. XML-Oriented gcc AST Analysis and Transformations[C]//Proceedings of the Third IEEE International Workshop on Source Code Analysis and Manipulation. 2005,7:869- 901
  • 5AhoAV SethiR UllmanJD.编译康理、技术与工具(英文版)[M].北京:人民邮电出版社,2002.279-284.
  • 6Evans D. Splint Manual]M]. http://www.splint.org/manual, 2003.
  • 7Dor N, Rodeh M, Sagiv M. Cleanness Checking of String Manipulations in C Programs via Integer Analysis[C]. Proceedings of the 8^th Symposium on Static Analysis, 2001-07.
  • 8Gcc Command Options[EB/OL]: http:llgcc.gnu.org/onlinedocs/gcc_3.0.4/gcc_3.html.
  • 9AHO A V,SETHI R,ULLMAN J D.Compilers principles,techniques,and tools[M].America:Addison Wesley,1986.
  • 10石峰,刘坚.一种解析GCC抽象语法树的方法[J].计算机应用,2004,24(3):115-116. 被引量:8

共引文献24

相关作者

内容加载中请稍等...

相关机构

内容加载中请稍等...

相关主题

内容加载中请稍等...

浏览历史

内容加载中请稍等...
;
使用帮助 返回顶部