PBSOI CISG MVP v0.8 — Impact Engine

/mnt/data/PBSOI_CISG_MVP_v0.8/impact_demo · Python repository · evidence-grounded static graph

4
Files
25
Nodes
34
Edges
14
Impact targets
5
Data values
1
State regions
0
Defects
2
Motifs

MVP pipeline

Repository → CISG → Data/State Closure → Impact Engine → review scope

v0.8 technical view preserves one-hop direct evidence from bounded derived impact. Derived impact uses resolved local-call reachability and shared-state coupling; it is review scope, not a claim that every reachable entity will change at runtime.

Metrics

{
  "loaded_files": 4,
  "nodes": 25,
  "edges": 34,
  "node_types": {
    "file": 4,
    "function": 5,
    "data_value": 5,
    "data_sink": 4,
    "control": 1,
    "state_region": 1,
    "data_use": 1,
    "effect": 1,
    "boundary_call": 3
  },
  "edge_types": {
    "contains": 5,
    "imports": 3,
    "defines": 5,
    "contains_data": 5,
    "returns_value": 3,
    "calls": 6,
    "controls": 1,
    "reads_state": 2,
    "writes_state": 1,
    "flows_to": 2,
    "effect": 1
  },
  "resolved_local_calls": 3,
  "boundary_calls": 3,
  "findings_by_category": {},
  "findings_by_severity": {},
  "motif_instances": 2,
  "motif_clusters": 2,
  "data_values": 5,
  "phi_nodes": 0,
  "data_edges": 10,
  "alias_edges": 0,
  "state_regions": 1,
  "state_reads": 2,
  "state_writes": 1,
  "module_binding_reads": 0,
  "exception_handlers": 0,
  "explicit_raises": 0,
  "unresolved_local_uses": 0,
  "warnings": 0
}

Highest review breadth

KindTargetReview breadthPath
function10tests/test_a.py
function10a.py
function10b.py
function10c.py
state_region2
function1b.py

Warnings

  • None

Impact Engine

Direct = one-hop graph evidence. Derived = bounded resolved call paths + shared-state coupling. No single impact score is treated as truth.

Choose a target.

Code-Induced Semantic Graph

Overview shows 9 of 9 file/class/function entities. Full graph is in cisg.json / cisg.graphml.
a.pya.py{"id": "file_bb88d7506cfdcbc8", "type": "file", "label": "a.py", "path": "a.py", "module": "a", "status": "observed", "confidence": 1.0, "evidence": {"path": "a.py", "line": 1, "end_line": 5, "source_hash": "ed421b0a3ed16047e268a81a352da7c5d3503256f5eb4438f3327a8ee49016e6", "source_kind": "code"}}rootroot{"id": "fn_9887306795bebe6d", "type": "function", "label": "root", "path": "a.py", "module": "a", "symbol": "root", "async": false, "status": "observed", "confidence": 1.0, "evidence": {"path": "a.py", "line": 4, "end_line": 5, "source_hash": "ed421b0a3ed16047e268a81a352da7c5d3503256f5eb4438f3327a8ee49016e6", "source_kind": "code"}, "shape_signature": "shape_cf3d32cb6b58284e", "motif_signature": "motif_exact_8066e141245f", "motif_coarse_signature": "motif_coarse_c03889665559", "features": {"controls": [], "effects": [], "state_reads": 0, "state_writes": 0, "state_read_targets": [], "state_write_targets": [], "local_calls": 1, "boundary_calls": 0}}b.pyb.py{"id": "file_18225e7f6d29d67c", "type": "file", "label": "b.py", "path": "b.py", "module": "b", "status": "observed", "confidence": 1.0, "evidence": {"path": "b.py", "line": 1, "end_line": 17, "source_hash": "a9af3ee8d84e48ef8e0beb1d626c37d65ea6a9f024a53c6e923ce156667af48d", "source_kind": "code"}}middlemiddle{"id": "fn_b96e8f0f2acefac4", "type": "function", "label": "middle", "path": "b.py", "module": "b", "symbol": "middle", "async": false, "status": "observed", "confidence": 1.0, "evidence": {"path": "b.py", "line": 6, "end_line": 12, "source_hash": "a9af3ee8d84e48ef8e0beb1d626c37d65ea6a9f024a53c6e923ce156667af48d", "source_kind": "code"}, "shape_signature": "shape_51c8820e826d76fc", "motif_signature": "motif_exact_b20ce41fd280", "motif_coarse_signature": "motif_coarse_f8acb1311ec1", "features": {"controls": ["with_scope"], "effects": ["file_io"], "state_reads": 1, "state_writes": 1, "state_read_targets": ["b:global:CACHE"], "state_write_targets": ["b:global:CACHE"], "local_calls": 1, "boundary_calls": 3}}observeobserve{"id": "fn_68f4df8337273077", "type": "function", "label": "observe", "path": "b.py", "module": "b", "symbol": "observe", "async": false, "status": "observed", "confidence": 1.0, "evidence": {"path": "b.py", "line": 15, "end_line": 17, "source_hash": "a9af3ee8d84e48ef8e0beb1d626c37d65ea6a9f024a53c6e923ce156667af48d", "source_kind": "code"}, "shape_signature": "shape_02ece4a7df94110c", "motif_signature": "motif_exact_3f6528288685", "motif_coarse_signature": "motif_coarse_fca123bd72d6", "features": {"controls": [], "effects": [], "state_reads": 1, "state_writes": 0, "state_read_targets": ["b:global:CACHE"], "state_write_targets": [], "local_calls": 0, "boundary_calls": 0}}c.pyc.py{"id": "file_dcbe72e1b8e1a28e", "type": "file", "label": "c.py", "path": "c.py", "module": "c", "status": "observed", "confidence": 1.0, "evidence": {"path": "c.py", "line": 1, "end_line": 2, "source_hash": "a9809ee1c71cf4fb1eccf60bf483103c288bfeaf9aec83684c528a2efd6a466d", "source_kind": "code"}}leafleaf{"id": "fn_c3c3f7416208753c", "type": "function", "label": "leaf", "path": "c.py", "module": "c", "symbol": "leaf", "async": false, "status": "observed", "confidence": 1.0, "evidence": {"path": "c.py", "line": 1, "end_line": 2, "source_hash": "a9809ee1c71cf4fb1eccf60bf483103c288bfeaf9aec83684c528a2efd6a466d", "source_kind": "code"}, "shape_signature": "shape_bde66ac8d10840cf", "motif_signature": "motif_exact_83e42922287b", "motif_coarse_signature": "motif_coarse_fca123bd72d6", "features": {"controls": [], "effects": [], "state_reads": 0, "state_writes": 0, "state_read_targets": [], "state_write_targets": [], "local_calls": 0, "boundary_calls": 0}}tests/test_a.pytests/test_a.py{"id": "file_f5f4a47b633152e6", "type": "file", "label": "tests/test_a.py", "path": "tests/test_a.py", "module": "tests.test_a", "status": "observed", "confidence": 1.0, "evidence": {"path": "tests/test_a.py", "line": 1, "end_line": 5, "source_hash": "3c5756cfd4cc615df1e33f1d19e5a3771bf2a4832e6f843b1ada68777701049a", "source_kind": "code"}}test_roottest_root{"id": "fn_519c6c7efd37f8c7", "type": "function", "label": "test_root", "path": "tests/test_a.py", "module": "tests.test_a", "symbol": "test_root", "async": false, "status": "observed", "confidence": 1.0, "evidence": {"path": "tests/test_a.py", "line": 4, "end_line": 5, "source_hash": "3c5756cfd4cc615df1e33f1d19e5a3771bf2a4832e6f843b1ada68777701049a", "source_kind": "code"}, "shape_signature": "shape_4859098cec48ffce", "motif_signature": "motif_exact_8066e141245f", "motif_coarse_signature": "motif_coarse_c03889665559", "features": {"controls": [], "effects": [], "state_reads": 0, "state_writes": 0, "state_read_targets": [], "state_write_targets": [], "local_calls": 1, "boundary_calls": 0}}

