mirror of
https://github.com/YosysHQ/sby.git
synced 2025-05-02 17:57:00 +00:00
Better checking of available solvers
Check for required auxiliary tools and always regenerate the make rules when the set of available tools changes.
This commit is contained in:
parent
939e000036
commit
dc22d97362
3 changed files with 36 additions and 7 deletions
|
@ -37,7 +37,7 @@ with out_file.open("w") as output:
|
|||
print(f"{out_file}: {checked_dir}", file=output)
|
||||
|
||||
for test in tests:
|
||||
print(f"make/rules/test/{test}.mk: {test}", file=output)
|
||||
print(f"make/rules/test/{test}.mk: {test} make/rules/found_tools", file=output)
|
||||
for ext in [".sh", ".py"]:
|
||||
script_file = test.parent / (test.stem + ext)
|
||||
if script_file.exists():
|
||||
|
|
|
@ -26,6 +26,8 @@ def parse_engine(engine):
|
|||
return engine, default_solvers.get(engine)
|
||||
|
||||
|
||||
# When adding new tools, also update TOOL_LIST in Makefile to make sure we regenerate
|
||||
# the rules when the user installs or removes any of the tools
|
||||
REQUIRED_TOOLS = {
|
||||
("smtbmc", "yices"): ["yices-smt2"],
|
||||
("smtbmc", "z3"): ["z3"],
|
||||
|
@ -34,11 +36,12 @@ REQUIRED_TOOLS = {
|
|||
("smtbmc", "boolector"): ["boolector"],
|
||||
("smtbmc", "bitwuzla"): ["bitwuzla"],
|
||||
("smtbmc", "abc"): ["yosys-abc"],
|
||||
("aiger", "suprove"): ["suprove"],
|
||||
("aiger", "avy"): ["avy"],
|
||||
("aiger", "aigbmc"): ["aigbmc"],
|
||||
("btor", "btormc"): ["btormc"],
|
||||
("btor", "pono"): ["pono"],
|
||||
("aiger", "suprove"): ["suprove", "yices"],
|
||||
("aiger", "avy"): ["avy", "yices"],
|
||||
("aiger", "aigbmc"): ["aigbmc", "yices"],
|
||||
("btor", "btormc"): ["btormc", "btorsim"],
|
||||
("btor", "pono"): ["pono", "btorsim"],
|
||||
("abc"): ["yices"],
|
||||
}
|
||||
|
||||
rules_file = Path("make/rules/test") / sby_dir / (sby_file.name + ".mk")
|
||||
|
@ -63,7 +66,9 @@ with rules_file.open("w") as rules:
|
|||
for engine in info["engines"]:
|
||||
engine, solver = parse_engine(engine)
|
||||
engines.add(engine)
|
||||
required_tools.update(REQUIRED_TOOLS.get((engine, solver), ()))
|
||||
required_tools.update(
|
||||
REQUIRED_TOOLS.get((engine, solver), REQUIRED_TOOLS.get(engine, ()))
|
||||
)
|
||||
if solver:
|
||||
solvers.add(solver)
|
||||
engine_solvers.add((engine, solver))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue