LExecutor: Learning-Guided Execution

02/05/2023
by   Beatriz Souza, et al.
0

Executing code is essential for various program analysis tasks, e.g., to detect bugs that manifest through exceptions or to obtain execution traces for further dynamic analysis. However, executing an arbitrary piece of code is often difficult in practice, e.g., because of missing variable definitions, missing user inputs, and missing third-party dependencies. This paper presents LExecutor, a learning-guided approach for executing arbitrary code snippets in an underconstrained way. The key idea is to let a neural model predict missing values that otherwise would cause the program to get stuck, and to inject these values into the execution. For example, LExecutor injects likely values for otherwise undefined variables and likely return values of calls to otherwise missing functions. We evaluate the approach on Python code from popular open-source projects and on code snippets extracted from Stack Overflow. The neural model predicts realistic values with an accuracy between 80.1 94.2 approach successfully executes significantly more code than any available technique, such as simply executing the code as-is. For example, executing the open-source code snippets as-is covers only 4.1 crashes early on, whereas LExecutor achieves a coverage of 50.1

READ FULL TEXT

page 1

page 2

page 3

page 4

research
04/25/2023

TraceFixer: Execution Trace-Driven Program Repair

When debugging unintended program behavior, developers can often identif...
research
06/13/2023

TRACED: Execution-aware Pre-training for Source Code

Most existing pre-trained language models for source code focus on learn...
research
06/19/2018

Augmenting Source Code Lines with Sample Variable Values

Source code is inherently abstract, which makes it difficult to understa...
research
08/25/2022

TEP-GNN: Accurate Execution Time Prediction of Functional Tests using Graph Neural Networks

Predicting the performance of production code prior to actually executin...
research
10/28/2021

Fuzzm: Finding Memory Bugs through Binary-Only Instrumentation and Fuzzing of WebAssembly

WebAssembly binaries are often compiled from memory-unsafe languages, su...
research
11/21/2018

Improving Grey-Box Fuzzing by Modeling Program Behavior

Grey-box fuzzers such as American Fuzzy Lop (AFL) are popular tools for ...
research
08/16/2022

What Your Firmware Tells You Is Not How You Should Emulate It: A Specification-Guided Approach for Firmware Emulation

Emulating firmware of microcontrollers is challenging due to the lack of...

Please sign up or login with your details

Forgot password? Click here to reset