Skip to content

Commit

Permalink
Merge pull request #876 from viperproject/meilers_fix_862
Browse files Browse the repository at this point in the history
Fixing issue #862
  • Loading branch information
marcoeilers authored Oct 15, 2024
2 parents 2030e3e + c9832eb commit 8641490
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion silver
2 changes: 1 addition & 1 deletion src/main/scala/rules/Evaluator.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1678,7 +1678,7 @@ object evaluator extends EvaluationRules {
Option.when(withExp)(ast.Implies(BigAnd(entry.pathConditions.branchConditionExps.map(bc => bc._2.get)), ast.EqCmp(joinExp.get, entry.data._2.get)())())))


var sJoined = entries.tail.foldLeft(entries.head.s)((sAcc, entry) =>sAcc.merge(entry.s))
var sJoined = entries.tail.foldLeft(entries.head.s)((sAcc, entry) => sAcc.merge(entry.s))
sJoined = sJoined.copy(functionRecorder = sJoined.functionRecorder.recordPathSymbol(joinSymbol))

joinDefEqs foreach { case (t, exp, expNew) => v.decider.assume(t, exp, expNew)}
Expand Down
10 changes: 8 additions & 2 deletions src/main/scala/state/State.scala
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ object State {
triggerExp2,
`partiallyConsumedHeap1`,
`permissionScalingFactor1`, `permissionScalingFactorExp1`, `isEvalInOld`,
`reserveHeaps1`, `reserveCfgs1`, `conservedPcs1`, `recordPcs1`, `exhaleExt1`,
`reserveHeaps1`, `reserveCfgs1`, conservedPcs2, `recordPcs1`, `exhaleExt1`,
ssCache2, `hackIssue387DisablePermissionConsumption1`,
`qpFields1`, `qpPredicates1`, `qpMagicWands1`, `permResources1`, smCache2, pmCache2, `smDomainNeeded1`,
`predicateSnapMap1`, `predicateFormalVarMap1`, `retryLevel`, `useHeapTriggers`,
Expand All @@ -214,6 +214,11 @@ object State {
val ssCache3 = ssCache1 ++ ssCache2
val moreCompleteExhale3 = moreCompleteExhale || moreCompleteExhale2

assert(conservedPcs1.length == conservedPcs2.length)
val conservedPcs3 = conservedPcs1
.zip(conservedPcs1)
.map({ case (pcs1, pcs2) => (pcs1 ++ pcs2).distinct })

s1.copy(functionRecorder = functionRecorder3,
possibleTriggers = possibleTriggers3,
triggerExp = triggerExp3,
Expand All @@ -222,7 +227,8 @@ object State {
ssCache = ssCache3,
smCache = smCache3,
pmCache = pmCache3,
moreCompleteExhale = moreCompleteExhale3)
moreCompleteExhale = moreCompleteExhale3,
conservedPcs = conservedPcs3)

case _ =>
val err = new StringBuilder()
Expand Down

0 comments on commit 8641490

Please sign in to comment.