Skip to content

EXPERIMENT: elide Python attribute after CFG nodes - #160

Draft
yoff wants to merge 1 commit into
yoff/python-shared-cfg-dataflow-flip-dca-basefrom
yoff/python-attribute-after-elision-dca
Draft

yoff wants to merge 1 commit into
yoff/python-shared-cfg-dataflow-flip-dca-basefrom
yoff/python-attribute-after-elision-dca

Conversation

@yoff

@yoff yoff commented Oct 6, 2026

Copy link
Copy Markdown
Owner

Experimental DCA only

This draft isolates one Python shared-CFG representation experiment: merge ordinary AttributeExpr after-completion with the canonical attribute operation while retaining the operation and its exception/abrupt-completion origin.

Not proposed for merge. The purpose is to measure fleet heterogeneity and memory effects from removing a high-frequency positional CFG role.

Exact topology

  • Baseline: f7774efbc4502d015f21e001cd399d61f33cc9d9
  • Candidate: 1fd2a6c5b971f70c1c3baa259a9dd80d6c037a78
  • Sealed patch SHA-256: a54b1ffcded04ae408bab4e025fceede18479908a875e15d5124d2877d6b99f3
  • One experimental commit; two production files; no unrelated diagnostics.

Local controls

NiceGUI:

  • 21,645 fewer CFG/positional nodes;
  • five fewer blocks;
  • complete lifecycle: 91,437,534 -> 91,166,650 joined tuples, -270,884 (-0.296%);
  • rung-A shared-CFG construction: +39,003 joined tuples;
  • normal-clean cache: 31,404 -> 30,464 KiB;
  • tuple pool unchanged at 4,952 KiB.

Additional symmetric controls:

  • Langroid: -19,469 nodes, -0.193% lifecycle joins, rung A +51,079, cache -1,268 KiB;
  • DeepDiff: -4,044 nodes, -0.059% lifecycle joins, rung A +28,990, cache -376 KiB;
  • no tuple-pool growth.

Correctness gate

  • focused shared CFG/SSA tests: 8/8 passed;
  • focused Python dataflow tests: 14/14 passed;
  • exact complete canonical adjacency on NiceGUI, Langroid, and DeepDiff;
  • exact complete nonempty public local-flow relations on all three corpora;
  • SSA definitions, phis, first-use, and adjacent-use unchanged;
  • production MissingCallToDel BQRS byte-identical on all three corpora.

The known first-construction regression is caused by the generic AttributeExpr membership route; later stages save work because the reachable graph is smaller. The DCA tests whether corpus variation or space effects make this tradeoff useful anywhere beyond the pinned local controls.

Merge AttributeExpr normal completion with its canonical CFG operation node while preserving the attribute operation and exception origin. This is an isolated DCA experiment, not a production recommendation.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@yoff

yoff commented Oct 6, 2026

Copy link
Copy Markdown
Owner Author

DCA launched: github/codeql-dca-main#39772

  • Baseline: f7774efbc4502d015f21e001cd399d61f33cc9d9
  • Candidate: 1fd2a6c5b971f70c1c3baa259a9dd80d6c037a78
  • Toolchain / extractor / compiler / evaluator: be44d8072494633e7caf0a79bae276a4c5090c35
  • DCA revision: 00dae12ec8cdb10aab3fc9065a109841acc13860
  • Sources: exact canonical 48-source Python set from github/codeql-dca-main#38848
  • Suite/source configuration: nightly.qls / nightly.yml
  • Database cache: disabled
  • Grouping/action/toolchain/source inputs: structurally identical to the reference after normalizing experiment/variant/bundle identities
  • Controller: Tasks run 37544982718
  • Reports: data/yoff/PR-160-python-attribute-after/reports

The local token is not SAML-authorized for the worker organization, so dispatch used DCA’s supported --skip-assert-worker-repository-access preflight exception. The generated worker inputs were unchanged. No follow-up DCA will be launched while this experiment is unresolved.

@github-actions github-actions Bot added the Python label Oct 7, 2026
@yoff

yoff commented Oct 7, 2026

Copy link
Copy Markdown
Owner Author

DCA completed: github/codeql-dca-main#39772

  • Coverage: 54/54 successful analyze runs for each variant; 0 failed targets
  • Correctness: 0 changed code-scanning rows, 0 added/removed alerts, 0 changed query-result tuple counts
  • Total query execution time: 6,404s -> 6,425s, +0.328%
  • Complete-source analysis sum: +0.326%; paired-source median: 0.000%
  • Sources: 21 improved, 7 unchanged, 20 regressed
  • Cache after normal cleanup: -0.778%
  • Tuple-pool cache: -0.858%
  • Database after normal cleanup: -0.156%
  • DIL: +0.0661%

Conclusion: REJECT the exact experiment as a performance change. The retained-space reduction is real, but fleet runtime is neutral/slightly worse, deterministic local gains are only 0.059-0.296%, rung-A construction regresses, and generic hook machinery expands DIL. No follow-up DCA will be launched without explicit authorization.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant