Commit cf618079a22a27aa481799dfa04a6fb94a1bd608
1 parent
1f10fb42
Exists in
master
new output
Showing
1 changed file
with
119 additions
and
100 deletions
Show diff stats
fzn-parser/examples/aust.ast
@@ -5,15 +5,16 @@ _T > [[]|_T]. | @@ -5,15 +5,16 @@ _T > [[]|_T]. | ||
5 | _T > [int|_T]. | 5 | _T > [int|_T]. |
6 | _T > ['X_INTRODUCED_0'|_T]. | 6 | _T > ['X_INTRODUCED_0'|_T]. |
7 | _T > [[]|_T]. | 7 | _T > [[]|_T]. |
8 | -_T > [int:lit(1)|_T]. | ||
9 | -_T > [int:lit(-1)|_T]. | ||
10 | -[T2:E2,T1:E1|_T] > [(T1,T2):(E1,E2)|_T]. | ||
11 | -[Es|_T] > [array(_):alit(Es)|_T]. | 8 | +_T > [lit(1,int)|_T]. |
9 | +_T > [lit(-1,int)|_T]. | ||
10 | +[E|_T] > [[E]|_T]. | ||
11 | +[T,H|_T] > [[H|T]|_T]. | ||
12 | +[Es|_T] > [lit(Es,array(_))|_T]. | ||
12 | [VAL,AN,ID,T|_T] > [var(ID, array(T,1,2), VAL, AN)|_T]. | 13 | [VAL,AN,ID,T|_T] > [var(ID, array(T,1,2), VAL, AN)|_T]. |
13 | [H,T|_T] > [[H|T]|_T]. | 14 | [H,T|_T] > [[H|T]|_T]. |
14 | _T > [int(1,3)|_T]. | 15 | _T > [int(1,3)|_T]. |
15 | _T > ['wa'|_T]. | 16 | _T > ['wa'|_T]. |
16 | -_T > [_:id('output_var')|_T]. | 17 | +_T > [id('output_var')|_T]. |
17 | _T > [[]|_T]. | 18 | _T > [[]|_T]. |
18 | [As, E|_T] > [[E|As]|_T]. | 19 | [As, E|_T] > [[E|As]|_T]. |
19 | _T > [[]|_T]. | 20 | _T > [[]|_T]. |
@@ -21,7 +22,7 @@ _T > [[]|_T]. | @@ -21,7 +22,7 @@ _T > [[]|_T]. | ||
21 | [H,T|_T] > [[H|T]|_T]. | 22 | [H,T|_T] > [[H|T]|_T]. |
22 | _T > [int(1,3)|_T]. | 23 | _T > [int(1,3)|_T]. |
23 | _T > ['nt'|_T]. | 24 | _T > ['nt'|_T]. |
24 | -_T > [_:id('output_var')|_T]. | 25 | +_T > [id('output_var')|_T]. |
25 | _T > [[]|_T]. | 26 | _T > [[]|_T]. |
26 | [As, E|_T] > [[E|As]|_T]. | 27 | [As, E|_T] > [[E|As]|_T]. |
27 | _T > [[]|_T]. | 28 | _T > [[]|_T]. |
@@ -29,7 +30,7 @@ _T > [[]|_T]. | @@ -29,7 +30,7 @@ _T > [[]|_T]. | ||
29 | [H,T|_T] > [[H|T]|_T]. | 30 | [H,T|_T] > [[H|T]|_T]. |
30 | _T > [int(1,3)|_T]. | 31 | _T > [int(1,3)|_T]. |
31 | _T > ['sa'|_T]. | 32 | _T > ['sa'|_T]. |
32 | -_T > [_:id('output_var')|_T]. | 33 | +_T > [id('output_var')|_T]. |
33 | _T > [[]|_T]. | 34 | _T > [[]|_T]. |
34 | [As, E|_T] > [[E|As]|_T]. | 35 | [As, E|_T] > [[E|As]|_T]. |
35 | _T > [[]|_T]. | 36 | _T > [[]|_T]. |
@@ -37,7 +38,7 @@ _T > [[]|_T]. | @@ -37,7 +38,7 @@ _T > [[]|_T]. | ||
37 | [H,T|_T] > [[H|T]|_T]. | 38 | [H,T|_T] > [[H|T]|_T]. |
38 | _T > [int(1,3)|_T]. | 39 | _T > [int(1,3)|_T]. |
39 | _T > ['q'|_T]. | 40 | _T > ['q'|_T]. |
40 | -_T > [_:id('output_var')|_T]. | 41 | +_T > [id('output_var')|_T]. |
41 | _T > [[]|_T]. | 42 | _T > [[]|_T]. |
42 | [As, E|_T] > [[E|As]|_T]. | 43 | [As, E|_T] > [[E|As]|_T]. |
43 | _T > [[]|_T]. | 44 | _T > [[]|_T]. |
@@ -45,7 +46,7 @@ _T > [[]|_T]. | @@ -45,7 +46,7 @@ _T > [[]|_T]. | ||
45 | [H,T|_T] > [[H|T]|_T]. | 46 | [H,T|_T] > [[H|T]|_T]. |
46 | _T > [int(1,3)|_T]. | 47 | _T > [int(1,3)|_T]. |
47 | _T > ['nsw'|_T]. | 48 | _T > ['nsw'|_T]. |
48 | -_T > [_:id('output_var')|_T]. | 49 | +_T > [id('output_var')|_T]. |
49 | _T > [[]|_T]. | 50 | _T > [[]|_T]. |
50 | [As, E|_T] > [[E|As]|_T]. | 51 | [As, E|_T] > [[E|As]|_T]. |
51 | _T > [[]|_T]. | 52 | _T > [[]|_T]. |
@@ -53,7 +54,7 @@ _T > [[]|_T]. | @@ -53,7 +54,7 @@ _T > [[]|_T]. | ||
53 | [H,T|_T] > [[H|T]|_T]. | 54 | [H,T|_T] > [[H|T]|_T]. |
54 | _T > [int(1,3)|_T]. | 55 | _T > [int(1,3)|_T]. |
55 | _T > ['v'|_T]. | 56 | _T > ['v'|_T]. |
56 | -_T > [_:id('output_var')|_T]. | 57 | +_T > [id('output_var')|_T]. |
57 | _T > [[]|_T]. | 58 | _T > [[]|_T]. |
58 | [As, E|_T] > [[E|As]|_T]. | 59 | [As, E|_T] > [[E|As]|_T]. |
59 | _T > [[]|_T]. | 60 | _T > [[]|_T]. |
@@ -61,7 +62,7 @@ _T > [[]|_T]. | @@ -61,7 +62,7 @@ _T > [[]|_T]. | ||
61 | [H,T|_T] > [[H|T]|_T]. | 62 | [H,T|_T] > [[H|T]|_T]. |
62 | _T > [int(1,3)|_T]. | 63 | _T > [int(1,3)|_T]. |
63 | _T > ['t'|_T]. | 64 | _T > ['t'|_T]. |
64 | -_T > [_:id('output_var')|_T]. | 65 | +_T > [id('output_var')|_T]. |
65 | _T > [[]|_T]. | 66 | _T > [[]|_T]. |
66 | [As, E|_T] > [[E|As]|_T]. | 67 | [As, E|_T] > [[E|As]|_T]. |
67 | _T > [[]|_T]. | 68 | _T > [[]|_T]. |
@@ -69,113 +70,131 @@ _T > [[]|_T]. | @@ -69,113 +70,131 @@ _T > [[]|_T]. | ||
69 | [H,T|_T] > [[H|T]|_T]. | 70 | [H,T|_T] > [[H|T]|_T]. |
70 | [X|_T] > [vars(X)|_T]. | 71 | [X|_T] > [vars(X)|_T]. |
71 | _T > [[]|_T]. | 72 | _T > [[]|_T]. |
72 | -_T > [_:id('X_INTRODUCED_0')|_T]. | ||
73 | -_T > [_:id('wa')|_T]. | ||
74 | -_T > [_:id('nt')|_T]. | ||
75 | -[T2:E2,T1:E1|_T] > [(T1,T2):(E1,E2)|_T]. | ||
76 | -[Es|_T] > [array(_):alit(Es)|_T]. | ||
77 | -_T > [int:lit(0)|_T]. | ||
78 | -[T2:E2,T1:E1|_T] > [(T1,T2):(E1,E2)|_T]. | ||
79 | -[T2:E2,T1:E1|_T] > [(T1,T2):(E1,E2)|_T]. | 73 | +_T > [id('X_INTRODUCED_0')|_T]. |
74 | +_T > [id('wa')|_T]. | ||
75 | +_T > [id('nt')|_T]. | ||
76 | +[E|_T] > [[E]|_T]. | ||
77 | +[T,H|_T] > [[H|T]|_T]. | ||
78 | +[Es|_T] > [lit(Es,array(_))|_T]. | ||
79 | +_T > [lit(0,int)|_T]. | ||
80 | +[E|_T] > [[E]|_T]. | ||
81 | +[T,H|_T] > [[H|T]|_T]. | ||
82 | +[T,H|_T] > [[H|T]|_T]. | ||
80 | [AL|_T] > [C|_T] :- C =.. ['int_lin_ne'|AL]. | 83 | [AL|_T] > [C|_T] :- C =.. ['int_lin_ne'|AL]. |
81 | _T > [[]|_T]. | 84 | _T > [[]|_T]. |
82 | -[A,C,E|_T] > [constraint(C,E,A)|_T]. | ||
83 | -[H,T|_T] > [[H|T]|_T]. | ||
84 | -_T > [_:id('X_INTRODUCED_0')|_T]. | ||
85 | -_T > [_:id('wa')|_T]. | ||
86 | -_T > [_:id('sa')|_T]. | ||
87 | -[T2:E2,T1:E1|_T] > [(T1,T2):(E1,E2)|_T]. | ||
88 | -[Es|_T] > [array(_):alit(Es)|_T]. | ||
89 | -_T > [int:lit(0)|_T]. | ||
90 | -[T2:E2,T1:E1|_T] > [(T1,T2):(E1,E2)|_T]. | ||
91 | -[T2:E2,T1:E1|_T] > [(T1,T2):(E1,E2)|_T]. | 85 | +[A,C|_T] > [constraint(C,A)|_T]. |
86 | +[H,T|_T] > [[H|T]|_T]. | ||
87 | +_T > [id('X_INTRODUCED_0')|_T]. | ||
88 | +_T > [id('wa')|_T]. | ||
89 | +_T > [id('sa')|_T]. | ||
90 | +[E|_T] > [[E]|_T]. | ||
91 | +[T,H|_T] > [[H|T]|_T]. | ||
92 | +[Es|_T] > [lit(Es,array(_))|_T]. | ||
93 | +_T > [lit(0,int)|_T]. | ||
94 | +[E|_T] > [[E]|_T]. | ||
95 | +[T,H|_T] > [[H|T]|_T]. | ||
96 | +[T,H|_T] > [[H|T]|_T]. | ||
92 | [AL|_T] > [C|_T] :- C =.. ['int_lin_ne'|AL]. | 97 | [AL|_T] > [C|_T] :- C =.. ['int_lin_ne'|AL]. |
93 | _T > [[]|_T]. | 98 | _T > [[]|_T]. |
94 | -[A,C,E|_T] > [constraint(C,E,A)|_T]. | ||
95 | -[H,T|_T] > [[H|T]|_T]. | ||
96 | -_T > [_:id('X_INTRODUCED_0')|_T]. | ||
97 | -_T > [_:id('nt')|_T]. | ||
98 | -_T > [_:id('sa')|_T]. | ||
99 | -[T2:E2,T1:E1|_T] > [(T1,T2):(E1,E2)|_T]. | ||
100 | -[Es|_T] > [array(_):alit(Es)|_T]. | ||
101 | -_T > [int:lit(0)|_T]. | ||
102 | -[T2:E2,T1:E1|_T] > [(T1,T2):(E1,E2)|_T]. | ||
103 | -[T2:E2,T1:E1|_T] > [(T1,T2):(E1,E2)|_T]. | 99 | +[A,C|_T] > [constraint(C,A)|_T]. |
100 | +[H,T|_T] > [[H|T]|_T]. | ||
101 | +_T > [id('X_INTRODUCED_0')|_T]. | ||
102 | +_T > [id('nt')|_T]. | ||
103 | +_T > [id('sa')|_T]. | ||
104 | +[E|_T] > [[E]|_T]. | ||
105 | +[T,H|_T] > [[H|T]|_T]. | ||
106 | +[Es|_T] > [lit(Es,array(_))|_T]. | ||
107 | +_T > [lit(0,int)|_T]. | ||
108 | +[E|_T] > [[E]|_T]. | ||
109 | +[T,H|_T] > [[H|T]|_T]. | ||
110 | +[T,H|_T] > [[H|T]|_T]. | ||
104 | [AL|_T] > [C|_T] :- C =.. ['int_lin_ne'|AL]. | 111 | [AL|_T] > [C|_T] :- C =.. ['int_lin_ne'|AL]. |
105 | _T > [[]|_T]. | 112 | _T > [[]|_T]. |
106 | -[A,C,E|_T] > [constraint(C,E,A)|_T]. | ||
107 | -[H,T|_T] > [[H|T]|_T]. | ||
108 | -_T > [_:id('X_INTRODUCED_0')|_T]. | ||
109 | -_T > [_:id('nt')|_T]. | ||
110 | -_T > [_:id('q')|_T]. | ||
111 | -[T2:E2,T1:E1|_T] > [(T1,T2):(E1,E2)|_T]. | ||
112 | -[Es|_T] > [array(_):alit(Es)|_T]. | ||
113 | -_T > [int:lit(0)|_T]. | ||
114 | -[T2:E2,T1:E1|_T] > [(T1,T2):(E1,E2)|_T]. | ||
115 | -[T2:E2,T1:E1|_T] > [(T1,T2):(E1,E2)|_T]. | 113 | +[A,C|_T] > [constraint(C,A)|_T]. |
114 | +[H,T|_T] > [[H|T]|_T]. | ||
115 | +_T > [id('X_INTRODUCED_0')|_T]. | ||
116 | +_T > [id('nt')|_T]. | ||
117 | +_T > [id('q')|_T]. | ||
118 | +[E|_T] > [[E]|_T]. | ||
119 | +[T,H|_T] > [[H|T]|_T]. | ||
120 | +[Es|_T] > [lit(Es,array(_))|_T]. | ||
121 | +_T > [lit(0,int)|_T]. | ||
122 | +[E|_T] > [[E]|_T]. | ||
123 | +[T,H|_T] > [[H|T]|_T]. | ||
124 | +[T,H|_T] > [[H|T]|_T]. | ||
116 | [AL|_T] > [C|_T] :- C =.. ['int_lin_ne'|AL]. | 125 | [AL|_T] > [C|_T] :- C =.. ['int_lin_ne'|AL]. |
117 | _T > [[]|_T]. | 126 | _T > [[]|_T]. |
118 | -[A,C,E|_T] > [constraint(C,E,A)|_T]. | ||
119 | -[H,T|_T] > [[H|T]|_T]. | ||
120 | -_T > [_:id('X_INTRODUCED_0')|_T]. | ||
121 | -_T > [_:id('sa')|_T]. | ||
122 | -_T > [_:id('q')|_T]. | ||
123 | -[T2:E2,T1:E1|_T] > [(T1,T2):(E1,E2)|_T]. | ||
124 | -[Es|_T] > [array(_):alit(Es)|_T]. | ||
125 | -_T > [int:lit(0)|_T]. | ||
126 | -[T2:E2,T1:E1|_T] > [(T1,T2):(E1,E2)|_T]. | ||
127 | -[T2:E2,T1:E1|_T] > [(T1,T2):(E1,E2)|_T]. | 127 | +[A,C|_T] > [constraint(C,A)|_T]. |
128 | +[H,T|_T] > [[H|T]|_T]. | ||
129 | +_T > [id('X_INTRODUCED_0')|_T]. | ||
130 | +_T > [id('sa')|_T]. | ||
131 | +_T > [id('q')|_T]. | ||
132 | +[E|_T] > [[E]|_T]. | ||
133 | +[T,H|_T] > [[H|T]|_T]. | ||
134 | +[Es|_T] > [lit(Es,array(_))|_T]. | ||
135 | +_T > [lit(0,int)|_T]. | ||
136 | +[E|_T] > [[E]|_T]. | ||
137 | +[T,H|_T] > [[H|T]|_T]. | ||
138 | +[T,H|_T] > [[H|T]|_T]. | ||
128 | [AL|_T] > [C|_T] :- C =.. ['int_lin_ne'|AL]. | 139 | [AL|_T] > [C|_T] :- C =.. ['int_lin_ne'|AL]. |
129 | _T > [[]|_T]. | 140 | _T > [[]|_T]. |
130 | -[A,C,E|_T] > [constraint(C,E,A)|_T]. | ||
131 | -[H,T|_T] > [[H|T]|_T]. | ||
132 | -_T > [_:id('X_INTRODUCED_0')|_T]. | ||
133 | -_T > [_:id('sa')|_T]. | ||
134 | -_T > [_:id('nsw')|_T]. | ||
135 | -[T2:E2,T1:E1|_T] > [(T1,T2):(E1,E2)|_T]. | ||
136 | -[Es|_T] > [array(_):alit(Es)|_T]. | ||
137 | -_T > [int:lit(0)|_T]. | ||
138 | -[T2:E2,T1:E1|_T] > [(T1,T2):(E1,E2)|_T]. | ||
139 | -[T2:E2,T1:E1|_T] > [(T1,T2):(E1,E2)|_T]. | 141 | +[A,C|_T] > [constraint(C,A)|_T]. |
142 | +[H,T|_T] > [[H|T]|_T]. | ||
143 | +_T > [id('X_INTRODUCED_0')|_T]. | ||
144 | +_T > [id('sa')|_T]. | ||
145 | +_T > [id('nsw')|_T]. | ||
146 | +[E|_T] > [[E]|_T]. | ||
147 | +[T,H|_T] > [[H|T]|_T]. | ||
148 | +[Es|_T] > [lit(Es,array(_))|_T]. | ||
149 | +_T > [lit(0,int)|_T]. | ||
150 | +[E|_T] > [[E]|_T]. | ||
151 | +[T,H|_T] > [[H|T]|_T]. | ||
152 | +[T,H|_T] > [[H|T]|_T]. | ||
140 | [AL|_T] > [C|_T] :- C =.. ['int_lin_ne'|AL]. | 153 | [AL|_T] > [C|_T] :- C =.. ['int_lin_ne'|AL]. |
141 | _T > [[]|_T]. | 154 | _T > [[]|_T]. |
142 | -[A,C,E|_T] > [constraint(C,E,A)|_T]. | ||
143 | -[H,T|_T] > [[H|T]|_T]. | ||
144 | -_T > [_:id('X_INTRODUCED_0')|_T]. | ||
145 | -_T > [_:id('sa')|_T]. | ||
146 | -_T > [_:id('v')|_T]. | ||
147 | -[T2:E2,T1:E1|_T] > [(T1,T2):(E1,E2)|_T]. | ||
148 | -[Es|_T] > [array(_):alit(Es)|_T]. | ||
149 | -_T > [int:lit(0)|_T]. | ||
150 | -[T2:E2,T1:E1|_T] > [(T1,T2):(E1,E2)|_T]. | ||
151 | -[T2:E2,T1:E1|_T] > [(T1,T2):(E1,E2)|_T]. | 155 | +[A,C|_T] > [constraint(C,A)|_T]. |
156 | +[H,T|_T] > [[H|T]|_T]. | ||
157 | +_T > [id('X_INTRODUCED_0')|_T]. | ||
158 | +_T > [id('sa')|_T]. | ||
159 | +_T > [id('v')|_T]. | ||
160 | +[E|_T] > [[E]|_T]. | ||
161 | +[T,H|_T] > [[H|T]|_T]. | ||
162 | +[Es|_T] > [lit(Es,array(_))|_T]. | ||
163 | +_T > [lit(0,int)|_T]. | ||
164 | +[E|_T] > [[E]|_T]. | ||
165 | +[T,H|_T] > [[H|T]|_T]. | ||
166 | +[T,H|_T] > [[H|T]|_T]. | ||
152 | [AL|_T] > [C|_T] :- C =.. ['int_lin_ne'|AL]. | 167 | [AL|_T] > [C|_T] :- C =.. ['int_lin_ne'|AL]. |
153 | _T > [[]|_T]. | 168 | _T > [[]|_T]. |
154 | -[A,C,E|_T] > [constraint(C,E,A)|_T]. | ||
155 | -[H,T|_T] > [[H|T]|_T]. | ||
156 | -_T > [_:id('X_INTRODUCED_0')|_T]. | ||
157 | -_T > [_:id('q')|_T]. | ||
158 | -_T > [_:id('nsw')|_T]. | ||
159 | -[T2:E2,T1:E1|_T] > [(T1,T2):(E1,E2)|_T]. | ||
160 | -[Es|_T] > [array(_):alit(Es)|_T]. | ||
161 | -_T > [int:lit(0)|_T]. | ||
162 | -[T2:E2,T1:E1|_T] > [(T1,T2):(E1,E2)|_T]. | ||
163 | -[T2:E2,T1:E1|_T] > [(T1,T2):(E1,E2)|_T]. | 169 | +[A,C|_T] > [constraint(C,A)|_T]. |
170 | +[H,T|_T] > [[H|T]|_T]. | ||
171 | +_T > [id('X_INTRODUCED_0')|_T]. | ||
172 | +_T > [id('q')|_T]. | ||
173 | +_T > [id('nsw')|_T]. | ||
174 | +[E|_T] > [[E]|_T]. | ||
175 | +[T,H|_T] > [[H|T]|_T]. | ||
176 | +[Es|_T] > [lit(Es,array(_))|_T]. | ||
177 | +_T > [lit(0,int)|_T]. | ||
178 | +[E|_T] > [[E]|_T]. | ||
179 | +[T,H|_T] > [[H|T]|_T]. | ||
180 | +[T,H|_T] > [[H|T]|_T]. | ||
164 | [AL|_T] > [C|_T] :- C =.. ['int_lin_ne'|AL]. | 181 | [AL|_T] > [C|_T] :- C =.. ['int_lin_ne'|AL]. |
165 | _T > [[]|_T]. | 182 | _T > [[]|_T]. |
166 | -[A,C,E|_T] > [constraint(C,E,A)|_T]. | ||
167 | -[H,T|_T] > [[H|T]|_T]. | ||
168 | -_T > [_:id('X_INTRODUCED_0')|_T]. | ||
169 | -_T > [_:id('nsw')|_T]. | ||
170 | -_T > [_:id('v')|_T]. | ||
171 | -[T2:E2,T1:E1|_T] > [(T1,T2):(E1,E2)|_T]. | ||
172 | -[Es|_T] > [array(_):alit(Es)|_T]. | ||
173 | -_T > [int:lit(0)|_T]. | ||
174 | -[T2:E2,T1:E1|_T] > [(T1,T2):(E1,E2)|_T]. | ||
175 | -[T2:E2,T1:E1|_T] > [(T1,T2):(E1,E2)|_T]. | 183 | +[A,C|_T] > [constraint(C,A)|_T]. |
184 | +[H,T|_T] > [[H|T]|_T]. | ||
185 | +_T > [id('X_INTRODUCED_0')|_T]. | ||
186 | +_T > [id('nsw')|_T]. | ||
187 | +_T > [id('v')|_T]. | ||
188 | +[E|_T] > [[E]|_T]. | ||
189 | +[T,H|_T] > [[H|T]|_T]. | ||
190 | +[Es|_T] > [lit(Es,array(_))|_T]. | ||
191 | +_T > [lit(0,int)|_T]. | ||
192 | +[E|_T] > [[E]|_T]. | ||
193 | +[T,H|_T] > [[H|T]|_T]. | ||
194 | +[T,H|_T] > [[H|T]|_T]. | ||
176 | [AL|_T] > [C|_T] :- C =.. ['int_lin_ne'|AL]. | 195 | [AL|_T] > [C|_T] :- C =.. ['int_lin_ne'|AL]. |
177 | _T > [[]|_T]. | 196 | _T > [[]|_T]. |
178 | -[A,C,E|_T] > [constraint(C,E,A)|_T]. | 197 | +[A,C|_T] > [constraint(C,A)|_T]. |
179 | [H,T|_T] > [[H|T]|_T]. | 198 | [H,T|_T] > [[H|T]|_T]. |
180 | [X|_T] > [constrs(X)|_T]. | 199 | [X|_T] > [constrs(X)|_T]. |
181 | _T > [[]|_T]. | 200 | _T > [[]|_T]. |