aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorYann Herklotz <ymherklotz@gmail.com>2019-02-01 20:33:47 +0000
committerYann Herklotz <ymherklotz@gmail.com>2019-02-01 20:33:47 +0000
commit2b690485436b1d4df3c9212a928a1557562fb378 (patch)
tree4e1275166222b71627d97955213cbcde83154161 /app
parent157559045f477e443a3f965af6a1959f59930eb8 (diff)
downloadverismith-2b690485436b1d4df3c9212a928a1557562fb378.tar.gz
verismith-2b690485436b1d4df3c9212a928a1557562fb378.zip
Fix all the compile and test errors
Diffstat (limited to 'app')
-rw-r--r--app/Main.hs16
1 files changed, 4 insertions, 12 deletions
diff --git a/app/Main.hs b/app/Main.hs
index ba0e306..d1b6bb2 100644
--- a/app/Main.hs
+++ b/app/Main.hs
@@ -14,7 +14,7 @@ import Shelly
import Test.QuickCheck (Gen)
import qualified Test.QuickCheck as QC
import VeriFuzz
-import qualified VeriFuzz.Graph.RandomAlt as V
+import qualified VeriFuzz.RandomAlt as V
myForkIO :: IO () -> IO (MVar ())
myForkIO io = do
@@ -57,17 +57,9 @@ onFailure t _ = do
cd ".."
cp_r (fromText t) $ fromText (t <> "_failed")
-random :: [Identifier] -> (Expr -> ContAssign) -> Gen ModItem
-random ctx fun = do
- expr <- QC.sized (exprWithContext ctx)
- return . ModCA $ fun expr
-
-randomAssigns :: [Identifier] -> [Gen ModItem]
-randomAssigns ids = random ids . ContAssign <$> ids
-
-runEquivalence :: IO ModDecl -> Text -> Int -> IO ()
+runEquivalence :: Gen ModDecl -> Text -> Int -> IO ()
runEquivalence gm t i = do
- m <- gm
+ m <- QC.generate gm
shellyFailDir $ do
mkdir_p (fromText "equiv" </> fromText n)
curr <- toTextIgnore <$> pwd
@@ -86,5 +78,5 @@ main :: IO ()
main = do
num <- getNumCapabilities
vars <- sequence $ (\x -> myForkIO $
- runEquivalence ("test_" <> T.pack (show x)) 0) <$> [1..num]
+ runEquivalence fromGraph ("test_" <> T.pack (show x)) 0) <$> [1..num]
sequence_ $ takeMVar <$> vars