arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1908.04636cs.SE
收藏

基于连续边收缩的抽取方法重构

Extract Method Refactoring by Successive Edge Contraction

Omkarendra Tiwari, Rushikesh K. Joshi

摘要:

提出了一种新的基于连续边缘收缩的图像分割方法,用于重构图像的提取方法。它的目标是识别方法中实现的不同功能。分段建立在语句之间的数据和控制依赖关系的基础上,通过结构依赖图(SDG)中边的连续收缩从代码中提取功能。研究了三种边收缩,即结构控制边收缩、排他数据依赖边收缩和顺序数据依赖边收缩。SDG首先从程序中构建,然后将其折叠成捕获子任务之间依赖关系的段图。语句之间的数据和控制依赖关系的中间表示保持了技术语言的独立性。四个案例研究,包括三个开源领域的方法进行评估,并报告的结果。

英文摘要:

Segmentation, a new approach based on successive edge contraction is introduced for extract method refactoring. It targets identification of distinct functionalities implemented within a method. Segmentation builds upon data and control dependencies among statements to extract functionalities from code by successive contraction of edges in the Structure Dependence Graph (SDG). Three edge contractions are explored, namely structural control edge contraction, exclusive data dependence edge contraction, and sequential data dependence edge contraction. The SDG is first constructed from the program, which is then collapsed into a segment graph that captures dependence between subtasks. An intermediate representation for data and control dependencies among statements keeps the technique language independent. The approach is evaluated on four case studies, including three from the open source domain, and the findings are reported.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