Package-level declarations

Types

Link copied to clipboard

Loads a v5 or compact v6 analysis.json (see AnalysisResult) into a Vista.

Link copied to clipboard
data class AnalysisResult(val schemaVersion: Int = 5, val codeAnalysisConfiguration: CodeAnalysisConfiguration, val repos: List<Repo>, val controlFlowGraph: ControlFlowGraph, val sinks: List<Sink>, val solverExecutions: List<SolverExecution> = emptyList(), val dataFlowEvidence: DataFlowEvidenceStore = DataFlowEvidenceStore())
Link copied to clipboard
Link copied to clipboard

Propagates ASIL through the data-flow edges of a Vista and flags cascading-failure sinks.

Link copied to clipboard
data class CodeAnalysisConfiguration(val stigVersion: String, val analyzerSourceSha: String, val phasarVersion: String, val modulePath: String, val configPath: String, val solver: Solver, val alias: Alias, val callGraph: CallGraph, val pathFeasibility: PathFeasibility, val analysisKind: AnalysisKind, val maxSourcesPerSolver: Int = 1, val maxSinksPerSolver: Int? = null, val configuredSources: List<String> = emptyList(), val configuredSinks: List<String> = emptyList(), val entryPoints: List<String> = emptyList(), val emitLeaks: Boolean? = null, val emitDataFlowGraph: Boolean? = null, val emitControlFlowGraph: Boolean? = null, val emitFeasibility: Boolean? = null)

Pass identity + reproducibility metadata. Captures every choice that could affect the analyzer's output: solver/alias picks, pinned PhASAR commit, the analyzer binary's source SHA.

Link copied to clipboard
data class ControlFlowEdge(val id: String, val from: String, val to: String, val kind: IcfgEdgeKind, val caseLabel: String? = null)

Directed edge between ICFG nodes. caseLabel is populated only on kind = SWITCH_CASE edges; null otherwise (omitted in JSON).

Link copied to clipboard
data class ControlFlowGraph(val nodes: List<ControlFlowNode>, val edges: List<ControlFlowEdge>)
Link copied to clipboard
data class ControlFlowNode(val id: String, val opcode: String, val calleeSymbol: String, val calleeDemangled: String, val sourceRepo: String, val sourceFile: String, val line: Int, val column: Int, val functionMangled: String, val functionDeclContext: String, val functionBaseName: String, val sourceFunctionMangled: String = "", val sourceFunctionDeclContext: String = "", val sourceFunctionBaseName: String = "", val isEntryPoint: Boolean, val isBranch: Boolean, val isSink: Boolean, val isSource: Boolean, val isCompilerGenerated: Boolean)

One node per LLVM instruction the analyzer visited. Ids are globally unique (instruction-N, with N a monotone counter from PhASAR).

Link copied to clipboard

Renders a laid-out Vista to the JSON format cytoscape.js consumes via cy.json({...}) or fetch('graph.cyjson').then(cy.add).

Link copied to clipboard
data class DataFlowEndpointPair(val sourceInstructionId: String, val sinkInstructionId: String)

One exact configured-source to reached physical-sink relation.

Link copied to clipboard
data class DataFlowEndpointSummary(val configuredSourceInstructionIds: Set<String>, val configuredSinkInstructionIds: Set<String>, val configuredSinkSymbols: Set<String>, val leakedConfiguredSinkInstructionIds: Set<String>, val configuredSourceSegmentIds: Set<String>, val configuredSinkSegmentIds: Set<String>, val leakedConfiguredSinkSegmentIds: Set<String>, val reachedSourceSinkPairs: Set<DataFlowEndpointPair>)

Endpoint-only projection of analyzer data-flow evidence.

