Skip to content

Conversation

@aviatesk
Copy link
Member

This change is not necessary for NativeInterpreter at all, but is particularly useful for JET. For error reporting, which is the purpose of JETAnalyzer, it is desirable to present error causes in a user-understandable form even when concrete evaluation presents errors. This requires analysis using regular abstract interpretation (constant propagation) in general. However, to reduce false positives, the precision that concrete evaluation brings is very important, and completely disabling concrete evaluation is not desirable either. Currently, JETAnalyzer aims to avoid this tradeoff by limiting concrete evaluation to only some functions, but this approach does not scale and occasionally causes problems like #59884.

This commit enables ad-hoc cancellation of concrete evaluation based on the result of concrete_eval_call, allowing JETAnalyzer to fallback to abstract interpretation only when concrete evaluation causes errors, fundamentally avoiding such problems.

This change is not necessary for `NativeInterpreter` at all, but is
particularly useful for JET. For error reporting, which is the purpose
of `JETAnalyzer`, it is desirable to present error causes in a
user-understandable form even when concrete evaluation presents errors.
This requires analysis using regular abstract interpretation (constant
propagation) in general. However, to reduce false positives, the
precision that concrete evaluation brings is very important, and
completely disabling concrete evaluation is not desirable either.
Currently, `JETAnalyzer` aims to avoid this tradeoff by limiting
concrete evaluation to only some functions, but this approach does not
scale and occasionally causes problems like #59884.

This commit enables ad-hoc cancellation of concrete evaluation based on
the result of `concrete_eval_call`, allowing `JETAnalyzer` to fallback
to abstract interpretation only when concrete evaluation causes errors,
fundamentally avoiding such problems.
@aviatesk aviatesk added the backport 1.12 Change should be backported to release-1.12 label Oct 19, 2025
@aviatesk aviatesk changed the title absint: enable ad-hoc cancellation of concrete evaluation absint: allow ad-hoc cancellation of concrete evaluation Oct 19, 2025
@aviatesk aviatesk merged commit c6091de into master Oct 20, 2025
9 of 10 checks passed
@aviatesk aviatesk deleted the avi/ad-hoc-absint branch October 20, 2025 17:57
KristofferC pushed a commit that referenced this pull request Oct 21, 2025
This change is not necessary for `NativeInterpreter` at all, but is
particularly useful for JET. For error reporting, which is the purpose
of `JETAnalyzer`, it is desirable to present error causes in a
user-understandable form even when concrete evaluation presents errors.
This requires analysis using regular abstract interpretation (constant
propagation) in general. However, to reduce false positives, the
precision that concrete evaluation brings is very important, and
completely disabling concrete evaluation is not desirable either.
Currently, `JETAnalyzer` aims to avoid this tradeoff by limiting
concrete evaluation to only some functions, but this approach does not
scale and occasionally causes problems like #59884.

This commit enables ad-hoc cancellation of concrete evaluation based on
the result of `concrete_eval_call`, allowing `JETAnalyzer` to fallback
to abstract interpretation only when concrete evaluation causes errors,
fundamentally avoiding such problems.

(cherry picked from commit c6091de)
KristofferC pushed a commit that referenced this pull request Oct 21, 2025
This change is not necessary for `NativeInterpreter` at all, but is
particularly useful for JET. For error reporting, which is the purpose
of `JETAnalyzer`, it is desirable to present error causes in a
user-understandable form even when concrete evaluation presents errors.
This requires analysis using regular abstract interpretation (constant
propagation) in general. However, to reduce false positives, the
precision that concrete evaluation brings is very important, and
completely disabling concrete evaluation is not desirable either.
Currently, `JETAnalyzer` aims to avoid this tradeoff by limiting
concrete evaluation to only some functions, but this approach does not
scale and occasionally causes problems like #59884.

This commit enables ad-hoc cancellation of concrete evaluation based on
the result of `concrete_eval_call`, allowing `JETAnalyzer` to fallback
to abstract interpretation only when concrete evaluation causes errors,
fundamentally avoiding such problems.

(cherry picked from commit c6091de)
@KristofferC KristofferC mentioned this pull request Oct 21, 2025
19 tasks
aviatesk referenced this pull request in aviatesk/JET.jl Oct 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport 1.12 Change should be backported to release-1.12

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants