Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Silver sometimes auto-generates triggers that cannot be used by Silicon because of missing old-wrappers #740

Closed
marcoeilers opened this issue Sep 13, 2023 · 0 comments

Comments

@marcoeilers
Copy link
Contributor

For the following program

function foo(i: Int): Int
  requires i > 0
{
  i + 5
}

predicate P()
predicate Q() { true }

function bar(i: Int): Int
  requires i > 0
  requires P()

method m() 
  requires P()
  requires Q()
{
  assume forall i: Int ::  i > 0 ==> foo(i * 6 + 1 ) == old( unfolding Q() in bar(i))

  assert bar(8) == 48+1+5
}

Silver generates the trigger { bar(i) } for the assumed quantifier. However, Silicon cannot use this trigger (the warning Might not be able to use trigger bar(i), since it is not evaluated while evaluating the body of the quantifier is emitted). Silver should generate { old(bar(i)) } instead, since that is (ignoring the unfolding) the expression that actually occurs inside the quantifier, and that Silicon can use.

JonasAlaif pushed a commit that referenced this issue Sep 14, 2023
JonasAlaif pushed a commit that referenced this issue Sep 14, 2023
marcoeilers added a commit that referenced this issue Oct 17, 2023
marcoeilers added a commit that referenced this issue Oct 18, 2023
…ce_proper

Cleaner implementation of fix for issue #740
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant