17154445b240d570fc512204938c577b1b791402
[nit.git] / c_src / partial_order._sep.c
1 /* This C file is generated by NIT to compile module partial_order. */
2 #include "partial_order._sep.h"
3 val_t partial_order___PartialOrder___roots(val_t self) {
4 struct trace_t trace = {NULL, NULL, 30, LOCATE_partial_order___PartialOrder___roots};
5 trace.prev = tracehead; tracehead = &trace;
6 trace.file = LOCATE_partial_order;
7 tracehead = trace.prev;
8 return ATTR_partial_order___PartialOrder____roots( self) /*PartialOrder::_roots*/;
9 }
10 val_t partial_order___PartialOrder___is_empty(val_t self) {
11 struct trace_t trace = {NULL, NULL, 35, LOCATE_partial_order___PartialOrder___is_empty};
12 val_t variable0;
13 trace.prev = tracehead; tracehead = &trace;
14 trace.file = LOCATE_partial_order;
15 variable0 = ATTR_partial_order___PartialOrder____elements( self) /*PartialOrder::_elements*/;
16 variable0 = ((abstract_collection___Collection___is_empty_t)CALL(variable0,COLOR_abstract_collection___Collection___is_empty))(variable0) /*Collection::is_empty*/;
17 goto return_label0;
18 return_label0: while(false);
19 tracehead = trace.prev;
20 return variable0;
21 }
22 val_t partial_order___PartialOrder___length(val_t self) {
23 struct trace_t trace = {NULL, NULL, 37, LOCATE_partial_order___PartialOrder___length};
24 val_t variable0;
25 trace.prev = tracehead; tracehead = &trace;
26 trace.file = LOCATE_partial_order;
27 variable0 = ATTR_partial_order___PartialOrder____elements( self) /*PartialOrder::_elements*/;
28 variable0 = ((abstract_collection___Collection___length_t)CALL(variable0,COLOR_abstract_collection___Collection___length))(variable0) /*Collection::length*/;
29 goto return_label1;
30 return_label1: while(false);
31 tracehead = trace.prev;
32 return variable0;
33 }
34 val_t partial_order___PartialOrder___first(val_t self) {
35 struct trace_t trace = {NULL, NULL, 39, LOCATE_partial_order___PartialOrder___first};
36 val_t variable0;
37 trace.prev = tracehead; tracehead = &trace;
38 trace.file = LOCATE_partial_order;
39 variable0 = ATTR_partial_order___PartialOrder____elements_list( self) /*PartialOrder::_elements_list*/;
40 variable0 = ((abstract_collection___IndexedCollection___first_t)CALL(variable0,COLOR_abstract_collection___Collection___first))(variable0) /*IndexedCollection::first*/;
41 goto return_label2;
42 return_label2: while(false);
43 tracehead = trace.prev;
44 return variable0;
45 }
46 val_t partial_order___PartialOrder___has(val_t self, val_t param0) {
47 struct trace_t trace = {NULL, NULL, 41, LOCATE_partial_order___PartialOrder___has};
48 val_t variable0;
49 val_t variable1;
50 trace.prev = tracehead; tracehead = &trace;
51 trace.file = LOCATE_partial_order;
52 variable0 = param0;
53 variable1 = ATTR_partial_order___PartialOrder____elements( self) /*PartialOrder::_elements*/;
54 variable1 = ((abstract_collection___Map___has_key_t)CALL(variable1,COLOR_abstract_collection___Map___has_key))(variable1, variable0 /*e*/) /*Map::has_key*/;
55 goto return_label3;
56 return_label3: while(false);
57 tracehead = trace.prev;
58 return variable1;
59 }
60 val_t partial_order___PartialOrder___has_only(val_t self, val_t param0) {
61 struct trace_t trace = {NULL, NULL, 43, LOCATE_partial_order___PartialOrder___has_only};
62 val_t variable0;
63 val_t variable1;
64 val_t variable2;
65 trace.prev = tracehead; tracehead = &trace;
66 trace.file = LOCATE_partial_order;
67 variable0 = param0;
68 variable1 = ATTR_partial_order___PartialOrder____elements( self) /*PartialOrder::_elements*/;
69 variable1 = ((abstract_collection___Collection___length_t)CALL(variable1,COLOR_abstract_collection___Collection___length))(variable1) /*Collection::length*/;
70 variable1 = TAG_Bool((variable1)==( TAG_Int(1)));
71 variable2 = variable1;
72 if (UNTAG_Bool(variable2)) { /* and */
73 variable2 = ATTR_partial_order___PartialOrder____elements( self) /*PartialOrder::_elements*/;
74 variable2 = ((abstract_collection___Collection___first_t)CALL(variable2,COLOR_abstract_collection___Collection___first))(variable2) /*Collection::first*/;
75 variable2 = TAG_Bool((variable2 == variable0 /*e*/) || ((variable2 != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL(variable2,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable2, variable0 /*e*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable2,COLOR_kernel___Object_____eqeq))(variable2, variable0 /*e*/) /*Object::==*/)))));
76 }
77 variable1 = variable2;
78 goto return_label4;
79 return_label4: while(false);
80 tracehead = trace.prev;
81 return variable1;
82 }
83 val_t partial_order___PartialOrder___count(val_t self, val_t param0) {
84 struct trace_t trace = {NULL, NULL, 45, LOCATE_partial_order___PartialOrder___count};
85 val_t variable0;
86 val_t variable1;
87 trace.prev = tracehead; tracehead = &trace;
88 trace.file = LOCATE_partial_order;
89 variable0 = param0;
90 variable1 = ((partial_order___PartialOrder___has_t)CALL( self,COLOR_abstract_collection___Collection___has))( self, variable0 /*e*/) /*PartialOrder::has*/;
91 if (UNTAG_Bool(variable1)) { /*if*/
92 variable1 = TAG_Int(1);
93 goto return_label5;
94 } else { /*if*/
95 variable1 = TAG_Int(0);
96 goto return_label5;
97 }
98 return_label5: while(false);
99 tracehead = trace.prev;
100 return variable1;
101 }
102 val_t partial_order___PartialOrder___iterator(val_t self) {
103 struct trace_t trace = {NULL, NULL, 54, LOCATE_partial_order___PartialOrder___iterator};
104 val_t variable0;
105 trace.prev = tracehead; tracehead = &trace;
106 trace.file = LOCATE_partial_order;
107 variable0 = ATTR_partial_order___PartialOrder____elements_list( self) /*PartialOrder::_elements_list*/;
108 variable0 = ((array___AbstractArray___iterator_t)CALL(variable0,COLOR_abstract_collection___Collection___iterator))(variable0) /*AbstractArray::iterator*/;
109 goto return_label6;
110 return_label6: while(false);
111 tracehead = trace.prev;
112 return variable0;
113 }
114 val_t partial_order___PartialOrder_____bra(val_t self, val_t param0) {
115 struct trace_t trace = {NULL, NULL, 58, LOCATE_partial_order___PartialOrder_____bra};
116 val_t variable0;
117 val_t variable1;
118 trace.prev = tracehead; tracehead = &trace;
119 trace.file = LOCATE_partial_order;
120 variable0 = param0;
121 variable1 = ATTR_partial_order___PartialOrder____elements( self) /*PartialOrder::_elements*/;
122 variable1 = ((abstract_collection___Map___has_key_t)CALL(variable1,COLOR_abstract_collection___Map___has_key))(variable1, variable0 /*e*/) /*Map::has_key*/;
123 if (UNTAG_Bool(variable1)) { /*if*/
124 variable1 = ATTR_partial_order___PartialOrder____elements( self) /*PartialOrder::_elements*/;
125 variable1 = ((abstract_collection___Map_____bra_t)CALL(variable1,COLOR_abstract_collection___Map_____bra))(variable1, variable0 /*e*/) /*Map::[]*/;
126 goto return_label7;
127 } else { /*if*/
128 variable1 = NIT_NULL /*null*/;
129 goto return_label7;
130 }
131 return_label7: while(false);
132 tracehead = trace.prev;
133 return variable1;
134 }
135 val_t partial_order___PartialOrder___to_dot(val_t self) {
136 struct trace_t trace = {NULL, NULL, 68, LOCATE_partial_order___PartialOrder___to_dot};
137 val_t variable0;
138 val_t variable1;
139 val_t variable2;
140 val_t variable3;
141 val_t variable4;
142 val_t variable5;
143 trace.prev = tracehead; tracehead = &trace;
144 trace.file = LOCATE_partial_order;
145 variable1 = NEW_string___String___init(); /*new String*/
146 variable0 = variable1;
147 variable1 = ((partial_order___PartialOrder___to_dot_header_t)CALL( self,COLOR_partial_order___PartialOrder___to_dot_header))( self) /*PartialOrder::to_dot_header*/;
148 ((string___String___append_t)CALL( variable0 /*s*/,COLOR_abstract_collection___IndexedCollection___append))( variable0 /*s*/, variable1) /*String::append*/;
149 variable1 = ATTR_partial_order___PartialOrder____elements( self) /*PartialOrder::_elements*/;
150 variable1 = ((abstract_collection___Map___iterator_t)CALL(variable1,COLOR_abstract_collection___Collection___iterator))(variable1) /*Map::iterator*/;
151 while (true) { /*for*/
152 variable2 = ((abstract_collection___Iterator___is_ok_t)CALL(variable1,COLOR_abstract_collection___Iterator___is_ok))(variable1) /*Iterator::is_ok*/;
153 if (!UNTAG_Bool(variable2)) break; /*for*/
154 variable2 = ((abstract_collection___Iterator___item_t)CALL(variable1,COLOR_abstract_collection___Iterator___item))(variable1) /*Iterator::item*/;
155 variable3 = ((partial_order___PartialOrderElement___value_t)CALL( variable2 /*e*/,COLOR_partial_order___PartialOrderElement___value))( variable2 /*e*/) /*PartialOrderElement::value*/;
156 variable3 = ((partial_order___PartialOrder___to_dot_node_t)CALL( self,COLOR_partial_order___PartialOrder___to_dot_node))( self, variable3) /*PartialOrder::to_dot_node*/;
157 ((string___String___append_t)CALL( variable0 /*s*/,COLOR_abstract_collection___IndexedCollection___append))( variable0 /*s*/, variable3) /*String::append*/;
158 variable3 = ((partial_order___PartialOrderElement___direct_greaters_t)CALL( variable2 /*e*/,COLOR_partial_order___PartialOrderElement___direct_greaters))( variable2 /*e*/) /*PartialOrderElement::direct_greaters*/;
159 variable3 = ((array___AbstractArray___iterator_t)CALL(variable3,COLOR_abstract_collection___Collection___iterator))(variable3) /*AbstractArray::iterator*/;
160 while (true) { /*for*/
161 variable4 = ((array___ArrayIterator___is_ok_t)CALL(variable3,COLOR_abstract_collection___Iterator___is_ok))(variable3) /*ArrayIterator::is_ok*/;
162 if (!UNTAG_Bool(variable4)) break; /*for*/
163 variable4 = ((array___ArrayIterator___item_t)CALL(variable3,COLOR_abstract_collection___Iterator___item))(variable3) /*ArrayIterator::item*/;
164 variable5 = ((partial_order___PartialOrderElement___value_t)CALL( variable2 /*e*/,COLOR_partial_order___PartialOrderElement___value))( variable2 /*e*/) /*PartialOrderElement::value*/;
165 variable5 = ((partial_order___PartialOrder___to_dot_edge_t)CALL( self,COLOR_partial_order___PartialOrder___to_dot_edge))( self, variable5, variable4 /*d*/) /*PartialOrder::to_dot_edge*/;
166 ((string___String___append_t)CALL( variable0 /*s*/,COLOR_abstract_collection___IndexedCollection___append))( variable0 /*s*/, variable5) /*String::append*/;
167 continue_10: while(0);
168 ((array___ArrayIterator___next_t)CALL(variable3,COLOR_abstract_collection___Iterator___next))(variable3) /*ArrayIterator::next*/;
169 }
170 break_10: while(0);
171 continue_9: while(0);
172 ((abstract_collection___Iterator___next_t)CALL(variable1,COLOR_abstract_collection___Iterator___next))(variable1) /*Iterator::next*/;
173 }
174 break_9: while(0);
175 variable1 = NEW_string___String___with_native(BOX_NativeString("}\n"), TAG_Int(2)); /*new String*/
176 ((string___String___append_t)CALL( variable0 /*s*/,COLOR_abstract_collection___IndexedCollection___append))( variable0 /*s*/, variable1) /*String::append*/;
177 variable0 = variable0 /*s*/;
178 goto return_label8;
179 return_label8: while(false);
180 tracehead = trace.prev;
181 return variable0;
182 }
183 val_t partial_order___PartialOrder___to_dot_header(val_t self) {
184 struct trace_t trace = {NULL, NULL, 83, LOCATE_partial_order___PartialOrder___to_dot_header};
185 val_t variable0;
186 trace.prev = tracehead; tracehead = &trace;
187 trace.file = LOCATE_partial_order;
188 variable0 = NEW_string___String___with_native(BOX_NativeString("digraph G {\ngraph [rankdir=BT];\n"), TAG_Int(32)); /*new String*/
189 goto return_label11;
190 return_label11: while(false);
191 tracehead = trace.prev;
192 return variable0;
193 }
194 val_t partial_order___PartialOrder___to_dot_node(val_t self, val_t param0) {
195 struct trace_t trace = {NULL, NULL, 89, LOCATE_partial_order___PartialOrder___to_dot_node};
196 val_t variable0;
197 val_t variable1;
198 val_t variable2;
199 val_t variable3;
200 val_t variable4;
201 val_t variable5;
202 val_t variable6;
203 trace.prev = tracehead; tracehead = &trace;
204 trace.file = LOCATE_partial_order;
205 variable0 = param0;
206 variable1 = NEW_string___String___init(); /*new String*/
207 variable2 = NEW_string___String___with_native(BOX_NativeString("\""), TAG_Int(1)); /*new String*/
208 variable3 = variable2;
209 ((string___String___append_t)CALL(variable1,COLOR_abstract_collection___IndexedCollection___append))(variable1, variable3) /*String::append*/;
210 variable4 = variable0 /*e*/;
211 variable4 = ((string___String___to_s_t)CALL(variable4,COLOR_string___Object___to_s))(variable4) /*String::to_s*/;
212 ((string___String___append_t)CALL(variable1,COLOR_abstract_collection___IndexedCollection___append))(variable1, variable4) /*String::append*/;
213 variable5 = NEW_string___String___with_native(BOX_NativeString("\";\n"), TAG_Int(3)); /*new String*/
214 variable6 = variable5;
215 ((string___String___append_t)CALL(variable1,COLOR_abstract_collection___IndexedCollection___append))(variable1, variable6) /*String::append*/;
216 goto return_label12;
217 return_label12: while(false);
218 tracehead = trace.prev;
219 return variable1;
220 }
221 val_t partial_order___PartialOrder___to_dot_edge(val_t self, val_t param0, val_t param1) {
222 struct trace_t trace = {NULL, NULL, 95, LOCATE_partial_order___PartialOrder___to_dot_edge};
223 val_t variable0;
224 val_t variable1;
225 val_t variable2;
226 val_t variable3;
227 val_t variable4;
228 val_t variable5;
229 val_t variable6;
230 val_t variable7;
231 val_t variable8;
232 val_t variable9;
233 val_t variable10;
234 trace.prev = tracehead; tracehead = &trace;
235 trace.file = LOCATE_partial_order;
236 variable0 = param0;
237 variable1 = param1;
238 variable2 = NEW_string___String___init(); /*new String*/
239 variable3 = NEW_string___String___with_native(BOX_NativeString("\""), TAG_Int(1)); /*new String*/
240 variable4 = variable3;
241 ((string___String___append_t)CALL(variable2,COLOR_abstract_collection___IndexedCollection___append))(variable2, variable4) /*String::append*/;
242 variable5 = variable0 /*e1*/;
243 variable5 = ((string___String___to_s_t)CALL(variable5,COLOR_string___Object___to_s))(variable5) /*String::to_s*/;
244 ((string___String___append_t)CALL(variable2,COLOR_abstract_collection___IndexedCollection___append))(variable2, variable5) /*String::append*/;
245 variable6 = NEW_string___String___with_native(BOX_NativeString("\" -> \""), TAG_Int(6)); /*new String*/
246 variable7 = variable6;
247 ((string___String___append_t)CALL(variable2,COLOR_abstract_collection___IndexedCollection___append))(variable2, variable7) /*String::append*/;
248 variable8 = variable1 /*e2*/;
249 variable8 = ((string___String___to_s_t)CALL(variable8,COLOR_string___Object___to_s))(variable8) /*String::to_s*/;
250 ((string___String___append_t)CALL(variable2,COLOR_abstract_collection___IndexedCollection___append))(variable2, variable8) /*String::append*/;
251 variable9 = NEW_string___String___with_native(BOX_NativeString("\";\n"), TAG_Int(3)); /*new String*/
252 variable10 = variable9;
253 ((string___String___append_t)CALL(variable2,COLOR_abstract_collection___IndexedCollection___append))(variable2, variable10) /*String::append*/;
254 goto return_label13;
255 return_label13: while(false);
256 tracehead = trace.prev;
257 return variable2;
258 }
259 val_t partial_order___PartialOrder___select_smallests(val_t self, val_t param0) {
260 struct trace_t trace = {NULL, NULL, 101, LOCATE_partial_order___PartialOrder___select_smallests};
261 val_t variable0;
262 val_t variable1;
263 val_t variable2;
264 val_t variable3;
265 val_t variable4;
266 val_t variable5;
267 val_t variable6;
268 trace.prev = tracehead; tracehead = &trace;
269 trace.file = LOCATE_partial_order;
270 variable0 = param0;
271 variable1 = TAG_Bool(( variable0 /*c*/ == NIT_NULL /*null*/) || (( variable0 /*c*/ != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL( variable0 /*c*/,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable0 /*c*/, NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL( variable0 /*c*/,COLOR_kernel___Object_____eqeq))( variable0 /*c*/, NIT_NULL /*null*/) /*Object::==*/)))));
272 if (UNTAG_Bool(variable1)) { /*if*/
273 variable1 = NEW_array___Array___init(); /*new Array[E]*/
274 goto return_label14;
275 }
276 variable1 = ((partial_order___PartialOrder___has_all_t)CALL( self,COLOR_partial_order___PartialOrder___has_all))( self, variable0 /*c*/) /*PartialOrder::has_all*/;
277 if (!UNTAG_Bool(variable1)) { fprintf(stderr, "Assert%s failed", ""); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_partial_order___PartialOrder___select_smallests, LOCATE_partial_order, 105); nit_exit(1);}
278 variable2 = ((abstract_collection___Collection___length_t)CALL( variable0 /*c*/,COLOR_abstract_collection___Collection___length))( variable0 /*c*/) /*Collection::length*/;
279 variable3 = NEW_array___Array___with_capacity(variable2); /*new Array[E]*/
280 variable2 = variable3;
281 variable1 = variable2;
282 variable3 = ((abstract_collection___Collection___length_t)CALL( variable0 /*c*/,COLOR_abstract_collection___Collection___length))( variable0 /*c*/) /*Collection::length*/;
283 variable4 = NEW_array___Array___with_capacity(variable3); /*new Array[E]*/
284 variable3 = variable4;
285 variable2 = variable3;
286 variable3 = ((abstract_collection___Collection___iterator_t)CALL( variable0 /*c*/,COLOR_abstract_collection___Collection___iterator))( variable0 /*c*/) /*Collection::iterator*/;
287 while (true) { /*for*/
288 variable4 = ((abstract_collection___Iterator___is_ok_t)CALL(variable3,COLOR_abstract_collection___Iterator___is_ok))(variable3) /*Iterator::is_ok*/;
289 if (!UNTAG_Bool(variable4)) break; /*for*/
290 variable4 = ((abstract_collection___Iterator___item_t)CALL(variable3,COLOR_abstract_collection___Iterator___item))(variable3) /*Iterator::item*/;
291 variable6 = ((partial_order___PartialOrder___add_to_smallests_t)CALL( self,COLOR_partial_order___PartialOrder___add_to_smallests))( self, variable4 /*e*/, variable1 /*res*/, variable2 /*tmp*/) /*PartialOrder::add_to_smallests*/;
292 variable5 = variable6;
293 if (UNTAG_Bool( variable5 /*r*/)) { /*if*/
294 variable6 = variable2 /*tmp*/;
295 variable2 = variable1 /*res*/ /*tmp=*/;
296 variable1 = variable6 /*t*/ /*res=*/;
297 }
298 continue_15: while(0);
299 ((abstract_collection___Iterator___next_t)CALL(variable3,COLOR_abstract_collection___Iterator___next))(variable3) /*Iterator::next*/;
300 }
301 break_15: while(0);
302 variable1 = variable1 /*res*/;
303 goto return_label14;
304 return_label14: while(false);
305 tracehead = trace.prev;
306 return variable1;
307 }
308 val_t partial_order___PartialOrder___add(val_t self, val_t param0, val_t param1) {
309 struct trace_t trace = {NULL, NULL, 122, LOCATE_partial_order___PartialOrder___add};
310 val_t variable0;
311 val_t variable1;
312 val_t variable2;
313 val_t variable3;
314 val_t variable4;
315 val_t variable5;
316 trace.prev = tracehead; tracehead = &trace;
317 trace.file = LOCATE_partial_order;
318 variable0 = param0;
319 variable1 = param1;
320 variable2 = ((partial_order___PartialOrder___has_t)CALL( self,COLOR_abstract_collection___Collection___has))( self, variable0 /*e*/) /*PartialOrder::has*/;
321 if (!UNTAG_Bool( TAG_Bool(!UNTAG_Bool(variable2)))) { fprintf(stderr, "Assert%s failed", ""); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_partial_order___PartialOrder___add, LOCATE_partial_order, 125); nit_exit(1);}
322 variable2 = TAG_Bool(( variable1 /*supers*/ == NIT_NULL /*null*/) || (( variable1 /*supers*/ != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL( variable1 /*supers*/,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable1 /*supers*/, NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL( variable1 /*supers*/,COLOR_kernel___Object_____eqeq))( variable1 /*supers*/, NIT_NULL /*null*/) /*Object::==*/)))));
323 variable3 = variable2;
324 if (!UNTAG_Bool(variable3)) { /* or */
325 variable3 = ((partial_order___PartialOrder___has_all_t)CALL( self,COLOR_partial_order___PartialOrder___has_all))( self, variable1 /*supers*/) /*PartialOrder::has_all*/;
326 }
327 variable2 = variable3;
328 if (!UNTAG_Bool(variable2)) { fprintf(stderr, "Assert%s failed", ""); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_partial_order___PartialOrder___add, LOCATE_partial_order, 126); nit_exit(1);}
329 variable3 = ((partial_order___PartialOrder___select_smallests_t)CALL( self,COLOR_partial_order___PartialOrder___select_smallests))( self, variable1 /*supers*/) /*PartialOrder::select_smallests*/;
330 variable2 = variable3;
331 variable4 = ((partial_order___PartialOrder___new_poe_t)CALL( self,COLOR_partial_order___PartialOrder___new_poe))( self, variable0 /*e*/, variable2 /*directs*/) /*PartialOrder::new_poe*/;
332 variable3 = variable4;
333 variable4 = ATTR_partial_order___PartialOrder____elements( self) /*PartialOrder::_elements*/;
334 ((abstract_collection___Map_____braeq_t)CALL(variable4,COLOR_abstract_collection___Map_____braeq))(variable4, variable0 /*e*/, variable3 /*poe*/) /*Map::[]=*/;
335 variable4 = ATTR_partial_order___PartialOrder____elements_list( self) /*PartialOrder::_elements_list*/;
336 ((array___AbstractArray___add_t)CALL(variable4,COLOR_abstract_collection___SimpleCollection___add))(variable4, variable0 /*e*/) /*AbstractArray::add*/;
337 variable4 = TAG_Bool(( variable1 /*supers*/ == NIT_NULL /*null*/) || (( variable1 /*supers*/ != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL( variable1 /*supers*/,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable1 /*supers*/, NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL( variable1 /*supers*/,COLOR_kernel___Object_____eqeq))( variable1 /*supers*/, NIT_NULL /*null*/) /*Object::==*/)))));
338 variable5 = variable4;
339 if (!UNTAG_Bool(variable5)) { /* or */
340 variable5 = ((abstract_collection___Collection___is_empty_t)CALL( variable1 /*supers*/,COLOR_abstract_collection___Collection___is_empty))( variable1 /*supers*/) /*Collection::is_empty*/;
341 }
342 variable4 = variable5;
343 if (UNTAG_Bool(variable4)) { /*if*/
344 variable4 = ATTR_partial_order___PartialOrder____roots( self) /*PartialOrder::_roots*/;
345 ((array___AbstractArray___add_t)CALL(variable4,COLOR_abstract_collection___SimpleCollection___add))(variable4, variable0 /*e*/) /*AbstractArray::add*/;
346 }
347 variable2 = variable3 /*poe*/;
348 goto return_label16;
349 return_label16: while(false);
350 tracehead = trace.prev;
351 return variable2;
352 }
353 val_t partial_order___PartialOrder___has_all(val_t self, val_t param0) {
354 struct trace_t trace = {NULL, NULL, 137, LOCATE_partial_order___PartialOrder___has_all};
355 val_t variable0;
356 val_t variable1;
357 val_t variable2;
358 val_t variable3;
359 trace.prev = tracehead; tracehead = &trace;
360 trace.file = LOCATE_partial_order;
361 variable0 = param0;
362 variable1 = ((abstract_collection___Collection___iterator_t)CALL( variable0 /*e*/,COLOR_abstract_collection___Collection___iterator))( variable0 /*e*/) /*Collection::iterator*/;
363 while (true) { /*for*/
364 variable2 = ((abstract_collection___Iterator___is_ok_t)CALL(variable1,COLOR_abstract_collection___Iterator___is_ok))(variable1) /*Iterator::is_ok*/;
365 if (!UNTAG_Bool(variable2)) break; /*for*/
366 variable2 = ((abstract_collection___Iterator___item_t)CALL(variable1,COLOR_abstract_collection___Iterator___item))(variable1) /*Iterator::item*/;
367 variable3 = ((partial_order___PartialOrder___has_t)CALL( self,COLOR_abstract_collection___Collection___has))( self, variable2 /*i*/) /*PartialOrder::has*/;
368 if (UNTAG_Bool( TAG_Bool(!UNTAG_Bool(variable3)))) { /*if*/
369 variable1 = TAG_Bool(false);
370 goto return_label17;
371 }
372 continue_18: while(0);
373 ((abstract_collection___Iterator___next_t)CALL(variable1,COLOR_abstract_collection___Iterator___next))(variable1) /*Iterator::next*/;
374 }
375 break_18: while(0);
376 variable1 = TAG_Bool(true);
377 goto return_label17;
378 return_label17: while(false);
379 tracehead = trace.prev;
380 return variable1;
381 }
382 val_t partial_order___PartialOrder___new_poe(val_t self, val_t param0, val_t param1) {
383 struct trace_t trace = {NULL, NULL, 148, LOCATE_partial_order___PartialOrder___new_poe};
384 val_t variable0;
385 val_t variable1;
386 val_t variable2;
387 trace.prev = tracehead; tracehead = &trace;
388 trace.file = LOCATE_partial_order;
389 variable0 = param0;
390 variable1 = param1;
391 variable2 = NEW_partial_order___PartialOrderElement___init( self, variable0 /*e*/, variable1 /*directs*/); /*new PartialOrderElement[E]*/
392 goto return_label19;
393 return_label19: while(false);
394 tracehead = trace.prev;
395 return variable2;
396 }
397 val_t partial_order___PartialOrder___add_to_smallests(val_t self, val_t param0, val_t param1, val_t param2) {
398 struct trace_t trace = {NULL, NULL, 154, LOCATE_partial_order___PartialOrder___add_to_smallests};
399 val_t variable0;
400 val_t variable1;
401 val_t variable2;
402 val_t variable3;
403 val_t variable4;
404 val_t variable5;
405 val_t variable6;
406 trace.prev = tracehead; tracehead = &trace;
407 trace.file = LOCATE_partial_order;
408 variable0 = param0;
409 variable1 = param1;
410 variable2 = param2;
411 ((array___AbstractArray___clear_t)CALL( variable2 /*to*/,COLOR_abstract_collection___RemovableCollection___clear))( variable2 /*to*/) /*AbstractArray::clear*/;
412 variable4 = ((partial_order___PartialOrder_____bra_t)CALL( self,COLOR_partial_order___PartialOrder_____bra))( self, variable0 /*e*/) /*PartialOrder::[]*/;
413 variable3 = variable4;
414 variable4 = ((array___AbstractArray___iterator_t)CALL( variable1 /*from*/,COLOR_abstract_collection___Collection___iterator))( variable1 /*from*/) /*AbstractArray::iterator*/;
415 while (true) { /*for*/
416 variable5 = ((array___ArrayIterator___is_ok_t)CALL(variable4,COLOR_abstract_collection___Iterator___is_ok))(variable4) /*ArrayIterator::is_ok*/;
417 if (!UNTAG_Bool(variable5)) break; /*for*/
418 variable5 = ((array___ArrayIterator___item_t)CALL(variable4,COLOR_abstract_collection___Iterator___item))(variable4) /*ArrayIterator::item*/;
419 variable6 = ((partial_order___PartialOrderElement_____g_t)CALL( variable3 /*poe*/,COLOR_partial_order___PartialOrderElement_____g))( variable3 /*poe*/, variable5 /*i*/) /*PartialOrderElement::>*/;
420 if (UNTAG_Bool(variable6)) { /*if*/
421 variable3 = TAG_Bool(false);
422 goto return_label20;
423 }
424 variable6 = ((partial_order___PartialOrderElement_____l_t)CALL( variable3 /*poe*/,COLOR_partial_order___PartialOrderElement_____l))( variable3 /*poe*/, variable5 /*i*/) /*PartialOrderElement::<*/;
425 if (UNTAG_Bool( TAG_Bool(!UNTAG_Bool(variable6)))) { /*if*/
426 ((array___AbstractArray___add_t)CALL( variable2 /*to*/,COLOR_abstract_collection___SimpleCollection___add))( variable2 /*to*/, variable5 /*i*/) /*AbstractArray::add*/;
427 }
428 continue_21: while(0);
429 ((array___ArrayIterator___next_t)CALL(variable4,COLOR_abstract_collection___Iterator___next))(variable4) /*ArrayIterator::next*/;
430 }
431 break_21: while(0);
432 ((array___AbstractArray___add_t)CALL( variable2 /*to*/,COLOR_abstract_collection___SimpleCollection___add))( variable2 /*to*/, variable0 /*e*/) /*AbstractArray::add*/;
433 variable3 = TAG_Bool(true);
434 goto return_label20;
435 return_label20: while(false);
436 tracehead = trace.prev;
437 return variable3;
438 }
439 void partial_order___PartialOrder___compute_smallers_for(val_t self, val_t param0, val_t param1) {
440 struct trace_t trace = {NULL, NULL, 175, LOCATE_partial_order___PartialOrder___compute_smallers_for};
441 val_t variable0;
442 val_t variable1;
443 val_t variable2;
444 val_t variable3;
445 val_t variable4;
446 val_t variable5;
447 trace.prev = tracehead; tracehead = &trace;
448 trace.file = LOCATE_partial_order;
449 variable0 = param0;
450 variable1 = param1;
451 variable3 = ((partial_order___PartialOrderElement___value_t)CALL( variable0 /*poe*/,COLOR_partial_order___PartialOrderElement___value))( variable0 /*poe*/) /*PartialOrderElement::value*/;
452 variable2 = variable3;
453 variable3 = ATTR_partial_order___PartialOrder____elements( self) /*PartialOrder::_elements*/;
454 variable3 = ((abstract_collection___Map___iterator_t)CALL(variable3,COLOR_abstract_collection___Collection___iterator))(variable3) /*Map::iterator*/;
455 while (true) { /*for*/
456 variable4 = ((abstract_collection___Iterator___is_ok_t)CALL(variable3,COLOR_abstract_collection___Iterator___is_ok))(variable3) /*Iterator::is_ok*/;
457 if (!UNTAG_Bool(variable4)) break; /*for*/
458 variable4 = ((abstract_collection___Iterator___item_t)CALL(variable3,COLOR_abstract_collection___Iterator___item))(variable3) /*Iterator::item*/;
459 variable5 = ((partial_order___PartialOrderElement_____l_t)CALL( variable4 /*s*/,COLOR_partial_order___PartialOrderElement_____l))( variable4 /*s*/, variable2 /*e*/) /*PartialOrderElement::<*/;
460 if (UNTAG_Bool(variable5)) { /*if*/
461 variable5 = ((partial_order___PartialOrderElement___value_t)CALL( variable4 /*s*/,COLOR_partial_order___PartialOrderElement___value))( variable4 /*s*/) /*PartialOrderElement::value*/;
462 ((abstract_collection___SimpleCollection___add_t)CALL( variable1 /*set*/,COLOR_abstract_collection___SimpleCollection___add))( variable1 /*set*/, variable5) /*SimpleCollection::add*/;
463 }
464 continue_23: while(0);
465 ((abstract_collection___Iterator___next_t)CALL(variable3,COLOR_abstract_collection___Iterator___next))(variable3) /*Iterator::next*/;
466 }
467 break_23: while(0);
468 tracehead = trace.prev;
469 return;
470 }
471 void partial_order___PartialOrder___init(val_t self, int* init_table) {
472 struct trace_t trace = {NULL, NULL, 185, LOCATE_partial_order___PartialOrder___init};
473 val_t variable0;
474 trace.prev = tracehead; tracehead = &trace;
475 trace.file = LOCATE_partial_order;
476 if (init_table[VAL2OBJ( self)->vft[INIT_TABLE_POS_PartialOrder].i]) return;
477 variable0 = NEW_hash___HashMap___init(); /*new HashMap[K, V]*/
478 ATTR_partial_order___PartialOrder____elements( self) /*PartialOrder::_elements*/ = variable0;
479 variable0 = NEW_array___Array___init(); /*new Array[E]*/
480 ATTR_partial_order___PartialOrder____elements_list( self) /*PartialOrder::_elements_list*/ = variable0;
481 variable0 = NEW_array___Array___init(); /*new Array[E]*/
482 ATTR_partial_order___PartialOrder____roots( self) /*PartialOrder::_roots*/ = variable0;
483 init_table[VAL2OBJ( self)->vft[INIT_TABLE_POS_PartialOrder].i] = 1;
484 tracehead = trace.prev;
485 return;
486 }
487 val_t partial_order___PartialOrderElement___order(val_t self) {
488 struct trace_t trace = {NULL, NULL, 194, LOCATE_partial_order___PartialOrderElement___order};
489 trace.prev = tracehead; tracehead = &trace;
490 trace.file = LOCATE_partial_order;
491 tracehead = trace.prev;
492 return ATTR_partial_order___PartialOrderElement____order( self) /*PartialOrderElement::_order*/;
493 }
494 val_t partial_order___PartialOrderElement___value(val_t self) {
495 struct trace_t trace = {NULL, NULL, 197, LOCATE_partial_order___PartialOrderElement___value};
496 trace.prev = tracehead; tracehead = &trace;
497 trace.file = LOCATE_partial_order;
498 tracehead = trace.prev;
499 return ATTR_partial_order___PartialOrderElement____value( self) /*PartialOrderElement::_value*/;
500 }
501 val_t partial_order___PartialOrderElement___rank(val_t self) {
502 struct trace_t trace = {NULL, NULL, 200, LOCATE_partial_order___PartialOrderElement___rank};
503 trace.prev = tracehead; tracehead = &trace;
504 trace.file = LOCATE_partial_order;
505 tracehead = trace.prev;
506 return ATTR_partial_order___PartialOrderElement____rank( self) /*PartialOrderElement::_rank*/;
507 }
508 val_t partial_order___PartialOrderElement___direct_greaters(val_t self) {
509 struct trace_t trace = {NULL, NULL, 206, LOCATE_partial_order___PartialOrderElement___direct_greaters};
510 trace.prev = tracehead; tracehead = &trace;
511 trace.file = LOCATE_partial_order;
512 tracehead = trace.prev;
513 return ATTR_partial_order___PartialOrderElement____direct_greaters( self) /*PartialOrderElement::_direct_greaters*/;
514 }
515 val_t partial_order___PartialOrderElement___direct_smallers(val_t self) {
516 struct trace_t trace = {NULL, NULL, 209, LOCATE_partial_order___PartialOrderElement___direct_smallers};
517 trace.prev = tracehead; tracehead = &trace;
518 trace.file = LOCATE_partial_order;
519 tracehead = trace.prev;
520 return ATTR_partial_order___PartialOrderElement____direct_smallers( self) /*PartialOrderElement::_direct_smallers*/;
521 }
522 val_t partial_order___PartialOrderElement___greaters(val_t self) {
523 struct trace_t trace = {NULL, NULL, 212, LOCATE_partial_order___PartialOrderElement___greaters};
524 trace.prev = tracehead; tracehead = &trace;
525 trace.file = LOCATE_partial_order;
526 tracehead = trace.prev;
527 return ATTR_partial_order___PartialOrderElement____greaters( self) /*PartialOrderElement::_greaters*/;
528 }
529 val_t partial_order___PartialOrderElement___greaters_and_self(val_t self) {
530 struct trace_t trace = {NULL, NULL, 218, LOCATE_partial_order___PartialOrderElement___greaters_and_self};
531 val_t variable0;
532 val_t variable1;
533 trace.prev = tracehead; tracehead = &trace;
534 trace.file = LOCATE_partial_order;
535 variable0 = ATTR_partial_order___PartialOrderElement____greaters_and_self_cache( self) /*PartialOrderElement::_greaters_and_self_cache*/;
536 variable0 = TAG_Bool((variable0 == NIT_NULL /*null*/) || ((variable0 != NIT_NULL) && UNTAG_Bool(((array___AbstractArray_____eqeq_t)CALL(variable0,COLOR_kernel___Object_____eqeq))(variable0, NIT_NULL /*null*/) /*AbstractArray::==*/)));
537 if (UNTAG_Bool(variable0)) { /*if*/
538 variable0 = ATTR_partial_order___PartialOrderElement____greaters( self) /*PartialOrderElement::_greaters*/;
539 variable0 = ((array___Collection___to_a_t)CALL(variable0,COLOR_array___Collection___to_a))(variable0) /*Collection::to_a*/;
540 ATTR_partial_order___PartialOrderElement____greaters_and_self_cache( self) /*PartialOrderElement::_greaters_and_self_cache*/ = variable0;
541 variable0 = ATTR_partial_order___PartialOrderElement____greaters_and_self_cache( self) /*PartialOrderElement::_greaters_and_self_cache*/;
542 variable1 = ATTR_partial_order___PartialOrderElement____value( self) /*PartialOrderElement::_value*/;
543 ((array___AbstractArray___add_t)CALL(variable0,COLOR_abstract_collection___SimpleCollection___add))(variable0, variable1) /*AbstractArray::add*/;
544 }
545 variable0 = ATTR_partial_order___PartialOrderElement____greaters_and_self_cache( self) /*PartialOrderElement::_greaters_and_self_cache*/;
546 goto return_label25;
547 return_label25: while(false);
548 tracehead = trace.prev;
549 return variable0;
550 }
551 val_t partial_order___PartialOrderElement___smallers(val_t self) {
552 struct trace_t trace = {NULL, NULL, 234, LOCATE_partial_order___PartialOrderElement___smallers};
553 val_t variable0;
554 val_t variable1;
555 trace.prev = tracehead; tracehead = &trace;
556 trace.file = LOCATE_partial_order;
557 variable0 = ATTR_partial_order___PartialOrderElement____smallers_last_length( self) /*PartialOrderElement::_smallers_last_length*/;
558 variable1 = ATTR_partial_order___PartialOrderElement____order( self) /*PartialOrderElement::_order*/;
559 variable1 = ((partial_order___PartialOrder___length_t)CALL(variable1,COLOR_abstract_collection___Collection___length))(variable1) /*PartialOrder::length*/;
560 variable0 = TAG_Bool(UNTAG_Int(variable0)<UNTAG_Int(variable1));
561 if (UNTAG_Bool(variable0)) { /*if*/
562 variable0 = ATTR_partial_order___PartialOrderElement____order( self) /*PartialOrderElement::_order*/;
563 variable1 = ATTR_partial_order___PartialOrderElement____smallers_cache( self) /*PartialOrderElement::_smallers_cache*/;
564 ((partial_order___PartialOrder___compute_smallers_for_t)CALL(variable0,COLOR_partial_order___PartialOrder___compute_smallers_for))(variable0, self, variable1) /*PartialOrder::compute_smallers_for*/;
565 variable0 = ATTR_partial_order___PartialOrderElement____order( self) /*PartialOrderElement::_order*/;
566 variable0 = ((partial_order___PartialOrder___length_t)CALL(variable0,COLOR_abstract_collection___Collection___length))(variable0) /*PartialOrder::length*/;
567 ATTR_partial_order___PartialOrderElement____smallers_last_length( self) /*PartialOrderElement::_smallers_last_length*/ = variable0;
568 }
569 variable0 = ATTR_partial_order___PartialOrderElement____smallers_cache( self) /*PartialOrderElement::_smallers_cache*/;
570 goto return_label26;
571 return_label26: while(false);
572 tracehead = trace.prev;
573 return variable0;
574 }
575 val_t partial_order___PartialOrderElement___linear_extension(val_t self) {
576 struct trace_t trace = {NULL, NULL, 247, LOCATE_partial_order___PartialOrderElement___linear_extension};
577 val_t variable0;
578 val_t variable1;
579 val_t variable2;
580 val_t variable3;
581 val_t variable4;
582 val_t variable5;
583 val_t variable6;
584 val_t variable7;
585 trace.prev = tracehead; tracehead = &trace;
586 trace.file = LOCATE_partial_order;
587 variable0 = ATTR_partial_order___PartialOrderElement____linear_extension_cache( self) /*PartialOrderElement::_linear_extension_cache*/;
588 variable0 = TAG_Bool((variable0 == NIT_NULL /*null*/) || ((variable0 != NIT_NULL) && UNTAG_Bool(((array___AbstractArray_____eqeq_t)CALL(variable0,COLOR_kernel___Object_____eqeq))(variable0, NIT_NULL /*null*/) /*AbstractArray::==*/)));
589 if (UNTAG_Bool(variable0)) { /*if*/
590 variable1 = NEW_array___Array___init(); /*new Array[E]*/
591 variable0 = variable1;
592 variable2 = NEW_array___Array___init(); /*new Array[E]*/
593 variable1 = variable2;
594 variable2 = ((partial_order___PartialOrderElement___value_t)CALL( self,COLOR_partial_order___PartialOrderElement___value))( self) /*PartialOrderElement::value*/;
595 ((array___AbstractArray___add_t)CALL( variable0 /*res*/,COLOR_abstract_collection___SimpleCollection___add))( variable0 /*res*/, variable2) /*AbstractArray::add*/;
596 variable2 = ((partial_order___PartialOrderElement___direct_greaters_t)CALL( self,COLOR_partial_order___PartialOrderElement___direct_greaters))( self) /*PartialOrderElement::direct_greaters*/;
597 variable2 = ((array___AbstractArray___iterator_t)CALL(variable2,COLOR_abstract_collection___Collection___iterator))(variable2) /*AbstractArray::iterator*/;
598 while (true) { /*for*/
599 variable3 = ((array___ArrayIterator___is_ok_t)CALL(variable2,COLOR_abstract_collection___Iterator___is_ok))(variable2) /*ArrayIterator::is_ok*/;
600 if (!UNTAG_Bool(variable3)) break; /*for*/
601 variable3 = ((array___ArrayIterator___item_t)CALL(variable2,COLOR_abstract_collection___Iterator___item))(variable2) /*ArrayIterator::item*/;
602 variable5 = ((partial_order___PartialOrderElement___order_t)CALL( self,COLOR_partial_order___PartialOrderElement___order))( self) /*PartialOrderElement::order*/;
603 variable5 = ((partial_order___PartialOrder_____bra_t)CALL(variable5,COLOR_partial_order___PartialOrder_____bra))(variable5, variable3 /*s*/) /*PartialOrder::[]*/;
604 variable5 = ((partial_order___PartialOrderElement___linear_extension_t)CALL(variable5,COLOR_partial_order___PartialOrderElement___linear_extension))(variable5) /*PartialOrderElement::linear_extension*/;
605 variable4 = variable5;
606 ((array___AbstractArray___clear_t)CALL( variable1 /*res2*/,COLOR_abstract_collection___RemovableCollection___clear))( variable1 /*res2*/) /*AbstractArray::clear*/;
607 variable5 = ((array___AbstractArray___iterator_t)CALL( variable0 /*res*/,COLOR_abstract_collection___Collection___iterator))( variable0 /*res*/) /*AbstractArray::iterator*/;
608 while (true) { /*for*/
609 variable6 = ((array___ArrayIterator___is_ok_t)CALL(variable5,COLOR_abstract_collection___Iterator___is_ok))(variable5) /*ArrayIterator::is_ok*/;
610 if (!UNTAG_Bool(variable6)) break; /*for*/
611 variable6 = ((array___ArrayIterator___item_t)CALL(variable5,COLOR_abstract_collection___Iterator___item))(variable5) /*ArrayIterator::item*/;
612 variable7 = ((array___AbstractArray___has_t)CALL( variable4 /*sl*/,COLOR_abstract_collection___Collection___has))( variable4 /*sl*/, variable6 /*e*/) /*AbstractArray::has*/;
613 if (UNTAG_Bool( TAG_Bool(!UNTAG_Bool(variable7)))) { /*if*/
614 ((array___AbstractArray___add_t)CALL( variable1 /*res2*/,COLOR_abstract_collection___SimpleCollection___add))( variable1 /*res2*/, variable6 /*e*/) /*AbstractArray::add*/;
615 }
616 continue_29: while(0);
617 ((array___ArrayIterator___next_t)CALL(variable5,COLOR_abstract_collection___Iterator___next))(variable5) /*ArrayIterator::next*/;
618 }
619 break_29: while(0);
620 ((abstract_collection___IndexedCollection___append_t)CALL( variable1 /*res2*/,COLOR_abstract_collection___IndexedCollection___append))( variable1 /*res2*/, variable4 /*sl*/) /*IndexedCollection::append*/;
621 variable5 = variable0 /*res*/;
622 variable0 = variable1 /*res2*/ /*res=*/;
623 variable1 = variable5 /*tmp*/ /*res2=*/;
624 continue_28: while(0);
625 ((array___ArrayIterator___next_t)CALL(variable2,COLOR_abstract_collection___Iterator___next))(variable2) /*ArrayIterator::next*/;
626 }
627 break_28: while(0);
628 ATTR_partial_order___PartialOrderElement____linear_extension_cache( self) /*PartialOrderElement::_linear_extension_cache*/ = variable0 /*res*/;
629 }
630 variable0 = ATTR_partial_order___PartialOrderElement____linear_extension_cache( self) /*PartialOrderElement::_linear_extension_cache*/;
631 goto return_label27;
632 return_label27: while(false);
633 tracehead = trace.prev;
634 return variable0;
635 }
636 val_t partial_order___PartialOrderElement___reverse_linear_extension(val_t self) {
637 struct trace_t trace = {NULL, NULL, 275, LOCATE_partial_order___PartialOrderElement___reverse_linear_extension};
638 val_t variable0;
639 val_t variable1;
640 val_t variable2;
641 val_t variable3;
642 val_t variable4;
643 trace.prev = tracehead; tracehead = &trace;
644 trace.file = LOCATE_partial_order;
645 variable0 = ATTR_partial_order___PartialOrderElement____reverse_linear_extension_cache( self) /*PartialOrderElement::_reverse_linear_extension_cache*/;
646 variable0 = TAG_Bool((variable0 == NIT_NULL /*null*/) || ((variable0 != NIT_NULL) && UNTAG_Bool(((array___AbstractArray_____eqeq_t)CALL(variable0,COLOR_kernel___Object_____eqeq))(variable0, NIT_NULL /*null*/) /*AbstractArray::==*/)));
647 if (UNTAG_Bool(variable0)) { /*if*/
648 variable1 = NEW_hash___HashSet___init(); /*new HashSet[E]*/
649 variable0 = variable1;
650 variable1 = ((partial_order___PartialOrderElement___direct_greaters_t)CALL( self,COLOR_partial_order___PartialOrderElement___direct_greaters))( self) /*PartialOrderElement::direct_greaters*/;
651 variable1 = ((array___AbstractArray___iterator_t)CALL(variable1,COLOR_abstract_collection___Collection___iterator))(variable1) /*AbstractArray::iterator*/;
652 while (true) { /*for*/
653 variable2 = ((array___ArrayIterator___is_ok_t)CALL(variable1,COLOR_abstract_collection___Iterator___is_ok))(variable1) /*ArrayIterator::is_ok*/;
654 if (!UNTAG_Bool(variable2)) break; /*for*/
655 variable2 = ((array___ArrayIterator___item_t)CALL(variable1,COLOR_abstract_collection___Iterator___item))(variable1) /*ArrayIterator::item*/;
656 variable4 = ((partial_order___PartialOrderElement___order_t)CALL( self,COLOR_partial_order___PartialOrderElement___order))( self) /*PartialOrderElement::order*/;
657 variable4 = ((partial_order___PartialOrder_____bra_t)CALL(variable4,COLOR_partial_order___PartialOrder_____bra))(variable4, variable2 /*s*/) /*PartialOrder::[]*/;
658 variable4 = ((partial_order___PartialOrderElement___linear_extension_t)CALL(variable4,COLOR_partial_order___PartialOrderElement___linear_extension))(variable4) /*PartialOrderElement::linear_extension*/;
659 variable3 = variable4;
660 ((abstract_collection___SimpleCollection___add_all_t)CALL( variable0 /*res*/,COLOR_abstract_collection___SimpleCollection___add_all))( variable0 /*res*/, variable3 /*sl*/) /*SimpleCollection::add_all*/;
661 continue_31: while(0);
662 ((array___ArrayIterator___next_t)CALL(variable1,COLOR_abstract_collection___Iterator___next))(variable1) /*ArrayIterator::next*/;
663 }
664 break_31: while(0);
665 variable1 = ((partial_order___PartialOrderElement___value_t)CALL( self,COLOR_partial_order___PartialOrderElement___value))( self) /*PartialOrderElement::value*/;
666 ((hash___HashSet___add_t)CALL( variable0 /*res*/,COLOR_abstract_collection___SimpleCollection___add))( variable0 /*res*/, variable1) /*HashSet::add*/;
667 variable1 = ((array___Collection___to_a_t)CALL( variable0 /*res*/,COLOR_array___Collection___to_a))( variable0 /*res*/) /*Collection::to_a*/;
668 ATTR_partial_order___PartialOrderElement____linear_extension_cache( self) /*PartialOrderElement::_linear_extension_cache*/ = variable1;
669 }
670 variable0 = ATTR_partial_order___PartialOrderElement____linear_extension_cache( self) /*PartialOrderElement::_linear_extension_cache*/;
671 goto return_label30;
672 return_label30: while(false);
673 tracehead = trace.prev;
674 return variable0;
675 }
676 val_t partial_order___PartialOrderElement_____l(val_t self, val_t param0) {
677 struct trace_t trace = {NULL, NULL, 291, LOCATE_partial_order___PartialOrderElement_____l};
678 val_t variable0;
679 val_t variable1;
680 trace.prev = tracehead; tracehead = &trace;
681 trace.file = LOCATE_partial_order;
682 variable0 = param0;
683 variable1 = ATTR_partial_order___PartialOrderElement____greaters( self) /*PartialOrderElement::_greaters*/;
684 variable1 = ((abstract_collection___Collection___has_t)CALL(variable1,COLOR_abstract_collection___Collection___has))(variable1, variable0 /*o*/) /*Collection::has*/;
685 goto return_label32;
686 return_label32: while(false);
687 tracehead = trace.prev;
688 return variable1;
689 }
690 val_t partial_order___PartialOrderElement_____leq(val_t self, val_t param0) {
691 struct trace_t trace = {NULL, NULL, 297, LOCATE_partial_order___PartialOrderElement_____leq};
692 val_t variable0;
693 val_t variable1;
694 val_t variable2;
695 trace.prev = tracehead; tracehead = &trace;
696 trace.file = LOCATE_partial_order;
697 variable0 = param0;
698 variable1 = ATTR_partial_order___PartialOrderElement____value( self) /*PartialOrderElement::_value*/;
699 variable1 = TAG_Bool((variable1 == variable0 /*o*/) || ((variable1 != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL(variable1,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable1, variable0 /*o*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable1,COLOR_kernel___Object_____eqeq))(variable1, variable0 /*o*/) /*Object::==*/)))));
700 variable2 = variable1;
701 if (!UNTAG_Bool(variable2)) { /* or */
702 variable2 = ATTR_partial_order___PartialOrderElement____greaters( self) /*PartialOrderElement::_greaters*/;
703 variable2 = ((abstract_collection___Collection___has_t)CALL(variable2,COLOR_abstract_collection___Collection___has))(variable2, variable0 /*o*/) /*Collection::has*/;
704 }
705 variable1 = variable2;
706 goto return_label33;
707 return_label33: while(false);
708 tracehead = trace.prev;
709 return variable1;
710 }
711 val_t partial_order___PartialOrderElement_____g(val_t self, val_t param0) {
712 struct trace_t trace = {NULL, NULL, 303, LOCATE_partial_order___PartialOrderElement_____g};
713 val_t variable0;
714 val_t variable1;
715 val_t variable2;
716 trace.prev = tracehead; tracehead = &trace;
717 trace.file = LOCATE_partial_order;
718 variable0 = param0;
719 variable1 = ATTR_partial_order___PartialOrderElement____order( self) /*PartialOrderElement::_order*/;
720 variable1 = ((partial_order___PartialOrder_____bra_t)CALL(variable1,COLOR_partial_order___PartialOrder_____bra))(variable1, variable0 /*o*/) /*PartialOrder::[]*/;
721 variable2 = ATTR_partial_order___PartialOrderElement____value( self) /*PartialOrderElement::_value*/;
722 variable1 = ((partial_order___PartialOrderElement_____l_t)CALL(variable1,COLOR_partial_order___PartialOrderElement_____l))(variable1, variable2) /*PartialOrderElement::<*/;
723 goto return_label34;
724 return_label34: while(false);
725 tracehead = trace.prev;
726 return variable1;
727 }
728 val_t partial_order___PartialOrderElement_____geq(val_t self, val_t param0) {
729 struct trace_t trace = {NULL, NULL, 309, LOCATE_partial_order___PartialOrderElement_____geq};
730 val_t variable0;
731 val_t variable1;
732 val_t variable2;
733 val_t variable3;
734 trace.prev = tracehead; tracehead = &trace;
735 trace.file = LOCATE_partial_order;
736 variable0 = param0;
737 variable1 = ATTR_partial_order___PartialOrderElement____value( self) /*PartialOrderElement::_value*/;
738 variable1 = TAG_Bool((variable1 == variable0 /*o*/) || ((variable1 != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL(variable1,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable1, variable0 /*o*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable1,COLOR_kernel___Object_____eqeq))(variable1, variable0 /*o*/) /*Object::==*/)))));
739 variable2 = variable1;
740 if (!UNTAG_Bool(variable2)) { /* or */
741 variable2 = ATTR_partial_order___PartialOrderElement____order( self) /*PartialOrderElement::_order*/;
742 variable2 = ((partial_order___PartialOrder_____bra_t)CALL(variable2,COLOR_partial_order___PartialOrder_____bra))(variable2, variable0 /*o*/) /*PartialOrder::[]*/;
743 variable3 = ATTR_partial_order___PartialOrderElement____value( self) /*PartialOrderElement::_value*/;
744 variable2 = ((partial_order___PartialOrderElement_____l_t)CALL(variable2,COLOR_partial_order___PartialOrderElement_____l))(variable2, variable3) /*PartialOrderElement::<*/;
745 }
746 variable1 = variable2;
747 goto return_label35;
748 return_label35: while(false);
749 tracehead = trace.prev;
750 return variable1;
751 }
752 void partial_order___PartialOrderElement___register_direct_smallers(val_t self, val_t param0) {
753 struct trace_t trace = {NULL, NULL, 315, LOCATE_partial_order___PartialOrderElement___register_direct_smallers};
754 val_t variable0;
755 val_t variable1;
756 trace.prev = tracehead; tracehead = &trace;
757 trace.file = LOCATE_partial_order;
758 variable0 = param0;
759 variable1 = ATTR_partial_order___PartialOrderElement____direct_smallers( self) /*PartialOrderElement::_direct_smallers*/;
760 ((array___AbstractArray___add_t)CALL(variable1,COLOR_abstract_collection___SimpleCollection___add))(variable1, variable0 /*e*/) /*AbstractArray::add*/;
761 tracehead = trace.prev;
762 return;
763 }
764 void partial_order___PartialOrderElement___init(val_t self, val_t param0, val_t param1, val_t param2, int* init_table) {
765 struct trace_t trace = {NULL, NULL, 320, LOCATE_partial_order___PartialOrderElement___init};
766 val_t variable0;
767 val_t variable1;
768 val_t variable2;
769 val_t variable3;
770 val_t variable4;
771 val_t variable5;
772 val_t variable6;
773 val_t variable7;
774 val_t variable8;
775 val_t variable9;
776 trace.prev = tracehead; tracehead = &trace;
777 trace.file = LOCATE_partial_order;
778 variable0 = param0;
779 variable1 = param1;
780 variable2 = param2;
781 if (init_table[VAL2OBJ( self)->vft[INIT_TABLE_POS_PartialOrderElement].i]) return;
782 ATTR_partial_order___PartialOrderElement____order( self) /*PartialOrderElement::_order*/ = variable0 /*o*/;
783 ATTR_partial_order___PartialOrderElement____value( self) /*PartialOrderElement::_value*/ = variable1 /*e*/;
784 ATTR_partial_order___PartialOrderElement____direct_greaters( self) /*PartialOrderElement::_direct_greaters*/ = variable2 /*directs*/;
785 variable3 = NEW_array___Array___init(); /*new Array[E]*/
786 ATTR_partial_order___PartialOrderElement____direct_smallers( self) /*PartialOrderElement::_direct_smallers*/ = variable3;
787 variable3 = NEW_hash___HashSet___init(); /*new HashSet[E]*/
788 ATTR_partial_order___PartialOrderElement____greaters( self) /*PartialOrderElement::_greaters*/ = variable3;
789 variable3 = NEW_hash___HashSet___init(); /*new HashSet[E]*/
790 ATTR_partial_order___PartialOrderElement____smallers_cache( self) /*PartialOrderElement::_smallers_cache*/ = variable3;
791 variable4 = ATTR_partial_order___PartialOrderElement____greaters( self) /*PartialOrderElement::_greaters*/;
792 variable3 = variable4;
793 variable4 = TAG_Int(0);
794 variable5 = ((array___AbstractArray___iterator_t)CALL( variable2 /*directs*/,COLOR_abstract_collection___Collection___iterator))( variable2 /*directs*/) /*AbstractArray::iterator*/;
795 while (true) { /*for*/
796 variable6 = ((array___ArrayIterator___is_ok_t)CALL(variable5,COLOR_abstract_collection___Iterator___is_ok))(variable5) /*ArrayIterator::is_ok*/;
797 if (!UNTAG_Bool(variable6)) break; /*for*/
798 variable6 = ((array___ArrayIterator___item_t)CALL(variable5,COLOR_abstract_collection___Iterator___item))(variable5) /*ArrayIterator::item*/;
799 ((abstract_collection___SimpleCollection___add_t)CALL( variable3 /*g*/,COLOR_abstract_collection___SimpleCollection___add))( variable3 /*g*/, variable6 /*ee*/) /*SimpleCollection::add*/;
800 variable8 = ATTR_partial_order___PartialOrderElement____order( self) /*PartialOrderElement::_order*/;
801 variable8 = ((partial_order___PartialOrder_____bra_t)CALL(variable8,COLOR_partial_order___PartialOrder_____bra))(variable8, variable6 /*ee*/) /*PartialOrder::[]*/;
802 variable7 = variable8;
803 variable8 = ((partial_order___PartialOrderElement___rank_t)CALL( variable7 /*poee*/,COLOR_partial_order___PartialOrderElement___rank))( variable7 /*poee*/) /*PartialOrderElement::rank*/;
804 variable8 = TAG_Bool(UNTAG_Int(variable8)>=UNTAG_Int( variable4 /*r*/));
805 if (UNTAG_Bool(variable8)) { /*if*/
806 variable8 = ((partial_order___PartialOrderElement___rank_t)CALL( variable7 /*poee*/,COLOR_partial_order___PartialOrderElement___rank))( variable7 /*poee*/) /*PartialOrderElement::rank*/;
807 variable8 = TAG_Int(UNTAG_Int(variable8)+UNTAG_Int( TAG_Int(1)));
808 variable4 = variable8 /*r=*/;
809 }
810 ((partial_order___PartialOrderElement___register_direct_smallers_t)CALL( variable7 /*poee*/,COLOR_partial_order___PartialOrderElement___register_direct_smallers))( variable7 /*poee*/, variable1 /*e*/) /*PartialOrderElement::register_direct_smallers*/;
811 variable8 = ((partial_order___PartialOrderElement___greaters_t)CALL( variable7 /*poee*/,COLOR_partial_order___PartialOrderElement___greaters))( variable7 /*poee*/) /*PartialOrderElement::greaters*/;
812 variable8 = ((abstract_collection___Collection___iterator_t)CALL(variable8,COLOR_abstract_collection___Collection___iterator))(variable8) /*Collection::iterator*/;
813 while (true) { /*for*/
814 variable9 = ((abstract_collection___Iterator___is_ok_t)CALL(variable8,COLOR_abstract_collection___Iterator___is_ok))(variable8) /*Iterator::is_ok*/;
815 if (!UNTAG_Bool(variable9)) break; /*for*/
816 variable9 = ((abstract_collection___Iterator___item_t)CALL(variable8,COLOR_abstract_collection___Iterator___item))(variable8) /*Iterator::item*/;
817 ((abstract_collection___SimpleCollection___add_t)CALL( variable3 /*g*/,COLOR_abstract_collection___SimpleCollection___add))( variable3 /*g*/, variable9 /*eee*/) /*SimpleCollection::add*/;
818 continue_39: while(0);
819 ((abstract_collection___Iterator___next_t)CALL(variable8,COLOR_abstract_collection___Iterator___next))(variable8) /*Iterator::next*/;
820 }
821 break_39: while(0);
822 continue_38: while(0);
823 ((array___ArrayIterator___next_t)CALL(variable5,COLOR_abstract_collection___Iterator___next))(variable5) /*ArrayIterator::next*/;
824 }
825 break_38: while(0);
826 ATTR_partial_order___PartialOrderElement____rank( self) /*PartialOrderElement::_rank*/ = variable4 /*r*/;
827 init_table[VAL2OBJ( self)->vft[INIT_TABLE_POS_PartialOrderElement].i] = 1;
828 tracehead = trace.prev;
829 return;
830 }