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
Add an expected-guided simplification step to state error derivations #297
The final Found step in a state error can contain facts from state sets unrelated to Expected. The user must identify the relevant fact and trace version equalities manually.
Current example
The last simplification step for preview.setTiling(...) is:
Expected concerns the tiling state of preview³⁰⁴. The relevant startTiling(preview²⁹⁹) fact and the version link are present, but compression facts remain in the final explanation.
Desired behavior
Append a step labeled “Relevant to this requirement” after the existing simplification steps when the verifier can safely produce one. In this example, it should retain startTiling(preview²⁹⁹) and the equality needed to relate its tiling state to preview³⁰⁴. It should omit compression facts only if their independence from this requirement has been established. The back arrow should return to the full step shown above.
This is a simplification step in the error display. It must not change the verification condition checked by the solver or the verification result.
Implementation direction
Give the new pass both Expected and the simplified Found expression. VCChecker.throwStateRefinementError has both when it constructs the error.
Use expression and state set information to identify the receiver, relevant state set, and necessary version equalities.
Remove a clause only when its independence has been established. Keep clauses whose role is uncertain.
Append the result to the derivation history with the metadata needed for source links and backward navigation. Do not infer dependencies from rendered names.
Acceptance criteria
The scanner error gains a final “Relevant to this requirement” step showing the startTiling fact and every necessary version link.
Proven independent compression facts are omitted; uncertain facts remain.
The existing full step remains available through the back arrow.
No step is added when safe cleanup cannot be established.
Expected concerns only the undo state set (state1), but Found keeps the frame equalities for the redo state set (state2(...) == state2(...)) and for limit(...). It also shows internal names for call results, #canRedo_result and #getUndoManager_result, which the message does not explain.
Part of this example is caused by a different problem: switch cases are not modelled separately. The REDO case's effects reach the UNDO case, which is where #canRedo_result and undoManager@70 come from (a separate issue is being filed for this). These facts all depend on the same #canRedo_result condition, so this issue's pass cannot drop the state2/limit facts on its own. For that reason, the main target is the scanner example below.
E_A3_07 (the scanner/preview example from this issue)
State Refinement Error: found startTiling(preview@53) && state2(preview@53) == state2(preview@52) && compressionSet(preview) && state1(preview) == state1(preview@53) but expected tilingExplicit(preview) || tilingSet(preview)
Here no switch or condition is involved: state2/compressionSet belong to the compression state set and share no term with the tiling state set that Expected names. The relevant step should be startTiling(preview@53) && state1(preview) == state1(preview@53).
Internal #<method>_result names
Advisor rule: if users are not told what something means and it does not make sense to them, do not show it. Proposal: write a refined call result as the call itself (undoManager.canRedo(), frame.getUndoManager()) wherever it reaches the shown Found. This changes how names are displayed (DisplayNames/translation table), and it applies to refinement errors too, not only to this state-error step. So I am leaving it out of this issue and suggest it as a follow-up. The same rule applies to the state1/state2 names of frame equalities, which are also never explained.
Following PM feedback, the step is now labelled Relevant to Expected instead of "Relevant to this requirement" (#495). The label is the step's simplification name, which the server already sends to vscode.
Activity
CatarinaGamboa commentedon Nov 6, 2026
Two more examples from the error-message study, run on current
main(ae278d2).A1_56 after a partial fix (only
redo()guarded)Expected concerns only the undo state set (
state1), but Found keeps the frame equalities for the redo state set (state2(...) == state2(...)) and forlimit(...). It also shows internal names for call results,#canRedo_resultand#getUndoManager_result, which the message does not explain.Part of this example is caused by a different problem: switch cases are not modelled separately. The
REDOcase's effects reach theUNDOcase, which is where#canRedo_resultandundoManager@70come from (a separate issue is being filed for this). These facts all depend on the same#canRedo_resultcondition, so this issue's pass cannot drop thestate2/limitfacts on its own. For that reason, the main target is the scanner example below.E_A3_07 (the scanner/preview example from this issue)
Here no switch or condition is involved:
state2/compressionSetbelong to the compression state set and share no term with the tiling state set that Expected names. The relevant step should bestartTiling(preview@53) && state1(preview) == state1(preview@53).Internal
#<method>_resultnamesAdvisor rule: if users are not told what something means and it does not make sense to them, do not show it. Proposal: write a refined call result as the call itself (
undoManager.canRedo(),frame.getUndoManager()) wherever it reaches the shown Found. This changes how names are displayed (DisplayNames/translation table), and it applies to refinement errors too, not only to this state-error step. So I am leaving it out of this issue and suggest it as a follow-up. The same rule applies to thestate1/state2names of frame equalities, which are also never explained.CatarinaGamboa commentedon Nov 6, 2026
Following PM feedback, the step is now labelled Relevant to Expected instead of "Relevant to this requirement" (#495). The label is the step's simplification name, which the server already sends to vscode.