aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYann Herklotz <git@yannherklotz.com>2019-05-20 12:51:11 +0100
committerYann Herklotz <git@yannherklotz.com>2019-05-20 12:51:11 +0100
commitb72c905c718ff52e623b748034d567cf8552b50e (patch)
treeb3daf3603897b5ea0cdf50cc1fc28a7e862431b1
parent309dd0b0a84057c998c492fdf488156c73b33613 (diff)
downloadverismith-b72c905c718ff52e623b748034d567cf8552b50e.tar.gz
verismith-b72c905c718ff52e623b748034d567cf8552b50e.zip
Only modify expressions in swarm testing
-rwxr-xr-xscripts/size.py23
-rw-r--r--src/VeriFuzz.hs14
2 files changed, 7 insertions, 30 deletions
diff --git a/scripts/size.py b/scripts/size.py
deleted file mode 100755
index 5fe2f48..0000000
--- a/scripts/size.py
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/usr/bin/env python3
-
-import subprocess
-import statistics
-
-def file_len(fname):
- with open(fname) as f:
- for i, l in enumerate(f):
- pass
- return i + 1
-
-def main():
- l = []
- for x in range(0, 10):
- subprocess.call(["verifuzz", "generate", "-o", "main.v", "-c", "config.toml"])
- l.append(file_len("main.v"))
- print("mean: ", statistics.mean(l))
- print("median: ", statistics.median(l))
- print("stdev: ", statistics.stdev(l))
- print("variance: ", statistics.variance(l))
-
-if __name__ == '__main__':
- main()
diff --git a/src/VeriFuzz.hs b/src/VeriFuzz.hs
index b7d46d1..7b79633 100644
--- a/src/VeriFuzz.hs
+++ b/src/VeriFuzz.hs
@@ -293,14 +293,14 @@ randDelete i = do
randomise :: Config -> IO Config
randomise config@(Config a _ c d e) = do
- mia <- randDelete $ cm ^. probModItemAssign
+ mia <- return $ cm ^. probModItemAssign
misa <- return $ cm ^. probModItemSeqAlways
- mica <- randDelete $ cm ^. probModItemCombAlways
- mii <- randDelete $ cm ^. probModItemInst
- ssb <- randDelete $ cs ^. probStmntBlock
- ssnb <- randDelete $ cs ^. probStmntNonBlock
- ssc <- randDelete $ cs ^. probStmntCond
- ssf <- randDelete $ cs ^. probStmntFor
+ mica <- return $ cm ^. probModItemCombAlways
+ mii <- return $ cm ^. probModItemInst
+ ssb <- return $ cs ^. probStmntBlock
+ ssnb <- return $ cs ^. probStmntNonBlock
+ ssc <- return $ cs ^. probStmntCond
+ ssf <- return $ cs ^. probStmntFor
en <- return $ ce ^. probExprNum
ei <- randDelete $ ce ^. probExprId
ers <- randDelete $ ce ^. probExprRangeSelect