Skip to content

Commit

Permalink
Simplify havoc
Browse files Browse the repository at this point in the history
  • Loading branch information
JonasAlaif committed May 17, 2024
1 parent f306ed7 commit e669d26
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/main/scala/rules/HavocSupporter.scala
Original file line number Diff line number Diff line change
Expand Up @@ -183,12 +183,9 @@ object havocSupporter extends SymbolicExecutionRules {

val newChunks = relevantChunks.map {
case ch: MagicWandChunk =>
val havockedSnap = freshSnap(sorts.Snap, v)
val abstractLhs = freshSnap(sorts.Snap, v)
val havockedSnap = v.decider.fresh("mwsf", sorts.MagicWandSnapFunction)
val cond = replacementCond(lhs, ch.args, condInfo)

// Define a new `MagicWandSnapshot` that checks the havoc condition when being applied
val magicWandSnapshot = magicWandSupporter.createMagicWandSnapshot(abstractLhs, Ite(cond, havockedSnap, MWSFLookup(ch.snap.mwsf, abstractLhs)), v)
val magicWandSnapshot = MagicWandSnapshot(Ite(cond, havockedSnap, ch.snap.mwsf))
ch.withSnap(magicWandSnapshot)

case ch =>
Expand Down

0 comments on commit e669d26

Please sign in to comment.