registry.cpp
20.5 KB
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
/* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */
/*
* Main authors:
* Guido Tack <tack@gecode.org>
*
* Contributing authors:
* Mikael Lagerkvist <lagerkvist@gmail.com>
*
* Copyright:
* Guido Tack, 2007
* Mikael Lagerkvist, 2009
*
* Last modified:
* $Date: 2010-07-02 19:18:43 +1000 (Fri, 02 Jul 2010) $ by $Author: tack $
* $Revision: 11149 $
*
* This file is part of Gecode, the generic constraint
* development environment:
* http://www.gecode.org
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*/
#include "registry.hh"
#include "flatzinc.hh"
namespace FlatZinc {
Registry& registry(void) {
static Registry r;
return r;
}
void
Registry::post(FlatZincModel& s, const ConExpr& ce, AST::Node* ann) {
std::map<std::string,poster>::iterator i = r.find(ce.id);
if (i == r.end()) {
throw FlatZinc::Error("Registry",
std::string("Constraint ")+ce.id+" not found");
}
i->second(s, ce, ann);
}
void
Registry::add(const std::string& id, poster p) {
r[id] = p;
}
namespace {
void p_int_eq(FlatZincModel& s, const ConExpr& ce, AST::Node* ann) {
std::cerr << "int_eq("<<(*ce[0])<<","<<(*ce[1])<<")::"<<(*ann)<<"\n";
}
void p_int_ne(FlatZincModel& s, const ConExpr& ce, AST::Node* ann) {
std::cerr << "int_eq("<<(*ce[0])<<","<<(*ce[1])<<")::"<<(*ann)<<"\n";
}
void p_int_ge(FlatZincModel& s, const ConExpr& ce, AST::Node* ann) {
std::cerr << "int_ge("<<(*ce[0])<<","<<(*ce[1])<<")::"<<(*ann)<<"\n";
}
void p_int_gt(FlatZincModel& s, const ConExpr& ce, AST::Node* ann) {
std::cerr << "int_gt("<<(*ce[0])<<","<<(*ce[1])<<")::"<<(*ann)<<"\n";
}
void p_int_le(FlatZincModel& s, const ConExpr& ce, AST::Node* ann) {
std::cerr << "int_le("<<(*ce[0])<<","<<(*ce[1])<<")::"<<(*ann)<<"\n";
}
void p_int_lt(FlatZincModel& s, const ConExpr& ce, AST::Node* ann) {
std::cerr << "int_lt("<<(*ce[0])<<","<<(*ce[1])<<")::"<<(*ann)<<"\n";
}
/* Comparisons */
void p_int_eq_reif(FlatZincModel& s, const ConExpr& ce, AST::Node* ann) {
std::cerr << "int_eq_reif("<<(*ce[0])<<","<<(*ce[1])<<","<<(*ce[2])
<<")::"<<(*ann)<<"\n";
}
void p_int_ne_reif(FlatZincModel& s, const ConExpr& ce, AST::Node* ann) {
std::cerr << "int_ne_reif("<<(*ce[0])<<","<<(*ce[1])<<","<<(*ce[2])
<<")::"<<(*ann)<<"\n";
}
void p_int_ge_reif(FlatZincModel& s, const ConExpr& ce, AST::Node* ann) {
std::cerr << "int_ge_reif("<<(*ce[0])<<","<<(*ce[1])<<","<<(*ce[2])
<<")::"<<(*ann)<<"\n";
}
void p_int_gt_reif(FlatZincModel& s, const ConExpr& ce, AST::Node* ann) {
std::cerr << "int_gt_reif("<<(*ce[0])<<","<<(*ce[1])<<","<<(*ce[2])
<<")::"<<(*ann)<<"\n";
}
void p_int_le_reif(FlatZincModel& s, const ConExpr& ce, AST::Node* ann) {
std::cerr << "int_le_reif("<<(*ce[0])<<","<<(*ce[1])<<","<<(*ce[2])
<<")::"<<(*ann)<<"\n";
}
void p_int_lt_reif(FlatZincModel& s, const ConExpr& ce, AST::Node* ann) {
std::cerr << "int_lt_reif("<<(*ce[0])<<","<<(*ce[1])<<","<<(*ce[2])
<<")::"<<(*ann)<<"\n";
}
void p_int_lin_eq(FlatZincModel& s, const ConExpr& ce, AST::Node* ann) {
std::cerr << "int_lin_eq("<<(*ce[0])<<","<<(*ce[1])<<","<<(*ce[2])
<<")::"<<(*ann)<<"\n";
}
void p_int_lin_eq_reif(FlatZincModel& s, const ConExpr& ce, AST::Node* ann) {
std::cerr << "int_lin_eq_reif("<<(*ce[0])<<","<<(*ce[1])<<","<<(*ce[2])
<<","<<(*ce[3])<<")::"<<(*ann)<<"\n";
}
void p_int_lin_ne(FlatZincModel& s, const ConExpr& ce, AST::Node* ann) {
std::cerr << "int_lin_ne("<<(*ce[0])<<","<<(*ce[1])<<","<<(*ce[2])
<<")::"<<(*ann)<<"\n";
}
void p_int_lin_ne_reif(FlatZincModel& s, const ConExpr& ce, AST::Node* ann) {
std::cerr << "int_lin_ne_reif("<<(*ce[0])<<","<<(*ce[1])<<","<<(*ce[2])
<<","<<(*ce[3])<<")::"<<(*ann)<<"\n";
}
void p_int_lin_le(FlatZincModel& s, const ConExpr& ce, AST::Node* ann) {
std::cerr << "int_lin_le("<<(*ce[0])<<","<<(*ce[1])<<","<<(*ce[2])
<<")::"<<(*ann)<<"\n";
}
void p_int_lin_le_reif(FlatZincModel& s, const ConExpr& ce, AST::Node* ann) {
std::cerr << "int_lin_le_reif("<<(*ce[0])<<","<<(*ce[1])<<","<<(*ce[2])
<<","<<(*ce[3])<<")::"<<(*ann)<<"\n";
}
void p_int_lin_lt(FlatZincModel& s, const ConExpr& ce, AST::Node* ann) {
std::cerr << "int_lin_lt("<<(*ce[0])<<","<<(*ce[1])<<","<<(*ce[2])
<<")::"<<(*ann)<<"\n";
}
void p_int_lin_lt_reif(FlatZincModel& s, const ConExpr& ce, AST::Node* ann) {
std::cerr << "int_lin_lt_reif("<<(*ce[0])<<","<<(*ce[1])<<","<<(*ce[2])
<<","<<(*ce[3])<<")::"<<(*ann)<<"\n";
}
void p_int_lin_ge(FlatZincModel& s, const ConExpr& ce, AST::Node* ann) {
std::cerr << "int_lin_ge("<<(*ce[0])<<","<<(*ce[1])<<","<<(*ce[2])
<<")::"<<(*ann)<<"\n";
}
void p_int_lin_ge_reif(FlatZincModel& s, const ConExpr& ce, AST::Node* ann) {
std::cerr << "int_lin_ge_reif("<<(*ce[0])<<","<<(*ce[1])<<","<<(*ce[2])
<<","<<(*ce[3])<<")::"<<(*ann)<<"\n";
}
void p_int_lin_gt(FlatZincModel& s, const ConExpr& ce, AST::Node* ann) {
std::cerr << "int_lin_gt("<<(*ce[0])<<","<<(*ce[1])<<","<<(*ce[2])
<<")::"<<(*ann)<<"\n";
}
void p_int_lin_gt_reif(FlatZincModel& s, const ConExpr& ce, AST::Node* ann) {
std::cerr << "int_lin_gt_reif("<<(*ce[0])<<","<<(*ce[1])<<","<<(*ce[2])
<<","<<(*ce[3])<<")::"<<(*ann)<<"\n";
}
/* arithmetic constraints */
void p_int_plus(FlatZincModel& s, const ConExpr& ce, AST::Node* ann) {
std::cerr << "int_plus("<<(*ce[0])<<","<<(*ce[1])<<","<<(*ce[2])
<<")::"<<(*ann)<<"\n";
}
void p_int_minus(FlatZincModel& s, const ConExpr& ce, AST::Node* ann) {
std::cerr << "int_minus("<<(*ce[0])<<","<<(*ce[1])<<","<<(*ce[2])
<<")::"<<(*ann)<<"\n";
}
void p_int_times(FlatZincModel& s, const ConExpr& ce, AST::Node* ann) {
std::cerr << "int_times("<<(*ce[0])<<","<<(*ce[1])<<","<<(*ce[2])
<<")::"<<(*ann)<<"\n";
}
void p_int_div(FlatZincModel& s, const ConExpr& ce, AST::Node* ann) {
std::cerr << "int_div("<<(*ce[0])<<","<<(*ce[1])<<","<<(*ce[2])
<<")::"<<(*ann)<<"\n";
}
void p_int_mod(FlatZincModel& s, const ConExpr& ce, AST::Node* ann) {
std::cerr << "int_mod("<<(*ce[0])<<","<<(*ce[1])<<","<<(*ce[2])
<<")::"<<(*ann)<<"\n";
}
void p_int_min(FlatZincModel& s, const ConExpr& ce, AST::Node* ann) {
std::cerr << "int_min("<<(*ce[0])<<","<<(*ce[1])<<","<<(*ce[2])
<<")::"<<(*ann)<<"\n";
}
void p_int_max(FlatZincModel& s, const ConExpr& ce, AST::Node* ann) {
std::cerr << "int_max("<<(*ce[0])<<","<<(*ce[1])<<","<<(*ce[2])
<<")::"<<(*ann)<<"\n";
}
void p_int_negate(FlatZincModel& s, const ConExpr& ce, AST::Node* ann) {
std::cerr << "int_negate("<<(*ce[0])<<","<<(*ce[1])<<","<<(*ce[2])
<<")::"<<(*ann)<<"\n";
}
void p_bool_eq(FlatZincModel& s, const ConExpr& ce, AST::Node* ann) {
std::cerr << "bool_eq("<<(*ce[0])<<","<<(*ce[1])
<<")::"<<(*ann)<<"\n";
}
void p_bool_eq_reif(FlatZincModel& s, const ConExpr& ce, AST::Node* ann) {
std::cerr << "bool_eq_reif("<<(*ce[0])<<","<<(*ce[1])<<","<<(*ce[2])
<<")::"<<(*ann)<<"\n";
}
void p_bool_ne(FlatZincModel& s, const ConExpr& ce, AST::Node* ann) {
std::cerr << "bool_ne("<<(*ce[0])<<","<<(*ce[1])
<<")::"<<(*ann)<<"\n";
}
void p_bool_ne_reif(FlatZincModel& s, const ConExpr& ce, AST::Node* ann) {
std::cerr << "bool_ne_reif("<<(*ce[0])<<","<<(*ce[1])<<","<<(*ce[2])
<<")::"<<(*ann)<<"\n";
}
void p_bool_ge(FlatZincModel& s, const ConExpr& ce, AST::Node* ann) {
std::cerr << "bool_ge("<<(*ce[0])<<","<<(*ce[1])
<<")::"<<(*ann)<<"\n";
}
void p_bool_ge_reif(FlatZincModel& s, const ConExpr& ce, AST::Node* ann) {
std::cerr << "bool_ge_reif("<<(*ce[0])<<","<<(*ce[1])<<","<<(*ce[2])
<<")::"<<(*ann)<<"\n";
}
void p_bool_le(FlatZincModel& s, const ConExpr& ce, AST::Node* ann) {
std::cerr << "bool_le("<<(*ce[0])<<","<<(*ce[1])
<<")::"<<(*ann)<<"\n";
}
void p_bool_le_reif(FlatZincModel& s, const ConExpr& ce, AST::Node* ann) {
std::cerr << "bool_le_reif("<<(*ce[0])<<","<<(*ce[1])<<","<<(*ce[2])
<<")::"<<(*ann)<<"\n";
}
void p_bool_gt(FlatZincModel& s, const ConExpr& ce, AST::Node* ann) {
std::cerr << "bool_gt("<<(*ce[0])<<","<<(*ce[1])
<<")::"<<(*ann)<<"\n";
}
void p_bool_gt_reif(FlatZincModel& s, const ConExpr& ce, AST::Node* ann) {
std::cerr << "bool_gt_reif("<<(*ce[0])<<","<<(*ce[1])<<","<<(*ce[2])
<<")::"<<(*ann)<<"\n";
}
void p_bool_lt(FlatZincModel& s, const ConExpr& ce, AST::Node* ann) {
std::cerr << "bool_lt("<<(*ce[0])<<","<<(*ce[1])
<<")::"<<(*ann)<<"\n";
}
void p_bool_lt_reif(FlatZincModel& s, const ConExpr& ce, AST::Node* ann) {
std::cerr << "bool_lt_reif("<<(*ce[0])<<","<<(*ce[1])<<","<<(*ce[2])
<<")::"<<(*ann)<<"\n";
}
void p_bool_or(FlatZincModel& s, const ConExpr& ce, AST::Node* ann) {
std::cerr << "bool_or("<<(*ce[0])<<","<<(*ce[1])<<","<<(*ce[2])
<<")::"<<(*ann)<<"\n";
}
void p_bool_and(FlatZincModel& s, const ConExpr& ce, AST::Node* ann) {
std::cerr << "bool_and("<<(*ce[0])<<","<<(*ce[1])<<","<<(*ce[2])
<<")::"<<(*ann)<<"\n";
}
void p_array_bool_and(FlatZincModel& s, const ConExpr& ce, AST::Node* ann)
{
std::cerr << "array_bool_and("<<(*ce[0])<<","<<(*ce[1])
<<")::"<<(*ann)<<"\n";
}
void p_array_bool_or(FlatZincModel& s, const ConExpr& ce, AST::Node* ann)
{
std::cerr << "array_bool_or("<<(*ce[0])<<","<<(*ce[1])
<<")::"<<(*ann)<<"\n";
}
void p_array_bool_clause(FlatZincModel& s, const ConExpr& ce,
AST::Node* ann) {
std::cerr << "array_bool_clause("<<(*ce[0])<<","<<(*ce[1])
<<")::"<<(*ann)<<"\n";
}
void p_array_bool_clause_reif(FlatZincModel& s, const ConExpr& ce,
AST::Node* ann) {
std::cerr << "array_bool_clause_reif("<<(*ce[0])<<","<<(*ce[1])<<","<<(*ce[2])
<<")::"<<(*ann)<<"\n";
}
void p_bool_xor(FlatZincModel& s, const ConExpr& ce, AST::Node* ann) {
std::cerr << "bool_xor("<<(*ce[0])<<","<<(*ce[1])<<","<<(*ce[2])
<<")::"<<(*ann)<<"\n";
}
void p_bool_l_imp(FlatZincModel& s, const ConExpr& ce, AST::Node* ann) {
std::cerr << "bool_l_imp("<<(*ce[0])<<","<<(*ce[1])<<","<<(*ce[2])
<<")::"<<(*ann)<<"\n";
}
void p_bool_r_imp(FlatZincModel& s, const ConExpr& ce, AST::Node* ann) {
std::cerr << "bool_r_imp("<<(*ce[0])<<","<<(*ce[1])<<","<<(*ce[2])
<<")::"<<(*ann)<<"\n";
}
void p_bool_not(FlatZincModel& s, const ConExpr& ce, AST::Node* ann) {
std::cerr << "bool_not("<<(*ce[0])<<","<<(*ce[1])
<<")::"<<(*ann)<<"\n";
}
/* element constraints */
void p_array_int_element(FlatZincModel& s, const ConExpr& ce,
AST::Node* ann) {
std::cerr << "array_int_element("<<(*ce[0])<<","<<(*ce[1])<<","<<(*ce[2])
<<")::"<<(*ann)<<"\n";
}
void p_array_bool_element(FlatZincModel& s, const ConExpr& ce,
AST::Node* ann) {
std::cerr << "array_bool_element("<<(*ce[0])<<","<<(*ce[1])<<","<<(*ce[2])
<<")::"<<(*ann)<<"\n";
}
/* coercion constraints */
void p_bool2int(FlatZincModel& s, const ConExpr& ce, AST::Node* ann) {
std::cerr << "bool2int("<<(*ce[0])<<","<<(*ce[1])
<<")::"<<(*ann)<<"\n";
}
void p_int_in(FlatZincModel& s, const ConExpr& ce, AST::Node *ann) {
std::cerr << "int_in("<<(*ce[0])<<","<<(*ce[1])
<<")::"<<(*ann)<<"\n";
}
void p_abs(FlatZincModel& s, const ConExpr& ce, AST::Node* ann) {
std::cerr << "abs("<<(*ce[0])<<","<<(*ce[1])<<")::"<<(*ann)<<"\n";
}
class IntPoster {
public:
IntPoster(void) {
registry().add("int_eq", &p_int_eq);
registry().add("int_ne", &p_int_ne);
registry().add("int_ge", &p_int_ge);
registry().add("int_gt", &p_int_gt);
registry().add("int_le", &p_int_le);
registry().add("int_lt", &p_int_lt);
registry().add("int_eq_reif", &p_int_eq_reif);
registry().add("int_ne_reif", &p_int_ne_reif);
registry().add("int_ge_reif", &p_int_ge_reif);
registry().add("int_gt_reif", &p_int_gt_reif);
registry().add("int_le_reif", &p_int_le_reif);
registry().add("int_lt_reif", &p_int_lt_reif);
registry().add("int_lin_eq", &p_int_lin_eq);
registry().add("int_lin_eq_reif", &p_int_lin_eq_reif);
registry().add("int_lin_ne", &p_int_lin_ne);
registry().add("int_lin_ne_reif", &p_int_lin_ne_reif);
registry().add("int_lin_le", &p_int_lin_le);
registry().add("int_lin_le_reif", &p_int_lin_le_reif);
registry().add("int_lin_lt", &p_int_lin_lt);
registry().add("int_lin_lt_reif", &p_int_lin_lt_reif);
registry().add("int_lin_ge", &p_int_lin_ge);
registry().add("int_lin_ge_reif", &p_int_lin_ge_reif);
registry().add("int_lin_gt", &p_int_lin_gt);
registry().add("int_lin_gt_reif", &p_int_lin_gt_reif);
registry().add("int_plus", &p_int_plus);
registry().add("int_minus", &p_int_minus);
registry().add("int_times", &p_int_times);
registry().add("int_div", &p_int_div);
registry().add("int_mod", &p_int_mod);
registry().add("int_min", &p_int_min);
registry().add("int_max", &p_int_max);
registry().add("int_abs", &p_abs);
registry().add("int_negate", &p_int_negate);
registry().add("bool_eq", &p_bool_eq);
registry().add("bool_eq_reif", &p_bool_eq_reif);
registry().add("bool_ne", &p_bool_ne);
registry().add("bool_ne_reif", &p_bool_ne_reif);
registry().add("bool_ge", &p_bool_ge);
registry().add("bool_ge_reif", &p_bool_ge_reif);
registry().add("bool_le", &p_bool_le);
registry().add("bool_le_reif", &p_bool_le_reif);
registry().add("bool_gt", &p_bool_gt);
registry().add("bool_gt_reif", &p_bool_gt_reif);
registry().add("bool_lt", &p_bool_lt);
registry().add("bool_lt_reif", &p_bool_lt_reif);
registry().add("bool_or", &p_bool_or);
registry().add("bool_and", &p_bool_and);
registry().add("bool_xor", &p_bool_xor);
registry().add("array_bool_and", &p_array_bool_and);
registry().add("array_bool_or", &p_array_bool_or);
registry().add("bool_clause", &p_array_bool_clause);
registry().add("bool_clause_reif", &p_array_bool_clause_reif);
registry().add("bool_left_imp", &p_bool_l_imp);
registry().add("bool_right_imp", &p_bool_r_imp);
registry().add("bool_not", &p_bool_not);
registry().add("array_int_element", &p_array_int_element);
registry().add("array_var_int_element", &p_array_int_element);
registry().add("array_bool_element", &p_array_bool_element);
registry().add("array_var_bool_element", &p_array_bool_element);
registry().add("bool2int", &p_bool2int);
registry().add("int_in", &p_int_in);
}
};
IntPoster __int_poster;
void p_set_union(FlatZincModel& s, const ConExpr& ce, AST::Node *ann) {
std::cerr << "set_union("<<(*ce[0])<<","<<(*ce[1])<<","<<(*ce[2])
<<")::"<<(*ann)<<"\n";
}
void p_set_intersect(FlatZincModel& s, const ConExpr& ce, AST::Node *ann) {
std::cerr << "set_intersect("<<(*ce[0])<<","<<(*ce[1])<<","<<(*ce[2])
<<")::"<<(*ann)<<"\n";
}
void p_set_diff(FlatZincModel& s, const ConExpr& ce, AST::Node *ann) {
std::cerr << "set_diff("<<(*ce[0])<<","<<(*ce[1])<<","<<(*ce[2])
<<")::"<<(*ann)<<"\n";
}
void p_set_symdiff(FlatZincModel& s, const ConExpr& ce, AST::Node* ann) {
std::cerr << "set_symdiff("<<(*ce[0])<<","<<(*ce[1])<<","<<(*ce[2])
<<")::"<<(*ann)<<"\n";
}
void p_set_eq(FlatZincModel& s, const ConExpr& ce, AST::Node * ann) {
std::cerr << "set_eq("<<(*ce[0])<<","<<(*ce[1])
<<")::"<<(*ann)<<"\n";
}
void p_set_ne(FlatZincModel& s, const ConExpr& ce, AST::Node * ann) {
std::cerr << "set_ne("<<(*ce[0])<<","<<(*ce[1])
<<")::"<<(*ann)<<"\n";
}
void p_set_subset(FlatZincModel& s, const ConExpr& ce, AST::Node * ann) {
std::cerr << "set_subset("<<(*ce[0])<<","<<(*ce[1])
<<")::"<<(*ann)<<"\n";
}
void p_set_superset(FlatZincModel& s, const ConExpr& ce, AST::Node * ann) {
std::cerr << "set_superset("<<(*ce[0])<<","<<(*ce[1])
<<")::"<<(*ann)<<"\n";
}
void p_set_card(FlatZincModel& s, const ConExpr& ce, AST::Node * ann) {
std::cerr << "set_card("<<(*ce[0])<<","<<(*ce[1])
<<")::"<<(*ann)<<"\n";
}
void p_set_in(FlatZincModel& s, const ConExpr& ce, AST::Node * ann) {
std::cerr << "set_in("<<(*ce[0])<<","<<(*ce[1])
<<")::"<<(*ann)<<"\n";
}
void p_set_eq_reif(FlatZincModel& s, const ConExpr& ce, AST::Node * ann) {
std::cerr << "set_eq_reif("<<(*ce[0])<<","<<(*ce[1])<<","<<(*ce[2])
<<")::"<<(*ann)<<"\n";
}
void p_set_ne_reif(FlatZincModel& s, const ConExpr& ce, AST::Node * ann) {
std::cerr << "set_ne_reif("<<(*ce[0])<<","<<(*ce[1])<<","<<(*ce[2])
<<")::"<<(*ann)<<"\n";
}
void p_set_subset_reif(FlatZincModel& s, const ConExpr& ce,
AST::Node *ann) {
std::cerr << "set_subset_reif("<<(*ce[0])<<","<<(*ce[1])<<","<<(*ce[2])
<<")::"<<(*ann)<<"\n";
}
void p_set_superset_reif(FlatZincModel& s, const ConExpr& ce,
AST::Node *ann) {
std::cerr << "set_superset_reif("<<(*ce[0])<<","<<(*ce[1])<<","<<(*ce[2])
<<")::"<<(*ann)<<"\n";
}
void p_set_in_reif(FlatZincModel& s, const ConExpr& ce, AST::Node *ann) {
std::cerr << "set_in_reif("<<(*ce[0])<<","<<(*ce[1])<<","<<(*ce[2])
<<")::"<<(*ann)<<"\n";
}
void p_set_disjoint(FlatZincModel& s, const ConExpr& ce, AST::Node *ann) {
std::cerr << "set_disjoint("<<(*ce[0])<<","<<(*ce[1])
<<")::"<<(*ann)<<"\n";
}
void p_array_set_element(FlatZincModel& s, const ConExpr& ce,
AST::Node* ann) {
std::cerr << "array_set_element("<<(*ce[0])<<","<<(*ce[1])<<","<<(*ce[2])
<<")::"<<(*ann)<<"\n";
}
class SetPoster {
public:
SetPoster(void) {
registry().add("set_eq", &p_set_eq);
registry().add("set_ne", &p_set_ne);
registry().add("set_union", &p_set_union);
registry().add("array_set_element", &p_array_set_element);
registry().add("array_var_set_element", &p_array_set_element);
registry().add("set_intersect", &p_set_intersect);
registry().add("set_diff", &p_set_diff);
registry().add("set_symdiff", &p_set_symdiff);
registry().add("set_subset", &p_set_subset);
registry().add("set_superset", &p_set_superset);
registry().add("set_card", &p_set_card);
registry().add("set_in", &p_set_in);
registry().add("set_eq_reif", &p_set_eq_reif);
registry().add("equal_reif", &p_set_eq_reif);
registry().add("set_ne_reif", &p_set_ne_reif);
registry().add("set_subset_reif", &p_set_subset_reif);
registry().add("set_superset_reif", &p_set_superset_reif);
registry().add("set_in_reif", &p_set_in_reif);
registry().add("disjoint", &p_set_disjoint);
}
};
SetPoster __set_poster;
}
}
// STATISTICS: flatzinc-any