Opti Code Pro: A Heuristic Search-based Approach to Code Refactoring
- URL: http://arxiv.org/abs/2305.07594v1
- Date: Fri, 12 May 2023 16:39:38 GMT
- Title: Opti Code Pro: A Heuristic Search-based Approach to Code Refactoring
- Authors: Sourena Khanzadeh, Samad Alias Nyein Chan, Richard Valenzano and Manar
Alalfi
- Abstract summary: The motivation for code 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 search-based techniques on an approximation of the full code problem.
- Score: 0.0
- License: http://arxiv.org/licenses/nonexclusive-distrib/1.0/
- Abstract: 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.
Related papers
- CodeDPO: Aligning Code Models with Self Generated and Verified Source Code [52.70310361822519]
We propose CodeDPO, a framework that integrates preference learning into code generation to improve two key code preference factors: code correctness and efficiency.
CodeDPO employs a novel dataset construction method, utilizing a self-generation-and-validation mechanism that simultaneously generates and evaluates code and test cases.
arXiv Detail & Related papers (2024-10-08T01:36:15Z) - DOCE: Finding the Sweet Spot for Execution-Based Code Generation [69.5305729627198]
We propose a comprehensive framework that includes candidate generation, $n$-best reranking, minimum Bayes risk (MBR) decoding, and self-ging as the core components.
Our findings highlight the importance of execution-based methods and the difference gap between execution-based and execution-free methods.
arXiv Detail & Related papers (2024-08-25T07:10:36Z) - In Search of Metrics to Guide Developer-Based Refactoring Recommendations [13.063733696956678]
Motivation is a well-established approach to improving source code quality without compromising its external behavior.
We propose an empirical study into the metrics that study the developer's willingness to apply operations.
We will quantify the value of product and process metrics in grasping developers' motivations to perform.
arXiv Detail & Related papers (2024-07-25T16:32:35Z) - Iterative or Innovative? A Problem-Oriented Perspective for Code Optimization [81.88668100203913]
Large language models (LLMs) have demonstrated strong capabilities in solving a wide range of programming tasks.
In this paper, we explore code optimization with a focus on performance enhancement, specifically aiming to optimize code for minimal execution time.
arXiv Detail & Related papers (2024-06-17T16:10:10Z) - A Survey of Deep Learning Based Software Refactoring [5.716522445049744]
Dozens of deep learning-based approaches have been proposed forfactoring software.
There is a lack of comprehensive reviews on such works as well as a taxonomy for deep learning-based approaches.
Most of the deep learning techniques have been used for the detection of code smells and the recommendation of solutions.
arXiv Detail & Related papers (2024-04-30T03:07:11Z) - Automatizing Software Cognitive Complexity Reduction through Integer
Linear Programming [1.1970409518725493]
Recently, we modeled software cognitive complexity reduction as an optimization problem and we proposed an approach to assist developers on this task.
This approach enumerates sequences of code extraction operations until a stopping criterion is met. As a result, it returns the minimal sequence of code extraction operations that is able to reduce the cognitive complexity of a code to the given threshold.
arXiv Detail & Related papers (2024-02-08T10:53:00Z) - Analyzing and Enhancing the Backward-Pass Convergence of Unrolled
Optimization [50.38518771642365]
The integration of constrained optimization models as components in deep networks has led to promising advances on many specialized learning tasks.
A central challenge in this setting is backpropagation through the solution of an optimization problem, which often lacks a closed form.
This paper provides theoretical insights into the backward pass of unrolled optimization, showing that it is equivalent to the solution of a linear system by a particular iterative method.
A system called Folded Optimization is proposed to construct more efficient backpropagation rules from unrolled solver implementations.
arXiv Detail & Related papers (2023-12-28T23:15:18Z) - Plan, Verify and Switch: Integrated Reasoning with Diverse X-of-Thoughts [65.15322403136238]
We propose XoT, an integrated problem solving framework by prompting LLMs with diverse reasoning thoughts.
For each question, XoT always begins with selecting the most suitable method then executes each method iteratively.
Within each iteration, XoT actively checks the validity of the generated answer and incorporates the feedback from external executors.
arXiv Detail & Related papers (2023-10-23T07:02:20Z) - RefSearch: A Search Engine for Refactoring [1.5519338281670214]
RefSearch enables users to search for cases through a user-friendly query language.
System collects instances using two detectors and provides a web interface for querying and browsing the cases.
arXiv Detail & Related papers (2023-08-28T03:04:47Z) - Branch & Learn for Recursively and Iteratively Solvable Problems in
Predict+Optimize [9.772500430303285]
This paper proposes Branch & Learn, a framework for Predict+ to tackle optimization problems containing parameters that are unknown at the time of solving.
Our framework applies also to iterative algorithms by viewing them as a degenerate form of recursion.
arXiv Detail & Related papers (2022-05-01T08:41:30Z) - End-to-End Constrained Optimization Learning: A Survey [69.22203885491534]
It focuses on surveying the work on integrating solvers and optimization methods with machine learning architectures.
These approaches hold the promise to develop new hybrid machine learning and optimization methods to predict fast, approximate, structural, solutions to problems and to enable logical inference.
arXiv Detail & Related papers (2021-03-30T14:19:30Z)
This list is automatically generated from the titles and abstracts of the papers in this site.
This site does not guarantee the quality of this site (including all information) and is not responsible for any consequences.