Skip to content

Unified: captured variables - #22726

Draft
asgerf wants to merge 40 commits into
github:mainfrom
asgerf:unified/captured-variables
Draft

asgerf wants to merge 40 commits into
github:mainfrom
asgerf:unified/captured-variables

Conversation

@asgerf

@asgerf asgerf commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

No description provided.

Comment on lines +243 to +247
this.isImplicitParameter(callable, pos) and
result = "[" + pos + " param] " + callable.toString()
or
this.isCallableEx(callable) and
result = "[callable] " + callable.toString()
asgerf added 27 commits October 2, 2026 12:25
These consistency violations originate from the VariableCapture instantation
in C#, JS, Python, and Ruby.
The previously-added consistency errors are gone.
Unified also had consistency errors from its LocalSSA instantiation, due
to its use of synthetic read nodes to represent post-update positions.
Many variables can have a post-update at the same CFG node.
Many tests passed for the wrong reasons, due to the SSA bug.

We need more library/operator modelling to actually find these flows.
Switched to TaintTracking and adds some very ad-hoc steps to recover
most of the results.

Some more tests pass and others fail; these are now consistent with what
we actually model.
The C++ instantiation of DataFlowIntegration generated a bad join order
Since the callee itself is now always considered to be an argument, it
needs to have a post-update node. This only matters when the callee is
a function with captures, but it should be harmless in general.
@asgerf
asgerf force-pushed the unified/captured-variables branch from 753f0d4 to d880379 Compare October 5, 2026 08:46
Comment on lines +2159 to +2161
/**
* The given `read` reads multiple variables at once. `var` is bound to one of them.
*/
@github-actions github-actions Bot added C# JS Java Python Ruby Rust Pull requests that update Rust code labels Oct 5, 2026

This branch has not been deployed

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants