1m4_divert(-1)
2
3dnl This m4 file contains the code for generating the test files
4dnl ppl_prolog_generated_test_<CLASS_NAME>.pl, which test
5dnl the generated Prolog interface predicates
6dnl and the main file ppl_prolog_generated_test_main.pl.
7
8dnl Copyright (C) 2001-2010 Roberto Bagnara <bagnara@cs.unipr.it>
9dnl Copyright (C) 2010-2016 BUGSENG srl (http://bugseng.com)
10dnl
11dnl This file is part of the Parma Polyhedra Library (PPL).
12dnl
13dnl The PPL is free software; you can redistribute it and/or modify it
14dnl under the terms of the GNU General Public License as published by the
15dnl Free Software Foundation; either version 3 of the License, or (at your
16dnl option) any later version.
17dnl
18dnl The PPL is distributed in the hope that it will be useful, but WITHOUT
19dnl ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20dnl FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
21dnl for more details.
22dnl
23dnl You should have received a copy of the GNU General Public License
24dnl along with this program; if not, write to the Free Software Foundation,
25dnl Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307, USA.
26dnl
27dnl For the most up-to-date information see the Parma Polyhedra Library
28dnl site: http://bugseng.com/products/ppl/ .
29
30m4_define(`m4_add_build_class_code', `dnl
31ppl_@TOPOLOGY@@CLASS@_build_test_object(TEST_DATA, PS, Dim) :-
32  (clean_ppl_new_@TOPOLOGY@@CLASS@_from_space_dimension(Dim, universe, PS),
33  ppl_build_test_data(TEST_DATA, t_@TOPOLOGY@, @CONSTRAINER@s, RS),
34  ppl_@CLASS@_refine_with_@CONSTRAINER@s(PS, RS)).
35
36')
37
38m4_define(`m4_add_comparison_class_code', `dnl
39ppl_@CLASS@_comparison_check(is_disjoint_from, PS1, PS2, Result) :-
40  (
41   ppl_new_@TOPOLOGY@@CLASS@_from_@TOPOLOGY@@CLASS@(PS1, PS1_Copy),
42   ppl_@CLASS@_intersection_assign(PS1_Copy, PS2),
43   (ppl_@CLASS@_is_empty(PS1_Copy)
44   ->
45    Result = true
46   ;
47    Result = false
48   ),
49   ppl_delete_@CLASS@(PS1_Copy)
50  ).
51
52ppl_@CLASS@_comparison_check(contains, PS1, PS2, Result) :-
53  (
54   ppl_new_@TOPOLOGY@@CLASS@_from_@TOPOLOGY@@CLASS@(PS1, PS1_Copy),
55   ppl_@CLASS@_intersection_assign(PS1_Copy, PS2),
56   (ppl_@CLASS@_equals_@CLASS@(PS1_Copy, PS2)
57   ->
58    Result = true
59   ;
60    Result = false
61   ),
62  ppl_delete_@CLASS@(PS1_Copy)
63  ).
64
65ppl_@CLASS@_comparison_check(strictly_contains, PS1, PS2, Result) :-
66  (
67   (ppl_@CLASS@_equals_@CLASS@(PS1, PS2)
68   ->
69     Result = false
70   ;
71     ppl_@CLASS@_comparison_check(contains, PS1, PS2, Result)
72   )
73  ).
74
75ppl_@CLASS@_comparison_check(geometrically_covers, _PS1, _PS2, _).
76
77ppl_@CLASS@_comparison_check(geometrically_equals, _PS1, _PS2, _).
78
79')
80
81m4_define(`m4_add_wdn_exn_class_code', `dnl
82ppl_@CLASS@_wdn_exn_check_code(PS1, PS1_Copy, PS2, PS2_Copy) :-
83  (
84     ppl_@CLASS@_contains_@CLASS@(PS1, PS1_Copy),
85     ppl_@CLASS@_contains_@CLASS@(PS1, PS2),
86     ppl_@CLASS@_equals_@CLASS@(PS2, PS2_Copy),
87     ppl_@CLASS@_OK(PS1),
88     ppl_@CLASS@_OK(PS2),
89     ppl_delete_@CLASS@(PS1),
90     ppl_delete_@CLASS@(PS1_Copy),
91     ppl_delete_@CLASS@(PS2),
92     ppl_delete_@CLASS@(PS2_Copy)
93  ).
94
95ppl_@CLASS@_wdn_exn_with_tokens_check_code(PS1, PS1a, PS1_Copy, PS2, PS2_Copy,
96                                           T, T1) :-
97  (
98     ppl_@CLASS@_contains_@CLASS@(PS1, PS1_Copy),
99     ppl_@CLASS@_contains_@CLASS@(PS1a, PS1_Copy),
100     ppl_@CLASS@_contains_@CLASS@(PS1, PS2),
101     ppl_@CLASS@_contains_@CLASS@(PS1a, PS1),
102     ppl_@CLASS@_equals_@CLASS@(PS2, PS2_Copy),
103     (T == 1
104     ->
105       ppl_@CLASS@_equals_@CLASS@(PS1, PS1a)
106     ;
107       T == 0,
108       ppl_@CLASS@_equals_@CLASS@(PS1, PS1_Copy)
109     ),
110     T1 == 0,
111     ppl_@CLASS@_OK(PS1),
112     ppl_@CLASS@_OK(PS1a),
113     ppl_@CLASS@_OK(PS2),
114     ppl_delete_@CLASS@(PS1),
115     ppl_delete_@CLASS@(PS1a),
116     ppl_delete_@CLASS@(PS1_Copy),
117     ppl_delete_@CLASS@(PS2),
118     ppl_delete_@CLASS@(PS2_Copy)
119  ).
120
121')
122
123m4_define(`m4_add_cleanup_class_code', `dnl
124ppl_cleanup_@CLASS@(_).
125ppl_cleanup_@CLASS@(P) :-
126  (out_@CLASS@(P), fail).
127
128ppl_cleanup_all_@CLASS@([]).
129ppl_cleanup_all_@CLASS@([_|_]).
130ppl_cleanup_all_@CLASS@([P|Ps]) :-
131  ppl_delete_all_@CLASS@([P|Ps]).
132
133ppl_delete_all_@CLASS@([]).
134ppl_delete_all_@CLASS@([P|Ps]) :-
135  (ppl_delete_@CLASS@(P),
136  ppl_delete_all_@CLASS@(Ps)).
137
138')
139
140m4_define(`m4_add_out_class_code', `dnl
141out_@CLASS@(P):-
142  ((noisy(N), N < 2) -> true ;
143    m4_ifelse(m4_current_group, pointset_powerset,
144      `display_message([nl, @!CLASS@, P, representation,
145                       cannot ,be, displayed, nl]),',
146              m4_current_group, product,
147      `display_message([nl, @!CLASS@, P, representation,
148                       cannot ,be, displayed, nl]),',
149`     ppl_@CLASS@_get_@CLASS_REPRESENT@s(P, RS),
150      display_message([nl, @CLASS_REPRESENT@s, are, nl, RS, nl]),')
151    fail
152  ).
153
154')
155
156m4_define(`m4_add_out_extra_class_code', `dnl
157out_@CLASS@(P) :-
158  ppl_delete_@CLASS@(P).
159
160')
161
162dnl Note that to avoid m4 treating commas as m4 argument separators,
163dnl all tests must be between `(' and `)'.
164m4_divert(-1)
165m4_define(`ppl_new_@TOPOLOGY@@CLASS@_from_space_dimension_code',
166`
167ppl_new_@TOPOLOGY@@CLASS@_from_space_dimension_3_test :-
168  (
169   clean_ppl_new_@TOPOLOGY@@CLASS@_from_space_dimension(0, empty, PS),
170   clean_ppl_new_@TOPOLOGY@@CLASS@_from_space_dimension(1, empty, PS1),
171   clean_ppl_new_@TOPOLOGY@@CLASS@_from_space_dimension(0, universe, PS2),
172   clean_ppl_new_@TOPOLOGY@@CLASS@_from_space_dimension(1, universe, PS3),
173   ppl_delete_@CLASS@(PS),
174   ppl_delete_@CLASS@(PS1),
175   ppl_delete_@CLASS@(PS2),
176   ppl_delete_@CLASS@(PS3)
177  ->
178   fail ; true).
179
180')
181
182m4_define(`ppl_C_Polyhedron_OK', ppl_Polyhedron_OK`'$1)
183m4_define(`ppl_NNC_Polyhedron_OK', ppl_Polyhedron_OK`'$1)
184
185m4_define(`ppl_delete_C_Polyhedron', ppl_delete_Polyhedron`'$1)
186m4_define(`ppl_delete_NNC_Polyhedron', ppl_delete_Polyhedron`'$1)
187
188m4_define(`ppl_new_@TOPOLOGY@@CLASS@_from_@FRIEND@_code',
189`
190ppl_new_@TOPOLOGY@@CLASS@_from_@FRIEND@_2_test :-
191  (
192   clean_ppl_new_@FRIEND@_from_space_dimension(0, universe, PS),
193   clean_ppl_new_@TOPOLOGY@@CLASS@_from_@FRIEND@(PS, PS1),
194   ppl_@FRIEND@_OK(`(PS)'),
195   ppl_@CLASS@_OK(PS1),
196   ppl_delete_@FRIEND@(`(PS)'),
197   ppl_delete_@CLASS@(PS1)
198  ->
199   fail ; true).
200
201')
202
203m4_define(`ppl_new_@TOPOLOGY@@CLASS@_from_@FRIEND@_with_complexity_code',
204`
205ppl_new_@TOPOLOGY@@CLASS@_from_@FRIEND@_with_complexity_2_test :-
206  (
207   clean_ppl_new_@FRIEND@_from_space_dimension(0, universe, PS),
208   clean_ppl_new_@TOPOLOGY@@CLASS@_from_@FRIEND@(PS, PS1),
209   ppl_@FRIEND@_OK(`(PS)'),
210   ppl_@CLASS@_OK(PS1),
211   ppl_delete_@FRIEND@(`(PS)'),
212   ppl_delete_@CLASS@(PS1)
213  ->
214   fail ; true).
215
216')
217
218m4_define(`ppl_new_@TOPOLOGY@@CLASS@_from_@BUILD_REPRESENT@s_code',
219`
220ppl_new_@TOPOLOGY@@CLASS@_from_@BUILD_REPRESENT@s_2_test :-
221  (
222   member(TEST_DATA, [test00, test02, test03, test04, test05]),
223   (
224    ppl_build_test_data(TEST_DATA, t_@TOPOLOGY@,
225                        @BUILD_REPRESENT@s, RS1),
226    clean_ppl_new_@TOPOLOGY@@CLASS@_from_@BUILD_REPRESENT@s(RS1, PS1),
227    ppl_build_test_data(TEST_DATA, t_@TOPOLOGY@,
228                        @A_BUILD_REPRESENT@s, RS1a),
229    clean_ppl_new_@TOPOLOGY@@CLASS@_from_@A_BUILD_REPRESENT@s(RS1a, PS1a),
230%%    ppl_@CLASS@_equals_@CLASS@(PS1, PS1a),
231    ppl_delete_@CLASS@(PS1),
232    ppl_delete_@CLASS@(PS1a)
233    ->
234    fail ; true)
235  ).
236
237')
238
239m4_define(`ppl_@CLASS@_@UB_EXACT@_code',
240`
241ppl_@CLASS@_@UB_EXACT@_2_test :-
242  (
243   choose_2_tests(TEST_DATA1, TEST_DATA2, Space_Dim),
244   (
245     ppl_@TOPOLOGY@@CLASS@_build_test_object(TEST_DATA1, PS1, Space_Dim),
246     ppl_@TOPOLOGY@@CLASS@_build_test_object(TEST_DATA2, PS2, Space_Dim),
247     ppl_@TOPOLOGY@@CLASS@_build_test_object(TEST_DATA2, PS2a, Space_Dim),
248     ppl_new_@TOPOLOGY@@CLASS@_from_@TOPOLOGY@@CLASS@(PS1, PS1_Copy),
249     (ppl_@CLASS@_@UB_EXACT@(PS1_Copy, PS2) ->
250       ppl_@CLASS@_equals_@CLASS@(PS2, PS2a),
251m4_ifelse(m4_current_group, pointset_powerset, `dnl
252       ppl_@CLASS@_geometrically_covers_@CLASS@(PS1_Copy, PS1),
253       ppl_@CLASS@_upper_bound_assign(PS2a, PS1),
254       ppl_@CLASS@_geometrically_covers_@CLASS@(PS2a, PS1_Copy)',
255`       true')
256     ;
257       ppl_@CLASS@_equals_@CLASS@(PS1_Copy, PS1),
258       ppl_@CLASS@_equals_@CLASS@(PS2a, PS2)
259     ),
260     ppl_@CLASS@_OK(PS1),
261     ppl_@CLASS@_OK(PS1_Copy),
262     ppl_@CLASS@_OK(PS2),
263     ppl_delete_@CLASS@(PS1),
264     ppl_delete_@CLASS@(PS1_Copy),
265     ppl_delete_@CLASS@(PS2),
266     ppl_delete_@CLASS@(PS2a)
267   ->
268     fail ; true)
269 ).
270
271')
272
273m4_define(`ppl_@CLASS@_swap_code',
274`
275ppl_@CLASS@_swap_2_test :-
276  (
277   (
278    clean_ppl_new_@TOPOLOGY@@CLASS@_from_space_dimension(3, universe, PS),
279    clean_ppl_new_@TOPOLOGY@@CLASS@_from_space_dimension(3, empty, PS1),
280    ppl_@CLASS@_swap(PS, PS1),
281    (predicate_exists(ppl_@CLASS@_is_empty)
282    ->
283      ppl_@CLASS@_is_empty(PS),
284      ppl_@CLASS@_is_universe(PS1)
285    ;
286      true
287    ),
288    ppl_@CLASS@_OK(PS),
289    ppl_@CLASS@_OK(PS1),
290    ppl_delete_@CLASS@(PS),
291    ppl_delete_@CLASS@(PS1)
292   ->
293     fail ; true)
294  ).
295
296')
297
298m4_define(`ppl_@CLASS@_@DIMENSION@_code',
299`
300ppl_@CLASS@_@DIMENSION@_2_test :-
301  (
302   choose_test(TEST_DATA, Space_Dim), TEST_DATA \= test07,
303    (
304     ppl_@TOPOLOGY@@CLASS@_build_test_object(TEST_DATA, PS, Space_Dim),
305     \+ppl_@CLASS@_@DIMENSION@(PS, 3),
306     ppl_@CLASS@_@DIMENSION@(PS, Dim),
307     ppl_dimension_test_data(TEST_DATA, @DIMENSION@, Dim1),
308     ((TEST_DATA == test05, @DIMENSION@ == affine_dimension)
309     ->
310       true
311     ;
312       Dim == Dim1
313     ),
314     ppl_delete_@CLASS@(PS)
315   ->
316     fail ; true)
317  ).
318
319')
320
321m4_define(`ppl_@CLASS@_get_@CLASS_REPRESENT@s_code',
322`
323ppl_@CLASS@_get_@CLASS_REPRESENT@s_2_test :-
324  (
325   choose_test(TEST_DATA, Space_Dim),
326   (
327     ppl_@TOPOLOGY@@CLASS@_build_test_object(TEST_DATA, PS, Space_Dim),
328     ppl_@TOPOLOGY@@CLASS@_build_test_object(TEST_DATA, PS1, Space_Dim),
329     ppl_@CLASS@_get_@CLASS_REPRESENT@s(PS, RS),
330     (predicate_exists(ppl_@CLASS@_add_@CLASS_REPRESENT@s)
331     ->
332         ppl_@CLASS@_add_@CLASS_REPRESENT@s(PS1, RS)
333     ;
334         true
335     ),
336     ppl_@CLASS@_OK(PS),
337     ppl_@CLASS@_OK(PS1),
338     ppl_delete_@CLASS@(PS),
339     ppl_delete_@CLASS@(PS1)
340   ->
341     fail ; true)
342  ).
343
344')
345
346m4_define(`ppl_@CLASS@_get_minimized_@CLASS_REPRESENT@s_code',
347`
348ppl_@CLASS@_get_minimized_@CLASS_REPRESENT@s_2_test :-
349  (
350   choose_test(TEST_DATA, Space_Dim),
351   (
352      ppl_@TOPOLOGY@@CLASS@_build_test_object(TEST_DATA, PS, Space_Dim),
353      ppl_@TOPOLOGY@@CLASS@_build_test_object(TEST_DATA, PS1, Space_Dim),
354      ppl_@CLASS@_get_minimized_@CLASS_REPRESENT@s(PS, RS),
355      ( predicate_exists(ppl_@CLASS@_add_@CLASS_REPRESENT@s)
356      ->
357        ppl_@CLASS@_add_@CLASS_REPRESENT@s(PS1, RS)
358      ;
359        true
360      ),
361      ppl_@CLASS@_OK(PS),
362      ppl_@CLASS@_OK(PS1),
363      ppl_delete_@CLASS@(PS),
364      ppl_delete_@CLASS@(PS1)
365   ->
366     fail ; true)
367  ).
368
369')
370
371m4_define(`ppl_@CLASS@_@MEMBYTES@_code',
372`
373ppl_@CLASS@_@MEMBYTES@_2_test :-
374  (
375   choose_test(TEST_DATA, Space_Dim),
376   (
377     ppl_@TOPOLOGY@@CLASS@_build_test_object(TEST_DATA, PH, Space_Dim),
378     ppl_@CLASS@_@MEMBYTES@(PH, S),
379     ((noisy(N), N < 2) -> true ;
380       display_message([nl, for, TEST_DATA, the, @MEMBYTES@, is, S, nl])
381     ),
382     ppl_delete_@CLASS@(PH)
383   ->
384     fail ; true)
385  ).
386
387')
388
389m4_define(`ppl_@CLASS@_@BEGINEND@_iterator_code',
390`
391ppl_@CLASS@_@BEGINEND@_iterator_2_test :-
392  (
393   choose_test(TEST_DATA, _Space_Dim),
394   ppl_build_test_data(TEST_DATA, t_@DISJUNCT_TOPOLOGY@, @CONSTRAINER@s, RS),
395   (
396     clean_ppl_new_@CLASS@_from_@CONSTRAINER@s(RS, PPS),
397     ppl_@CLASS@_@BEGINEND@_iterator(PPS, It_x),
398     ppl_@CLASS@_OK(PPS),
399     ppl_delete_@CLASS@_iterator(It_x),
400     ppl_delete_@CLASS@(PPS)
401   ->
402     fail ; true)
403  ).
404
405')
406
407m4_define(`ppl_@CLASS@_iterator_equals_iterator_code',
408`
409ppl_@CLASS@_iterator_equals_iterator_2_test :-
410  (
411   choose_test(TEST_DATA, _Space_Dim),
412   ppl_build_test_data(TEST_DATA, t_@DISJUNCT_TOPOLOGY@, @CONSTRAINER@s, RS),
413   (
414     clean_ppl_new_@CLASS@_from_@CONSTRAINER@s(RS, PPS),
415     ppl_@CLASS@_begin_iterator(PPS, It),
416     ppl_@CLASS@_begin_iterator(PPS, It_begin),
417     ppl_@CLASS@_iterator_equals_iterator(It, It_begin),
418     ppl_@CLASS@_OK(PPS),
419     ppl_delete_@CLASS@_iterator(It),
420     ppl_delete_@CLASS@_iterator(It_begin),
421     ppl_delete_@CLASS@(PPS)
422   ->
423     fail ; true)
424  ).
425
426')
427
428m4_define(`ppl_@CLASS@_@INCDEC@_iterator_code',
429`
430ppl_@CLASS@_@INCDEC@_iterator_1_test :-
431  (
432   choose_test(TEST_DATA, _Space_Dim),
433   ppl_build_test_data(TEST_DATA, t_@DISJUNCT_TOPOLOGY@, @CONSTRAINER@s, RS),
434   (
435     clean_ppl_new_@CLASS@_from_@CONSTRAINER@s(RS, PPS),
436     ppl_@CLASS@_begin_iterator(PPS, Itb),
437     ppl_@CLASS@_begin_iterator(PPS, It_begin),
438     ppl_@CLASS@_size(PPS, S),
439     (S > 0
440     ->
441       ppl_@CLASS@_increment_iterator(Itb),
442       ppl_@CLASS@_decrement_iterator(Itb)
443     ),
444     ppl_@CLASS@_iterator_equals_iterator(Itb, It_begin),
445     ppl_@CLASS@_end_iterator(PPS, Ite),
446     ppl_@CLASS@_end_iterator(PPS, It_end),
447     (S > 0
448     ->
449       ppl_@CLASS@_decrement_iterator(Ite),
450       ppl_@CLASS@_increment_iterator(Ite)
451     ),
452     ppl_@CLASS@_iterator_equals_iterator(Ite, It_end),
453     ppl_@CLASS@_OK(PPS),
454     ppl_delete_@CLASS@_iterator(Itb),
455     ppl_delete_@CLASS@_iterator(It_begin),
456     ppl_delete_@CLASS@_iterator(Ite),
457     ppl_delete_@CLASS@_iterator(It_end),
458     ppl_delete_@CLASS@(PPS)
459   ->
460     fail ; true)
461  ).
462
463')
464
465m4_define(`ppl_new_@CLASS@_iterator_from_iterator_code',
466`
467ppl_new_@CLASS@_iterator_from_iterator_2_test :-
468  (
469   TEST_DATA = test06, TEST_DATA1 = test07,
470   ppl_build_test_data(TEST_DATA, t_@DISJUNCT_TOPOLOGY@, @CONSTRAINER@s, RS),
471   ppl_build_test_data(TEST_DATA1, t_@DISJUNCT_TOPOLOGY@, @CONSTRAINER@s, RS1),
472   (
473     clean_ppl_new_@CLASS@_from_@CONSTRAINER@s(RS, PPS),
474     clean_ppl_new_@DISJUNCT_TOPOLOGY@@DISJUNCT@_from_@CONSTRAINER@s(RS1, PS),
475     ppl_@CLASS@_add_disjunct(PPS, PS),
476     ppl_@CLASS@_begin_iterator(PPS, It_begin),
477     ppl_new_@CLASS@_iterator_from_iterator(It_begin, It1),
478     ppl_@CLASS@_increment_iterator(It1),
479     \+ppl_@CLASS@_iterator_equals_iterator(It1, It_begin),
480     ppl_@CLASS@_OK(PPS),
481     ppl_delete_@CLASS@_iterator(It_begin),
482     ppl_delete_@CLASS@_iterator(It1),
483     ppl_delete_@CLASS@(PPS),
484     ppl_delete_@DISJUNCT@(PS)
485   ->
486     fail ; true)
487  ).
488
489')
490
491m4_define(`ppl_@CLASS@_drop_disjunct_code',
492`
493ppl_@CLASS@_drop_disjunct_2_test :-
494  (
495   TEST_DATA = test06, TEST_DATA1 = test07,
496   ppl_build_test_data(TEST_DATA, t_@DISJUNCT_TOPOLOGY@, @CONSTRAINER@s, RS),
497   ppl_build_test_data(TEST_DATA1, t_@DISJUNCT_TOPOLOGY@, @CONSTRAINER@s, RS1),
498   (
499     clean_ppl_new_@CLASS@_from_@CONSTRAINER@s(RS, PPS),
500     clean_ppl_new_@DISJUNCT_TOPOLOGY@@DISJUNCT@_from_@CONSTRAINER@s(RS1, PS),
501     ppl_@CLASS@_add_disjunct(PPS, PS),
502     ppl_@CLASS@_size(PPS, S),
503     S > 1,
504     ppl_@CLASS@_begin_iterator(PPS, It),
505     ppl_@CLASS@_increment_iterator(It),
506     ppl_@CLASS@_drop_disjunct(PPS, It),
507     S1 is S - 1,
508     ppl_@CLASS@_size(PPS, S1),
509     ppl_@CLASS@_decrement_iterator(It),
510     ppl_@CLASS@_drop_disjunct(PPS, It),
511     S2 is S1 - 1,
512     ppl_@CLASS@_size(PPS, S2),
513     ppl_@CLASS@_OK(PPS),
514     ppl_delete_@CLASS@_iterator(It),
515     ppl_delete_@CLASS@(PPS),
516     ppl_delete_@DISJUNCT@(PS)
517   ->
518     fail ; true)
519  ).
520
521')
522
523m4_define(`ppl_@CLASS@_drop_disjuncts_code',
524`
525ppl_@CLASS@_drop_disjuncts_3_test :-
526  (
527   TEST_DATA = test06, TEST_DATA1 = test07,
528   ppl_build_test_data(TEST_DATA, t_@DISJUNCT_TOPOLOGY@, @CONSTRAINER@s, RS),
529   ppl_build_test_data(TEST_DATA1, t_@DISJUNCT_TOPOLOGY@, @CONSTRAINER@s, RS1),
530   (
531     clean_ppl_new_@CLASS@_from_@CONSTRAINER@s(RS, PPS),
532     clean_ppl_new_@DISJUNCT_TOPOLOGY@@DISJUNCT@_from_@CONSTRAINER@s(RS1, PS),
533     ppl_@CLASS@_add_disjunct(PPS, PS),
534     ppl_@CLASS@_size(PPS, S),
535     ppl_@CLASS@_begin_iterator(PPS, It_begin),
536     ppl_new_@CLASS@_iterator_from_iterator(It_begin, It1),
537     (S > 1
538     ->
539         ppl_@CLASS@_increment_iterator(It1),
540         S1 is S - 1
541     ;
542         S1 = S
543     ),
544     ppl_@CLASS@_drop_disjuncts(PPS, It_begin, It1),
545     S1 is S - 1,
546     ppl_@CLASS@_size(PPS, S1),
547     ppl_@CLASS@_OK(PPS),
548     ppl_delete_@CLASS@_iterator(It_begin),
549     ppl_delete_@CLASS@_iterator(It1),
550     ppl_delete_@CLASS@(PPS),
551     ppl_delete_@DISJUNCT@(PS)
552   ->
553     fail ; true)
554  ).
555
556')
557
558m4_define(`ppl_@CLASS@_get_disjunct_code',
559`
560ppl_@CLASS@_get_disjunct_2_test :-
561  (
562   all_tests(Space_Dim, Tests),
563   (
564     clean_ppl_new_@CLASS@_from_space_dimension(Space_Dim, empty, PPS),
565     ppl_@CLASS@_get_disjunct_2_test1(PPS, Tests),
566     ppl_@CLASS@_begin_iterator(PPS, It),
567     ppl_@CLASS@_end_iterator(PPS, It_end),
568     ppl_@CLASS@_get_disjunct_2_test2(PPS, It, It_end, Space_Dim),
569     ppl_@CLASS@_OK(PPS),
570     ppl_delete_@CLASS@_iterator(It),
571     ppl_delete_@CLASS@_iterator(It_end),
572     ppl_delete_@CLASS@(PPS)
573   ->
574     fail ; true)
575  ).
576
577ppl_@CLASS@_get_disjunct_2_test1(_, []).
578ppl_@CLASS@_get_disjunct_2_test1(PPS, [Test|Tests]) :-
579  (
580   ppl_build_test_data(Test, t_@DISJUNCT_TOPOLOGY@, @CONSTRAINER@s, RS),
581   clean_ppl_new_@DISJUNCT_TOPOLOGY@@DISJUNCT@_from_@CONSTRAINER@s(RS, PS),
582   ppl_@CLASS@_add_disjunct(PPS, PS),
583   ppl_delete_@DISJUNCT@(PS),
584   ppl_@CLASS@_get_disjunct_2_test1(PPS, Tests),
585   !
586  ).
587
588ppl_@CLASS@_get_disjunct_2_test2(PPS, It, It_end, Space_Dim) :-
589  (
590   (ppl_@CLASS@_iterator_equals_iterator(It, It_end)
591   ->
592     true
593   ;
594     ppl_@CLASS@_get_disjunct(It, PS),
595     ppl_@CLASS@_increment_iterator(It),
596     ppl_@DISJUNCT@_OK(PS),
597     ppl_@DISJUNCT@_space_dimension(PS, D),
598     D = Space_Dim,
599     ppl_@CLASS@_get_disjunct_2_test2(PPS, It, It_end, Space_Dim)
600   )
601  ).
602
603')
604
605m4_define(`ppl_@CLASS@_linear_@PARTITION@_code',
606`dnl
607ppl_@CLASS@_linear_@PARTITION@_4_test :-
608  (
609   choose_2_tests(TEST_DATA1, TEST_DATA2, Space_Dim),
610   (
611     ppl_@TOPOLOGY@@CLASS@_build_test_object(TEST_DATA1, PS1, Space_Dim),
612     ppl_@TOPOLOGY@@CLASS@_build_test_object(TEST_DATA2, PS2, Space_Dim),
613     ppl_@CLASS@_linear_partition(PS1, PS2, PS3, PPS),
614     ppl_@CLASS@_OK(PS3),
615     ppl_delete_@CLASS@(PS1),
616     ppl_delete_@CLASS@(PS2),
617     ppl_delete_@CLASS@(PS3),
618     ppl_delete_Pointset_Powerset_NNC_Polyhedron(PPS)
619   ->
620     fail ; (class_@CLASS@ == class_BD_Shape_int8_t -> fail ; true))
621  ).
622
623')
624
625m4_define(`ppl_@CLASS@_approximate_@PARTITION@_code',
626`dnl
627ppl_@CLASS@_approximate_@PARTITION@_4_test :-
628  (
629   choose_2_tests(TEST_DATA1, TEST_DATA2, Space_Dim),
630   (
631     ppl_@CLASS@_build_test_object(TEST_DATA1, PS1, Space_Dim),
632     ppl_@CLASS@_build_test_object(TEST_DATA2, PS2, Space_Dim),
633     ppl_@CLASS@_approximate_partition(PS1, PS2, PS3, PPS, _Is_finite),
634     ppl_@CLASS@_OK(PS3),
635     ppl_delete_@CLASS@(PS1),
636     ppl_delete_@CLASS@(PS2),
637     ppl_delete_@CLASS@(PS3),
638     ppl_delete_Pointset_Powerset_NNC_Polyhedron(PPS)
639   ->
640     fail ; (class_@CLASS@ == class_BD_Shape_int8_t -> fail ; true))
641  ).
642
643')
644
645m4_define(`ppl_@CLASS@_relation_with_@RELATION_REPRESENT@_code',
646`
647ppl_@CLASS@_relation_with_@RELATION_REPRESENT@_3_test :-
648  (
649   choose_test(TEST_DATA, Space_Dim),
650   (
651     class_@CLASS@ \== class_BD_Shape_int8_t,
652     ppl_@TOPOLOGY@@CLASS@_build_test_object(TEST_DATA, PS, Space_Dim),
653     ppl_relation_test_data(TEST_DATA, @RELATION_REPRESENT@, R, Rel_Expected),
654     ppl_@CLASS@_relation_with_@RELATION_REPRESENT@(PS, R, Rel),
655     (class_@CLASS@ == class_Polyhedron ; class_@CLASS@ == class_Grid
656     ->
657       Rel = Rel_Expected
658     ;
659       true
660     ),
661     ppl_delete_@CLASS@(PS)
662   ->
663     fail ; (class_@CLASS@ == class_BD_Shape_int8_t -> fail ; true))
664  ).
665
666')
667
668m4_define(`ppl_@CLASS@_@HAS_PROPERTY@_code',
669`
670ppl_@CLASS@_@HAS_PROPERTY@_1_test :-
671  (
672   choose_test(TEST_DATA, Space_Dim),
673   (
674     ppl_@TOPOLOGY@@CLASS@_build_test_object(TEST_DATA, PS, Space_Dim),
675    (ppl_property_test_data(TEST_DATA, t_@TOPOLOGY@,
676                            @CONSTRAINER@, @HAS_PROPERTY@)
677    ->
678      ppl_@CLASS@_@HAS_PROPERTY@(PS)
679    ;
680      \+ ppl_@CLASS@_@HAS_PROPERTY@(PS)
681    ),
682    ppl_delete_@CLASS@(PS)
683   ->
684    fail ; true)
685  ).
686
687')
688
689m4_define(`ppl_@CLASS@_@SIMPLIFY@_code',
690`
691ppl_@CLASS@_@SIMPLIFY@_1_test :-
692  (
693   choose_test(TEST_DATA, Space_Dim),
694   TEST_DATA = test04,
695   \+ TEST_DATA = test00, \+ TEST_DATA = test02,
696   (
697     ppl_@TOPOLOGY@@CLASS@_build_test_object(TEST_DATA, PS, Space_Dim),
698     ppl_@TOPOLOGY@@CLASS@_build_test_object(TEST_DATA, PS1, Space_Dim),
699     ppl_@CLASS@_@SIMPLIFY@(PS),
700     ppl_@CLASS@_OK(PS),
701     (predicate_exists(ppl_@CLASS@_contains_@CLASS@)
702     ->
703       ppl_@CLASS@_contains_@CLASS@(PS, PS1)
704     ;
705       true
706     ),
707     ppl_delete_@CLASS@(PS1),
708     ppl_delete_@CLASS@(PS)
709   ->
710    fail ; true)
711  ).
712
713')
714
715m4_define(`ppl_@CLASS@_unconstrain_space_dimensions_code',
716`
717ppl_@CLASS@_unconstrain_space_dimensions_2_test :-
718  (
719   choose_test(TEST_DATA, Space_Dim),
720   \+ TEST_DATA = test00, \+ TEST_DATA = test02,
721   (
722     ppl_@TOPOLOGY@@CLASS@_build_test_object(TEST_DATA, PS, Space_Dim),
723     ppl_@TOPOLOGY@@CLASS@_build_test_object(TEST_DATA, PS1, Space_Dim),
724     make_vars(Space_Dim, [Var| _Var_List]),
725     ppl_@CLASS@_unconstrain_space_dimensions(PS, [Var]),
726     ppl_@CLASS@_OK(PS),
727     (predicate_exists(ppl_@CLASS@_contains_@CLASS@)
728     ->
729       ppl_@CLASS@_contains_@CLASS@(PS, PS1)
730     ;
731       true
732     ),
733     ppl_delete_@CLASS@(PS1),
734     ppl_delete_@CLASS@(PS)
735   ->
736    fail ; true)
737  ).
738
739ppl_@CLASS@_unconstrain_space_dimensions_2_test :-
740  (
741   choose_test(TEST_DATA, 0),
742   (
743     ppl_@TOPOLOGY@@CLASS@_build_test_object(TEST_DATA, PS, 0),
744     ppl_@CLASS@_unconstrain_space_dimensions(PS, []),
745     ppl_@CLASS@_OK(PS),
746     ppl_delete_@CLASS@(PS)
747   ->
748    fail ; true)
749  ).
750
751')
752
753m4_define(`ppl_@CLASS@_unconstrain_space_dimension_code',
754`
755ppl_@CLASS@_unconstrain_space_dimension_2_test :-
756  (
757   choose_test(TEST_DATA, Space_Dim),
758   \+ TEST_DATA = test00, \+ TEST_DATA = test02,
759   (
760     ppl_@TOPOLOGY@@CLASS@_build_test_object(TEST_DATA, PS, Space_Dim),
761     ppl_@TOPOLOGY@@CLASS@_build_test_object(TEST_DATA, PS1, Space_Dim),
762     make_vars(Space_Dim, [Var| _Var_List]),
763     ppl_@CLASS@_unconstrain_space_dimension(PS, Var),
764     ppl_@CLASS@_OK(PS),
765     (predicate_exists(ppl_@CLASS@_contains_@CLASS@)
766     ->
767       ppl_@CLASS@_contains_@CLASS@(PS, PS1)
768     ;
769       true
770     ),
771     ppl_delete_@CLASS@(PS1),
772     ppl_delete_@CLASS@(PS)
773   ->
774    fail ; true)
775  ).
776
777')
778
779m4_define(`ppl_@CLASS@_constrains_code',
780`
781ppl_@CLASS@_constrains_2_test :-
782  (
783   choose_test(TEST_DATA, Space_Dim),
784   \+ TEST_DATA = test00, \+ TEST_DATA = test02,
785   (
786     ppl_@TOPOLOGY@@CLASS@_build_test_object(TEST_DATA, PS, Space_Dim),
787     ppl_@TOPOLOGY@@CLASS@_build_test_object(TEST_DATA, PS1, Space_Dim),
788     make_vars(Space_Dim, [Var| _Var_List]),
789     ppl_constrains_test_data(TEST_DATA, _, Bool),
790     (ppl_@CLASS@_constrains(PS, Var)
791        -> Bool = true
792        ; Bool = false
793     ),
794     ppl_@CLASS@_OK(PS),
795     ppl_delete_@CLASS@(PS1),
796     ppl_delete_@CLASS@(PS)
797   ->
798    fail ; true)
799  ).
800
801')
802
803m4_define(`ppl_@CLASS@_bounds_from_@ABOVEBELOW@_code',
804`
805ppl_@CLASS@_bounds_from_@ABOVEBELOW@_2_test :-
806  (
807   choose_test(TEST_DATA, Space_Dim),
808   TEST_DATA \= test05,
809   (
810     ppl_@TOPOLOGY@@CLASS@_build_test_object(TEST_DATA, PS, Space_Dim),
811     ((
812       class_@DISJUNCT@ \= class_Grid,
813       ppl_bounds_test_data(TEST_DATA, @CONSTRAINER@s, LE,
814                           @ABOVEBELOW@, true))
815     ->
816       ppl_@CLASS@_bounds_from_@ABOVEBELOW@(PS, LE)
817     ;
818       true
819     ),
820     ((
821       class_@DISJUNCT@ \= class_Grid,
822       ppl_bounds_test_data(TEST_DATA, @CONSTRAINER@s, LE1,
823                           @ABOVEBELOW@, false))
824     ->
825       \+ ppl_@CLASS@_bounds_from_@ABOVEBELOW@(PS, LE1)
826     ;
827       true
828     ),
829     ppl_@CLASS@_OK(PS),
830     ppl_delete_@CLASS@(PS)
831   ->
832     fail ; true)
833  ).
834
835')
836
837m4_define(`ppl_@CLASS@_has_@UPPERLOWER@_bound_code',
838`
839ppl_@CLASS@_has_@UPPERLOWER@_bound_5_test :-
840  (
841   choose_test(TEST_DATA, Space_Dim),
842   (
843     ppl_@TOPOLOGY@@CLASS@_build_test_object(TEST_DATA, PS, Space_Dim),
844     ((
845       Space_Dim = 0
846      ;
847       ppl_@CLASS@_is_empty(PS)
848      ) ->
849       true
850     ;
851       make_vars(Space_Dim, [Var| _Var_List]),
852       (ppl_@CLASS@_has_@UPPERLOWER@_bound(PS, Var, _, _, _) -> true ; true)
853     ),
854     ppl_@CLASS@_OK(PS),
855     ppl_delete_@CLASS@(PS)
856   ->
857     fail ; true)
858  ).
859
860')
861
862dnl FIXME:: The test fails for BD_Shape.
863m4_define(`ppl_@CLASS@_@MAXMIN@_codeXXXXX',
864`
865ppl_@CLASS@_@MAXMIN@_5_test :-
866  (
867   choose_test(TEST_DATA, Space_Dim),
868   (
869     ppl_@TOPOLOGY@@CLASS@_build_test_object(TEST_DATA, PS, Space_Dim),
870     ppl_maxmin_test_data(TEST_DATA, t_@TOPOLOGY@, @CONSTRAINER@, @MAXMIN@,
871                          LE, Nexptd, Dexptd, Bexptd, _, SuccessFlag),
872     (SuccessFlag == true
873     ->
874       (ppl_@CLASS@_@MAXMIN@(PS, LE, N, D, B),
875        B == Bexptd, N == Nexptd, D == Dexptd)
876     ;
877       \+ ppl_@CLASS@_@MAXMIN@(PS, LE, N, D, B)
878     ),
879     ppl_@CLASS@_OK(PS),
880     ppl_delete_@CLASS@(PS)
881   ->
882     fail ; true)
883  ).
884
885')
886
887dnl FIXME:: The test fails for BD_Shape.
888m4_define(`ppl_@CLASS@_@MAXMIN@_with_point_codeXXXXX',
889`
890ppl_@CLASS@_@MAXMIN@_with_point_6_test :-
891  (
892   choose_test(TEST_DATA, Space_Dim),
893   (
894     ppl_@TOPOLOGY@@CLASS@_build_test_object(TEST_DATA, PS, Space_Dim),
895     ppl_maxmin_test_data(TEST_DATA, t_@TOPOLOGY@, @CONSTRAINER@, @MAXMIN@,
896                          LE, Nexptd, Dexptd, Bexptd, Gexptd, SuccessFlag),
897     (SuccessFlag == true
898     ->
899       (ppl_@CLASS@_@MAXMIN@_with_point(PS, LE, N, D, B, G),
900        B == Bexptd, N == Nexptd, D == Dexptd,
901        (predicate_exists(ppl_Polyhedron_add_generator)
902        ->
903          clean_ppl_new_C_Polyhedron_from_space_dimension(Space_Dim,
904                                                             empty, PSG),
905          clean_ppl_new_C_Polyhedron_from_space_dimension(Space_Dim,
906                                                             empty, PSGexptd),
907          (G =.. [closure_point|CP]
908          ->
909            Gexptd =.. [closure_point|CPexptd],
910            G_Point =.. [point|CP],
911            Gexptd_Point =.. [point|CPexptd],
912            ppl_Polyhedron_add_generator(PSG, G_Point),
913            ppl_Polyhedron_add_generator(PSGexptd, Gexptd_Point)
914          ;
915            (ppl_Polyhedron_add_generator(PSG, G),
916             ppl_Polyhedron_add_generator(PSGexptd, Gexptd))
917          ),
918          ppl_C_Polyhedron_equals_C_Polyhedron(PSG, PSGexptd),
919          ppl_delete_Polyhedron(PSG),
920          ppl_delete_Polyhedron(PSGexptd)
921        ;
922          true
923        ))
924     ;
925        \+ ppl_@CLASS@_@MAXMIN@_with_point(PS, LE, N, _, _, _)
926     ),
927     ppl_@CLASS@_OK(PS),
928     ppl_delete_@CLASS@(PS)
929   ->
930     fail ; true)
931  ).
932
933')
934m4_define(`ppl_@CLASS@_frequency_code',
935`
936ppl_@CLASS@_frequency_6_test :-
937  (
938   choose_test(TEST_DATA, Space_Dim),
939   (
940     ppl_@TOPOLOGY@@CLASS@_build_test_object(TEST_DATA, PS, Space_Dim),
941     ppl_frequency_test_data(TEST_DATA, t_@TOPOLOGY@, @CONSTRAINER@,
942                             LE, F_Nexptd, F_Dexptd, V_Nexptd, V_Dexptd,
943                             SuccessFlag),
944     (SuccessFlag == true
945     ->
946       (ppl_@CLASS@_frequency(PS, LE, F_N, F_D, V_N, V_D),
947        F_N == F_Nexptd, F_D == F_Dexptd,
948        V_N == V_Nexptd, V_D == V_Dexptd)
949     ;
950       \+ ppl_@CLASS@_frequency(PS, LE, _F_N, _F_D, _V_N, _V_D)
951     ),
952     ppl_@CLASS@_OK(PS),
953     ppl_delete_@CLASS@(PS)
954   ->
955     fail ; true)
956  ).
957
958')
959
960m4_define(`ppl_@CLASS@_@COMPARISON@_@CLASS@_code',
961`
962ppl_@CLASS@_@COMPARISON@_@CLASS@_2_test :-
963  (
964   choose_2_tests(TEST_DATA1, TEST_DATA2, Space_Dim),
965   (
966     ppl_@TOPOLOGY@@CLASS@_build_test_object(TEST_DATA1, PS1, Space_Dim),
967     ppl_@TOPOLOGY@@CLASS@_build_test_object(TEST_DATA2, PS2, Space_Dim),
968     (ppl_@CLASS@_@COMPARISON@_@CLASS@(PS1, PS2)
969     ->
970       ppl_@CLASS@_comparison_check(@COMPARISON@, PS1, PS2, true)
971     ;
972       ppl_@CLASS@_comparison_check(@COMPARISON@, PS1, PS2, false)
973     ),
974     ppl_@CLASS@_OK(PS1),
975     ppl_@CLASS@_OK(PS2),
976     ppl_delete_@CLASS@(PS1),
977     ppl_delete_@CLASS@(PS2)
978   ->
979     fail ; true)
980  ).
981
982')
983
984m4_define(`ppl_@CLASS@_add_@CLASS_REPRESENT@_code',
985`
986:- discontiguous(ppl_@CLASS@_add_@CLASS_REPRESENT@_2_test1/3).
987
988ppl_@CLASS@_add_@CLASS_REPRESENT@_2_test :-
989  (
990   member(TEST_DATA, [test00, test02, test03, test04, test05]),
991   choose_test(TEST_DATA, Space_Dim),
992   ppl_build_test_data(TEST_DATA, t_@TOPOLOGY@, @CLASS_REPRESENT@s, RS),
993   ppl_initial_test_system(@CLASS_REPRESENT@, U_or_E),
994   ppl_new_@TOPOLOGY@@CLASS@_from_space_dimension(Space_Dim, U_or_E, PS),
995   ppl_@CLASS@_add_@CLASS_REPRESENT@s(PS, RS),
996   ppl_new_@TOPOLOGY@@CLASS@_from_space_dimension(Space_Dim, U_or_E, PS1),
997   (ppl_@CLASS@_add_@CLASS_REPRESENT@_2_test1(PS, PS1, RS)
998   ->
999     fail ; true)
1000  ).
1001
1002ppl_@CLASS@_add_@CLASS_REPRESENT@_2_test1(PS, PS1, []) :-
1003  (
1004   (predicate_exists(ppl_@CLASS@_equals_@CLASS@)
1005      ->
1006     ppl_@CLASS@_equals_@CLASS@(PS, PS1)
1007   ;
1008     true
1009   ),
1010   ppl_delete_@CLASS@(PS),
1011   ppl_delete_@CLASS@(PS1)
1012  ).
1013ppl_@CLASS@_add_@CLASS_REPRESENT@_2_test1(PS, PS1, [R | RS]) :-
1014  (
1015     ppl_@CLASS@_add_@CLASS_REPRESENT@(PS1, R),
1016     ppl_@CLASS@_add_@CLASS_REPRESENT@_2_test1(PS, PS1, RS)
1017  ).
1018
1019')
1020
1021m4_define(`ppl_@CLASS@_add_@CLASS_REPRESENT@s_code',
1022`
1023ppl_@CLASS@_add_@CLASS_REPRESENT@s_2_test :-
1024  (
1025   member(TEST_DATA1, [test00, test02, test03, test04, test05]),
1026   member(TEST_DATA2, [test00, test02, test03, test04, test05]),
1027   choose_2_tests(TEST_DATA1, TEST_DATA2, Space_Dim),
1028   (
1029     ppl_build_test_data(TEST_DATA1, t_@TOPOLOGY@, @CLASS_REPRESENT@s, RS),
1030     ppl_build_test_data(TEST_DATA2, t_@TOPOLOGY@, @CLASS_REPRESENT@s, RS1),
1031     ppl_initial_test_system(@CLASS_REPRESENT@, U_or_E),
1032     ppl_new_@TOPOLOGY@@CLASS@_from_space_dimension(Space_Dim, U_or_E, PS),
1033     ppl_new_@TOPOLOGY@@CLASS@_from_space_dimension(Space_Dim, U_or_E, PS1),
1034     ppl_@CLASS@_add_@CLASS_REPRESENT@s(PS, RS),
1035     ppl_@CLASS@_add_@CLASS_REPRESENT@s(PS, RS1),
1036     ppl_@CLASS@_add_@CLASS_REPRESENT@s(PS1, RS1),
1037     ppl_@CLASS@_add_@CLASS_REPRESENT@s(PS1, RS),
1038     (predicate_exists(ppl_@CLASS@_equals_@CLASS@)
1039     ->
1040       ppl_@CLASS@_equals_@CLASS@(PS, PS1)
1041     ;
1042       true
1043     ),
1044     ppl_delete_@CLASS@(PS),
1045     ppl_delete_@CLASS@(PS1)
1046   ->
1047     fail ; true)
1048  ).
1049
1050')
1051
1052m4_define(`ppl_@CLASS@_add_disjunct_code',
1053`
1054ppl_@CLASS@_add_disjunct_2_test :-
1055  (
1056   choose_2_tests(TEST_DATA1, TEST_DATA2, Space_Dim),
1057   (
1058     ppl_@TOPOLOGY@@CLASS@_build_test_object(TEST_DATA1, PPS1, Space_Dim),
1059     ppl_@DISJUNCT_TOPOLOGY@@DISJUNCT@_build_test_object(TEST_DATA2, PS2, Space_Dim),
1060     ppl_@CLASS@_add_disjunct(PPS1, PS2),
1061     ppl_@CLASS@_OK(PPS1),
1062     ppl_@DISJUNCT@_OK(PS2),
1063     ppl_delete_@DISJUNCT@(PS2),
1064     ppl_delete_@CLASS@(PPS1)
1065   ->
1066     fail ; true)
1067  ).
1068
1069')
1070
1071m4_define(`ppl_@CLASS@_@BINOP@_code',
1072`
1073ppl_@CLASS@_@BINOP@_2_test :-
1074  (
1075   choose_2_tests(TEST_DATA1, TEST_DATA2, Space_Dim),
1076   (
1077     ppl_@TOPOLOGY@@CLASS@_build_test_object(TEST_DATA1, PS1, Space_Dim),
1078     ppl_@TOPOLOGY@@CLASS@_build_test_object(TEST_DATA2, PS2, Space_Dim),
1079     ppl_@TOPOLOGY@@CLASS@_build_test_object(TEST_DATA2, PS2a, Space_Dim),
1080     ppl_new_@TOPOLOGY@@CLASS@_from_@TOPOLOGY@@CLASS@(PS1, PS1_Copy),
1081     ppl_@CLASS@_@BINOP@(PS1_Copy, PS2),
1082     ((@BINOP@ == upper_bound_assign ; @BINOP@ == poly_hull_assign)
1083     ->
1084m4_ifelse(m4_current_group, pointset_powerset,`dnl
1085       ppl_@CLASS@_geometrically_covers_@CLASS@(PS1_Copy, PS1),
1086       ppl_@CLASS@_geometrically_covers_@CLASS@(PS1_Copy, PS2)',
1087`       ppl_@CLASS@_contains_@CLASS@(PS1_Copy, PS1),
1088       ppl_@CLASS@_contains_@CLASS@(PS1_Copy, PS2)')
1089     ;
1090       true
1091     ),
1092     (@BINOP@ == intersection_assign
1093     ->
1094m4_ifelse(m4_current_group, pointset_powerset,`dnl
1095       ppl_@CLASS@_geometrically_covers_@CLASS@(PS1, PS1_Copy),
1096       ppl_@CLASS@_geometrically_covers_@CLASS@(PS2, PS1_Copy)',
1097`       ppl_@CLASS@_contains_@CLASS@(PS1, PS1_Copy),
1098       ppl_@CLASS@_contains_@CLASS@(PS2, PS1_Copy)')
1099     ;
1100       true
1101     ),
1102     (@BINOP@ == difference_assign ; @BINOP@ == poly_difference_assign
1103     ->
1104m4_ifelse(m4_current_group, pointset_powerset,`dnl
1105       ppl_@CLASS@_geometrically_covers_@CLASS@(PS1, PS1_Copy)',
1106`       ppl_@CLASS@_contains_@CLASS@(PS1, PS1_Copy)')
1107     ;
1108       true
1109     ),
1110     (@BINOP@ == concatenate_assign
1111     ->
1112       ppl_@CLASS@_space_dimension(PS1, Dim1),
1113       ppl_@CLASS@_space_dimension(PS2, Dim2),
1114       Dim_Conc is Dim1 + Dim2,
1115       ppl_@CLASS@_space_dimension(PS1_Copy, Dim_Conc)
1116     ;
1117       true
1118     ),
1119     ppl_@CLASS@_OK(PS1),
1120     ppl_@CLASS@_OK(PS1_Copy),
1121     ppl_@CLASS@_OK(PS2),
1122     ppl_delete_@CLASS@(PS1),
1123     ppl_delete_@CLASS@(PS1_Copy),
1124     ppl_delete_@CLASS@(PS2),
1125     ppl_delete_@CLASS@(PS2a)
1126   ->
1127     fail ; true)
1128 ).
1129
1130')
1131
1132m4_define(`ppl_@CLASS@_simplify_using_context_assign_code',
1133`
1134ppl_@CLASS@_simplify_using_context_assign_2_test :-
1135  (
1136   choose_2_tests(TEST_DATA1, TEST_DATA2, Space_Dim),
1137   (
1138     ppl_@TOPOLOGY@@CLASS@_build_test_object(TEST_DATA1, PS1, Space_Dim),
1139     ppl_@TOPOLOGY@@CLASS@_build_test_object(TEST_DATA2, PS2, Space_Dim),
1140     ppl_new_@TOPOLOGY@@CLASS@_from_@TOPOLOGY@@CLASS@(PS1, PS1_Copy),
1141     ppl_@CLASS@_simplify_using_context_assign(PS1_Copy, PS2,
1142                                               _Is_Intersection),
1143     ppl_@CLASS@_OK(PS1),
1144     ppl_@CLASS@_OK(PS1_Copy),
1145     ppl_@CLASS@_OK(PS2),
1146     ppl_delete_@CLASS@(PS1),
1147     ppl_delete_@CLASS@(PS1_Copy),
1148     ppl_delete_@CLASS@(PS2)
1149   ->
1150     fail ; true)
1151 ).
1152
1153')
1154
1155m4_define(`ppl_@CLASS@_@AFFIMAGE@_code',
1156`ppl_@CLASS@_@AFFIMAGE@_4_test :-
1157  (
1158   choose_test(TEST_DATA, Space_Dim),
1159   Space_Dim > 0,
1160   (
1161     ppl_@TOPOLOGY@@CLASS@_build_test_object(TEST_DATA, PS, Space_Dim),
1162     ppl_@TOPOLOGY@@CLASS@_build_test_object(TEST_DATA, PS_Copy, Space_Dim),
1163     make_vars(Space_Dim, [Var| _Var_List]),
1164     ppl_@CLASS@_@AFFIMAGE@(PS, Var, Var + 5, 1),
1165     ppl_@CLASS@_@AFFIMAGE@(PS, Var, Var - 5, 1),
1166     (@AFFIMAGE@ == affine_image
1167     ->
1168       ppl_@CLASS@_@AFFIMAGE@(PS, Var, 2*Var, 1),
1169       ppl_@CLASS@_@AFFIMAGE@(PS, Var, Var, 2)
1170     ;
1171       ppl_@CLASS@_@AFFIMAGE@(PS, Var, Var, 2),
1172       ppl_@CLASS@_@AFFIMAGE@(PS, Var, 2*Var, 1)
1173     ),
1174dnl  FIXME: This fails with Uint??_Box domains for many of the tests
1175dnl      (predicate_exists(ppl_@CLASS@_equals_@CLASS@)
1176dnl      ->
1177dnl        ppl_@CLASS@_equals_@CLASS@(PS, PS_Copy)
1178dnl      ;
1179dnl        true
1180dnl      ),
1181     ppl_@CLASS@_OK(PS),
1182     ppl_delete_@CLASS@(PS),
1183     ppl_delete_@CLASS@(PS_Copy)
1184   ->
1185     fail ; true)
1186 ).
1187
1188')
1189
1190m4_define(`ppl_@CLASS@_bounded_@AFFIMAGE@_code',
1191`
1192ppl_@CLASS@_bounded_@AFFIMAGE@_5_test :-
1193  (
1194   choose_test(TEST_DATA, Space_Dim),
1195   ppl_dimension_test_data(TEST_DATA, space_dimension, Space_Dim),
1196   Space_Dim > 0,
1197   (
1198     ppl_@TOPOLOGY@@CLASS@_build_test_object(TEST_DATA, PS, Space_Dim),
1199     ppl_@TOPOLOGY@@CLASS@_build_test_object(TEST_DATA, PS_Copy, Space_Dim),
1200     make_vars(Space_Dim, [Var| _Var_List]),
1201     ppl_@CLASS@_bounded_@AFFIMAGE@(PS, Var, Var, 2*Var, 4),
1202     ppl_@CLASS@_bounded_@AFFIMAGE@(PS, Var, 4*Var, 4*Var, 1),
1203     ppl_@CLASS@_OK(PS),
1204     ppl_@CLASS@_bounded_@AFFIMAGE@(PS_Copy, Var, 4*Var, 4*Var, 1),
1205     ppl_@CLASS@_bounded_@AFFIMAGE@(PS_Copy, Var, Var, 2*Var, 2),
1206     ppl_@CLASS@_OK(PS),
1207     ppl_@CLASS@_OK(PS_Copy),
1208     ppl_delete_@CLASS@(PS_Copy),
1209     ppl_delete_@CLASS@(PS)
1210   ->
1211     fail ; true)
1212 ).
1213
1214')
1215
1216m4_define(`ppl_@CLASS@_generalized_@AFFIMAGE@_code',
1217`
1218ppl_@CLASS@_generalized_@AFFIMAGE@_5_test :-
1219  (
1220   choose_test(TEST_DATA, Space_Dim),
1221   Space_Dim > 0,
1222   (
1223     ppl_@TOPOLOGY@@CLASS@_build_test_object(TEST_DATA, PS, Space_Dim),
1224     ppl_@TOPOLOGY@@CLASS@_build_test_object(TEST_DATA, PS_Copy, Space_Dim),
1225     make_vars(Space_Dim, [Var| _Var_List]),
1226     ppl_@CLASS@_generalized_@AFFIMAGE@(PS, Var, >=, 2*Var, 2),
1227     ppl_@CLASS@_generalized_@AFFIMAGE@(PS, Var, >=, Var + 2, 1),
1228     ppl_@CLASS@_OK(PS),
1229     ppl_@CLASS@_generalized_@AFFIMAGE@(PS_Copy, Var, >=, Var + 2, 1),
1230     ppl_@CLASS@_generalized_@AFFIMAGE@(PS_Copy, Var, >=, 2*Var, 2),
1231     (predicate_exists(ppl_@CLASS@_equals_@CLASS@)
1232     ->
1233       ppl_@CLASS@_equals_@CLASS@(PS, PS_Copy)
1234     ;
1235       true
1236     ),
1237     ppl_@CLASS@_OK(PS_Copy),
1238     ppl_delete_@CLASS@(PS_Copy),
1239     ppl_delete_@CLASS@(PS)
1240   ->
1241     fail ; true)
1242 ).
1243
1244')
1245
1246m4_define(`ppl_@CLASS@_generalized_@AFFIMAGE@_with_congruence_code',
1247`
1248ppl_@CLASS@_generalized_@AFFIMAGE@_with_congruence_6_test :-
1249  (
1250   choose_test(TEST_DATA, Space_Dim),
1251   Space_Dim > 0,
1252   (
1253     ppl_@CLASS@_build_test_object(TEST_DATA, PS, Space_Dim),
1254     ppl_@CLASS@_build_test_object(TEST_DATA, PS_Copy, Space_Dim),
1255     make_vars(Space_Dim, [Var| _Var_List]),
1256     ppl_@CLASS@_generalized_@AFFIMAGE@_with_congruence(PS, Var, =, 2*Var, 3, 5),
1257     ppl_@CLASS@_generalized_@AFFIMAGE@_with_congruence(PS, Var, =, Var + 2, 1, 0),
1258     ppl_@CLASS@_OK(PS),
1259     ppl_@CLASS@_generalized_@AFFIMAGE@_with_congruence(PS_Copy, Var, =, Var + 2, 1, 0),
1260     ppl_@CLASS@_generalized_@AFFIMAGE@_with_congruence(PS_Copy, Var, =, 2*Var, 3, 5),
1261%%     ppl_@CLASS@_equals_@CLASS@(PS, PS_Copy),
1262     ppl_@CLASS@_OK(PS_Copy),
1263     ppl_delete_@CLASS@(PS_Copy),
1264     ppl_delete_@CLASS@(PS)
1265   ->
1266     fail ; true)
1267 ).
1268
1269')
1270
1271m4_define(`ppl_@CLASS@_generalized_@AFFIMAGE@_lhs_rhs_with_congruence_code',
1272`
1273ppl_@CLASS@_generalized_@AFFIMAGE@_lhs_rhs_with_congruence_4_test :-
1274  (
1275   choose_test(TEST_DATA, Space_Dim),
1276   Space_Dim > 0,
1277   (t_@TOPOLOGY@ == t_NNC_
1278   ->
1279     member(Op, [>=, =<, =, >, <])
1280   ;
1281     member(Op, [>=, =<, =])
1282   ),
1283   (
1284     ppl_@TOPOLOGY@@CLASS@_build_test_object(TEST_DATA, PS, Space_Dim),
1285     ppl_@TOPOLOGY@@CLASS@_build_test_object(TEST_DATA, PS_Copy, Space_Dim),
1286     make_vars(Space_Dim, [Var| _Var_List]),
1287     ppl_@CLASS@_generalized_@AFFIMAGE@_lhs_rhs_with_congruence(PS, 2*Var, Op, 2*(Var + 2)),
1288     ppl_@CLASS@_OK(PS),
1289     ppl_@CLASS@_generalized_@AFFIMAGE@_lhs_rhs_with_congruence(PS_Copy, Var, Op, Var + 2),
1290     (predicate_exists(ppl_@CLASS@_equals_@CLASS@)
1291     ->
1292       ppl_@CLASS@_equals_@CLASS@(PS, PS_Copy)
1293     ;
1294       true
1295     ),
1296     ppl_@CLASS@_OK(PS_Copy),
1297     ppl_delete_@CLASS@(PS_Copy),
1298     ppl_delete_@CLASS@(PS)
1299   ->
1300     fail ; true)
1301 ).
1302
1303')
1304
1305m4_define(`ppl_@CLASS@_generalized_@AFFIMAGE@_lhs_rhs_with_congruence_code',
1306`
1307ppl_@CLASS@_generalized_@AFFIMAGE@_lhs_rhs_with_congruence_5_test :-
1308  (
1309   choose_test(TEST_DATA, Space_Dim),
1310   Space_Dim > 0,
1311   (
1312     ppl_@CLASS@_build_test_object(TEST_DATA, PS, Space_Dim),
1313     ppl_@CLASS@_build_test_object(TEST_DATA, PS_Copy, Space_Dim),
1314     make_vars(Space_Dim, [Var| _Var_List]),
1315     ppl_@CLASS@_generalized_@AFFIMAGE@_lhs_rhs_with_congruence(PS, Var + 2, =, 2*Var, 5),
1316     ppl_@CLASS@_generalized_@AFFIMAGE@_lhs_rhs_with_congruence(PS, 1 - Var, =, Var + 2, 0),
1317     ppl_@CLASS@_OK(PS),
1318     ppl_@CLASS@_generalized_@AFFIMAGE@_lhs_rhs_with_congruence(PS_Copy,
1319                                                1 - Var, =, Var + 2, 0),
1320     ppl_@CLASS@_generalized_@AFFIMAGE@_lhs_rhs_with_congruence(PS_Copy,
1321                                                Var + 2, =, 2*Var, 5),
1322%%     ppl_@CLASS@_equals_@CLASS@(PS, PS_Copy),
1323     ppl_@CLASS@_OK(PS_Copy),
1324     ppl_delete_@CLASS@(PS_Copy),
1325     ppl_delete_@CLASS@(PS)
1326   ->
1327     fail ; true)
1328 ).
1329
1330')
1331
1332m4_define(`ppl_@CLASS@_@WIDEN@_widening_assign_code',
1333`
1334ppl_@CLASS@_@WIDEN@_widening_assign_2_test :-
1335  (
1336   choose_2_tests(TEST_DATA1, TEST_DATA2, Space_Dim),
1337   (
1338     ppl_@TOPOLOGY@@CLASS@_build_test_object(TEST_DATA1, PS1, Space_Dim),
1339     ppl_@TOPOLOGY@@CLASS@_build_test_object(TEST_DATA2, PS2, Space_Dim),
1340     ppl_@CLASS@_upper_bound_assign(PS1, PS2),
1341     ppl_new_@TOPOLOGY@@CLASS@_from_@TOPOLOGY@@CLASS@(PS1, PS1_Copy),
1342     ppl_new_@TOPOLOGY@@CLASS@_from_@TOPOLOGY@@CLASS@(PS2, PS2_Copy),
1343     ppl_@CLASS@_@WIDEN@_widening_assign(PS1, PS2),
1344     ppl_@CLASS@_wdn_exn_check_code(PS1, PS1_Copy, PS2, PS2_Copy)
1345   ->
1346     fail ; true)
1347 ).
1348
1349')
1350
1351m4_define(`ppl_@CLASS@_@WIDEN@_widening_assign_with_tokens_code',
1352`
1353ppl_@CLASS@_@WIDEN@_widening_assign_with_tokens_4_test :-
1354  (
1355   choose_2_tests(TEST_DATA1, TEST_DATA2, Space_Dim),
1356   (
1357     ppl_@TOPOLOGY@@CLASS@_build_test_object(TEST_DATA1, PS1, Space_Dim),
1358     ppl_@TOPOLOGY@@CLASS@_build_test_object(TEST_DATA2, PS2, Space_Dim),
1359     ppl_@CLASS@_upper_bound_assign(PS1, PS2),
1360     ppl_new_@TOPOLOGY@@CLASS@_from_@TOPOLOGY@@CLASS@(PS1, PS1_Copy),
1361     ppl_new_@TOPOLOGY@@CLASS@_from_@TOPOLOGY@@CLASS@(PS2, PS2_Copy),
1362     ppl_new_@TOPOLOGY@@CLASS@_from_@TOPOLOGY@@CLASS@(PS1, PS1a),
1363     ppl_@CLASS@_@WIDEN@_widening_assign_with_tokens(PS1, PS2, 1, T),
1364     ppl_@CLASS@_@WIDEN@_widening_assign_with_tokens(PS1a, PS2, 0, T1),
1365     ppl_@CLASS@_wdn_exn_with_tokens_check_code(PS1, PS1a, PS1_Copy,
1366                                                PS2, PS2_Copy, T, T1)
1367   ->
1368     fail ; true)
1369 ).
1370
1371')
1372
1373m4_define(`ppl_@CLASS@_BHZ03_@DISJUNCT_TOPOLOGY@@DISJUNCT_WIDEN@_@DISJUNCT_WIDEN@_widening_assign_code',
1374`
1375ppl_@CLASS@_BHZ03_@DISJUNCT_TOPOLOGY@@DISJUNCT_WIDEN@_@DISJUNCT_WIDEN@_widening_assign_test :-
1376  (
1377   choose_2_tests(TEST_DATA1, TEST_DATA2, Space_Dim),
1378   (
1379     ppl_@TOPOLOGY@@CLASS@_build_test_object(TEST_DATA1, PS1, Space_Dim),
1380     ppl_@TOPOLOGY@@CLASS@_build_test_object(TEST_DATA2, PS2, Space_Dim),
1381     ppl_@CLASS@_upper_bound_assign(PS1, PS2),
1382     ppl_new_@TOPOLOGY@@CLASS@_from_@TOPOLOGY@@CLASS@(PS1, PS1_Copy),
1383     ppl_new_@TOPOLOGY@@CLASS@_from_@TOPOLOGY@@CLASS@(PS2, PS2_Copy),
1384     ppl_@CLASS@_BHZ03_@A_DISJUNCT_WIDEN@_@DISJUNCT_WIDEN@_widening_assign(
1385                                                           PS1, PS2),
1386     ppl_@CLASS@_wdn_exn_check_code(PS1, PS1_Copy, PS2, PS2_Copy)
1387   ->
1388     fail ; true)
1389 ).
1390
1391')
1392
1393m4_define(`ppl_@CLASS@_BGP99_@DISJUNCT_WIDEN@_extrapolation_assign_code',
1394`
1395ppl_@CLASS@_BGP99_@DISJUNCT_WIDEN@_extrapolation_assign_test :-
1396  (
1397   choose_2_tests(TEST_DATA1, TEST_DATA2, Space_Dim),
1398   (
1399     ppl_@TOPOLOGY@@CLASS@_build_test_object(TEST_DATA1, PS1, Space_Dim),
1400     ppl_@TOPOLOGY@@CLASS@_build_test_object(TEST_DATA2, PS2, Space_Dim),
1401     ppl_@CLASS@_upper_bound_assign(PS1, PS2),
1402     ppl_new_@TOPOLOGY@@CLASS@_from_@TOPOLOGY@@CLASS@(PS1, PS1_Copy),
1403     ppl_new_@TOPOLOGY@@CLASS@_from_@TOPOLOGY@@CLASS@(PS2, PS2_Copy),
1404     ppl_@CLASS@_BGP99_@DISJUNCT_WIDEN@_extrapolation_assign(
1405                                                           PS1, PS2, 3),
1406     ppl_@CLASS@_wdn_exn_check_code(PS1, PS1_Copy, PS2, PS2_Copy)
1407   ->
1408     fail ; true)
1409 ).
1410
1411')
1412
1413m4_define(`ppl_@CLASS@_BGP99_@DISJUNCT_EXTRAPOLATION@_extrapolation_assign_code',
1414`
1415ppl_@CLASS@_BGP99_@DISJUNCT_EXTRAPOLATION@_extrapolation_assign_test :-
1416  (
1417   choose_2_tests(TEST_DATA1, TEST_DATA2, Space_Dim),
1418   (
1419     ppl_@TOPOLOGY@@CLASS@_build_test_object(TEST_DATA1, PS1, Space_Dim),
1420     ppl_@TOPOLOGY@@CLASS@_build_test_object(TEST_DATA2, PS2, Space_Dim),
1421     ppl_@CLASS@_upper_bound_assign(PS1, PS2),
1422     ppl_new_@TOPOLOGY@@CLASS@_from_@TOPOLOGY@@CLASS@(PS1, PS1_Copy),
1423     ppl_new_@TOPOLOGY@@CLASS@_from_@TOPOLOGY@@CLASS@(PS2, PS2_Copy),
1424     ppl_@CLASS@_BGP99_@DISJUNCT_EXTRAPOLATION@_extrapolation_assign(
1425                                                           PS1, PS2, 3),
1426     ppl_@CLASS@_wdn_exn_check_code(PS1, PS1_Copy, PS2, PS2_Copy)
1427   ->
1428     fail ; true)
1429 ).
1430
1431')
1432
1433m4_define(`ppl_@CLASS@_@LIMITEDBOUNDED@_@WIDENEXPN@_extrapolation_assign_code',
1434`
1435ppl_@CLASS@_@LIMITEDBOUNDED@_@EXTRAPOLATION@_extrapolation_assign_3_test :-
1436  (
1437   choose_2_tests(TEST_DATA1, TEST_DATA2, Dim),
1438   Dim > 0,
1439   (
1440     ppl_@TOPOLOGY@@CLASS@_build_test_object(TEST_DATA1, PS1, Dim),
1441     ppl_@TOPOLOGY@@CLASS@_build_test_object(TEST_DATA2, PS2, Dim),
1442     ppl_@CLASS@_upper_bound_assign(PS1, PS2),
1443     ppl_new_@TOPOLOGY@@CLASS@_from_@TOPOLOGY@@CLASS@(PS1, PS1_Copy),
1444     ppl_new_@TOPOLOGY@@CLASS@_from_@TOPOLOGY@@CLASS@(PS2, PS2_Copy),
1445     make_vars(Dim, [Var|_]),
1446     ppl_@CLASS@_@LIMITEDBOUNDED@_@WIDENEXPN@_extrapolation_assign(
1447           PS1, PS2, [Var = 1]),
1448     ppl_@CLASS@_wdn_exn_check_code(PS1, PS1_Copy, PS2, PS2_Copy)
1449   ->
1450     fail ; true)
1451 ).
1452
1453')
1454
1455m4_define(`ppl_@CLASS@_@LIMITEDBOUNDED@_@WIDENEXPN@_extrapolation_assign_with_tokens_code',
1456`
1457ppl_@CLASS@_@LIMITEDBOUNDED@_@WIDENEXPN@_extrapolation_assign_with_tokens_5_test :-
1458  (
1459   choose_2_tests(TEST_DATA1, TEST_DATA2, Dim),
1460   Dim > 0,
1461   (
1462     ppl_@TOPOLOGY@@CLASS@_build_test_object(TEST_DATA1, PS1, Dim),
1463     ppl_@TOPOLOGY@@CLASS@_build_test_object(TEST_DATA2, PS2, Dim),
1464     ppl_@CLASS@_upper_bound_assign(PS1, PS2),
1465     ppl_new_@TOPOLOGY@@CLASS@_from_@TOPOLOGY@@CLASS@(PS1, PS1_Copy),
1466     ppl_new_@TOPOLOGY@@CLASS@_from_@TOPOLOGY@@CLASS@(PS2, PS2_Copy),
1467     ppl_new_@TOPOLOGY@@CLASS@_from_@TOPOLOGY@@CLASS@(PS1, PS1a),
1468     make_vars(Dim, [Var|_]),
1469     ppl_@CLASS@_@LIMITEDBOUNDED@_@WIDENEXPN@_extrapolation_assign_with_tokens(
1470                                                  PS1, PS2, [Var = 1], 1, T),
1471     ppl_@CLASS@_@LIMITEDBOUNDED@_@WIDENEXPN@_extrapolation_assign_with_tokens(
1472                                                  PS1a, PS2, [Var = 1], 0, T1),
1473     ppl_@CLASS@_wdn_exn_with_tokens_check_code(PS1, PS1a, PS1_Copy,
1474                                                PS2, PS2_Copy, T, T1)
1475   ->
1476     fail ; true)
1477 ).
1478
1479')
1480
1481m4_define(`ppl_@CLASS@_@EXTRAPOLATION@_extrapolation_assign_code',
1482`
1483ppl_@CLASS@_@EXTRAPOLATION@_extrapolation_assign_2_test :-
1484  (
1485   choose_2_tests(TEST_DATA1, TEST_DATA2, Space_Dim),
1486   (
1487     ppl_@TOPOLOGY@@CLASS@_build_test_object(TEST_DATA1, PS1, Space_Dim),
1488     ppl_@TOPOLOGY@@CLASS@_build_test_object(TEST_DATA2, PS2, Space_Dim),
1489     ppl_@CLASS@_upper_bound_assign(PS1, PS2),
1490     ppl_new_@TOPOLOGY@@CLASS@_from_@TOPOLOGY@@CLASS@(PS1, PS1_Copy),
1491     ppl_new_@TOPOLOGY@@CLASS@_from_@TOPOLOGY@@CLASS@(PS2, PS2_Copy),
1492     ppl_@CLASS@_@EXTRAPOLATION@_extrapolation_assign(PS1, PS2),
1493     ppl_@CLASS@_wdn_exn_check_code(PS1, PS1_Copy, PS2, PS2_Copy)
1494   ->
1495     fail ; true)
1496 ).
1497
1498')
1499
1500m4_define(`ppl_@CLASS@_@EXTRAPOLATION@_extrapolation_assign_with_tokens_code',
1501`
1502ppl_@CLASS@_@EXTRAPOLATION@_extrapolation_assign_with_tokens_4_test :-
1503  (
1504   choose_2_tests(TEST_DATA1, TEST_DATA2, Space_Dim),
1505   (
1506     ppl_@TOPOLOGY@@CLASS@_build_test_object(TEST_DATA1, PS1, Space_Dim),
1507     ppl_@TOPOLOGY@@CLASS@_build_test_object(TEST_DATA2, PS2, Space_Dim),
1508     ppl_@CLASS@_upper_bound_assign(PS1, PS2),
1509     ppl_new_@TOPOLOGY@@CLASS@_from_@TOPOLOGY@@CLASS@(PS1, PS1_Copy),
1510     ppl_new_@TOPOLOGY@@CLASS@_from_@TOPOLOGY@@CLASS@(PS2, PS2_Copy),
1511     ppl_new_@TOPOLOGY@@CLASS@_from_@TOPOLOGY@@CLASS@(PS1, PS1a),
1512     ppl_@CLASS@_@EXTRAPOLATION@_extrapolation_assign_with_tokens(PS1, PS2,
1513                                                                  1, T),
1514     ppl_@CLASS@_@EXTRAPOLATION@_extrapolation_assign_with_tokens(PS1a, PS2,
1515                                                                  0, T1),
1516     ppl_@CLASS@_wdn_exn_with_tokens_check_code(PS1, PS1a, PS1_Copy,
1517                                                PS2, PS2_Copy, T, T1)
1518   ->
1519     fail ; true)
1520 ).
1521
1522')
1523
1524m4_define(`ppl_@CLASS@_@EXTRAPOLATION@_narrowing_assign_code',
1525`
1526ppl_@CLASS@_@EXTRAPOLATION@_narrowing_assign_2_test :-
1527  (
1528   choose_2_tests(TEST_DATA1, TEST_DATA2, Space_Dim),
1529   (
1530     ppl_@TOPOLOGY@@CLASS@_build_test_object(TEST_DATA1, PS1, Space_Dim),
1531     ppl_@TOPOLOGY@@CLASS@_build_test_object(TEST_DATA2, PS2, Space_Dim),
1532     ppl_@CLASS@_upper_bound_assign(PS1, PS2),
1533     ppl_new_@TOPOLOGY@@CLASS@_from_@TOPOLOGY@@CLASS@(PS1, PS1_Copy),
1534     ppl_new_@TOPOLOGY@@CLASS@_from_@TOPOLOGY@@CLASS@(PS2, PS2_Copy),
1535     ppl_@CLASS@_@EXTRAPOLATION@_narrowing_assign(PS2, PS1),
1536     ppl_@CLASS@_contains_@CLASS@(PS2, PS2_Copy),
1537     ppl_@CLASS@_contains_@CLASS@(PS1, PS2),
1538     ppl_@CLASS@_equals_@CLASS@(PS1, PS1_Copy),
1539     ppl_@CLASS@_OK(PS1),
1540     ppl_@CLASS@_OK(PS2),
1541     ppl_delete_@CLASS@(PS1),
1542     ppl_delete_@CLASS@(PS1_Copy),
1543     ppl_delete_@CLASS@(PS2),
1544     ppl_delete_@CLASS@(PS2_Copy)
1545   ->
1546     fail ; true)
1547 ).
1548
1549')
1550
1551m4_define(`ppl_@CLASS@_add_space_dimensions_@EMBEDPROJECT@_code',
1552`
1553ppl_@CLASS@_add_space_dimensions_@EMBEDPROJECT@_2_test :-
1554  (
1555    (
1556      clean_ppl_new_@TOPOLOGY@@CLASS@_from_space_dimension(1, universe, PS),
1557      ppl_@CLASS@_add_space_dimensions_@EMBEDPROJECT@(PS, 1),
1558      ppl_@CLASS@_OK(PS),
1559      ppl_@CLASS@_space_dimension(PS, 2),
1560      (@EMBEDPROJECT@ == and_embed
1561      ->
1562        clean_ppl_new_@TOPOLOGY@@CLASS@_from_space_dimension(2, universe, PS1)
1563      ;
1564        make_vars(2, [Var0, Var1]),
1565        clean_ppl_new_@TOPOLOGY@@CLASS@_from_@CONSTRAINER@s(
1566                            [Var0 = Var0, Var1 = 0], PS1)
1567      ),
1568      (predicate_exists(ppl_@CLASS@_equals_@CLASS@)
1569      ->
1570        ppl_@CLASS@_equals_@CLASS@(PS, PS1),
1571        ppl_@CLASS@_OK(PS1),
1572        ppl_@CLASS@_OK(PS)
1573      ;
1574        true
1575      ),
1576      ppl_delete_@CLASS@(PS1),
1577      ppl_delete_@CLASS@(PS)
1578
1579   ->
1580    fail ; true)
1581  ).
1582
1583')
1584
1585m4_define(`ppl_@CLASS@_remove_higher_space_dimensions_code',
1586`
1587ppl_@CLASS@_remove_higher_space_dimensions_2_test :-
1588  (
1589   choose_test(TEST_DATA, Dim),
1590   (
1591     ppl_@TOPOLOGY@@CLASS@_build_test_object(TEST_DATA, PS, Dim),
1592     ppl_new_@TOPOLOGY@@CLASS@_from_@TOPOLOGY@@CLASS@(PS, PS_Copy),
1593     ppl_@CLASS@_add_space_dimensions_and_embed(PS, 1),
1594     ppl_@CLASS@_OK(PS),
1595     ppl_@CLASS@_space_dimension(PS, Dim1),
1596     Dim1 is Dim + 1,
1597     ppl_@CLASS@_remove_higher_space_dimensions(PS, Dim),
1598     ppl_@CLASS@_space_dimension(PS, Dim),
1599     (predicate_exists(ppl_@CLASS@_equals_@CLASS@)
1600     ->
1601       ppl_@CLASS@_equals_@CLASS@(PS, PS_Copy)
1602     ;
1603       true
1604     ),
1605     ppl_@CLASS@_remove_higher_space_dimensions(PS, 0),
1606     ppl_@CLASS@_space_dimension(PS, 0),
1607     ppl_@CLASS@_OK(PS),
1608     ppl_delete_@CLASS@(PS),
1609     ppl_delete_@CLASS@(PS_Copy)
1610   ->
1611    fail ; true)
1612  ).
1613
1614')
1615
1616m4_define(`ppl_@CLASS@_remove_space_dimensions_code',
1617`
1618ppl_@CLASS@_remove_space_dimensions_2_test :-
1619  (
1620   choose_test(TEST_DATA, Dim),
1621   (
1622     ppl_@TOPOLOGY@@CLASS@_build_test_object(TEST_DATA, PS, Dim),
1623     ppl_new_@TOPOLOGY@@CLASS@_from_@TOPOLOGY@@CLASS@(PS, PS_Copy),
1624     ppl_@CLASS@_add_space_dimensions_and_embed(PS, 1),
1625     Dim1 is Dim + 1,
1626     ppl_@CLASS@_remove_space_dimensions(PS, []),
1627     ppl_@CLASS@_space_dimension(PS, Dim1),
1628     make_vars(Dim1, Var_List),
1629     append(_, [Var], Var_List),
1630     ppl_@CLASS@_remove_space_dimensions(PS, [Var]),
1631     (predicate_exists(ppl_@CLASS@_equals_@CLASS@)
1632     ->
1633       ppl_@CLASS@_equals_@CLASS@(PS, PS_Copy)
1634     ;
1635       true
1636     ),
1637     ppl_@CLASS@_OK(PS),
1638     ppl_delete_@CLASS@(PS),
1639     ppl_delete_@CLASS@(PS_Copy)
1640   ->
1641    fail ; true)
1642  ).
1643
1644')
1645
1646m4_define(`ppl_@CLASS@_expand_space_dimension_code',
1647`
1648ppl_@CLASS@_expand_space_dimension_3_test :-
1649  (
1650   choose_test(TEST_DATA, Dim),
1651   (
1652     ppl_@TOPOLOGY@@CLASS@_build_test_object(TEST_DATA, PS, Dim),
1653     ppl_@CLASS@_add_space_dimensions_and_embed(PS, 1),
1654     ppl_new_@TOPOLOGY@@CLASS@_from_@TOPOLOGY@@CLASS@(PS, PS_Copy),
1655     Dim1 is Dim + 1,
1656     make_vars(1, [Var]),
1657     ppl_@CLASS@_expand_space_dimension(PS, Var, 0),
1658     ppl_@CLASS@_equals_@CLASS@(PS, PS_Copy),
1659     make_vars(Dim1, Var_List),
1660     append(_, [Var1], Var_List),
1661     ppl_@CLASS@_expand_space_dimension(PS, Var1, 1),
1662     Dim2 is Dim1 + 1,
1663     ppl_@CLASS@_space_dimension(PS, Dim2),
1664     ppl_@CLASS@_remove_higher_space_dimensions(PS, Dim1),
1665     ppl_@CLASS@_equals_@CLASS@(PS, PS_Copy),
1666     ppl_@CLASS@_OK(PS),
1667     ppl_delete_@CLASS@(PS),
1668     ppl_delete_@CLASS@(PS_Copy)
1669   ->
1670    fail ; true)
1671  ).
1672
1673')
1674
1675m4_define(`ppl_@CLASS@_fold_space_dimensions_code',
1676`
1677ppl_@CLASS@_fold_space_dimensions_3_test :-
1678  (
1679   choose_test(TEST_DATA, Dim),
1680   (
1681     ppl_@TOPOLOGY@@CLASS@_build_test_object(TEST_DATA, PS, Dim),
1682     ppl_@CLASS@_add_space_dimensions_and_embed(PS, 1),
1683     ppl_new_@TOPOLOGY@@CLASS@_from_@TOPOLOGY@@CLASS@(PS, PS_Copy),
1684     Dim1 is Dim + 1,
1685     make_vars(Dim1, [Var | _]),
1686     ppl_@CLASS@_fold_space_dimensions(PS, [], Var),
1687     ppl_@CLASS@_equals_@CLASS@(PS, PS_Copy),
1688     ppl_@CLASS@_add_space_dimensions_and_embed(PS, 1),
1689     Dim2 is Dim1 + 1,
1690     make_vars(Dim2, Var_List),
1691     append(_, [Var1], Var_List),
1692     ppl_@CLASS@_fold_space_dimensions(PS, [Var], Var1),
1693     ppl_@CLASS@_space_dimension(PS, Dim1),
1694     ppl_@CLASS@_OK(PS),
1695     ppl_delete_@CLASS@(PS),
1696     ppl_delete_@CLASS@(PS_Copy)
1697   ->
1698    fail ; true)
1699  ).
1700
1701')
1702
1703m4_define(`ppl_@CLASS@_map_space_dimensions_code',
1704`
1705ppl_@CLASS@_map_space_dimensions_2_test :-
1706  (
1707   choose_test(TEST_DATA, Dim),
1708   (
1709     ppl_@TOPOLOGY@@CLASS@_build_test_object(TEST_DATA, PS, Dim),
1710     ppl_@CLASS@_add_space_dimensions_and_embed(PS, 1),
1711     ppl_@CLASS@_add_space_dimensions_and_project(PS, 1),
1712     ppl_new_@TOPOLOGY@@CLASS@_from_@TOPOLOGY@@CLASS@(PS, PS_Copy),
1713     ppl_new_@TOPOLOGY@@CLASS@_from_@TOPOLOGY@@CLASS@(PS, PSa),
1714     Dim1 is Dim + 2,
1715     ppl_@CLASS@_map_space_dimensions(PSa, []),
1716     ppl_@CLASS@_space_dimension(PSa, 0),
1717     make_vars(Dim1, Var_List),
1718     append(_, [Var, Var1], Var_List),
1719     make_map_vars(Dim, Var_Map_List),
1720     append(Var_Map_List, [Var-Var1, Var1-Var], Var_Map_List1),
1721     ppl_@CLASS@_map_space_dimensions(PS, Var_Map_List1),
1722     ppl_@CLASS@_map_space_dimensions(PS, Var_Map_List1),
1723     ppl_@CLASS@_space_dimension(PS, Dim1),
1724     (predicate_exists(ppl_@CLASS@_equals_@CLASS@)
1725     ->
1726       ppl_@CLASS@_equals_@CLASS@(PS, PS_Copy)
1727     ;
1728       true
1729     ),
1730     ppl_@CLASS@_OK(PS),
1731     ppl_delete_@CLASS@(PS),
1732     ppl_delete_@CLASS@(PSa),
1733     ppl_delete_@CLASS@(PS_Copy)
1734   ->
1735    fail ; true)
1736  ).
1737
1738')
1739
1740m4_define(`ppl_@CLASS@_wrap_assign_code',
1741`
1742ppl_@CLASS@_wrap_assign_8_test :-
1743  (
1744   choose_test(TEST_DATA, Dim),
1745   (
1746     ppl_@TOPOLOGY@@CLASS@_build_test_object(TEST_DATA, PS, Dim),
1747     ppl_new_@TOPOLOGY@@CLASS@_from_@TOPOLOGY@@CLASS@(PS, PS_Copy),
1748     ppl_@CLASS@_wrap_assign(PS, [], bits_8, unsigned, overflow_wraps,
1749                             [], 0, true),
1750     ppl_@CLASS@_equals_@CLASS@(PS, PS_Copy),
1751     ppl_@CLASS@_OK(PS),
1752     ppl_delete_@CLASS@(PS),
1753     ppl_delete_@CLASS@(PS_Copy)
1754   ->
1755    fail ; true)
1756  ).
1757
1758')
1759
1760m4_define(`ppl_@CLASS@_drop_some_non_integer_points_code',
1761`
1762ppl_@CLASS@_drop_some_non_integer_points_2_test :-
1763  (
1764   choose_test(TEST_DATA, Dim),
1765   (
1766     ppl_@TOPOLOGY@@CLASS@_build_test_object(TEST_DATA, PS, Dim),
1767     ppl_new_@TOPOLOGY@@CLASS@_from_@TOPOLOGY@@CLASS@(PS, PS_Copy),
1768     ppl_@CLASS@_drop_some_non_integer_points(PS, any),
1769     ppl_@CLASS@_OK(PS),
1770     ppl_delete_@CLASS@(PS),
1771     ppl_delete_@CLASS@(PS_Copy)
1772   ->
1773    fail ; true)
1774  ).
1775
1776')
1777
1778m4_define(`ppl_termination_test_@TERMINATION_ID@_@TOPOLOGY@@CLASS@_code',
1779`
1780ppl_termination_test_@TERMINATION_ID@_@TOPOLOGY@@CLASS@_1_test :-
1781  (
1782   choose_2_tests(TEST_DATA1, TEST_DATA2, Space_Dim),
1783   (
1784     ppl_@TOPOLOGY@@CLASS@_build_test_object(TEST_DATA1, PS1, Space_Dim),
1785     ppl_@TOPOLOGY@@CLASS@_build_test_object(TEST_DATA2, PS2, Space_Dim),
1786     ppl_@CLASS@_concatenate_assign(PS1, PS2),
1787     (ppl_termination_test_@TERMINATION_ID@_@TOPOLOGY@@CLASS@(PS1) ->
1788        true
1789     ;
1790        true
1791     ),
1792     ppl_@CLASS@_OK(PS1),
1793     ppl_delete_@CLASS@(PS1),
1794     ppl_delete_@CLASS@(PS2)
1795   ->
1796    fail ; true)
1797  ).
1798
1799')
1800
1801m4_define(`ppl_termination_test_@TERMINATION_ID@_@TOPOLOGY@@CLASS@_2_code',
1802`
1803ppl_termination_test_@TERMINATION_ID@_@TOPOLOGY@@CLASS@_2_2_test :-
1804  (
1805   choose_2_tests(TEST_DATA1, TEST_DATA2, Space_Dim),
1806   (
1807     ppl_@TOPOLOGY@@CLASS@_build_test_object(TEST_DATA1, PS1, Space_Dim),
1808     ppl_@TOPOLOGY@@CLASS@_build_test_object(TEST_DATA2, PS2, Space_Dim),
1809     ppl_@CLASS@_concatenate_assign(PS1, PS2),
1810     (ppl_termination_test_@TERMINATION_ID@_@TOPOLOGY@@CLASS@_2(PS2, PS1) ->
1811        true
1812     ;
1813        true
1814     ),
1815     ppl_@CLASS@_OK(PS1),
1816     ppl_@CLASS@_OK(PS2),
1817     ppl_delete_@CLASS@(PS1),
1818     ppl_delete_@CLASS@(PS2)
1819   ->
1820    fail ; true)
1821  ).
1822
1823')
1824
1825m4_define(
1826  `ppl_one_affine_ranking_function_@TERMINATION_ID@_@TOPOLOGY@@CLASS@_code',
1827`
1828ppl_one_affine_ranking_function_@TERMINATION_ID@_@TOPOLOGY@@CLASS@_2_test :-
1829  (
1830   choose_2_tests(TEST_DATA1, TEST_DATA2, Space_Dim),
1831   (
1832     ppl_@TOPOLOGY@@CLASS@_build_test_object(TEST_DATA1, PS1, Space_Dim),
1833     ppl_@TOPOLOGY@@CLASS@_build_test_object(TEST_DATA2, PS2, Space_Dim),
1834     ppl_@CLASS@_concatenate_assign(PS1, PS2),
1835     (ppl_one_affine_ranking_function_@TERMINATION_ID@_@TOPOLOGY@@CLASS@(PS1,
1836                                                                         _Pt)
1837     ->
1838        true
1839     ;
1840        true
1841     ),
1842     ppl_@CLASS@_OK(PS1),
1843     ppl_@CLASS@_OK(PS2),
1844     ppl_delete_@CLASS@(PS1),
1845     ppl_delete_@CLASS@(PS2)
1846   ->
1847    fail ; true)
1848  ).
1849
1850')
1851
1852m4_define(
1853  `ppl_one_affine_ranking_function_@TERMINATION_ID@_@TOPOLOGY@@CLASS@_2_code',
1854`
1855ppl_one_affine_ranking_function_@TERMINATION_ID@_@TOPOLOGY@@CLASS@_2_2_test :-
1856  (
1857   choose_2_tests(TEST_DATA1, TEST_DATA2, Space_Dim),
1858   (
1859     ppl_@TOPOLOGY@@CLASS@_build_test_object(TEST_DATA1, PS1, Space_Dim),
1860     ppl_@TOPOLOGY@@CLASS@_build_test_object(TEST_DATA2, PS2, Space_Dim),
1861     ppl_@CLASS@_concatenate_assign(PS1, PS2),
1862     (ppl_one_affine_ranking_function_@TERMINATION_ID@_@TOPOLOGY@@CLASS@_2(PS2,
1863                                                                           PS1,
1864                                                                           _Pt)
1865     ->
1866        true
1867     ;
1868        true
1869     ),
1870     ppl_@CLASS@_OK(PS1),
1871     ppl_@CLASS@_OK(PS2),
1872     ppl_delete_@CLASS@(PS1),
1873     ppl_delete_@CLASS@(PS2)
1874   ->
1875    fail ; true)
1876  ).
1877
1878')
1879
1880m4_define(
1881  `ppl_all_affine_ranking_functions_@TERMINATION_ID@_@TOPOLOGY@@CLASS@_code',
1882`
1883ppl_all_affine_ranking_functions_@TERMINATION_ID@_@TOPOLOGY@@CLASS@_2_test :-
1884  (
1885   choose_2_tests(TEST_DATA1, TEST_DATA2, Space_Dim),
1886   (
1887     ppl_@TOPOLOGY@@CLASS@_build_test_object(TEST_DATA1, PS1, Space_Dim),
1888     ppl_@TOPOLOGY@@CLASS@_build_test_object(TEST_DATA2, PS2, Space_Dim),
1889     ppl_@CLASS@_concatenate_assign(PS1, PS2),
1890     ppl_all_affine_ranking_functions_@TERMINATION_ID@_@TOPOLOGY@@CLASS@(PS1,
1891                                                                         Ph),
1892     ppl_Polyhedron_OK(Ph),
1893     ppl_@CLASS@_OK(PS1),
1894     ppl_@CLASS@_OK(PS2),
1895     ppl_delete_@CLASS@(PS1),
1896     ppl_delete_@CLASS@(PS2)
1897   ->
1898    fail ; true)
1899  ).
1900
1901')
1902
1903m4_define(
1904  `ppl_all_affine_ranking_functions_@TERMINATION_ID@_@TOPOLOGY@@CLASS@_2_code',
1905`
1906ppl_all_affine_ranking_functions_@TERMINATION_ID@_@TOPOLOGY@@CLASS@_2_2_test :-
1907  (
1908   choose_2_tests(TEST_DATA1, TEST_DATA2, Space_Dim),
1909   (
1910     ppl_@TOPOLOGY@@CLASS@_build_test_object(TEST_DATA1, PS1, Space_Dim),
1911     ppl_@TOPOLOGY@@CLASS@_build_test_object(TEST_DATA2, PS2, Space_Dim),
1912     ppl_@CLASS@_concatenate_assign(PS1, PS2),
1913     ppl_all_affine_ranking_functions_@TERMINATION_ID@_@TOPOLOGY@@CLASS@_2(PS2,
1914                                                                           PS1,
1915                                                                           Ph),
1916     ppl_Polyhedron_OK(Ph),
1917     ppl_@CLASS@_OK(PS1),
1918     ppl_@CLASS@_OK(PS2),
1919     ppl_delete_@CLASS@(PS1),
1920     ppl_delete_@CLASS@(PS2)
1921   ->
1922    fail ; true)
1923  ).
1924
1925')
1926
1927m4_define(
1928  `ppl_all_affine_quasi_ranking_functions_MS_@TOPOLOGY@@CLASS@_code',
1929`
1930ppl_all_affine_quasi_ranking_functions_MS_@TOPOLOGY@@CLASS@_3_test :-
1931  (
1932   choose_2_tests(TEST_DATA1, TEST_DATA2, Space_Dim),
1933   (
1934     ppl_@TOPOLOGY@@CLASS@_build_test_object(TEST_DATA1, PS1, Space_Dim),
1935     ppl_@TOPOLOGY@@CLASS@_build_test_object(TEST_DATA2, PS2, Space_Dim),
1936     ppl_@CLASS@_concatenate_assign(PS1, PS2),
1937     ppl_all_affine_quasi_ranking_functions_MS_@TOPOLOGY@@CLASS@(PS1, Ph1, Ph2),
1938     ppl_Polyhedron_OK(Ph1),
1939     ppl_Polyhedron_OK(Ph2),
1940     ppl_@CLASS@_OK(PS1),
1941     ppl_@CLASS@_OK(PS2),
1942     ppl_delete_@CLASS@(PS1),
1943     ppl_delete_@CLASS@(PS2)
1944   ->
1945    fail ; true)
1946  ).
1947
1948')
1949
1950m4_define(
1951  `ppl_all_affine_quasi_ranking_functions_MS_@TOPOLOGY@@CLASS@_2_code',
1952`
1953ppl_all_affine_quasi_ranking_functions_MS_@TOPOLOGY@@CLASS@_2_4_test :-
1954  (
1955   choose_2_tests(TEST_DATA1, TEST_DATA2, Space_Dim),
1956   (
1957     ppl_@TOPOLOGY@@CLASS@_build_test_object(TEST_DATA1, PS1, Space_Dim),
1958     ppl_@TOPOLOGY@@CLASS@_build_test_object(TEST_DATA2, PS2, Space_Dim),
1959     ppl_@CLASS@_concatenate_assign(PS1, PS2),
1960     ppl_all_affine_quasi_ranking_functions_MS_@TOPOLOGY@@CLASS@_2(PS2, PS1,
1961                                                                   Ph1, Ph2),
1962     ppl_Polyhedron_OK(Ph1),
1963     ppl_Polyhedron_OK(Ph2),
1964     ppl_@CLASS@_OK(PS1),
1965     ppl_@CLASS@_OK(PS2),
1966     ppl_delete_@CLASS@(PS1),
1967     ppl_delete_@CLASS@(PS2)
1968   ->
1969    fail ; true)
1970  ).
1971
1972')
1973
1974dnl ppl_@CLASS@_@NARROWING@_narrowing_assign/2,
1975