Link copied to clipboard
data class DataFlowEvidenceCompaction(val offeredFacts: Long = 0, val offeredStates: Long = 0, val offeredSegmentPayloads: Long = 0, val offeredSuccessorLists: Long = 0, val offeredTopologyShapes: Long = 0, val offeredTopologyTemplates: Long = 0, val offeredSegmentInstances: Long = 0, val offeredEdges: Long = 0, val offeredRootReferences: Long = 0, val offeredTerminalReferences: Long = 0, val offeredSourceBoundaries: Long = 0, val offeredCanonicalKeyBytes: Long = 0, val retainedFacts: Long = 0, val retainedStates: Long = 0, val retainedSegmentPayloads: Long = 0, val retainedSuccessorLists: Long = 0, val retainedSuccessorTargets: Long = 0, val retainedTopologyShapes: Long = 0, val retainedShapeBaseSegmentPayloadReferences: Long = 0, val retainedShapeSuccessorListReferences: Long = 0, val retainedTopologyTemplates: Long = 0, val retainedTemplatePayloadOverrides: Long = 0, val retainedTemplateSegmentInstances: Long = 0, val retainedTemplateEdges: Long = 0, val retainedRootReferences: Long = 0, val retainedTerminalReferences: Long = 0, val retainedEvidenceComponents: Long = 0, val retainedCanonicalKeyBytes: Long = 0, val retainedTopologyKeyBytes: Long = 0, val serializedSectionBytes: SerializedEvidenceSectionBytes = SerializedEvidenceSectionBytes())

Deterministic producer counters; wall-clock timings remain log telemetry.

Link copied to clipboard
data class DataFlowEvidenceStore(val format: String = "", val facts: List<Fact> = emptyList(), val states: List<GlobalFlowState> = emptyList(), val segmentPayloads: List<GlobalSegmentPayload> = emptyList(), val successorLists: List<GlobalSuccessorList> = emptyList(), val topologyShapes: List<DataFlowTopologyShape> = emptyList(), val topologyTemplates: List<DataFlowTopologyTemplate> = emptyList(), val components: List<GlobalEvidenceComponent> = emptyList(), val compaction: DataFlowEvidenceCompaction = DataFlowEvidenceCompaction())
Link copied to clipboard
data class DataFlowSegment(val id: String, val instructionIds: List<String>, val factIds: List<String> = emptyList(), val mergedSegmentIds: List<String> = emptyList(), val sourceBoundaryInstructionIds: List<String> = emptyList())

Segment ids are globally unique across all sinks (one counter on the analyzer side). instructionIds references ControlFlowGraph.nodes.id — segments are normalized over the ICFG, not denormalized with full instruction data.

Link copied to clipboard
data class DataFlowSegmentEdge(val id: String, val from: String, val to: String)
Link copied to clipboard
data class DataFlowTopologyShape(val id: String, val baseSegmentPayloadDeltas: List<Int>, val successorListDeltas: List<Int>, val rootSegmentIndices: List<Int>, val terminalSegmentIndices: List<Int>)

Exact positional topology plus the first labelled payload layout using it.

Link copied to clipboard
data class DataFlowTopologyTemplate(val id: String, val topologyShapeIndex: Int, val segmentPayloadOverrides: List<Int>)

Exact labelled component topology. Flat override pairs are [segmentPosition0, payloadIndex0, ...]; omitted positions use the shape's base payload. Positions remain distinct even when their labels and adjacency are equal.

Link copied to clipboard
object Enrichment

Layers extra information on top of a freshly loaded Vista — demangled display names, per-function metrics from clang-tidy, doxygen-style descriptions, and node-kind icons.

Link copied to clipboard
data class EvidenceComponent(val id: String, val solverExecutionId: String, val leakFactIds: List<String>, val segments: List<EvidenceSegment>, val edges: List<DataFlowSegmentEdge>, val rootSegmentIds: List<String>, val terminalSegmentIds: List<String>, val sourceBoundaries: List<EvidenceSourceBoundary> = emptyList())
Link copied to clipboard
data class EvidenceComponentStorageStatistics(val leakFacts: Long, val stateOccurrences: Long, val offeredFactKeys: Long, val offeredStateKeys: Long, val offeredSegmentPayloadKeys: Long, val offeredSuccessorListKeys: Long, val offeredSegmentInstances: Long, val offeredEdges: Long, val offeredRootReferences: Long, val offeredTerminalReferences: Long, val offeredSourceBoundaries: Long, val canonicalTopologyKeyBytes: Long, val newFacts: Long, val newStates: Long, val newSegmentPayloads: Long, val newSuccessorLists: Long, val newTopologyShapes: Long, val newTopologyTemplates: Long)

One positive (solver execution, physical sink) evidence cell.

