diff options
author | Andres Noetzli <andres.noetzli@gmail.com> | 2020-03-18 23:46:50 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-18 23:46:50 -0700 |
commit | d862942f821ea14973207ef538be3326fb11c17c (patch) | |
tree | 80a6b809f84019d9bcd1e0552cea778b10a1e8c8 /test/regress/regress0 | |
parent | 9c960866c9e71e543c5688aac826a8150c899ca6 (diff) |
Only allow bv2nat/int2bv with BV and integer logic (#4118)
CVC4 supports `bv2nat` and `int2bv` to convert bit-vectors to/from
integers. Those operators are not standard. This commit only enables
those operators when parsing is non-strict and both bit-vectors and
integers are enabled in the logic. To achieve this, the commit
simplifies the handling of logics in the parser: Instead of defining a
separate `Logic` enum in the `Smt2` class, we simply use `LogicInfo`
directly.
Diffstat (limited to 'test/regress/regress0')
-rw-r--r-- | test/regress/regress0/parser/bv_nat.smt2 | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/regress/regress0/parser/bv_nat.smt2 b/test/regress/regress0/parser/bv_nat.smt2 new file mode 100644 index 000000000..fc2140854 --- /dev/null +++ b/test/regress/regress0/parser/bv_nat.smt2 @@ -0,0 +1,13 @@ +; EXPECT: sat +; EXPECT: not declared +; SCRUBBER: grep -o "sat\|not declared" +; EXIT: 1 +(set-logic QF_BVLIA) +(declare-const x (_ BitVec 4)) +(assert (= (bv2nat x) 0)) +(check-sat) +(reset) +(set-logic QF_BV) +(declare-const x (_ BitVec 4)) +(assert (= (bv2nat x) 0)) +(check-sat) |