How gustavo2358/analysis-cfg works
Analysis CFG builds a structural control-flow graph from an Analysis IR Publication. The documented local workflow reads AIR JSON, uses the shared air-java JSON binding to obtain a Publication, builds and projects a CFG, then writes CFG JSON. Projection supports known-subset and strict policies, preserves source coverage and gaps, and represents instructions, jumps, branches, returns, and halts. The graph follows the README’s documented flow and the supplied source tree; detailed launcher and adapter call wiring was not sampled, so uncertain links are omitted. Other analysis modules in the tree are not shown as workflow stages because the README describes dataflow and possible-values analysis as not yet part of this product.
Main entry points: CfgBuildCoordinator.java Build coordinator · AnalysisCfg.java CFG launcher · CfgGraph.java CFG graph · AirJsonFileReader.java AIR file reader
Components 17
JSON transport
- AIR JSON input
- AIR file reader
cfg-adapters/src/main/java/io/github/gustavo2358/analysis/cfg/adapters/AirJsonFileReader.java - Shared AirJson
- CFG JSON writer
cfg-adapters/src/main/java/io/github/gustavo2358/analysis/cfg/adapters/CfgJsonWriter.java - CFG JSON output
CFG build
- Publication
- CFG launcher
cfg-launcher/src/main/java/io/github/gustavo2358/analysis/cfg/launcher/AnalysisCfg.java - Build coordinator
cfg-kernel/src/main/java/io/github/gustavo2358/analysis/cfg/application/CfgBuildCoordinator.java - CFG preflight
cfg-kernel/src/main/java/io/github/gustavo2358/analysis/cfg/application/CfgPreflight.java - Build policy
cfg-kernel/src/main/java/io/github/gustavo2358/analysis/cfg/application/BuildOptions.java - Interpreter registry
cfg-kernel/src/main/java/io/github/gustavo2358/analysis/cfg/extension/SemanticInterpreterRegistry.java - Core projection
cfg-kernel/src/main/java/io/github/gustavo2358/analysis/cfg/domain/CoreCfgProjection.java - Build result
cfg-kernel/src/main/java/io/github/gustavo2358/analysis/cfg/application/CfgBuildResult.java
CFG model
- CFG graph
cfg-kernel/src/main/java/io/github/gustavo2358/analysis/cfg/domain/CfgGraph.java - CFG nodes
cfg-kernel/src/main/java/io/github/gustavo2358/analysis/cfg/domain/CfgNode.java - CFG transitions
cfg-kernel/src/main/java/io/github/gustavo2358/analysis/cfg/domain/CfgTransition.java
Other components
- CLI caller
Connections 16
- CLI caller → CFG launcher: invokes
- AIR JSON input → AIR file reader: reads
- AIR file reader → Shared AirJson: decodes via
- Shared AirJson → Publication: produces
- CFG launcher → AIR file reader: reads input
- CFG launcher → Build coordinator: requests build
- Build coordinator → CFG preflight: validates
- Build coordinator → Build policy: applies
- Build coordinator → Interpreter registry: uses
- Build coordinator → Core projection: projects
- Core projection → CFG graph: constructs
- CFG graph → CFG nodes: contains
- CFG graph → CFG transitions: contains
- Build coordinator → Build result: returns
- CFG launcher → CFG JSON writer: serializes result
- CFG JSON writer → CFG JSON output: writes