Node evidence

Click a node.

SSA-like data flow

Local data footprint feeds Impact Engine but is not transitive across function boundaries.

RelationSourceTargetEvidenceStatus
returns_valuex#0return@5a.py:5observed
flows_tohandle#1expr@11b.py:11observed
flows_toold#1expr@11b.py:11observed
returns_valuex#0return@12b.py:12observed
returns_valuex#0return@2c.py:2observed

State regions

AccessFunctionRegionKindEvidence
reads_statemiddleb:global:CACHEmodule_globalb.py:8
writes_statemiddleb:global:CACHEmodule_globalb.py:9
reads_stateobserveb:global:CACHEmodule_globalb.py:17

Module binding reads

FunctionBindingEvidence

Explicit exception flow

RelationSourceTargetEvidenceStatus

Findings

SeverityClassTypeLocationSymbolEvidence statement

Deterministic motif candidates

KindPathSymbolConfidenceStructural rule
read_modify_writeb.pymiddle0.86same function reads and writes the same state target
resource_scopeb.pymiddle0.92with/async-with establishes bounded resource scope

Name-independent structural signature clusters

Motif IDMembersIdentity basis
motif_coarse_c038896655592name-independent coarse structural feature signature
motif_coarse_fca123bd72d62name-independent coarse structural feature signature

Per-file SHA-256

PathBytesSHA-256
a.py57ed421b0a3ed16047…
b.py238a9af3ee8d84e48ef…
c.py30a9809ee1c71cf4fb…
tests/test_a.py623c5756cfd4cc615d…

Epistemic contract

observed

  • Python AST definitions
  • imports
  • call syntax
  • control syntax
  • source spans
  • local file hashes
  • SSA-like local definitions/uses
  • self/cls/explicit-global state accesses
  • module-binding reads
  • explicit raise/except syntax
  • definition-time Python name aliases

strongly_inferred

  • local call target resolution
  • parameter-container state regions
  • effect hints
  • branch/loop phi merges
  • explicit exception catch matching
  • structural motif candidates

unresolved

  • runtime dispatch
  • reflection
  • native extension behavior
  • external library semantics
  • precise heap points-to beyond definition-time alias
  • dynamic exception behavior from calls
  • concurrency semantics