Skip to content

Commit

Permalink
Merge pull request #875 from viperproject/meilers_asserting
Browse files Browse the repository at this point in the history
Support for new asserting expressions
  • Loading branch information
marcoeilers authored Nov 13, 2024
2 parents 26091b7 + 4ca6695 commit 115f3f4
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/main/scala/rules/Evaluator.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1029,6 +1029,12 @@ object evaluator extends EvaluationRules {
Option.when(withExp)(s.relevantQuantifiedVariables.map(_._2.get)), v))((s4, r4, v4)
=> Q(s4, r4._1, r4._2, v4))

case ast.Asserting(eAss, eIn) =>
consume(s, eAss, pve, v)((s2, _, v2) => {
val s3 = s2.copy(g = s.g, h = s.h)
eval(s3, eIn, pve, v2)(Q)
})

/* Sequences */

case ast.SeqContains(e0, e1) => evalBinOp(s, e1, e0, SeqIn, pve, v)((s1, t, e1New, e0New, v1) =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ class HeapAccessReplacingExpressionTranslator(symbolConverter: SymbolConverter,
case loc: ast.LocationAccess => getOrFail(data.locToSnap, loc, toSort(loc.typ), Option.when(Verifier.config.enableDebugging())(extractPTypeFromExp(loc)))
case ast.Unfolding(_, eIn) => translate(toSort)(eIn)
case ast.Applying(_, eIn) => translate(toSort)(eIn)
case ast.Asserting(_, eIn) => translate(toSort)(eIn)

case eFApp: ast.FuncApp =>
val silverFunc = program.findFunction(eFApp.funcname)
Expand Down

0 comments on commit 115f3f4

Please sign in to comment.