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*/;
9 val_t
partial_order___PartialOrder___is_empty(val_t self
) {
10 struct trace_t trace
= {NULL
, LOCATE_partial_order___PartialOrder___is_empty
, 35};
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*/;
16 return_label0
: while(false);
17 tracehead
= trace
.prev
;
20 val_t
partial_order___PartialOrder___length(val_t self
) {
21 struct trace_t trace
= {NULL
, LOCATE_partial_order___PartialOrder___length
, 37};
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*/;
27 return_label1
: while(false);
28 tracehead
= trace
.prev
;
31 val_t
partial_order___PartialOrder___first(val_t self
) {
32 struct trace_t trace
= {NULL
, LOCATE_partial_order___PartialOrder___first
, 39};
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*/;
38 return_label2
: while(false);
39 tracehead
= trace
.prev
;
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};
46 trace
.prev
= tracehead
; tracehead
= &trace
;
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*/;
51 return_label3
: while(false);
52 tracehead
= trace
.prev
;
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};
60 trace
.prev
= tracehead
; tracehead
= &trace
;
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::==*/)))));
71 variable1
= variable2
;
73 return_label4
: while(false);
74 tracehead
= trace
.prev
;
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};
81 trace
.prev
= tracehead
; tracehead
= &trace
;
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);
88 variable1
= TAG_Int(0);
91 return_label5
: while(false);
92 tracehead
= trace
.prev
;
95 val_t
partial_order___PartialOrder___iterator(val_t self
) {
96 struct trace_t trace
= {NULL
, LOCATE_partial_order___PartialOrder___iterator
, 54};
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*/;
102 return_label6
: while(false);
103 tracehead
= trace
.prev
;
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};
110 trace
.prev
= tracehead
; tracehead
= &trace
;
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::[]*/;
119 variable1
= NIT_NULL
/*null*/;
122 return_label7
: while(false);
123 tracehead
= trace
.prev
;
126 val_t
partial_order___PartialOrder___to_dot(val_t self
) {
127 struct trace_t trace
= {NULL
, LOCATE_partial_order___PartialOrder___to_dot
, 68};
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*/;
161 continue_9
: while(0);
162 ((abstract_collection___Iterator___next_t
)CALL(variable1
,COLOR_abstract_collection___Iterator___next
))(variable1
) /*MapIterator::next*/;
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*/;
169 return_label8
: while(false);
170 tracehead
= trace
.prev
;
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};
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*/
179 return_label11
: while(false);
180 tracehead
= trace
.prev
;
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};
192 trace
.prev
= tracehead
; tracehead
= &trace
;
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*/;
205 return_label12
: while(false);
206 tracehead
= trace
.prev
;
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};
222 trace
.prev
= tracehead
; tracehead
= &trace
;
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*/;
242 return_label13
: while(false);
243 tracehead
= trace
.prev
;
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};
255 trace
.prev
= tracehead
; tracehead
= &trace
;
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]*/
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=*/;
284 continue_15
: while(0);
285 ((abstract_collection___Iterator___next_t
)CALL(variable3
,COLOR_abstract_collection___Iterator___next
))(variable3
) /*Iterator::next*/;
288 variable1
= variable1
/*res*/;
290 return_label14
: while(false);
291 tracehead
= trace
.prev
;
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};
302 trace
.prev
= tracehead
; tracehead
= &trace
;
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*/;
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*/;
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*/;
332 variable2
= variable3
/*poe*/;
334 return_label16
: while(false);
335 tracehead
= trace
.prev
;
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};
344 trace
.prev
= tracehead
; tracehead
= &trace
;
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);
356 continue_18
: while(0);
357 ((abstract_collection___Iterator___next_t
)CALL(variable1
,COLOR_abstract_collection___Iterator___next
))(variable1
) /*Iterator::next*/;
360 variable1
= TAG_Bool(true);
362 return_label17
: while(false);
363 tracehead
= trace
.prev
;
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};
371 trace
.prev
= tracehead
; tracehead
= &trace
;
374 variable2
= NEW_partial_order___PartialOrderElement___init( self
, variable0
/*e*/, variable1
/*directs*/); /*new PartialOrderElement[E]*/
376 return_label19
: while(false);
377 tracehead
= trace
.prev
;
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};
389 trace
.prev
= tracehead
; tracehead
= &trace
;
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);
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*/;
410 continue_21
: while(0);
411 ((array___ArrayIterator___next_t
)CALL(variable4
,COLOR_abstract_collection___Iterator___next
))(variable4
) /*ArrayIterator::next*/;
414 ((array___AbstractArray___add_t
)CALL( variable2
/*to*/,COLOR_abstract_collection___SimpleCollection___add
))( variable2
/*to*/, variable0
/*e*/) /*Array::add*/;
415 variable3
= TAG_Bool(true);
417 return_label20
: while(false);
418 tracehead
= trace
.prev
;
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};
429 trace
.prev
= tracehead
; tracehead
= &trace
;
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*/;
445 continue_23
: while(0);
446 ((abstract_collection___Iterator___next_t
)CALL(variable3
,COLOR_abstract_collection___Iterator___next
))(variable3
) /*MapIterator::next*/;
449 tracehead
= trace
.prev
;
452 void partial_order___PartialOrder___init(val_t self
, int* init_table
) {
453 struct trace_t trace
= {NULL
, LOCATE_partial_order___PartialOrder___init
, 185};
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
;
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*/;
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*/;
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*/;
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*/;
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*/;
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*/;
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};
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*/;
518 variable0
= ATTR_partial_order___PartialOrderElement____greaters_and_self_cache( self
) /*PartialOrderElement::_greaters_and_self_cache*/;
520 return_label25
: while(false);
521 tracehead
= trace
.prev
;
524 val_t
partial_order___PartialOrderElement___smallers(val_t self
) {
525 struct trace_t trace
= {NULL
, LOCATE_partial_order___PartialOrderElement___smallers
, 234};
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
;
541 variable0
= ATTR_partial_order___PartialOrderElement____smallers_cache( self
) /*PartialOrderElement::_smallers_cache*/;
543 return_label26
: while(false);
544 tracehead
= trace
.prev
;
547 val_t
partial_order___PartialOrderElement___linear_extension(val_t self
) {
548 struct trace_t trace
= {NULL
, LOCATE_partial_order___PartialOrderElement___linear_extension
, 247};
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*/;
587 continue_29
: while(0);
588 ((array___ArrayIterator___next_t
)CALL(variable5
,COLOR_abstract_collection___Iterator___next
))(variable5
) /*ArrayIterator::next*/;
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*/;
599 ATTR_partial_order___PartialOrderElement____linear_extension_cache( self
) /*PartialOrderElement::_linear_extension_cache*/ = variable0
/*res*/;
601 variable0
= ATTR_partial_order___PartialOrderElement____linear_extension_cache( self
) /*PartialOrderElement::_linear_extension_cache*/;
603 return_label27
: while(false);
604 tracehead
= trace
.prev
;
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};
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*/;
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
;
640 variable0
= ATTR_partial_order___PartialOrderElement____linear_extension_cache( self
) /*PartialOrderElement::_linear_extension_cache*/;
642 return_label30
: while(false);
643 tracehead
= trace
.prev
;
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};
650 trace
.prev
= tracehead
; tracehead
= &trace
;
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*/;
655 return_label32
: while(false);
656 tracehead
= trace
.prev
;
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};
664 trace
.prev
= tracehead
; tracehead
= &trace
;
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*/;
673 variable1
= variable2
;
675 return_label33
: while(false);
676 tracehead
= trace
.prev
;
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};
684 trace
.prev
= tracehead
; tracehead
= &trace
;
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::<*/;
691 return_label34
: while(false);
692 tracehead
= trace
.prev
;
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};
701 trace
.prev
= tracehead
; tracehead
= &trace
;
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::<*/;
712 variable1
= variable2
;
714 return_label35
: while(false);
715 tracehead
= trace
.prev
;
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};
722 trace
.prev
= tracehead
; tracehead
= &trace
;
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
;
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};
741 trace
.prev
= tracehead
; tracehead
= &trace
;
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=*/;
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*/;
786 continue_38
: while(0);
787 ((array___ArrayIterator___next_t
)CALL(variable5
,COLOR_abstract_collection___Iterator___next
))(variable5
) /*ArrayIterator::next*/;
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
;