aboutsummaryrefslogtreecommitdiffstats
path: root/src/Verismith/Tool/Internal.hs
diff options
context:
space:
mode:
authorYann Herklotz <git@yannherklotz.com>2019-11-12 16:51:32 +0000
committerYann Herklotz <git@yannherklotz.com>2019-11-12 16:51:32 +0000
commit02849780204c36fd9c130a398c0a6901b461f8f5 (patch)
tree7145e35f751661120641329568afa7797902009a /src/Verismith/Tool/Internal.hs
parent9d2bddfa46b0e4b80f7cf8b30769dec49e1ed423 (diff)
downloadverismith-02849780204c36fd9c130a398c0a6901b461f8f5.tar.gz
verismith-02849780204c36fd9c130a398c0a6901b461f8f5.zip
Add reduction for simulation failures
Diffstat (limited to 'src/Verismith/Tool/Internal.hs')
-rw-r--r--src/Verismith/Tool/Internal.hs12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/Verismith/Tool/Internal.hs b/src/Verismith/Tool/Internal.hs
index ee31c4e..b97c2f1 100644
--- a/src/Verismith/Tool/Internal.hs
+++ b/src/Verismith/Tool/Internal.hs
@@ -77,10 +77,18 @@ class Tool a => Simulator a where
data Failed = EmptyFail
| EquivFail CounterEg
| EquivError
- | SimFail
+ | SimFail ByteString
| SynthFail
| TimeoutError
- deriving (Eq, Show)
+ deriving (Eq)
+
+instance Show Failed where
+ show EmptyFail = "EmptyFail"
+ show (EquivFail _) = "EquivFail"
+ show EquivError = "EquivError"
+ show (SimFail bs) = "SimFail " <> T.unpack (T.take 10 $ showBS bs)
+ show SynthFail = "SynthFail"
+ show TimeoutError = "TimeoutError"
instance Semigroup Failed where
EmptyFail <> a = a