-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmax3.sl
33 lines (25 loc) · 778 Bytes
/
max3.sl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
(set-weight (w1 TROP) )
(set-logic LIA)
(synth-fun max4 ((x Int) (y Int) (z Int)) Int
((Start Int (x y 0 1 z
(+ Start Start)
(- Start Start)
((ite StartBool Start Start) : 1)))
(StartBool Bool ((and StartBool StartBool)
(or StartBool StartBool)
(not StartBool)
(<= Start Start)
(= Start Start)
(>= Start Start)))))
(declare-var x Int)
(declare-var y Int)
(declare-var z Int)
(constraint (>= (max4 x y z) x))
(constraint (>= (max4 x y z) y))
(constraint (>= (max4 x y z) z))
(constraint (or (= x (max4 x y z ))
(or (= y (max4 x y z))
(= z (max4 x y z))))))
(weight-constraint (<= w1 1))
(optimize w1)
(check-synth)