You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ddg edges reference endpoints that are not body nodes of their own callable #228
Some ddg edges name an endpoint key that does not exist in the callable's own body{} map. On daytrader8 at -a 4, 87 of 5,434 ddg edges dangle this way, across 38 distinct keys.
Every one of them shares a shape:
the key is always <line>:0 — column zero, which no real body-node key uses
every affected edge carries prov: ["points-to"]
cfg (6,984 edges) and cdg (4,416) have no such endpoint, and neither direction of ddg dangles for any other provenance
So it looks specific to the points-to pass minting a key that the body map never received, rather than a general keying problem.
Consequence
The Neo4j emitter materialises body nodes from body{}, so an edge whose endpoint was never a body node cannot be written: the graph holds 5,347 where the JSON claims 5,434. That is the only place a consumer reading both artefacts sees them disagree — everything else round-trips exactly.
Found while verifying that an SDK's two backends answer identically. Rather than tolerate a fuzzy count, the test now asserts the difference is exactly the set of dangling edges, so a change in this behaviour surfaces immediately.
Repro
java -jar codeanalyzer-3.0.1.jar -i <daytrader8> -a 4 -o out
then for each callable, check every ddg edge's src and dst against the keys of that callable's own body{}. The 87 misses are all <line>:0.
Not visible on a small pruned project — a fixture of four files has none — so a scale corpus is needed to see it.
Definition of done
Every ddg endpoint is a key of the callable's own body{}, or the vertex it names is emitted.
Activity
fix(ddg): drop dependence edges whose endpoint is not a body node (#229)