Understanding how the requirements are implemented in source code

Wei Zhao, Lu Zhang, Yin Liu, Jing Luo, Jiasu Sun
{"title":"Understanding how the requirements are implemented in source code","authors":"Wei Zhao, Lu Zhang, Yin Liu, Jing Luo, Jiasu Sun","doi":"10.1109/APSEC.2003.1254359","DOIUrl":null,"url":null,"abstract":"For software maintenance and evolution, a common problem is to understand how each requirement is implemented in the source code. The basic solution of this problem is to find the fragment of source code that is corresponding to the implementation of each requirement. This can be viewed as a requirement-slicing problem - slicing the source code according to each individual requirement. We present an approach to find the set of functions that is corresponding to each requirement. The main idea of our method is to combine the information retrieval technology with the static analysis of source code structures. First, we retrieve the initial function sets through some information retrieval model using functional requirements as the queries and identifier information (such as function names, parameter names, variable names etc.) of functions in the source code as target documents. Then we complement each retrieved initial function set by analyzing the call graph extracted from the source code. A premise of our approach is that programmers should use meaningful names as identifiers. Furthermore, we perform an experimental study based on a GNU system. We use two basic metrics: precision and recall (which are the common practice in the information retrieval field), to evaluate our approach. We also compare the results directly acquired from information retrieval with those that are complemented through static source code structure analysis.","PeriodicalId":122752,"journal":{"name":"Tenth Asia-Pacific Software Engineering Conference, 2003.","volume":"07 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2003-12-10","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"25","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Tenth Asia-Pacific Software Engineering Conference, 2003.","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/APSEC.2003.1254359","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 25

Abstract

For software maintenance and evolution, a common problem is to understand how each requirement is implemented in the source code. The basic solution of this problem is to find the fragment of source code that is corresponding to the implementation of each requirement. This can be viewed as a requirement-slicing problem - slicing the source code according to each individual requirement. We present an approach to find the set of functions that is corresponding to each requirement. The main idea of our method is to combine the information retrieval technology with the static analysis of source code structures. First, we retrieve the initial function sets through some information retrieval model using functional requirements as the queries and identifier information (such as function names, parameter names, variable names etc.) of functions in the source code as target documents. Then we complement each retrieved initial function set by analyzing the call graph extracted from the source code. A premise of our approach is that programmers should use meaningful names as identifiers. Furthermore, we perform an experimental study based on a GNU system. We use two basic metrics: precision and recall (which are the common practice in the information retrieval field), to evaluate our approach. We also compare the results directly acquired from information retrieval with those that are complemented through static source code structure analysis.
了解如何在源代码中实现需求
对于软件维护和发展,一个常见的问题是理解每个需求是如何在源代码中实现的。这个问题的基本解决方案是找到与每个需求的实现相对应的源代码片段。这可以看作是一个需求切片问题——根据每个单独的需求对源代码进行切片。我们提出了一种方法来找到与每个需求相对应的函数集。该方法的主要思想是将信息检索技术与源代码结构的静态分析相结合。首先,我们使用功能需求作为查询,将源代码中函数的标识信息(如函数名、参数名、变量名等)作为目标文档,通过一些信息检索模型检索初始函数集。然后,我们通过分析从源代码中提取的调用图来补充每个检索到的初始函数集。我们的方法的前提是程序员应该使用有意义的名称作为标识符。在此基础上,进行了基于GNU系统的实验研究。我们使用两个基本指标:精确度和召回率(这是信息检索领域的常见做法)来评估我们的方法。我们还比较了直接从信息检索中获得的结果与通过静态源代码结构分析补充得到的结果。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术官方微信