@@ -254,7 +254,7 @@ object executor extends ExecutionRules {
254254 val edgeConditions = sortedEdges.collect{case ce : cfg.ConditionalEdge [ast.Stmt , ast.Exp ] => ce.condition}
255255 .distinct
256256
257- type PhaseData = (State , RecordedPathConditions , Set [FunctionDecl ])
257+ type PhaseData = (State , RecordedPathConditions , Set [FunctionDecl ], Seq [ MacroDecl ] )
258258 var phase1data : Vector [PhaseData ] = Vector .empty
259259
260260 (executionFlowController.locally(sBody, v)((s0, v0) => {
@@ -263,7 +263,8 @@ object executor extends ExecutionRules {
263263 produces(s0, freshSnap, invs, ContractNotWellformed , v0)((s1, v1) => {
264264 phase1data = phase1data :+ (s1,
265265 v1.decider.pcs.after(mark),
266- v1.decider.freshFunctions /* [BRANCH-PARALLELISATION] */ )
266+ v1.decider.freshFunctions /* [BRANCH-PARALLELISATION] */ ,
267+ v1.decider.freshMacros /* [BRANCH-PARALLELISATION] */ )
267268 Success ()
268269 })})
269270 combine executionFlowController.locally(s, v)((s0, v0) => {
@@ -272,10 +273,11 @@ object executor extends ExecutionRules {
272273 v1.decider.prover.comment(" Loop head block: Execute statements of loop head block (in invariant state)" )
273274 phase1data.foldLeft(Success (): VerificationResult ) {
274275 case (result, _) if ! result.continueVerification => result
275- case (intermediateResult, (s1, pcs, ff1)) => /* [BRANCH-PARALLELISATION] ff1 */
276+ case (intermediateResult, (s1, pcs, ff1, fm1 )) => /* [BRANCH-PARALLELISATION] ff1, m1 */
276277 val s2 = s1.copy(invariantContexts = sLeftover.h +: s1.invariantContexts)
277278 intermediateResult combine executionFlowController.locally(s2, v1)((s3, v2) => {
278279 v2.decider.declareAndRecordAsFreshFunctions(ff1 -- v2.decider.freshFunctions) /* [BRANCH-PARALLELISATION] */
280+ v2.decider.declareAndRecordAsFreshMacros(fm1.filter(! v2.decider.freshMacros.contains(_))) /* [BRANCH-PARALLELISATION] */
279281 v2.decider.assume(pcs.assumptions, Option .when(withExp)(DebugExp .createInstance(" Loop invariant" , pcs.assumptionExps)), false )
280282 v2.decider.prover.saturate(Verifier .config.proverSaturationTimeouts.afterContract)
281283 if (v2.decider.checkSmoke())
0 commit comments