Understanding Programs by Exploiting (Fuzzing) Test Cases

05/23/2023
by   Jianyu Zhao, et al.
0

Semantic understanding of programs has attracted great attention in the community. Inspired by recent successes of large language models (LLMs) in natural language understanding, tremendous progress has been made by treating programming language as another sort of natural language and training LLMs on corpora of program code. However, programs are essentially different from texts after all, in a sense that they are normally heavily structured and syntax-strict. In particular, programs and their basic units (i.e., functions and subroutines) are designed to demonstrate a variety of behaviors and/or provide possible outputs, given different inputs. The relationship between inputs and possible outputs/behaviors represents the functions/subroutines and profiles the program as a whole. Therefore, we propose to incorporate such a relationship into learning, for achieving a deeper semantic understanding of programs. To obtain inputs that are representative enough to trigger the execution of most part of the code, we resort to fuzz testing and propose fuzz tuning to boost the performance of program understanding and code representation learning, given a pre-trained LLM. The effectiveness of the proposed method is verified on two program understanding tasks including code clone detection and code classification, and it outperforms current state-of-the-arts by large margins. Code is available at https://github.com/rabbitjy/FuzzTuning.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
04/20/2023

Learning to Program with Natural Language

Large Language Models (LLMs) have shown remarkable performance in variou...
research
09/04/2023

Code Representation Pre-training with Complements from Program Executions

Large language models (LLMs) for natural language processing have been g...
research
06/11/2023

Augmenting Greybox Fuzzing with Generative AI

Real-world programs expecting structured inputs often has a format-parsi...
research
03/10/2021

Unified Pre-training for Program Understanding and Generation

Code summarization and generation empower conversion between programming...
research
05/02/2023

From Words to Code: Harnessing Data for Program Synthesis from Natural Language

Creating programs to correctly manipulate data is a difficult task, as t...
research
09/12/2018

Automatic Program Synthesis of Long Programs with a Learned Garbage Collector

We consider the problem of generating automatic code given sample input-...
research
03/10/2020

Ecological Semantics: Programming Environments for Situated Language Understanding

Large-scale natural language understanding (NLU) systems have made impre...

Please sign up or login with your details

Forgot password? Click here to reset