计算机科学 ›› 2025, Vol. 52 ›› Issue (6A): 241000024-5.doi: 10.11896/jsjkx.241000024

• 计算机软件&体系架构 • 上一篇    下一篇

需求可追溯性在代码静态分析中的应用

陈望旭, 文昊, 倪洋   

  1. 南京南瑞信息通信科技有限公司 南京 210003
  • 出版日期:2025-06-16 发布日期:2025-06-12
  • 通讯作者: 陈望旭(chenwangxu@egepri.sgcc.com.cn)

Application of Requirements Traceability in Code Static Analysis

CHEN Wangxu, WEN Hao, NI Yang   

  1. NARI Group Corporation Information & Communication Technology Co.Ltd.,Nanjing 210003,China
  • Online:2025-06-16 Published:2025-06-12
  • About author:CHEN Wangxu,born in 1988,master,intermediate engineer certification.His main research interests include information system architecture and heterogeneous data analysis.

摘要: 对于软件需求逆向工程,传统的代码静态分析方法需要人工标注大量完整的需求标记,这成为研发过程中庞大且冗余的负担,很难切实推行。针对该情况,提出了一种基于需求可追溯性并使用图数据库存储结构的代码静态分析方法。该方法首先通过基础静态分析方法生成软件的方法调用关系图,使用图数据库存储结构对其进行存储,然后通过少量的人工标记对调用关系图进行初始化,再通过图数据支持的若干连通性计算方法,补全调用关系图上的节点需求并最终反馈到软件代码层面。实验结果表明,该方法能够保证推演后方法节点上的需求覆盖率达到较高标准,同时极大地降低人工标记的工作量。

关键词: 需求可追溯性, 图数据库, 代码静态分析

Abstract: For software requirements reverse engineering,traditional static code analysis method needs a large number of manual labeling,which is a huge and redundant burden in the research and development process.In view of this situation,a static code analysis method based on requirement traceability and using graph database storage structure is proposed.Firstly,the software method CallGraph is generated by static analysis method,and the graph database is used to store it,then the graph is initialized by a few of manual marks.Experimental results show that the proposed method can guarantee the requirement coverage on the nodes of the inferential method to reach a higher standard,and greatly reduce the workload of manual labeling.

Key words: Requirement traceability, Graph database, Code static analysis

中图分类号: 

  • TP399
[1]LE H T,SHAR L K,BIANCULLI D,et al.Automated reverse engineering of role-based access control policies of web applications[J].Journal of Systems and Software,2022,184:111109.
[2]KIENLE H M,MÜLLERH A.The tools perspective on soft-ware reverse engineering:requirements,construction,and evaluation[J].Advances in Computers,2010,79:189-290.
[3]CANFORA G,DI PENTA M,CERULO L.Achievements and challenges in software reverse engineering[J].Communications of the ACM,2011,54(4):142-151.
[4]CHARALAMPIDOU S,AMPATZOGLOU A,KAROUNTZ-OS E,et al.Empirical studies on software traceability:A mapping study[J].Journal of Software:Evolution and Process,2021,33(2):e2294.
[5]HORVATH A,MYERS B,MACVEAN A,et al.Using annotations for sensemaking about code[C]//Proceedings of the 35th Annual ACM Symposium on User Interface Software and Technology.2022:1-16.
[6]GAO H,KUANG H,MA X,et al.Propagating frugal user feedback through closeness of code dependencies to improve IR-based traceability recovery[J].Empirical Software Engineering,2022,27(2):41.
[7]TAO C Q,ZHANG M,GUO H J,et al.Review of Research on Requirements Traceability Approaches for Different Software Artifacts[J].Chinese Journal of Computers,2022,45(11):2393-2419.
[8]GAO H,KUANG H,SUN K,et al.Using consensual biterms from text structures of requirements and code to improve IR-based traceability recovery[C]//Proceedings of the 37th IEEE/ACM International Conference on Automated Software Engineering.2022.
[9]BURGSTALLER B,EGYEDA.Understanding whererequire-ments are implemented[C]//Proceedings of 2010 IEEE International Conference on Software Maintenance.2010:1-5.
[10]VICKNAIR C,MACIAS M,ZHAO Z,et al.A comparison of a graph database and a relational database:a data provenance perspective[C]//Proceedings of the 48th Annual Southeast Regional Conference.2010:1-6.
[11]MARIN M,DEURSEN A V,MOONEN L,et al.Identifyingcrosscutting concerns using fan-in analysis[J].ACM Transactions on Software Engineering and Methodology,2007,17(1):1-37.
[12]REIF M,EICHBERG M,HERMANNB,et al.Call graph construction for java libraries[C]//Proceedings of 2016 24th ACM SIGSOFT International Symposium on Foundations of Software Engineering.2016:474-486.
[13]BARDAS A G.Static code analysis[J].Journal of Information Systems & Operations Management,2010,4(2):99-107.
[14]LIN Z Q,ZHAO J F,XIE B,et al.A Graph Database Based Method for Parsing and Searching Code Structure[J].Journal of Computer Research and Development,2016,53(3):531-540.
[15]ALI K,LAI X,LUO Z,et al.A study of call graph construction for jvm-hosted languages[J].IEEE Transactions on Software Engineering,2019,47(12):2644-2666.
[16]REIF M,EICHBERG M,HERMANNB,et al.Call graph construction for java libraries[C]//Proceedings of 2016 24th ACM SIGSOFT International Symposium on Foundations of Software Engineering.2016:474-486.
[17]SUN Y,GUTIN G.Strong subgraph connectivity of digraphs[J].Graphs and Combinatorics,2021,37:951-970.
[18]ARROYUELO D,HOGAN A,NAVARRO G,et al.Time-andspace-efficient regular path queries[C]//Proceedings of 2022 IEEE 38th International Conference on Data Engineering(ICDE).IEEE,2022:3091-3105.
[19]BELGUNDI R,KULKARNI Y,JAGDALE B.Analysis ofNative Multi-model Database Using ArangoDB[C]//Proceedings of 3rd International Conference on Sustainable Expert Systems(ICSES 2022).Singapore:Springer Nature Singapore,2023:923-935.
[20]KUANG H,MÄDER P,HU H,et al.Do data dependencies in source code complement call dependencies for understanding requirements traceability?[C]//Proceedings of 28th IEEE International Conference on Software Maintenance(ICSM).2012:181-190.
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!