Debian Codegraph @

test/regress/cli/regress0/sygus/dt-sel-parse1.sy

raw
1 ; COMMAND-LINE: --lang=sygus2 --sygus-out=status
2 ; EXPECT: feasible
3 (set-logic ALL)
4
5 (declare-datatypes ((IntRange 0))
6 (((IntRangec (lower Int) (upper Int)))))
7
8 (declare-datatypes ((Loc 0))
9 (((Locc (x Int) (y Int)))))
10
11 (declare-datatypes ((LocRange 0))
12 (((LocRangec (xD IntRange) (yD IntRange)))))
13
14 (declare-datatypes ((Ship 0))
15 (((Shipc (shipCapacity Int) (shipLoc Loc)))))
16
17 (declare-datatypes ((ShipRange 0))
18 (((ShipRangec (shipCapacityD IntRange) (shipLocDs LocRange)))))
19
20 (define-fun max ((x Int) (y Int)) Int
21 (ite (>= x y) x y)
22 )
23
24 (define-fun min ((x Int) (y Int)) Int
25 (ite (<= x y) x y)
26 )
27
28 ; provide synthesis template
29 (synth-fun f ((secret Ship) (prior ShipRange) (response Bool)) ShipRange
30 ((Start ShipRange) (B Bool) (SR ShipRange) (IR IntRange) (LR LocRange) (I Int))
31 (
32 (Start ShipRange ((ite B SR SR)))
33 (B Bool (response))
34 (SR ShipRange ((ShipRangec IR LR) prior))
35 (IR IntRange ((IntRangec I I) (shipCapacityD SR)))
36 (LR LocRange ((LocRangec IR IR) (shipLocDs SR)))
37 (I Int ((lower IR) (upper IR)
38 (max I (lower (shipCapacityD SR)))
39 (min I I) 50 51))
40 )
41 )
42
43 (declare-var secret Ship)
44 (declare-var prior ShipRange)
45 (declare-var response Bool)
46
47 (constraint true)
48
49 (check-synth)