This paper mainly discusses the design and implementation of a program slicing system based on c - similar language ( later referred as csl ) : a language defined by myself and has described the design and implementation of a complete static program slicing system 本文以一种自定义的结构化语言-类c语言( c - similarlanguage ,简称csl )为例,描述了一个完整的静态程序分片系统的设计与实现过程。
The first part : according to the treatment range of the slicing technique in the paper , applying compiling technique , define the grammar of csl language and implement its lexical analysis and syntactical analysis manually , and obtain the ast of the source program of csl 本文在编译技术、图论和程序分片理论的基础上,探讨了程序静态分片技术的实现策略,介绍了一种整体实现方案,是关于结构化语言静态程序分片系统实现的一种尝试。
Program slicing is an important technique to analyze and understand programs . a program slice s is composed of a set of statements in program p which can influence the value of a variables named v at a special program point n , in which ( n , v ) is named as slicing criterion 程序分片是一种重要的程序分析理解方法,用于从源程序中抽取对程序中特定点上的特定变量有影响的语句和控制条件,组成新的程序(称作分片) ,然后通过分析分片来分析源程序的行为。
Since the concept of program slicing is proposed , it is widely concerned by software researchers and development staffs and is widely applied in the fields of software testing , debugging , measuring , maintenance , xml information extraction , reverse engineering and re - engineering , etc . 自从程序分片概念被提出以后,受到很多研究人员和软件开发人员的关注,使得它在软件测试、调试、度量、维护、程序变换、 xml信息抽取、软件逆向工程与再工程等方面得到广泛应用。
The following works have been done : ( 1 ) define csl language and complete the lexical analysis and syntactical analysis of it ; ( 2 ) obtain control flow graph ( later referred as cfg ) from abstract syntax tree ( ast ) ; ( 3 ) control dependence analysis of csl ; ( 4 ) system architecture of csl slicing system 内容包括通过语法分析获得源程序的抽象语法树,从抽象语法树构造控制流图,在控制流图上做控制流分析获得源程序的控制依赖关系,在控制流图上做数据流分析获得源程序的数据依赖关系,以及最后获得源程序的程序依赖图并以图可达性算法获得程序分片的全过程。
程序: procedure程序分部: proce departmentalization; process departmentalization程序分段: program segmentation; program segmenting; segmentation程序分工: division of process程序分解: program decomposition程序分块: deblocking程序分类: class of procedures程序分配: program allocation程序分析: analysis of program; procedur analysis; procedure analysis; process analysis; program analysis (computer science); programanalysis程序分析器: program analyzer程序分析师: program analyst程序分析图: procedure analysis chart程序分析员: analyst programmer; program analyst; programmer analyst程序分枝: program branching程序分支: program derivation程序分组: program packet分程序分析: block analysis源程序分析: analysis of the source program子程序分配: subroutine allocation程序分析程序: program analyzer程序分析程序, 程序分析器: program analyzer程序分层模型: hierarchical model of program程序分层设计: hierarchical design of program程序分层图解: program hierarchy chart程序分段模块: programming language cobol segmentation modulee