Skip to content

Let expression in forall body causes exception #641

@Felalolf

Description

@Felalolf

The following Viper Snipet causes Silicon to crash with "java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: java.lang.RuntimeException: Unexpected expression acc(y.f, write) cannot be symbolically evaluated".

field f: Int

method bar(x: Seq[Ref]) 
  requires forall i: Int, j: Int :: 0 <= i && i < |x| && 0 <= j && j < |x| && i != j ==> x[i] != x[j]
  requires forall i: Int :: 0 <= i && i < |x| ==> let y == (x[i]) in acc(y.f) // fails
  requires forall i: Int :: 0 <= i && i < |x| ==>  let y == (x[i]) in y.f >= 5 // ok

I get the error in the IDE and also when verifying corresponding Viper AST nodes directly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    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