GraphsΒΆ

Graph modules build and expose the structural representations Topos measures: AST, CFG, CPG, MDG, PDG, and UAST. Use this section when adding language support, debugging parser output, or tracing how source code becomes measurable program structure.

topos.graphs.base

Representation Protocol Defines the contract that all program representations must satisfy.

topos.graphs.ast.dispatch

topos.graphs.ast.object

AST Representation Adapts the existing ProgramObject to the Representation protocol.

topos.graphs.ast.types

topos.graphs.ast.providers.base

topos.graphs.ast.providers.native_provider

topos.graphs.ast.providers.tree_sitter_provider

topos.graphs.cfg.builder

CFG Builder

topos.graphs.cfg.models

CFG Models

topos.graphs.cfg.object

ControlFlowGraph Representation

topos.graphs.cpg.builder

CPG Builder

topos.graphs.cpg.models

CPG Models β€” Code Property Graph node & edge types per Yamaguchi et al.

topos.graphs.cpg.object

CodePropertyGraph Representation.

topos.graphs.mdg.object

Module Dependency Graph (MDG) Representation Consumes the knowledge graph produced by GitNexus and lifts it into a Representation. This is the inter-module view of the program β€” it captures the import/call/inheritance structure across files, packages, and classes. Compare this with the academic intra-procedural Program Dependence Graph at topos.graphs.pdg.object, which records control- and data-dependence edges within a single procedure.

topos.graphs.pdg.object

Academic Program Dependence Graph (Ferrante/Ottenstein style).

topos.graphs.uast.mapper_common

UAST Mapper Common

topos.graphs.uast.mapper_cpp

topos.graphs.uast.mapper_javascript

topos.graphs.uast.mapper_python

topos.graphs.uast.mapper_rust

topos.graphs.uast.mapper_typescript

topos.graphs.uast.models

UAST Models