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*/;
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
};
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*/;
18 return_label0
: while(false);
19 tracehead
= trace
.prev
;
22 val_t
partial_order___PartialOrder___length(val_t self
) {
23 struct trace_t trace
= {NULL
, NULL
, 37, LOCATE_partial_order___PartialOrder___length
};
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*/;
30 return_label1
: while(false);
31 tracehead
= trace
.prev
;
34 val_t
partial_order___PartialOrder___first(val_t self
) {
35 struct trace_t trace
= {NULL
, NULL
, 39, LOCATE_partial_order___PartialOrder___first
};
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*/;
42 return_label2
: while(false);
43 tracehead
= trace
.prev
;
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
};
50 trace
.prev
= tracehead
; tracehead
= &trace
;
51 trace
.file
= LOCATE_partial_order
;
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*/;
56 return_label3
: while(false);
57 tracehead
= trace
.prev
;
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
};
65 trace
.prev
= tracehead
; tracehead
= &trace
;
66 trace
.file
= LOCATE_partial_order
;
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::==*/)))));
77 variable1
= variable2
;
79 return_label4
: while(false);
80 tracehead
= trace
.prev
;
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
};
87 trace
.prev
= tracehead
; tracehead
= &trace
;
88 trace
.file
= LOCATE_partial_order
;
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);
95 variable1
= TAG_Int(0);
98 return_label5
: while(false);
99 tracehead
= trace
.prev
;
102 val_t
partial_order___PartialOrder___iterator(val_t self
) {
103 struct trace_t trace
= {NULL
, NULL
, 54, LOCATE_partial_order___PartialOrder___iterator
};
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*/;
110 return_label6
: while(false);
111 tracehead
= trace
.prev
;
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
};
118 trace
.prev
= tracehead
; tracehead
= &trace
;
119 trace
.file
= LOCATE_partial_order
;
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::[]*/;
128 variable1
= NIT_NULL
/*null*/;
131 return_label7
: while(false);
132 tracehead
= trace
.prev
;
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
};
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*/;
171 continue_9
: while(0);
172 ((abstract_collection___Iterator___next_t
)CALL(variable1
,COLOR_abstract_collection___Iterator___next
))(variable1
) /*Iterator::next*/;
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*/;
179 return_label8
: while(false);
180 tracehead
= trace
.prev
;
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
};
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*/
190 return_label11
: while(false);
191 tracehead
= trace
.prev
;
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
};
203 trace
.prev
= tracehead
; tracehead
= &trace
;
204 trace
.file
= LOCATE_partial_order
;
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*/;
217 return_label12
: while(false);
218 tracehead
= trace
.prev
;
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
};
234 trace
.prev
= tracehead
; tracehead
= &trace
;
235 trace
.file
= LOCATE_partial_order
;
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*/;
255 return_label13
: while(false);
256 tracehead
= trace
.prev
;
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
};
268 trace
.prev
= tracehead
; tracehead
= &trace
;
269 trace
.file
= LOCATE_partial_order
;
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]*/
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=*/;
298 continue_15
: while(0);
299 ((abstract_collection___Iterator___next_t
)CALL(variable3
,COLOR_abstract_collection___Iterator___next
))(variable3
) /*Iterator::next*/;
302 variable1
= variable1
/*res*/;
304 return_label14
: while(false);
305 tracehead
= trace
.prev
;
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
};
316 trace
.prev
= tracehead
; tracehead
= &trace
;
317 trace
.file
= LOCATE_partial_order
;
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*/;
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*/;
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*/;
347 variable2
= variable3
/*poe*/;
349 return_label16
: while(false);
350 tracehead
= trace
.prev
;
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
};
359 trace
.prev
= tracehead
; tracehead
= &trace
;
360 trace
.file
= LOCATE_partial_order
;
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);
372 continue_18
: while(0);
373 ((abstract_collection___Iterator___next_t
)CALL(variable1
,COLOR_abstract_collection___Iterator___next
))(variable1
) /*Iterator::next*/;
376 variable1
= TAG_Bool(true);
378 return_label17
: while(false);
379 tracehead
= trace
.prev
;
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
};
387 trace
.prev
= tracehead
; tracehead
= &trace
;
388 trace
.file
= LOCATE_partial_order
;
391 variable2
= NEW_partial_order___PartialOrderElement___init( self
, variable0
/*e*/, variable1
/*directs*/); /*new PartialOrderElement[E]*/
393 return_label19
: while(false);
394 tracehead
= trace
.prev
;
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
};
406 trace
.prev
= tracehead
; tracehead
= &trace
;
407 trace
.file
= LOCATE_partial_order
;
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);
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*/;
428 continue_21
: while(0);
429 ((array___ArrayIterator___next_t
)CALL(variable4
,COLOR_abstract_collection___Iterator___next
))(variable4
) /*ArrayIterator::next*/;
432 ((array___AbstractArray___add_t
)CALL( variable2
/*to*/,COLOR_abstract_collection___SimpleCollection___add
))( variable2
/*to*/, variable0
/*e*/) /*AbstractArray::add*/;
433 variable3
= TAG_Bool(true);
435 return_label20
: while(false);
436 tracehead
= trace
.prev
;
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
};
447 trace
.prev
= tracehead
; tracehead
= &trace
;
448 trace
.file
= LOCATE_partial_order
;
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*/;
464 continue_23
: while(0);
465 ((abstract_collection___Iterator___next_t
)CALL(variable3
,COLOR_abstract_collection___Iterator___next
))(variable3
) /*Iterator::next*/;
468 tracehead
= trace
.prev
;
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
};
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
;
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*/;
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*/;
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*/;
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*/;
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*/;
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*/;
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
};
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*/;
545 variable0
= ATTR_partial_order___PartialOrderElement____greaters_and_self_cache( self
) /*PartialOrderElement::_greaters_and_self_cache*/;
547 return_label25
: while(false);
548 tracehead
= trace
.prev
;
551 val_t
partial_order___PartialOrderElement___smallers(val_t self
) {
552 struct trace_t trace
= {NULL
, NULL
, 234, LOCATE_partial_order___PartialOrderElement___smallers
};
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
;
569 variable0
= ATTR_partial_order___PartialOrderElement____smallers_cache( self
) /*PartialOrderElement::_smallers_cache*/;
571 return_label26
: while(false);
572 tracehead
= trace
.prev
;
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
};
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*/;
616 continue_29
: while(0);
617 ((array___ArrayIterator___next_t
)CALL(variable5
,COLOR_abstract_collection___Iterator___next
))(variable5
) /*ArrayIterator::next*/;
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*/;
628 ATTR_partial_order___PartialOrderElement____linear_extension_cache( self
) /*PartialOrderElement::_linear_extension_cache*/ = variable0
/*res*/;
630 variable0
= ATTR_partial_order___PartialOrderElement____linear_extension_cache( self
) /*PartialOrderElement::_linear_extension_cache*/;
632 return_label27
: while(false);
633 tracehead
= trace
.prev
;
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
};
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*/;
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
;
670 variable0
= ATTR_partial_order___PartialOrderElement____linear_extension_cache( self
) /*PartialOrderElement::_linear_extension_cache*/;
672 return_label30
: while(false);
673 tracehead
= trace
.prev
;
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
};
680 trace
.prev
= tracehead
; tracehead
= &trace
;
681 trace
.file
= LOCATE_partial_order
;
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*/;
686 return_label32
: while(false);
687 tracehead
= trace
.prev
;
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
};
695 trace
.prev
= tracehead
; tracehead
= &trace
;
696 trace
.file
= LOCATE_partial_order
;
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*/;
705 variable1
= variable2
;
707 return_label33
: while(false);
708 tracehead
= trace
.prev
;
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
};
716 trace
.prev
= tracehead
; tracehead
= &trace
;
717 trace
.file
= LOCATE_partial_order
;
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::<*/;
724 return_label34
: while(false);
725 tracehead
= trace
.prev
;
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
};
734 trace
.prev
= tracehead
; tracehead
= &trace
;
735 trace
.file
= LOCATE_partial_order
;
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::<*/;
746 variable1
= variable2
;
748 return_label35
: while(false);
749 tracehead
= trace
.prev
;
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
};
756 trace
.prev
= tracehead
; tracehead
= &trace
;
757 trace
.file
= LOCATE_partial_order
;
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
;
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
};
776 trace
.prev
= tracehead
; tracehead
= &trace
;
777 trace
.file
= LOCATE_partial_order
;
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=*/;
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*/;
822 continue_38
: while(0);
823 ((array___ArrayIterator___next_t
)CALL(variable5
,COLOR_abstract_collection___Iterator___next
))(variable5
) /*ArrayIterator::next*/;
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
;