Link copied to clipboard
data class EvidenceSegment(val id: String, val payloadId: String)
Link copied to clipboard
data class EvidenceSourceBoundary(val rootSegmentId: String, val sourceInstructionId: String, val generatedStateId: String)
Link copied to clipboard
data class Fact(val id: String, val label: String, val baseValueKind: String? = null, val baseValueId: String? = null, val offsets: List<Long> = emptyList(), val lifetime: Long? = null, val isZero: Boolean? = null, val isOverApproximation: Boolean? = null, val strides: List<Long> = emptyList(), val counts: List<BigInteger> = emptyList())

One PhASAR IFDS dataflow fact reaching this sink. label is PhASAR's DToString(fact) — the human-readable description of which value is tainted (variable name, SSA reg, struct chain).

Link copied to clipboard
data class FeasibleFact(val factId: String, val feasibility: Feasibility, val paths: List<FeasiblePath>, val solverExecutionId: String? = null)

Z3's verdict for one (sink, fact) pair. Emitted only when the pass was run with pathFeasibility != NO_CHECK. paths[] is the concrete enumerated feasible paths — non-empty iff feasibility = YES, but the analyzer may truncate enumeration.

Link copied to clipboard
data class FeasiblePath(val id: String, val segmentIds: List<String> = emptyList(), val instructionIds: List<String> = emptyList())

One concrete feasible path through this sink's DAG. segmentIds[] is ordered source-end first → sink-end last, and references Sink.dataFlowDAG.segments[].id.

Link copied to clipboard
data class FlowState(val id: String, val instructionId: String, val factId: String)
Link copied to clipboard
data class GlobalEvidenceComponent(val id: String, val solverExecutionId: String, val sinkInstructionId: String, val topologyTemplateIndex: Int, val leakFactIndices: List<Int>, val sourceBoundaries: List<GlobalEvidenceSourceBoundary>, val storageStatistics: EvidenceComponentStorageStatistics)
Link copied to clipboard
data class GlobalEvidenceSourceBoundary(val rootSegmentIndex: Int, val sourceInstructionId: String, val generatedStateIndex: Int)
Link copied to clipboard
data class GlobalFlowState(val id: String, val instructionId: String, val factIndex: Int)

Exact (stable instruction, canonical fact) state stored once per run.

Link copied to clipboard
data class GlobalSegmentPayload(val id: String, val stateIndices: List<Int>)

Ordered state sequence shared by exact segment occurrences.

Link copied to clipboard
data class GlobalSuccessorList(val id: String, val successorRuns: List<Int>)

Exact ordered outgoing adjacency shared without merging its owning positions.

Link copied to clipboard

Issue 29 — hierarchical boxing. Synthesises compound (box) layers above the Activity → Class → Function → Instruction chain that issue 24 #12 already wires in Enrichment.applyClassNesting / Enrichment.applyElementNesting.

Link copied to clipboard
object Layout

Lays out a Vista and returns a copy with Position populated on every view and Waypoints on every edge.

Link copied to clipboard
typealias PipelineGraph = Vista
Link copied to clipboard
data class Repo(val name: String, val path: String)

One declared source repo. The analyzer was launched with --repo <name>=<path> for each entry; any LLVM source path that doesn't fall under at least one of these failed analysis. path is relative to the analysis JSON file's directory (NOT relative to the CWD at analysis time) so the JSON is portable across machines.

Link copied to clipboard
data class SegmentPayload(val id: String, val stateIds: List<String>)
Link copied to clipboard
data class SerializedEvidenceSectionBytes(val facts: Long = 0, val states: Long = 0, val segmentPayloads: Long = 0, val successorLists: Long = 0, val topologyShapes: Long = 0, val topologyTemplates: Long = 0, val components: Long = 0)
Link copied to clipboard

Renders a laid-out Vista to the flat JSON shape consumed by sigma-viewer.html:

Link copied to clipboard
data class Sink(val id: String, val isConfigured: Boolean, val calleeSymbol: String, val calleeDemangled: String, val reportedSinkValues: List<String> = emptyList(), val facts: List<Fact>, val dataFlowDAG: SinkDataFlowDAG, val evidenceComponentIndices: List<Int> = emptyList(), val feasibleFacts: List<FeasibleFact>, val leaked: Boolean)

