Skip to content

v2 Stage 4: L4 interprocedural SDG + Scalpel oracle #74

Closed

Description

@rahlk

Part of #69.

Stage 4 — L4 interprocedural SDG + Scalpel oracle

Branch: feat/v2-stage4-l4

Deliverables:

  • dataflow/scalpel_oracle.py — ScalpelAliasOracle implementing the may_alias(p1, p2) contract (per the Stage 0 record); oracle selection: Scalpel primary, TypeBasedAliasOracle fallback (logged when it falls back).
  • Emit synthetic param vertices into body (@formal_in/out, …/actual_in/out); summary edges on the callable; param_in/param_out at application scope; semantic DDG (prov:["points-to"]) as the delta the oracle adds beyond L3.
  • CLI: -a max 3→4; --graphs sdg requires -a 4.
  • Neo4j: param vertices ride PyCFGNode; PY_PARAM_IN/OUT, PY_SUMMARY.
  • pyproject.toml: add [project.optional-dependencies] scalpel.
  • Migrate test/test_dataflow_sdg.py, test/test_dataflow_emission.py.

Files: dataflow/{scalpel_oracle,alias,builder,sdg,summaries}.py, __main__.py, neo4j/project.py, pyproject.toml, SDG tests.

Gate: no dangling SDG endpoints; PARAM_IN/OUT arity matches; a summary edge exists for a known transitive flow in the fixture; full superset L1 ⊆ … ⊆ L4; L4 gate runs against the Scalpel oracle (monotonic widening only).

Expand into full bite-sized tasks with superpowers:writing-plans at stage start.

Activity

  1. rahlk commented on Jul 7, 2026

    @rahlk
    ContributorAuthor

    Stage-4 note (from Stage 3 Task 3.8): the L3 conformance gate asserts every ddg edge has prov == ["ssa"] under max_level >= 3. When L4 lands the alias-derived (prov: ["points-to"]) ddg edges, relax this in test/conftest_v2.py::assert_conformant (gate the ssa-only check to exactly level 3, or widen the allowed prov set at level 4). Also: emit_l3_body hardcodes prov=["ssa"] — the L4 emission must add the points-to edges as the delta.

  2. rahlk commented on Jul 15, 2026

    @rahlk
    ContributorAuthor

    Landed on main via the stacked v2 chain (PR #88 → merge d477207) and released as v1.0.0 (schema_version 2.0.0).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions