@@ -574,9 +574,10 @@ main = do
574574{- | Use the parsed 'KoreExecOptions' to set up output and logging, then
575575dispatch the requested command.
576576-}
577- mainWithOptions :: KoreExecOptions -> IO ()
578- mainWithOptions execOptions = do
579- let KoreExecOptions {koreSolverOptions, bugReportOption, outputFileName} = execOptions
577+ mainWithOptions :: LocalOptions KoreExecOptions -> IO ()
578+ mainWithOptions LocalOptions {execOptions, simplifierx} = do
579+ let KoreExecOptions {koreSolverOptions, bugReportOption, outputFileName} =
580+ execOptions
580581 ensureSmtPreludeExists koreSolverOptions
581582 exitCode <-
582583 withBugReport Main. exeName bugReportOption $ \ tmpDir -> do
@@ -586,7 +587,7 @@ mainWithOptions execOptions = do
586587 }
587588 writeOptionsAndKoreFiles tmpDir execOptions'
588589 e <-
589- mainDispatch execOptions'
590+ mainDispatch LocalOptions { execOptions = execOptions', simplifierx}
590591 & handle handleWithConfiguration
591592 & handle handleSomeException
592593 & runKoreLog tmpDir koreLogOptions
@@ -612,36 +613,38 @@ mainWithOptions execOptions = do
612613 throwM someException
613614
614615-- | Dispatch the requested command, for example 'koreProve' or 'koreRun'.
615- mainDispatch :: KoreExecOptions -> Main ExitCode
616+ mainDispatch :: LocalOptions KoreExecOptions -> Main ExitCode
616617mainDispatch = warnProductivity . mainDispatchWorker
617618 where
618619 warnProductivity :: Main (KFileLocations , ExitCode ) -> Main ExitCode
619620 warnProductivity action = do
620621 (kFileLocations, exitCode) <- action
621622 warnIfLowProductivity kFileLocations
622623 return exitCode
623- mainDispatchWorker :: KoreExecOptions -> Main (KFileLocations , ExitCode )
624- mainDispatchWorker execOptions
624+ mainDispatchWorker ::
625+ LocalOptions KoreExecOptions ->
626+ Main (KFileLocations , ExitCode )
627+ mainDispatchWorker localOptions@ LocalOptions {execOptions}
625628 | Just proveOptions@ KoreProveOptions {bmc} <- koreProveOptions =
626629 if bmc
627- then koreBmc execOptions proveOptions
628- else koreProve execOptions proveOptions
630+ then koreBmc localOptions proveOptions
631+ else koreProve localOptions proveOptions
629632 | Just searchOptions <- koreSearchOptions =
630- koreSearch execOptions searchOptions
633+ koreSearch localOptions searchOptions
631634 | Just mergeOptions <- koreMergeOptions =
632- koreMerge execOptions mergeOptions
635+ koreMerge localOptions mergeOptions
633636 | otherwise =
634- koreRun execOptions
637+ koreRun localOptions
635638 where
636639 KoreExecOptions {koreProveOptions} = execOptions
637640 KoreExecOptions {koreSearchOptions} = execOptions
638641 KoreExecOptions {koreMergeOptions} = execOptions
639642
640643koreSearch ::
641- KoreExecOptions ->
644+ LocalOptions KoreExecOptions ->
642645 KoreSearchOptions ->
643646 Main (KFileLocations , ExitCode )
644- koreSearch execOptions searchOptions = do
647+ koreSearch LocalOptions { execOptions, simplifierx} searchOptions = do
645648 let KoreExecOptions {definitionFileName} = execOptions
646649 definition <- loadDefinitions [definitionFileName]
647650 let KoreExecOptions {mainModuleName} = execOptions
@@ -652,16 +655,23 @@ koreSearch execOptions searchOptions = do
652655 initial <- loadPattern mainModule patternFileName
653656 final <-
654657 execute execOptions mainModule $
655- search depthLimit breadthLimit mainModule initial target config
658+ search
659+ simplifierx
660+ depthLimit
661+ breadthLimit
662+ mainModule
663+ initial
664+ target
665+ config
656666 lift $ renderResult execOptions (unparse final)
657667 return (kFileLocations definition, ExitSuccess )
658668 where
659669 KoreSearchOptions {bound, searchType} = searchOptions
660670 config = Search. Config {bound, searchType}
661671 KoreExecOptions {breadthLimit, depthLimit} = execOptions
662672
663- koreRun :: KoreExecOptions -> Main (KFileLocations , ExitCode )
664- koreRun execOptions = do
673+ koreRun :: LocalOptions KoreExecOptions -> Main (KFileLocations , ExitCode )
674+ koreRun LocalOptions { execOptions, simplifierx} = do
665675 let KoreExecOptions {definitionFileName} = execOptions
666676 definition <- loadDefinitions [definitionFileName]
667677 let KoreExecOptions {mainModuleName} = execOptions
@@ -670,17 +680,17 @@ koreRun execOptions = do
670680 initial <- loadPattern mainModule patternFileName
671681 (exitCode, final) <-
672682 execute execOptions mainModule $
673- exec depthLimit breadthLimit mainModule strategy initial
683+ exec simplifierx depthLimit breadthLimit mainModule strategy initial
674684 lift $ renderResult execOptions (unparse final)
675685 return (kFileLocations definition, exitCode)
676686 where
677687 KoreExecOptions {breadthLimit, depthLimit, strategy} = execOptions
678688
679689koreProve ::
680- KoreExecOptions ->
690+ LocalOptions KoreExecOptions ->
681691 KoreProveOptions ->
682692 Main (KFileLocations , ExitCode )
683- koreProve execOptions proveOptions = do
693+ koreProve LocalOptions { execOptions, simplifierx} proveOptions = do
684694 let KoreExecOptions {definitionFileName} = execOptions
685695 KoreProveOptions {specFileName} = proveOptions
686696 definition <- loadDefinitions [definitionFileName, specFileName]
@@ -696,6 +706,7 @@ koreProve execOptions proveOptions = do
696706 let KoreExecOptions {breadthLimit, depthLimit} = execOptions
697707 KoreProveOptions {graphSearch} = proveOptions
698708 prove
709+ simplifierx
699710 graphSearch
700711 breadthLimit
701712 depthLimit
@@ -785,10 +796,10 @@ koreProve execOptions proveOptions = do
785796 }
786797
787798koreBmc ::
788- KoreExecOptions ->
799+ LocalOptions KoreExecOptions ->
789800 KoreProveOptions ->
790801 Main (KFileLocations , ExitCode )
791- koreBmc execOptions proveOptions = do
802+ koreBmc LocalOptions { execOptions, simplifierx} proveOptions = do
792803 let KoreExecOptions {definitionFileName} = execOptions
793804 KoreProveOptions {specFileName} = proveOptions
794805 definition <- loadDefinitions [definitionFileName, specFileName]
@@ -801,6 +812,7 @@ koreBmc execOptions proveOptions = do
801812 KoreProveOptions {graphSearch} = proveOptions
802813 checkResult <-
803814 boundedModelCheck
815+ simplifierx
804816 breadthLimit
805817 depthLimit
806818 mainModule
@@ -819,10 +831,10 @@ koreBmc execOptions proveOptions = do
819831 success = (ExitSuccess , mkTop $ mkSortVariable " R" )
820832
821833koreMerge ::
822- KoreExecOptions ->
834+ LocalOptions KoreExecOptions ->
823835 KoreMergeOptions ->
824836 Main (KFileLocations , ExitCode )
825- koreMerge execOptions mergeOptions = do
837+ koreMerge LocalOptions { execOptions, simplifierx} mergeOptions = do
826838 let KoreExecOptions {definitionFileName} = execOptions
827839 definition <- loadDefinitions [definitionFileName]
828840 let KoreExecOptions {mainModuleName} = execOptions
@@ -833,8 +845,12 @@ koreMerge execOptions mergeOptions = do
833845 eitherMergedRule <- execute execOptions mainModule $
834846 case maybeBatchSize of
835847 Just batchSize ->
836- mergeRulesConsecutiveBatches batchSize mainModule ruleIds
837- Nothing -> mergeAllRules mainModule ruleIds
848+ mergeRulesConsecutiveBatches
849+ simplifierx
850+ batchSize
851+ mainModule
852+ ruleIds
853+ Nothing -> mergeAllRules simplifierx mainModule ruleIds
838854 case eitherMergedRule of
839855 (Left err) -> do
840856 lift $ Text. hPutStrLn stderr err
0 commit comments