4d06e100081f340bfaa403480c430d489f79951f
4 ("smtbmc", "yices"): ["yices-smt2"],
5 ("smtbmc", "z3"): ["z3"],
6 ("smtbmc", "cvc4"): ["cvc4"],
7 ("smtbmc", "mathsat"): ["mathsat"],
8 ("smtbmc", "boolector"): ["boolector"],
9 ("smtbmc", "bitwuzla"): ["bitwuzla"],
10 ("smtbmc", "abc"): ["yosys-abc"],
11 ("aiger", "suprove"): ["suprove", "yices"],
12 ("aiger", "avy"): ["avy", "yices"],
13 ("aiger", "aigbmc"): ["aigbmc", "yices"],
14 ("btor", "btormc"): ["btormc", "btorsim"],
15 ("btor", "pono"): ["pono", "btorsim"],
20 if __name__
== "__main__":
23 from pathlib
import Path
27 for tools
in REQUIRED_TOOLS
.values():
28 check_tools
.update(tools
)
30 for tool
in sorted(check_tools
):
31 if not shutil
.which(tool
):
35 error_msg
= subprocess
.run(
40 if "invalid command line option" in error_msg
:
42 "found `btorsim` binary is too old "
43 "to support the `--vcd` option, ignoring"
47 found_tools
.append(tool
)
49 found_tools
= "\n".join(found_tools
+ [""])
52 with
open("make/rules/found_tools") as found_tools_file
:
53 if found_tools_file
.read() == found_tools
:
55 except FileNotFoundError
:
58 Path("make/rules").mkdir(exist_ok
=True)
60 with
open("make/rules/found_tools", "w") as found_tools_file
:
61 found_tools_file
.write(found_tools
)
63 with
open("make/rules/found_tools") as found_tools_file
:
64 found_tools
= [tool
.strip() for tool
in found_tools_file
.readlines()]