Learning Blended, Precise Semantic Program Embeddings

07/03/2019
by   Ke Wang, et al.
0

Learning neural program embeddings is key to utilizing deep neural networks in program languages research --- precise and efficient program representations enable the application of deep models to a wide range of program analysis tasks. Existing approaches predominately learn to embed programs from their source code, and, as a result, they do not capture deep, precise program semantics. On the other hand, models learned from runtime information critically depend on the quality of program executions, thus leading to trained models with highly variant quality. This paper tackles these inherent weaknesses of prior approaches by introducing a new deep neural network, , which learns program representations from a mixture of symbolic and concrete execution traces. We have evaluated on , a recently proposed benchmark suite for evaluating neural program embeddings. Results show (1) is significantly more accurate than the state-of-the-art syntax-based models Gated Graph Neural Network and code2vec in classifying program semantics, and (2) requires on average 10x fewer executions covering 74% fewer paths than the state-of-the-art dynamic model . Furthermore, we extend to predict the name for a method from its body's vector representation. Learning on the same set of functions (more than 170K in total), significantly outperforms code2seq, the previous state-of-the-art for method name prediction.

READ FULL TEXT
research
07/03/2019

A Hybrid Approach for Learning Program Representations

Learning neural program embedding is the key to utilizing deep neural ne...
research
04/18/2023

NPS: A Framework for Accurate Program Sampling Using Graph Neural Network

With the end of Moore's Law, there is a growing demand for rapid archite...
research
05/13/2019

Learning Scalable and Precise Representation of Program Semantics

Neural program embedding has shown potential in aiding the analysis of l...
research
03/18/2018

Code Vectors: Understanding Programs Through Embedded Abstracted Symbolic Traces

With the rise of machine learning, there is a great deal of interest in ...
research
07/08/2019

Neutaint: Efficient Dynamic Taint Analysis with Neural Networks

Dynamic taint analysis (DTA) is widely used by various applications to t...
research
10/02/2021

ProTo: Program-Guided Transformer for Program-Guided Tasks

Programs, consisting of semantic and structural information, play an imp...
research
09/11/2014

Building Program Vector Representations for Deep Learning

Deep learning has made significant breakthroughs in various fields of ar...

Please sign up or login with your details

Forgot password? Click here to reset