Skip to content

v2 Stage 3: L3 intraprocedural CFG/CDG/DDG (syntactic) #73

Description

@rahlk

Part of #69.

Stage 3 — L3 intraprocedural CFG/CDG/DDG (syntactic)

Branch:feat/v2-stage3-l3

Deliverables:

  • dataflow/identity.py — the (signature, int node_id) ↔ (can:// callable-id, ordinal-id) bijection; consumed by both emitters.
  • Populate body with statement nodes + @entry/@exit; emit cfg/cdg/ddg edge lists on each callable, re-targeting the existing cfg/dominance/defuse kernels through the identity map.
  • Split the current PDG rows into cfg/cdg/ddg; add a syntactic-only DDG mode (textual interference, oracle bypassed, prov:["ssa"]).
  • CLI: --graphs cfg,dfg,pdg scoping; --graph-field-depth at L3+; sdg requires -a 4 (flag error otherwise).
  • Neo4j: PyCFGNode keyed by ordinal id; PY_DDG gains prov.
  • Migrate test/test_dataflow_{cfg,dominance,defuse,pdg,scc,cpg,slicing}.py to v2 ids.

Files:dataflow/{identity,builder,defuse}.py, core.py, __main__.py, neo4j/project.py, dataflow tests.

Gate: intraprocedural backward slice == hand-computed set exactly (over ordinal ids); assert_conformant(..., 3) incl. no dangling cfg/cdg/ddg; L2 ⊆ L3.

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

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