Skip to content

Commit

Permalink
Add an optimize test (#1230)
Browse files Browse the repository at this point in the history
We do not check that optimization works with arithmetical expressions
in `maximize` or `minimize`.

(We do it for `ite` and bitvector expressions).
  • Loading branch information
Halbaroth authored Aug 30, 2024
1 parent b66421e commit 53520cf
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/models/arith/arith15.models.expected
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

unknown
(
(define-fun x () Int 5)
(define-fun y () Int 0)
)
(objectives
((- (* 5 x) y) 25)
)
10 changes: 10 additions & 0 deletions tests/models/arith/arith15.models.smt2
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
(set-option :produce-models true)
(set-logic ALL)
(declare-const x Int)
(declare-const y Int)
(assert (<= x 5))
(assert (<= 0 y))
(maximize (- (* 5 x) y))
(check-sat)
(get-model)
(get-objectives)

0 comments on commit 53520cf

Please sign in to comment.