Skip to content

Commit

Permalink
Computing new macros from else branch in a less stupid way
Browse files Browse the repository at this point in the history
  • Loading branch information
marcoeilers committed Sep 16, 2024
1 parent d2b4d43 commit dfb0380
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/main/scala/rules/Brancher.scala
Original file line number Diff line number Diff line change
Expand Up @@ -148,12 +148,12 @@ object brancher extends BranchingRules {
v1.decider.setCurrentBranchCondition(negatedCondition, (negatedConditionExp, negatedConditionExpNew))

var functionsOfElseBranchdDeciderBefore: Set[FunctionDecl] = null
var macrosOfElseBranchDeciderBefore: Seq[MacroDecl] = null
var nMacrosOfElseBranchDeciderBefore: Int = 0

if (v.uniqueId != v0.uniqueId) {
v1.decider.prover.saturate(Verifier.config.proverSaturationTimeouts.afterContract)
if (s.underJoin) {
macrosOfElseBranchDeciderBefore = v1.decider.freshMacros
nMacrosOfElseBranchDeciderBefore = v1.decider.freshMacros.size
functionsOfElseBranchdDeciderBefore = v1.decider.freshFunctions
}
}
Expand All @@ -164,8 +164,7 @@ object brancher extends BranchingRules {
v1.decider.setProverOptions(proverArgsOfElseBranchDecider)
if (s.underJoin) {
functionsOfElseBranchDecider = v1.decider.freshFunctions -- functionsOfElseBranchdDeciderBefore
val elseMacrosBeforeSet = HashSet.from(macrosOfElseBranchDeciderBefore)
macrosOfElseBranchDecider = v1.decider.freshMacros.filter(m => !elseMacrosBeforeSet.contains(m))
macrosOfElseBranchDecider = v1.decider.freshMacros.drop(nMacrosOfElseBranchDeciderBefore)
}
}
result
Expand Down

0 comments on commit dfb0380

Please sign in to comment.