viperproject / silicon

Symbolic-execution-based verifier for the Viper intermediate verification language.
Mozilla Public License 2.0
79 stars 32 forks source link

Non-aliasing assumptions from unfolding predicates #40

Open viper-admin opened 11 years ago

viper-admin commented 11 years ago

Created by @mschwerhoff on 2013-07-31 08:48 Last updated on 2019-11-16 14:58

Additional non-aliasing assumptions could be generated when unfolding permissions, as illustrated by the following program:

field next: Ref

predicate valid(this: Ref) {
  acc(this.next, wildcard) &&
  (((this.next) != (null)) ==> acc(valid(this.next), wildcard))
}

method testNestingUnfold(this: Ref)
  requires acc(valid(this), wildcard)
{
  unfold acc(valid(this), wildcard)
  assert ((this) != (this.next))

  if (((this.next) != (null))) {
    unfold acc(valid(this.next), wildcard)
    assert ((this.next) != (this.next.next))
    assert ((this) != (this.next.next))
  }
}

This is currently not done in Silicon.

viper-admin commented 5 years ago

@alexanderjsummers on 2019-08-28 09:34:

  • edited the description
viper-admin commented 5 years ago

@alexanderjsummers commented on 2019-08-28 09:35

The issue was fixed, but the code wasn't valid Viper code

viper-admin commented 5 years ago

@alexanderjsummers on 2019-08-28 09:35:

  • changed state from new to resolved
viper-admin commented 4 years ago

@mschwerhoff commented on 2019-11-16 14:58

This issue wasn't actually resolved, as can be seen when replacing each wildcard by 1/2 or write. It is merely a coincidence that the program as-is now verifies.

viper-admin commented 4 years ago

@mschwerhoff on 2019-11-16 14:58:

  • changed state from resolved to open