Debian Codegraph @

test/regress/cli/regress0/sygus/pLTL-sygus-syntax-err.sy

raw
1 ; DISABLE-TESTER: dump
2 ; REQUIRES: no-competition
3 ; COMMAND-LINE: --sygus-out=status --sygus-rec-fun --lang=sygus2
4 ; ERROR-SCRUBBER: grep -o "number of arguments does not match the constructor type"
5 ; EXPECT-ERROR: number of arguments does not match the constructor type
6 ; EXIT: 1
7 (set-logic HO_ALL)
8 (set-option :lang sygus2)
9 ;(set-option :sygus-out status)
10 (set-option :sygus-rec-fun true)
11
12
13 (define-sort Time () Int)
14
15 (declare-datatype Var ( (X0) (X1) ))
16
17 ; Declare Unary Operators.
18 (declare-datatype UNARY_OP ( (NOT) (Y) (G) (H) ))
19
20 ; Declare Binary Operators.
21 (declare-datatype BINARY_OP ( (AND) (OR) (IMPLIES) )) ; (S) ))
22
23 ; Formula Declaration.
24 (declare-datatype Formula (
25 (P (Id Var))
26 (Op1 (op1 UNARY_OP) (f Formula))
27 (Op2 (op2 BINARY_OP) (f1 Formula) (f2 Formula))
28 )
29 )
30
31 ; Trace Length.
32
33 ;cTrace Declaration (trace_index, variable_index)
34 (define-fun val ((i Int) (x Var)) Bool
35 (or (and (= i 0) (= x X0))
36 (and (= i 0) (= x X1))
37 (and (= i 1) (= x X1))
38 )
39 )
40
41 ;cpLTL Semantics
42 (define-fun-rec holds ((f Formula) (t Time)) Bool
43 (and (<= 0 t 2)
44 (match f (
45 ((P i) (val t i))
46
47 ((Op1 op g)
48 (match op (
49 (NOT (not (holds g t)))
50
51 (Y (and (< 0 t) (holds g (- t 1))))
52
53 (G (and (holds g t) (or (= t 2) (holds f (+ t 1)))))
54
55 (H (and (holds g t) (or (= t 0) (holds f (- t 1)))))
56 )))
57
58 ((Op2 op f g)
59 (match op (
60 (AND (and (holds f t) (holds g t)))
61
62 (OR (or (holds f t) (holds g t)))
63
64 (IMPLIES (or (not (holds f t)) (holds g t)))
65 )))))
66 )
67 )
68
69 (synth-fun phi ((x0 Var) (x1 Var)) Formula
70 ((<F> Formula) (<O1> UNARY_OP) (<O2> BINARY_OP))
71 (
72 (<F> Formula (
73 (P x0)
74 (P x1)
75 (Op1 <O1> <F>)
76 (Op2 <O2> <F>)
77 )
78 )
79 (<O1> UNARY_OP (NOT Y G H))
80 (<O2> BINARY_OP (AND OR IMPLIES))
81 )
82 )
83
84 (constraint (holds (Op1 G (phi X0 X1)) 0))
85
86 (check-synth)