Computer Science ›› 2015, Vol. 42 ›› Issue (4): 151-155.doi: 10.11896/j.issn.1002-137X.2015.04.030

Previous Articles     Next Articles

Consistency Detection Method between UML Model and Java Source Code

ZENG Yi, LI Han-yu, LIU Hui-jun, YU Shuang-shuang and ZHOU Bo   

  • Online:2018-11-14 Published:2018-11-14

Abstract: Aiming at the problem of inconsistencies between the code and the model,this paper presented a consistency detection method based on UML model and the JAVA code.Firstly,the UML class diagram and sequence diagram are formalized and a concept of sequence diagram call graph(SD-CG) is put forward.On this basis,the transformation from the associated relationship between classes to the associated attribute of class and the transformation from the sequence diagram to sequence diagram call graph are completed.Thirdly,based on call graph which is made up of class methods being as nodes and the call relation between them being as edges,to analyze the dynamic behavior in the source code,this paper got the information of Java classes and the method call graph (CG) by the lexical analysis and syntax analysis of Java source code.Then the consistency detection algorithm between UML model and Java source code was designed,including the static information consistency detection and the interactive information consistency detection.At last,we developed a prototype tool which can complete information consistency detection to verify the feasibility and effectiveness of the proposed method.

Key words: UML model,Java code,Sequence diagram call graph(SD-CG),Call graph(CG),Consistency detection

[1] Balzer R.“Tolerating Inconsistency” revisited[C]∥Proc.of the 23rd Int’l Conf.on Software Engineering.Toronto:IEEE Computer Press,2001:665
[2] Ghezzi C,Nuseibeh B.Guest editorial:Introduction to the special section[J].IEEE Trans.on Software Engineering,1999,5(6):782-783
[3] Easterbrook S,Chechik M.Int’l workshop on living with inconsistency[C]∥Proc.of the 23rd Int’l Conf.on Software Engineering.Toronto:IEEE Computer Press,2001:749-750
[4] Clarke E,Grumberg O,Long D.Verification tools for finite-state concurrent systems[C]∥Lecture Notes in Computer Science 803.London:Springer-Verlag,1994:124-175
[5] Holzmann J.The model checker SPIN[J].IEEE Trans.on Software Engineering,1997,3(5):279-95
[6] Heitmeyer C,Jeffords R,Kiskis D.Automated consistency checking requirements specifications[J].ACM Trans.on Software Engineering and Methodology,1996,5(3):231-261
[7] Chan W,Anderson R,Beame P,et al.Model checking large software specifications[J].IEEE Trans.on Software Engineering,1998,4(7):498-519
[8] Atlee J,Gannon J.State-Based model checking of event-driven system requirements[J].IEEE Trans.on Software Engineering,1993,19(1):24-40
[9] 丁娜.带OCL约束的活动图多态测试方法的研究[D].重庆:重庆大学,2012
[10] 逄瑞娟.基于UML顺序图的场景测试用例生成研究[D].青岛:青岛大学,2007
[11] 赵平.Java源代码静态分析系统的设计与实现[D].长春:吉林大学,2013
[12] 章程.基于机器学习和程序分析相结合的程序调用技术研究[D].上海:上海交通大学,2012
[13] 张健.精确的程序静态分析[J].计算机学报,2008,31(9):1550-1555
[14] 逄龙,王甜甜,苏小红,等.支持多程序语言的静态信息提取方法[J].哈尔滨工业大学学报,2011(3):62-66

No related articles found!
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!