One entry per declared sink the analyzer evaluated. For a reached configured sink, the id field is the same as the matching ICFG node's id. For an unreached configured sink with no analyzer call-site node, the entry is a negative verdict and may not have a corresponding ICFG node. calleeSymbol and calleeDemangled are duplicated here for callers that want sink metadata without joining back to the ICFG.

Link copied to clipboard
data class SinkDataFlowDAG(val segments: List<DataFlowSegment> = emptyList(), val edges: List<DataFlowSegmentEdge> = emptyList(), val states: List<FlowState> = emptyList(), val segmentPayloads: List<SegmentPayload> = emptyList(), val components: List<EvidenceComponent> = emptyList())

Per-physical-sink data-flow evidence. V5 stores a flattened segment DAG. V6 interns exact (instruction, fact) states and ordered payloads while retaining one isolated EvidenceComponent per positive solver/sink cell. Reconstruction walks backward from the sink; serialized edges point in the forward propagation direction (from upstream of to).

Link copied to clipboard
data class SolverExecution(val id: String, val sourceBatchIndex: Int, val sourceBatchCount: Int, val sinkBatchIndex: Int, val sinkBatchCount: Int, val sourceSymbols: List<String>, val sinkSymbols: List<String>, val explicitEsgNodeCount: Long? = null, val sinkVerdicts: List<SolverSinkVerdict>)
Link copied to clipboard
data class SolverSinkVerdict(val calleeSymbol: String, val reached: Boolean, val physicalSinkInstructionIds: List<String>, val reachedPhysicalSinkInstructionIds: List<String>)
Link copied to clipboard

Reads source text for instruction-level CodeConstructViews and stores it as tooltip metadata at the instruction's file:line location. The IR node label stays IR-specific (instruction-N: opcode) so multiple IR operations mapped to the same source line remain distinguishable.

Link copied to clipboard

Two-state source-to-sink verdict. Z3 feasibility, when present, is optional path metadata and does not participate in the report verdict.

Link copied to clipboard

Generates the compact SVG sprite shipped with STIG reports from the pinned Iconify JSON packages installed under js-vendor/node_modules and canonical STIG vector resources.

Link copied to clipboard

Canonical vector artwork shared by Dokka sprites and MkDocs presentation-group masks.

Link copied to clipboard

Generates a standalone comparison sheet for choosing Highway metamodel icons.

Link copied to clipboard

Presentation-only semantic families for Highway metamodel icons and model-tree nodes.

Link copied to clipboard

The set of stig-icons-* sprite IDs the diagram pipeline references.

Link copied to clipboard

Renders a laid-out Vista as an SVG string. Pure function — no I/O, no JVM-wide state — so callers (markdown task, file writer, in-process unit tests) drive the bytes however they like.

Link copied to clipboard

Two-axis "swimlane" placement for the flow views (data / control / ICFG), shared by Cytoscape and Sigma — both consume view.position, so a single computed layout positions both. Cytoscape additionally draws the function / namespace / element constructs as foldable compound boxes (data.parent); Sigma shows the same leaf coordinates flat, without boxes.

Link copied to clipboard
object Transform

View-specific reductions on a Vista — the layout-free stage between Enrichment and the exporters.

Functions

Link copied to clipboard
fun AnalysisResult.dataFlowEndpointSummary(includeSegmentIds: Boolean = true, logicalSinkSymbol: String? = null): DataFlowEndpointSummary

Reads only the source/sink boundary facts needed by aggregate diagrams and endpoint postconditions. Schema-v7 evidence is traversed in its compact representation; no SinkDataFlowDAG, DataFlowSegment, or segment edge is constructed.

Link copied to clipboard
fun main(args: Array<String>)

CLI entry point used by :stig-gradle-plugin:stigGenerateStigIcons.

fun main(args: Array<String>)

CLI entry point used by :stig-gradle-plugin:stigGenerateModelIconProposal.

Link copied to clipboard

Decompresses exactly one physical sink's schema-v7 component references. V5/v6 values are already sink-local and are returned unchanged. The generated segment/edge IDs identify (component, topology position) and do not collapse equal payloads at different graph positions.

Link copied to clipboard

Derives one logical-sink view from an aggregate analyzer result.

Generated with STIG