Skip to content

Invariant inference 2/6: Houdini check, keep the inductive candidates at the loop head #544

Closed

Description

@CatarinaGamboa

Part of the loop invariant inference plan (parent issue). Builds on the candidates sub-issue.

Houdini check at the loop head.

  • Start check: keep only the candidates that the facts before the loop prove for the pre-loop instance.
  • Step check: check the body assuming the candidates (and the loop condition) at the head; at each back edge (end of body, after a for update, each continue) drop the candidates not proved for the last instance. Repeat until none is dropped, inside the existing checkUntilFixpoint loop, and keep only the errors of the final check.
  • Pass the surviving conjunction as the known predicate of forgetChanges at the loop head.

Done when #537's reproducers (for (int i = 0; i < 10; i++) use(i); and the while (total < 1024) accumulator) verify, and a loop whose candidate is not inductive (e.g. i decremented below 0) is still rejected. Caps on rounds for IDE time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions