C++ Program Static Analyzer Based on Element Relation Model
-
摘要: 分析了面向对象软件测试和度量的特点,结合面向对象程序的性质提出了描述程序基本组成元素之间关系的基元关系模型(ERM),介绍了从基于MFC(Microsoft Foundation Class)的Visual C+ +6.0源程序中构造ERM模型的算法,据此构造了一个基于基元关系模型的VC+ +6.0程序静态分析器.对分析器实现中采取的名称空间符号表、增量式开发和增量式分析等关键技术进行了介绍.实践证明,该分析器可以高效正确地提取出模型中描述的各种关系,有助于面向对象软件测试和度量方面的进一步研究.Abstract: On the need of the Object-Oriented (OO) testing and measurement, and even OO program compiler construction, to analyze the elements in OO programs becomes an important task. The ERM (Element Relation Model) is presented here, on which a static analyzer was constructed for better OO testing and measurement effectiveness and efficiency. Based on ERM and MFC (Microsoft Foundation Class) a VC+ + 6.0 program analyzer is introduced here to depict how ERM can help test and measure OO software. Furthermore, the paper introduces some primarily concerned key technologies on constructing OO program analyzer, even OO compiler, such as how to structure the symbol table by namespace, how to incrementally extract ERM from OO programs. The static analyzer has proved the efficiency and correctness of the ERM. And at the same time it proved ERM would be helpful in OO testing and OO measurement practice and research.
-
[1] Binder R V. Object-oriented software testing[J]. CACM, 1994,37(9):28~29. [2] McGregor J D, Korson T D. Integrated object-oriented testing and development processes[J]. CACM, 1994,37(9):59~77. [3] 普瑞斯曼.软件工程——实践者的研究方法[M].黄柏素等译. 北京:机械工业出版社,1999. [4] Berard E V. Metrics for object-oriented software engineering . http://www.toa.com/pub/moose.htm,1995-01-28. [5] 高仲仪,金茂忠.编译原理及编译程序构造[M]. 北京:北京航空航天大学出版社,1990. [6] Microsoft公司.Microsoft Visual C+ + 6.0 language reference,语言参考手册[M].希望图书创作室译. 北京:北京希望电子出版社,1999.
点击查看大图
计量
- 文章访问数: 2552
- HTML全文浏览量: 21
- PDF下载量: 1350
- 被引次数: 0