topos.graphs.cpg.object¶
CodePropertyGraph Representation.
Implements the Representation protocol on the SECURE generator.
- class topos.graphs.cpg.object.CodePropertyGraph(nodes=<factory>, edges=<factory>, language='python', source='')[source]
Bases:
objectA Code Property Graph (Yamaguchi et al., arxiv:1909.03496).
- edges
Labeled CPG edges across the four families {AST, CFG, DDG, CDG}.
- Type:
list[topos.graphs.cpg.models.CPGEdge]
- language
The source language (passed through for danger-registry lookup).
- Type:
- nodes
- edges
- language = 'python'
- source = ''
- property name
- property dimension
- classmethod from_uast(uast_root, source='')[source]
- node_text(node)[source]
Slice the original source by a node’s byte span.
- nodes_of_kind(kind)[source]
- metrics()[source]