Skip to content

Invariant inference 6/6: show inferred invariants and hints in error messages #548

Open
0 of 2 issues completed

Description

@CatarinaGamboa

Part of the loop invariant inference plan (parent issue). Needs a PM decision before work starts.

Error messages.

Sub-issues

Sub-issues

0 of 2 Issues completed
Loading 2 sub-issues

Activity

  1. added
    enhancement
    on Nov 23, 2026
  2. CatarinaGamboa commented on Nov 23, 2026

    @CatarinaGamboa
    CollaboratorAuthor

    PM decisions (2026-11-23)

    1. Message (terminal, hover): inferred facts stay inside Found as ordinary facts, as today (found i < 10 && i >= 0 && i <= 10 but expected i < 9).
    2. VS Code side panel: the Found steps get a step that shows where those facts come from, e.g. "Inferred for the loop at line 10 (holds on every iteration): i >= 0 && i <= 10", followed by the usual simplification steps (which can show redundant facts such as i <= 10 being dropped).
    3. Loop-start names (total@18#1) stay in Found and are explained in the panel, like the other generated names.
    4. Hint: when the counterexample involves a variable that an enclosing loop changes and inference could not prove what is needed, suggest stating the invariant with @Refinement on the declaration. Prototype first and judge on real examples before keeping it.

    Work is split into:

    • verifier: mark the inferred facts (and their loop's line) in the diagnostic data, and the hint;
    • vscode-liquidjava: the panel step and the name explanation.
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

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions