Skip to content

3.1.0: the level-4 points-to DDG tier now depends on --external-calls; a plain -a 4 loses 276 edges #240

Description

@rahlk

Problem

In 3.1.0 the level-4 points-to dependence tier is only computed when --external-calls is passed. Before 3.1.0 it was unconditional.

Four runs over the same daytrader8 tree, same -a 4, only the flag varying:

run ddg prov == ["points-to"]
3.0.3 -a 4 10,430 1,134
3.1.0 -a 4 10,154 858
3.1.0 -a 4 --external-calls 10,430 1,134
3.1.0 --emit neo4j 10,430 1,134

276 points-to edges disappear from a plain -a 4 run at 3.1.0 that were present at 3.0.3.

Why it looks like a defect rather than a design change

--external-calls is documented as controlling whether out-of-project call targets are homed — that is, whether external_symbols is populated. Nothing in its description suggests it gates a dependence-analysis tier. A caller who wants points-to dataflow has no reason to think they need a flag about external symbol resolution, and the two runs report the same max_level either way, so nothing in the output says a tier is missing.

Downstream effect, already observable

--emit neo4j forces --external-calls, and python-sdk's in-process backend never passes it. So on 3.1.0 the graph is a strict superset of the JSON payload by exactly those 276 edges, and the same value slice reaches further over Neo4j than in process — for the same project, at the same analysis level. Three python-sdk parity tests had to move from equality to containment as a result.

That asymmetry did not exist at 3.0.3, and it is the kind that is hard to notice: both answers look plausible, and neither is empty.

Expected

Either the points-to tier is computed at -a 4 regardless of --external-calls, or — if the coupling is deliberate — the flag's documentation says so and the payload records which tiers were computed, so a consumer can tell a missing tier from an absent dependence.

Repro

codeanalyzer -i <project> -a 4 -o out-plain
codeanalyzer -i <project> -a 4 --external-calls -o out-flag

Count ddg entries whose prov is ["points-to"] in each analysis.json.

Environment

codeanalyzer-java 3.0.3 and 3.1.0, PyPI wheels with the bundled JVM, macOS 15 arm64. Measured while taking 3.1.0 up in python-sdk (#369).

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions