File tree Expand file tree Collapse file tree 1 file changed +14
-15
lines changed Expand file tree Collapse file tree 1 file changed +14
-15
lines changed Original file line number Diff line number Diff line change @@ -406,6 +406,20 @@ resultQuery goal model0 = do
406406-- SBV.Unsat -> throwError VacuousConstraints
407407-- SBV.Unk -> throwError . Unknown =<< lift SBV.getUnknownReason
408408
409+ -- SBV also provides 'inNewAssertionStack', but in 'Query'
410+ inNewAssertionStack
411+ :: ExceptT a SBV. Query CheckSuccess
412+ -> ExceptT a SBV. Query CheckSuccess
413+ inNewAssertionStack act = do
414+ push
415+ result <- act `catchError` \ e -> pop *> throwError e
416+ pop
417+ pure result
418+
419+ where
420+ push = lift $ SBV. push 1
421+ pop = lift $ SBV. pop 1
422+
409423verifyFunctionInvariants'
410424 :: Info
411425 -> [Table ]
@@ -444,21 +458,6 @@ verifyFunctionInvariants' funInfo tables pactArgs body = runExceptT $ do
444458 config :: SBV. SMTConfig
445459 config = SBV. z3
446460
447- -- SBV also provides 'inNewAssertionStack', but in 'Query'
448- inNewAssertionStack
449- :: ExceptT a SBV. Query CheckSuccess
450- -> ExceptT a SBV. Query CheckSuccess
451- inNewAssertionStack act = do
452- push
453- result <- act `catchError` \ e -> pop *> throwError e
454- pop
455- pure result
456-
457- where
458- push = lift $ SBV. push 1
459- pop = lift $ SBV. pop 1
460-
461-
462461 -- Discharges impure 'SMTException's from sbv.
463462 catchingExceptions
464463 :: IO (Either CheckFailure b )
You can’t perform that action at this time.
0 commit comments