Permissions: Bad loop (failing case 1)

Simple verification example case with permissions. A shared variable `val` is updated in a loop, but the order of the clauses in the loop invariant do matter here. This example is failing, since the `Perm(val,100)` invariant clause needs to be placed before the `val+tmp==\old(val)+n && tmp>0` clause.

General Information

  • Backend: Chalice
  • Language: Java
  • Features: Loop invariants
  • Path to Example File: permissions/BadLoop1.java
  • Should Verify: Yes
  • Date: 2017-06-20
  • Lines of Code: 16 (comments not included)
  • Lines of Specification: 4 (25.0% of total)
  • Computation Time: 8.3 seconds