topos.graphs.cpg.modelsΒΆ
CPG Models β Code Property Graph node & edge types per Yamaguchi et al.
- class topos.graphs.cpg.models.CPGEdgeKind(*values)[source]
Bases:
StrEnumThe four CPG edge families.
- AST = 'ast'
- CFG = 'cfg'
- DDG = 'ddg'
- CDG = 'cdg'
- class topos.graphs.cpg.models.CPGEdge(source, target, kind, label='')[source]
Bases:
objectA typed, labeled edge in the CPG multigraph.
- source
- target
- kind
- label = ''
- class topos.graphs.cpg.models.CPGNode(uast)[source]
Bases:
objectA CPG node: a UAST node enriched with quick-lookup metadata.
The CPG uses the UAST node directly as the node payload β every CPG node is a UAST node, so the AST family of edges is implicit in the UAST
childrenlists. We materialize them as CPGEdges anyway so downstream queries are uniform.- uast
- property id
- property kind
- property attributes