From d29813263852c866f20f88504860120820499411 Mon Sep 17 00:00:00 2001 From: Yann Herklotz Date: Tue, 3 Dec 2019 20:03:17 +0000 Subject: Do not run counter example if no rerunner is specified --- src/Verismith/Reduce.hs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/Verismith/Reduce.hs') diff --git a/src/Verismith/Reduce.hs b/src/Verismith/Reduce.hs index 022dd1d..8f7bd7b 100644 --- a/src/Verismith/Reduce.hs +++ b/src/Verismith/Reduce.hs @@ -607,18 +607,19 @@ reduceWithScript top script file = do -- | Reduce a 'SourceInfo' using two 'Synthesiser' that are passed to it. reduceSynth :: (Synthesiser a, Synthesiser b, MonadSh m) - => Shelly.FilePath + => Maybe Text + -> Shelly.FilePath -> a -> b -> SourceInfo -> m SourceInfo -reduceSynth datadir a b = reduce (fromText $ "reduce_" <> toText a <> "_" <> toText b <> ".v") synth +reduceSynth mt datadir a b = reduce (fromText $ "reduce_" <> toText a <> "_" <> toText b <> ".v") synth where synth src' = liftSh $ do r <- runResultT $ do runSynth a src' runSynth b src' - runEquiv datadir a b src' + runEquiv mt datadir a b src' return $ case r of Fail (EquivFail _) -> True _ -> False -- cgit