Can You Improve My Code? Optimizing Programs with Local Search

07/10/2023
by   Fatemeh Abdollahi, et al.
0

This paper introduces a local search method for improving an existing program with respect to a measurable objective. Program Optimization with Locally Improving Search (POLIS) exploits the structure of a program, defined by its lines. POLIS improves a single line of the program while keeping the remaining lines fixed, using existing brute-force synthesis algorithms, and continues iterating until it is unable to improve the program's performance. POLIS was evaluated with a 27-person user study, where participants wrote programs attempting to maximize the score of two single-agent games: Lunar Lander and Highway. POLIS was able to substantially improve the participants' programs with respect to the game scores. A proof-of-concept demonstration on existing Stack Overflow code measures applicability in real-world problems. These results suggest that POLIS could be used as a helpful programming assistant for programming problems with measurable objectives.

READ FULL TEXT
research
09/12/2019

Quantitative Programming by Examples

Programming-by-Example (PBE) systems synthesize an intended program in s...
research
09/29/2022

I Speak, You Verify: Toward Trustworthy Neural Program Synthesis

We develop an approach for improving the trustworthiness and overall acc...
research
01/09/2020

The Neighbours' Similar Fitness Property for Local Search

For most practical optimisation problems local search outperforms random...
research
08/12/2016

Coz: Finding Code that Counts with Causal Profiling

Improving performance is a central concern for software developers. To l...
research
01/15/2021

The Role of Working Memory in Program Tracing

Program tracing, or mentally simulating a program on concrete inputs, is...
research
11/30/2022

Genetic Programming with Local Scoring

We present new techniques for synthesizing programs through sequences of...
research
08/07/2020

Optimizing Program Size Using Multi-result Supercompilation

Supercompilation is a powerful program transformation technique with num...

Please sign up or login with your details

Forgot password? Click here to reset