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