Skip to content

Strange behaviour of unconstrained quantified permissions #342

@viper-admin

Description

@viper-admin

Created by @alexanderjsummers on 2018-06-04 15:54
Last updated on 2018-06-06 10:25

In the following example, an assumption guarantees that a particular field location is not given permission by a quantified permission, but the permission is still available in practice. I suspect this is related to an unsoundness in the axiomatisation (see this Carbon issue and its accompanying test case in the test suite), but it is not possible to e.g. prove false.

#!scala
field val : Int

function bool2Ref(b: Bool) : Ref

method m(x:Ref)
  requires forall b:Bool :: acc(bool2Ref(b).val)
  requires x != bool2Ref(true) && x != bool2Ref(false)
  {
    x.val := 4 // should fail (but doesn't)
    assert false // does fail
  } 

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions