Graph4Code: A Machine Interpretable Knowledge Graph for Code

02/21/2020
by   Kavitha Srinivas, et al.
0

Knowledge graphs have proven to be extremely useful in powering diverse applications in semantic search, natural language understanding, and even image classification. Graph4Code attempts to build well structured knowledge graphs about program code to similarly revolutionize diverse applications such as code search, code understanding, refactoring, bug detection, and code automation. We build such a graph by applying a set of generic code analysis techniques to Python code on the web. Since use of popular Python modules is ubiquitous in code, calls to functions in Python modules serve as key nodes of the knowledge graph. The edges in the graph are based on 1) function usage in the wild (e.g., which other function tends to call this one, or which function tends to precede this one, as gleaned from program analysis), 2) documentation about the function (e.g., code documentation, usage documentation, or forum discussions such as StackOverflow), and 3) program specific features such as class hierarchies. We use the Whyis knowledge graph management framework to make the graph easily extensible. We apply these techniques to 1.3M Python files drawn from GitHub, and associated documentation on the web for over 400 popular libraries, as well as StackOverflow posts about the same set of libraries. This knowledge graph will be made available soon to the larger community for use.

READ FULL TEXT
research
06/04/2019

Pykg2vec: A Python Library for Knowledge Graph Embedding

Pykg2vec is an open-source Python library for learning the representatio...
research
03/29/2021

Entity Context Graph: Learning Entity Representations fromSemi-Structured Textual Sources on the Web

Knowledge is captured in the form of entities and their relationships an...
research
09/06/2019

Structured Query Construction via Knowledge Graph Embedding

In order to facilitate the accesses of general users to knowledge graphs...
research
07/05/2021

Leveraging a Federation of Knowledge Graphs to Improve Faceted Search in Digital Libraries

Scientists always look for the most accurate and relevant answers to the...
research
03/15/2023

WikiCoder: Learning to Write Knowledge-Powered Code

We tackle the problem of automatic generation of computer programs from ...
research
02/28/2021

PyCG: Practical Call Graph Generation in Python

Call graphs play an important role in different contexts, such as profil...
research
04/13/2022

Timeloops: Automatic System Call Policy Learning for Containerized Microservices

In this paper we introduce Timeloops a novel technique for automatically...

Please sign up or login with your details

Forgot password? Click here to reset