Skip to content

Invariant mask analysis too strict #23

@wies

Description

@wies

The invariant mask analysis does not allow invariants to be allocated and discarded within the same scope. Example:

field f: Ref

inv p(x: Ref) {
  exists v: Ref :: own(x.f, v)
}

proc create() 
  returns (x: Ref)
  ensures p(x)
{
  x := new (f: null);
  fold p(x);
}

proc foo() 
{
  val x := create();
}

This leads to:

16 | {
      ^
Verification Error: Cannot call create. The invariant p required by create is not available in the current mask.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions