diff options
author | mudathirmahgoub <mudathirmahgoub@gmail.com> | 2020-10-29 13:26:51 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-29 13:26:51 -0500 |
commit | d23ba1433846b9baaf6149137aa999c1af60c516 (patch) | |
tree | b75389566b726edcaf32cb0f8ab2059bba9e1528 /test/unit/api/python/test_grammar.py | |
parent | 6898ab93a3858e78b20af38e537fe48ee9140c58 (diff) |
Add mkInteger to the API (#5274)
This PR adds mkInteger to the API and update mkReal to ensure that the returned term has real sort.
The parsers are modified to parse numbers like "0" "5" as integers and "0.0" and "15.0" as reals.
This means subtyping is effectively eliminated from all theories except arithmetic.
Other changes:
Term::isValue is removed which was introduced to support parsing for constant arrays. It is no longer needed after this PR.
Benchmarks are updated to match the changes in the parsers
Co-authored-by: Andrew Reynolds andrew-reynolds@uiowa.edu
Diffstat (limited to 'test/unit/api/python/test_grammar.py')
-rw-r--r-- | test/unit/api/python/test_grammar.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/unit/api/python/test_grammar.py b/test/unit/api/python/test_grammar.py index 0321f03d0..5a0d5101f 100644 --- a/test/unit/api/python/test_grammar.py +++ b/test/unit/api/python/test_grammar.py @@ -38,7 +38,7 @@ def test_add_rule(): with pytest.raises(Exception): g.addRule(nts, solver.mkBoolean(false)) with pytest.raises(Exception): - g.addRule(start, solver.mkReal(0)) + g.addRule(start, solver.mkInteger(0)) # expecting no errors solver.synthFun("f", {}, boolean, g) @@ -68,7 +68,7 @@ def test_add_rules(): with pytest.raises(Exception): g.addRules(nts, {solver.mkBoolean(False)}) with pytest.raises(Exception): - g.addRules(start, {solver.mkReal(0)}) + g.addRules(start, {solver.mkInteger(0)}) #Expecting no errors solver.synthFun("f", {}, boolean, g) |