aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/convert.py31
-rw-r--r--scripts/exclude.sh37
-rwxr-xr-xscripts/run.py22
-rwxr-xr-xscripts/size.py (renamed from scripts/size)0
-rwxr-xr-xscripts/swarm.py26
5 files changed, 116 insertions, 0 deletions
diff --git a/scripts/convert.py b/scripts/convert.py
new file mode 100755
index 0000000..d592fd6
--- /dev/null
+++ b/scripts/convert.py
@@ -0,0 +1,31 @@
+#!/usr/bin/env python3
+
+import sys
+from bs4 import BeautifulSoup
+import csv
+import re
+
+def main(file_, output):
+ with open(file_, "r") as f:
+ file_contents = f.read()
+
+ sec = re.compile(r"([0-9.]+)s")
+
+ soup = BeautifulSoup(file_contents, "html.parser")
+ table = soup.select_one("table.table")
+ headers = [th.text for th in table.select("tr th")]
+ vals = [[td.text for td in row.find_all("td")] for row in table.select("tr + tr")][:-2]
+
+ headers = map(lambda x: "Size" if x == "Size (loc)" else x, headers)
+
+ vals = map(lambda l: map(lambda s: sec.sub(r"\1", s), l), vals)
+ vals = map(lambda l: map(lambda s: re.sub(r"Failed", r"1", s), l), vals)
+ vals = map(lambda l: map(lambda s: re.sub(r"Passed", r"0", s), l), vals)
+
+ with open(output, "w") as f:
+ wr = csv.writer(f)
+ wr.writerow(headers)
+ wr.writerows(vals)
+
+if __name__ == '__main__':
+ main(sys.argv[1], sys.argv[2])
diff --git a/scripts/exclude.sh b/scripts/exclude.sh
new file mode 100644
index 0000000..cfaf514
--- /dev/null
+++ b/scripts/exclude.sh
@@ -0,0 +1,37 @@
+#!/usr/bin/env bash
+
+# bug0: ./output_vivado_all2/fuzz_8/vivado_2018.2/hs_err_pid108202.log
+bug0="HOptGenControl::updateConst\(UConst\*, int, URange const&, UConst::Type, UConst::Type\)\+0x8d"
+
+# bug1: ./output_vivado_all2/fuzz_18/vivado_2016.2/hs_err_pid128529.log
+bug1="HOptDfg::reconnectLoadPinToSource\(DFPin\*, DFPin\*\)\+0x247"
+
+# bug2: ./output_vivado_all2/fuzz_1/vivado_2016.2/hs_err_pid99371.log
+bug2="HOptDfg::reconnectLoadPinToSource\(DFPin\*, DFPin\*\)\+0x2c0"
+
+# bug3: ./output_vivado_all2/fuzz_1/vivado_2018.2/hs_err_pid99120.log
+bug3="HOptDfg::reconnectLoadPinToSource\(DFPin\*, DFPin\*\)\+0x23b"
+
+# bug4: ./size_test_length_no_combine/1/output5/fuzz_20/reduce_vivado/hs_err_pid52393.log
+bug4="HOptDfg::mergeReconvergentPartitions\(DFPin\*, DFGraph\*, UHashSet<DFPin\*, DFPin\*, UEKey<DFPin\*>, UHashSetNode<DFPin\*>, DFPin\*, UEValue<DFPin\*, UHashSetNode<DFPin\*> > > const&, UHashMap<DFNode\*, DFPin\*, DFNode\*, UEKey<DFNode\*> >&, UHashMap<DFGraph\*, DFGraphInfo, DFGraph\*, UEKey<DFGraph\*> >&, DFGraph::DFGraphType, UHashMapList<DFGraph\*, UHashList<DFPin\*, DFPin\*, UEKey<DFPin\*>, UHashListNode<DFPin\*>, DFPin\*>, DFGraph\*, UEKey<DFGraph\*> >&\)\+0x1c6"
+
+# bug5: ./swarm/medium95/fuzz_14/reduce_vivado/hs_err_pid126430.log
+bug5="HOptDfg::mergeReconvergentPartitions\(DFPin\*, DFGraph\*, UHashSet<DFPin\*, DFPin\*, UEKey<DFPin\*>, UHashSetNode<DFPin\*>, DFPin\*, UEValue<DFPin\*, UHashSetNode<DFPin\*> > > const&, UHashMap<DFNode\*, DFPin\*, DFNode\*, UEKey<DFNode\*> >&, UHashMap<DFGraph\*, DFGraphInfo, DFGraph\*, UEKey<DFGraph\*> >&, DFGraph::DFGraphType, UHashMapList<DFGraph\*, UHashList<DFPin\*, DFPin\*, UEKey<DFPin\*>, UHashListNode<DFPin\*>, DFPin\*>, DFGraph\*, UEKey<DFGraph\*> >&\)\+0x2e8"
+
+# bug6: ./swarm/medium108/fuzz_3/reduce_vivado/hs_err_pid95577.log
+bug6="DD::DD\(Cudd\*, DdNode\*\)\+0x2a"
+
+# bug7: ./output_vivado/medium13/fuzz_12/vivado_2016.2/hs_err_pid47970.log
+bug7="HOptDfg::mergeReconvergentPartitions\(DFPin\*, DFGraph\*, UHashSet<DFPin\*, DFPin\*, UEKey<DFPin\*>, UHashSetNode<DFPin\*>, DFPin\*, UEValue<DFPin\*, UHashSetNode<DFPin\*> > > const&, UHashMap<DFNode\*, DFPin\*, DFNode\*, UEKey<DFNode\*> >&, UHashMap<DFGraph\*, DFGraphInfo, DFGraph\*, UEKey<DFGraph\*> >&, DFGraph::DFGraphType, UHashMapList<DFGraph\*, UHashList<DFPin\*, DFPin\*, UEKey<DFPin\*>, UHashListNode<DFPin\*>, DFPin\*>, DFGraph\*, UEKey<DFGraph\*> >&\)\+0x241"
+
+# bug8: ./output_vivado/medium10/fuzz_5/vivado_2016.2/hs_err_pid50009.log
+bug8="HOptGenControl::extractSyncRSForWireOrMerge\(DFGraph\*, DFNode\*, URange const&, DFEdge\*, DFPin\*\*, UConst\*, int, UConst\*, int, bool, DFPin\*&, UHashSet<DFNode\*, DFNode\*, UEKey<DFNode\*>, UHashSetNode<DFNode\*>, DFNode\*, UEValue<DFNode\*, UHashSetNode<DFNode\*> > >&, bool\)\+0xc33"
+
+grep -E "$bug0|$bug1|$bug2|$bug3|$bug4|$bug5|$bug6|$bug7|$bug8" $1 >/dev/null 2>&1
+exitcode=$?
+
+if [[ $exitcode -ne 0 ]]; then
+ echo $1
+ head $1
+ echo
+fi
diff --git a/scripts/run.py b/scripts/run.py
new file mode 100755
index 0000000..63295af
--- /dev/null
+++ b/scripts/run.py
@@ -0,0 +1,22 @@
+#!/usr/bin/env python3
+
+import subprocess
+import os
+
+def main():
+ i = 0
+ name = "mediumB"
+ config = "experiments/config_yosys.toml"
+ iterations = 50
+ directory = "yosys_all"
+ if not os.path.exists(directory):
+ os.makedirs(directory)
+ while True:
+ subprocess.call(["verifuzz", "fuzz"
+ , "-o", directory + "/" + name + str(i)
+ , "-c", config
+ , "-n", str(iterations)])
+ i += 1
+
+if __name__ == '__main__':
+ main()
diff --git a/scripts/size b/scripts/size.py
index d6d7466..d6d7466 100755
--- a/scripts/size
+++ b/scripts/size.py
diff --git a/scripts/swarm.py b/scripts/swarm.py
new file mode 100755
index 0000000..99b0c54
--- /dev/null
+++ b/scripts/swarm.py
@@ -0,0 +1,26 @@
+#!/usr/bin/env python3
+
+import subprocess
+import os
+
+def main():
+ i = 0
+ name = "medium"
+ config = "experiments/config_medium.toml"
+ iterations = 20
+ directory = "swarm"
+ if not os.path.exists(directory):
+ os.makedirs(directory)
+ while True:
+ subprocess.call(["verifuzz", "config"
+ , "-c", config
+ , "-o", directory + "/config_medium_random.toml"
+ , "--randomise"])
+ subprocess.call([ "verifuzz", "fuzz"
+ , "-o", directory + "/" + name + str(i)
+ , "-c", directory + "/config_medium_random.toml"
+ , "-n", str(iterations)])
+ i += 1
+
+if __name__ == '__main__':
+ main()