Code property graph: Difference between revisions

Content deleted Content added
No edit summary
mNo edit summary
Line 5:
 
== Definition ==
A code property graph of a program is a graph representation of the program obtained by merging its [[abstract syntax tree]]s (AST), [[Controlcontrol-flow graph]]s (CFG) and [[program dependence graph]]s (PDG) at statement and predicate nodes. The resulting graph is a property graph, which is the underlying graph model of graph databases such as Neo4J[[Neo4j]], [[JanusGraph]] and [[OrientDB]] where data is stored in the nodes and edges as key-value pairs. In effect, code property graphs can be stored in graph databases and queried using graph query languages.
 
== Example ==
Line 20:
</syntaxhighlight>
 
The code property graph of the function is obtained by merging its abstract syntax tree, control -flow graph, and program dependence graph at statements and predicates as seen in the following figure:
 
[[File:CodePropertyGraph.png|700px|Code property graph of a sample C code snippet]]