Skip to content

Commit

Permalink
simple adt
Browse files Browse the repository at this point in the history
  • Loading branch information
Hossein Hojjat committed May 31, 2017
1 parent ec8f8cb commit 9c7f01d
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions regression-tests/horn-adt/simple-adt-horn.smt2
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
(set-logic HORN)

(declare-datatype Pair ( (P (left Int) (right Bool)) ))

(declare-fun I1 (Pair) Bool)
(declare-fun I2 (Pair) Bool)

(assert (I1 (P 0 true)))
(assert (forall ((p Pair))
(=> (I1 p) (I2 (P (+ (left p) 1) (not (right p)))))))
(assert (forall ((p Pair))
(=> (I2 p) (I1 (P (* (left p) 2) (not (right p)))))))

(assert (forall ((p Pair))
(=> (I1 p) (and (>= (left p) 0) (right p)))))

(check-sat)

0 comments on commit 9c7f01d

Please sign in to comment.