summaryrefslogtreecommitdiff
path: root/test/regress/regress0/parser
diff options
context:
space:
mode:
authorAina Niemetz <aina.niemetz@gmail.com>2021-01-20 07:28:29 -0800
committerGitHub <noreply@github.com>2021-01-20 09:28:29 -0600
commite2ec4e5401eba4ef63539ddb7c1f3a54301de4b1 (patch)
treed17d5a42599eec5699d646e2ffe3150771ff7aff /test/regress/regress0/parser
parentc8e8acd26b4bd5c47110b9448a74a45913b5518f (diff)
SMT2 parser: Do not add non-linear symbols for linear Int arith logics. (#5787)
This enables more strict handling of operators div, mod and abs for Integer arithmetic logics. More strict handling for '/' for Real arithmetic logics is more involved and should be done in the parser -- instead at solving time, like is currently done for checking that the application * is in the linear fragment. The latter should be checked in the parser, too. This is postponed to a later PR.
Diffstat (limited to 'test/regress/regress0/parser')
-rw-r--r--test/regress/regress0/parser/linear_arithmetic_err1.smt211
-rw-r--r--test/regress/regress0/parser/linear_arithmetic_err2.smt211
-rw-r--r--test/regress/regress0/parser/linear_arithmetic_err3.smt211
3 files changed, 33 insertions, 0 deletions
diff --git a/test/regress/regress0/parser/linear_arithmetic_err1.smt2 b/test/regress/regress0/parser/linear_arithmetic_err1.smt2
new file mode 100644
index 000000000..219b59d44
--- /dev/null
+++ b/test/regress/regress0/parser/linear_arithmetic_err1.smt2
@@ -0,0 +1,11 @@
+; REQUIRES: no-competition
+; SCRUBBER: grep -o "Symbol 'div' not declared as a variable"
+; EXPECT: Symbol 'div' not declared as a variable
+; EXIT: 1
+(set-option :incremental false)
+(set-info :status sat)
+(set-logic QF_LIA)
+(declare-fun x () Int)
+(declare-fun y () Int)
+(declare-fun z () Int)
+(check-sat-assuming ( (and (= z 0) (>= (+ (- (div 2 x) (* 2 y)) z) 1)) ))
diff --git a/test/regress/regress0/parser/linear_arithmetic_err2.smt2 b/test/regress/regress0/parser/linear_arithmetic_err2.smt2
new file mode 100644
index 000000000..893708b61
--- /dev/null
+++ b/test/regress/regress0/parser/linear_arithmetic_err2.smt2
@@ -0,0 +1,11 @@
+; REQUIRES: no-competition
+; SCRUBBER: grep -o "Symbol 'mod' not declared as a variable"
+; EXPECT: Symbol 'mod' not declared as a variable
+; EXIT: 1
+(set-option :incremental false)
+(set-info :status sat)
+(set-logic QF_LIA)
+(declare-fun x () Int)
+(declare-fun y () Int)
+(declare-fun z () Int)
+(check-sat-assuming ( (and (= z 0) (>= (+ (- (mod 2 x) (* 2 y)) z) 1)) ))
diff --git a/test/regress/regress0/parser/linear_arithmetic_err3.smt2 b/test/regress/regress0/parser/linear_arithmetic_err3.smt2
new file mode 100644
index 000000000..89748b36f
--- /dev/null
+++ b/test/regress/regress0/parser/linear_arithmetic_err3.smt2
@@ -0,0 +1,11 @@
+; REQUIRES: no-competition
+; SCRUBBER: grep -o "Symbol 'abs' not declared as a variable"
+; EXPECT: Symbol 'abs' not declared as a variable
+; EXIT: 1
+(set-option :incremental false)
+(set-info :status sat)
+(set-logic QF_LIA)
+(declare-fun x () Int)
+(declare-fun y () Int)
+(declare-fun z () Int)
+(check-sat-assuming ( (and (= z 0) (>= (+ (- (abs 2 x) (* 2 y)) z) 1)) ))
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback