节点文献

基于数据库模式的数据流图逆向恢复技术研究

【作者】 吴浩

【导师】 赵文耘;

【作者基本信息】 复旦大学 , 计算机软件与理论, 2008, 硕士

【摘要】 在软件系统的生命周期中,70%的时间和代价花费在软件维护上。以数据为中心的遗产系统,如商业信息系统,通常依赖于大量的数据库表(数据文件)。对这类系统进行维护和更新,是一个复杂的,高代价的过程。在没有理解(商业)系统的数据语义的情况下,要理解系统程序几乎是不可能完成的。另一方面,遗产系统中数据库模式和其中数据的语义信息通常易于获得,而对系统模块功能进行描述的数据流图则经常缺失。因此,恢复程序中数据的语义信息和系统的数据流图是对数据密集型遗产系统进行维护的重要要求。目前的软件逆向工程主要关注于代码的逆向工程,以理解程序的模块的功能;对数据逆向工程的研究则集中于数据库领域,偏重于对数据库表内部和表间关系和约束的恢复。程序中的数据资产和数据文件中的数据资产被区别对待。针对这些问题,本文结合数据库数据和代码逆向工程方法,从数据库模式出发,提出了一种恢复遗产系统源代码中数据语义,并生成系统分层数据流图的方法。该方法首先从数据库定义文件中获取数据库字段的语义信息,通过对源代码中与数据库交互的代码片断进行分析,利用系统依赖图和字符串静态计算方法,发现程序中变量和数据库中表字段间的对应关系。然后,通过变量和上下文的数据依赖关系,将数据库定义中的语义信息在程序中进行传递。在获得的系统方法(函数)和数据文件之间的底层数据流图的基础上,本文提出了结合数据库依赖和系统调用图信息的新的聚类标准,并通过聚类分析、合并低层数据流获得系统的分层数据流图。通过本文的方法,对遗产系统进行分析,将增加程序中属性或变量的语义信息,结合产生的数据流图,易于进行特征定位和程序理解。

【Abstract】 Software maintenance typically represents 70%of the cost during the life cycle of a system.Legacy information systems,i.e.,data-intensive applications such as business systems,based on hundreds or thousands of data files(or database tables), significantly resist modifications and changes.In such systems,it is impossible to understand a program until the main(business) data meanings have been fully understood.Generally,database data model in legacy systems are easy to get while data flow graphs that modeling the systems modular input,output and functions are missed.Therefore,recovering the data semantics in programs and data flow graphs of the system is the urgent requirement for the maintenance of data-intensive applications.Most of the current studies in software reverse engineering focus on program reverse engineering ignoring data from external files,while the researches of date reverse engineering are limited in database domain.Data assets in programs and data assets in data files are separately treated.To solve these problems mentioned above,this paper, based on the database scheme files,considering both database information and program reverse engineering techniques,proposes a method to determine the meaning of data in programs and generate the system hierarchical data flow graphs.The method first gets the semantics of data in database from database scheme,and then explores the code snippets that interact with DBMS to find the direct or indirect mapping of the program variable and the database columns utilizing the system dependency graph and string expression analysis technique.And then data semantics are assigned or transmitted according to the dependence relationships of the variables in the context.After obtaining the bottom data flow in methods(functions),this paper proposes a new criterion to cluster the modules based on the database dependencies and system call graph information.Then some clustering work is done to get layered data flow graph using this criterion.With this method,meanings of data asset in program increased,together with system data flow graph,feature location and program understanding become easy.

  • 【网络出版投稿人】 复旦大学
  • 【网络出版年期】2009年 03期
节点文献中: 

本文链接的文献网络图示:

本文的引文网络