diff options
author | Andres Noetzli <andres.noetzli@gmail.com> | 2021-08-18 14:06:52 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-18 16:06:52 -0500 |
commit | 7ef9f24a1a879d278d8ac5a3fef28c7ca8489d2c (patch) | |
tree | 57b1dee485832aece072146a378ecccabc91d83e /src/options/mkoptions.py | |
parent | dfd844226c4cc6c6d2af78ef6291b0a9d087f4d4 (diff) |
Minor fixes of policy for eliminating quantifiers (#7033)
PR #7017 fixed the policy for eliminating quantifiers but introduced
some minor issues, which this commit fixes:
the InstantiationEngine::checkOwnership() method was changed to look
for patterns in the wrong node.
the PR changed the modes of the --user-pat=MODE method but reused
one of the names. This commit fixes the name and adds a check in the
options script.
fixing the policy caused cvc5 to answer unsat instead of the
expected unknown for regress0/use_approx/bug812_approx.smt2. The
commit updates the expected result.
Diffstat (limited to 'src/options/mkoptions.py')
-rw-r--r-- | src/options/mkoptions.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/options/mkoptions.py b/src/options/mkoptions.py index edc0f88f4..a861b06eb 100644 --- a/src/options/mkoptions.py +++ b/src/options/mkoptions.py @@ -610,12 +610,20 @@ def codegen_module(module, dst_dir, tpls): cases=''.join(cases))) # Generate str-to-enum handler + names = set() cases = [] for value, attrib in option.mode.items(): assert len(attrib) == 1 + name = attrib[0]['name'] + if name in names: + die("multiple modes with the name '{}' for option '{}'". + format(name, option.long)) + else: + names.add(name) + cases.append( TPL_MODE_HANDLER_CASE.format( - name=attrib[0]['name'], + name=name, type=option.type, enum=value)) assert option.long |