arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2305.07594cs.SEcs.AI
收藏

Opti Code Pro:一种基于启发式搜索的代码重构方法

Opti Code Pro: A Heuristic Search-based Approach to Code Refactoring

Toronto Metropolitan University(多伦多都会大学)

Sourena Khanzadeh, Samad Alias Nyein Chan, Richard Valenzano, Manar Alalfi

AI总结:

本文提出一种基于启发式搜索的代码重构方法,通过近似问题引导重构过程实现高内聚低耦合,并在随机状态和Java项目上验证有效性。

摘要:

本文提出了一种评估最佳优先搜索方法在代码重构中的应用的方法。代码重构的动机可能是改善现有程序的设计、结构或实现,而不改变其功能。为了解决耦合和内聚这一非常具体的问题,我们建议在完整代码重构问题的近似上使用基于启发式搜索的技术,以引导重构过程朝向高内聚、低耦合的解决方案。我们通过提供该方法在随机状态问题上有效性的示例性演示来评估我们的方法,并创建了一个工具在Java项目中实现该算法。

英文摘要:

This paper presents an approach that evaluates best-first search methods to code refactoring. The motivation for code refactoring could be to improve the design, structure, or implementation of an existing program without changing its functionality. To solve a very specific problem of coupling and cohesion, we propose using heuristic search-based techniques on an approximation of the full code refactoring problem, to guide the refactoring process toward solutions that have high cohesion and low coupling. We evaluated our approach by providing demonstrative examples of the effectiveness of this approach on random state problems and created a tool to implement the algorithm on Java projects.

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

↑