首页 | 本学科首页   官方微博 | 高级检索  
     

一种基于UML关系的Java代码库构造方法
引用本文:姜人和,郑晓梅,朱晓倩,潘敏学,张天.一种基于UML关系的Java代码库构造方法[J].计算机科学,2017,44(11):69-79.
作者姓名:姜人和  郑晓梅  朱晓倩  潘敏学  张天
作者单位:南京大学计算机软件新技术国家重点实验室 南京210023,南京中医药大学信息技术学院 南京210023,南京大学计算机软件新技术国家重点实验室 南京210023,南京大学计算机软件新技术国家重点实验室 南京210023,南京大学计算机软件新技术国家重点实验室 南京210023
基金项目:本文受基于MDE的异构数据建模及转换研究(61472180),基于场景规约的中断驱动系统的建模与验证技术研究(61502228),基于SysML和MARTE的异构数据模型转换方法研究(BK20141322),中断驱动系统的建模与分析(BK20150589)资助
摘    要:关系信息是体现代码结构和语义的最重要的一类信息,如继承、聚合、组合、依赖、调用和创建实例等。为了更好地支持开源代码的理解与复用,提出了一种基于UML2关系的代码库构造方法。它以图数据库为实现平台,采用语言工程中经典的抽象语法树作为基础,并针对Java语言的特性和机制,设计富语义的Java代码属性图数据模型,在此基础上使得Java代码的图结构持久化。同时,为了屏蔽各种编程语言社区对代码中关系信息理解的差异性,采用UML2.4国际标准版本中定义的关系类型及语义解释,设计相应的代码关系抽取算法,为图节点添加对应的关系边。针对代码图化后的膨胀及代码库的空间存储消耗情况,选取9个常见的开源项目进行了实验评估。最后,给出了基于此代码库的查询应用实例。

关 键 词:代码库  UML  图数据库  代码查询
收稿时间:2016/10/9 0:00:00
修稿时间:2016/12/31 0:00:00

Method of Java Code Repository Construction Based on UML Relationship
JIANG Ren-he,ZHENG Xiao-mei,ZHU Xiao-qian,PAN Min-xue and ZHANG Tian.Method of Java Code Repository Construction Based on UML Relationship[J].Computer Science,2017,44(11):69-79.
Authors:JIANG Ren-he  ZHENG Xiao-mei  ZHU Xiao-qian  PAN Min-xue and ZHANG Tian
Affiliation:Key Laboratory for Novel Software Technology,Nanjing University,Nanjing 210023,China,School of Information Technology,Nanjing University of Chinese Medicine,Nanjing 210023,China,Key Laboratory for Novel Software Technology,Nanjing University,Nanjing 210023,China,Key Laboratory for Novel Software Technology,Nanjing University,Nanjing 210023,China and Key Laboratory for Novel Software Technology,Nanjing University,Nanjing 210023,China
Abstract:Relationship information is the most important information representing code structure and semantics,such as inheritance,aggregation,composition,dependency,call and creation.This paper provided a method constructing source repositories based on relationships defined in UML2 for better comprehension and reuse of the open source code.The graph database is used as the implementation plantform of the approach,and the abstract syntax tree is adopted as the base of graph schema.In addition,the schema is designed specifically according to the Java language so that semantics can be well presented.The key point of the approach is that the relationship definitions are prescribed strictly according to the UML2.4 specifications,which is an ISO version,so that the differentiation between different language communities about the comprehension of relationship can be eliminated.Each category of the relationships was studied and the corresponding recognition algorithms were designed.During the construction of the repository,the relationships are added as different kind of edges.The evaluation experiments of 9 open source projects were conducted to illustrate the expansion of the code graph and the consumed space.At last,two simple case studies of querying on the repository were given.
Keywords:Code repository  UML  Graph database  Code query
点击此处可从《计算机科学》浏览原始摘要信息
点击此处可从《计算机科学》下载全文
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号