Structured Generative Models of Natural Source Code

01/02/2014
by   Chris J. Maddison, et al.
0

We study the problem of building generative models of natural source code (NSC); that is, source code written and understood by humans. Our primary contribution is to describe a family of generative models for NSC that have three key properties: First, they incorporate both sequential and hierarchical structure. Second, we learn a distributed representation of source code elements. Finally, they integrate closely with a compiler, which allows leveraging compiler logic and abstractions when building structure into the model. We also develop an extension that includes more complex structure, refining how the model generates identifier tokens based on what variables are currently in scope. Our models can be learned efficiently, and we show empirically that including appropriate structure greatly improves the models, measured by the probability of generating test programs.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
04/04/2019

Neural Networks for Modeling Source Code Edits

Programming languages are emerging as a challenging and interesting doma...
research
03/14/2023

Implant Global and Local Hierarchy Information to Sequence based Code Representation Models

Source code representation with deep learning techniques is an important...
research
06/18/2021

Learning to Generate Code Sketches

Traditional generative models are limited to predicting sequences of ter...
research
05/22/2018

Generative Code Modeling with Graphs

Generative models for source code are an interesting structured predicti...
research
03/02/2023

BenchDirect: A Directed Language Model for Compiler Benchmarks

The exponential increase of hardware-software complexity has made it imp...
research
10/30/2021

Trojan Source: Invisible Vulnerabilities

We present a new type of attack in which source code is maliciously enco...
research
05/10/2018

EthIR: A Framework for High-Level Analysis of Ethereum Bytecode

Analyzing Ethereum bytecode, rather than the source code from which it w...

Please sign up or login with your details

Forgot password? Click here to reset