Year: 2022
Type: preprint
Abstract: Graph representations of programs are commonly a central element of machine learning for code research. We introduce an open source Python library python_graphs that applies static analysis to construct graph representations of Python programs suitable for training machine learning models. Our library admits the construction of control-flow graphs, data-flow graphs, and composite ``program graphs'' that combine control-flow, data-flow, syntactic, and lexical information about a program. We present the capabilities and limitations of the library, perform a case study applying the library to millions of competitive programming submissions, and showcase the library's utility for machine learning research.
Source: arXiv (Cornell University)
Authors: Bieber, David, Shi, Kensen, Maniatis, Petros, Sutton, Charles, Hellendoorn, Vincent, Johnson, Daniel, Tarlow, Daniel
Institutions: Google (United States), Carnegie Mellon University
Language: English
Subfield: Information Systems
Field: Computer Science
Domain: Physical Sciences
Open Access status: green
OpenAlex ID: W4301286743
