1 #include "partial_order._sep.h"
2 val_t
partial_order___PartialOrder___roots(val_t self
) {
3 struct trace_t trace
= {NULL
, "partial_order::PartialOrder::roots (src/metamodel//partial_order.nit:30,2--31:30)"};
4 trace
.prev
= tracehead
; tracehead
= &trace
;
5 tracehead
= trace
.prev
;
6 return ATTR_partial_order___PartialOrder____roots( self
) /*PartialOrder::_roots*/;
8 val_t
partial_order___PartialOrder___is_empty(val_t self
) {
9 struct trace_t trace
= {NULL
, "partial_order::PartialOrder::is_empty (src/metamodel//partial_order.nit:35,2--49)"};
11 trace
.prev
= tracehead
; tracehead
= &trace
;
12 variable0
= ATTR_partial_order___PartialOrder____elements( self
) /*PartialOrder::_elements*/;
13 variable0
= ((abstract_collection___Collection___is_empty_t
)CALL(variable0
,COLOR_abstract_collection___Collection___is_empty
))(variable0
) /*Map::is_empty*/;
15 return_label0
: while(false);
16 tracehead
= trace
.prev
;
19 val_t
partial_order___PartialOrder___length(val_t self
) {
20 struct trace_t trace
= {NULL
, "partial_order::PartialOrder::length (src/metamodel//partial_order.nit:37,2--45)"};
22 trace
.prev
= tracehead
; tracehead
= &trace
;
23 variable0
= ATTR_partial_order___PartialOrder____elements( self
) /*PartialOrder::_elements*/;
24 variable0
= ((abstract_collection___Collection___length_t
)CALL(variable0
,COLOR_abstract_collection___Collection___length
))(variable0
) /*Map::length*/;
26 return_label1
: while(false);
27 tracehead
= trace
.prev
;
30 val_t
partial_order___PartialOrder___first(val_t self
) {
31 struct trace_t trace
= {NULL
, "partial_order::PartialOrder::first (src/metamodel//partial_order.nit:39,2--48)"};
33 trace
.prev
= tracehead
; tracehead
= &trace
;
34 variable0
= ATTR_partial_order___PartialOrder____elements_list( self
) /*PartialOrder::_elements_list*/;
35 variable0
= ((abstract_collection___IndexedCollection___first_t
)CALL(variable0
,COLOR_abstract_collection___Collection___first
))(variable0
) /*Array::first*/;
37 return_label2
: while(false);
38 tracehead
= trace
.prev
;
41 val_t
partial_order___PartialOrder___has(val_t self
, val_t param0
) {
42 struct trace_t trace
= {NULL
, "partial_order::PartialOrder::has (src/metamodel//partial_order.nit:41,2--48)"};
45 trace
.prev
= tracehead
; tracehead
= &trace
;
47 variable1
= ATTR_partial_order___PartialOrder____elements( self
) /*PartialOrder::_elements*/;
48 variable1
= ((abstract_collection___Map___has_key_t
)CALL(variable1
,COLOR_abstract_collection___Map___has_key
))(variable1
, variable0
/*e*/) /*Map::has_key*/;
50 return_label3
: while(false);
51 tracehead
= trace
.prev
;
54 val_t
partial_order___PartialOrder___has_only(val_t self
, val_t param0
) {
55 struct trace_t trace
= {NULL
, "partial_order::PartialOrder::has_only (src/metamodel//partial_order.nit:43,2--80)"};
59 trace
.prev
= tracehead
; tracehead
= &trace
;
61 variable1
= ATTR_partial_order___PartialOrder____elements( self
) /*PartialOrder::_elements*/;
62 variable1
= ((abstract_collection___Collection___length_t
)CALL(variable1
,COLOR_abstract_collection___Collection___length
))(variable1
) /*Map::length*/;
63 variable1
= TAG_Bool((variable1
)==( TAG_Int(1)));
64 variable2
= variable1
;
65 if (UNTAG_Bool(variable2
)) { /* and */
66 variable2
= ATTR_partial_order___PartialOrder____elements( self
) /*PartialOrder::_elements*/;
67 variable2
= ((abstract_collection___Collection___first_t
)CALL(variable2
,COLOR_abstract_collection___Collection___first
))(variable2
) /*Map::first*/;
68 variable2
= TAG_Bool((variable2
== variable0
/*e*/) || ((variable2
!= NIT_NULL
) && ((((kernel___Object_____eqeq_t
)CALL(variable2
,COLOR_kernel___Object_____eqeq
))==kernel___Object_____eqeq
)?
(IS_EQUAL_NN(variable2
, variable0
/*e*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t
)CALL(variable2
,COLOR_kernel___Object_____eqeq
))(variable2
, variable0
/*e*/) /*PartialOrderElement::==*/)))));
70 variable1
= variable2
;
72 return_label4
: while(false);
73 tracehead
= trace
.prev
;
76 val_t
partial_order___PartialOrder___count(val_t self
, val_t param0
) {
77 struct trace_t trace
= {NULL
, "partial_order::PartialOrder::count (src/metamodel//partial_order.nit:45,2--50:11)"};
80 trace
.prev
= tracehead
; tracehead
= &trace
;
82 variable1
= ((partial_order___PartialOrder___has_t
)CALL( self
,COLOR_abstract_collection___Collection___has
))( self
, variable0
/*e*/) /*PartialOrder::has*/;
83 if (UNTAG_Bool(variable1
)) { /*if*/
84 variable1
= TAG_Int(1);
87 variable1
= TAG_Int(0);
90 return_label5
: while(false);
91 tracehead
= trace
.prev
;
94 val_t
partial_order___PartialOrder___iterator(val_t self
) {
95 struct trace_t trace
= {NULL
, "partial_order::PartialOrder::iterator (src/metamodel//partial_order.nit:54,2--54)"};
97 trace
.prev
= tracehead
; tracehead
= &trace
;
98 variable0
= ATTR_partial_order___PartialOrder____elements_list( self
) /*PartialOrder::_elements_list*/;
99 variable0
= ((array___AbstractArray___iterator_t
)CALL(variable0
,COLOR_abstract_collection___Collection___iterator
))(variable0
) /*Array::iterator*/;
101 return_label6
: while(false);
102 tracehead
= trace
.prev
;
105 val_t
partial_order___PartialOrder_____bra(val_t self
, val_t param0
) {
106 struct trace_t trace
= {NULL
, "partial_order::PartialOrder::[] (src/metamodel//partial_order.nit:58,2--64:14)"};
109 trace
.prev
= tracehead
; tracehead
= &trace
;
111 variable1
= ATTR_partial_order___PartialOrder____elements( self
) /*PartialOrder::_elements*/;
112 variable1
= ((abstract_collection___Map___has_key_t
)CALL(variable1
,COLOR_abstract_collection___Map___has_key
))(variable1
, variable0
/*e*/) /*Map::has_key*/;
113 if (UNTAG_Bool(variable1
)) { /*if*/
114 variable1
= ATTR_partial_order___PartialOrder____elements( self
) /*PartialOrder::_elements*/;
115 variable1
= ((abstract_collection___Map_____bra_t
)CALL(variable1
,COLOR_abstract_collection___Map_____bra
))(variable1
, variable0
/*e*/) /*Map::[]*/;
118 variable1
= NIT_NULL
/*null*/;
121 return_label7
: while(false);
122 tracehead
= trace
.prev
;
125 val_t
partial_order___PartialOrder___to_dot(val_t self
) {
126 struct trace_t trace
= {NULL
, "partial_order::PartialOrder::to_dot (src/metamodel//partial_order.nit:68,2--80:10)"};
133 trace
.prev
= tracehead
; tracehead
= &trace
;
134 variable1
= NEW_string___String___init(); /*new String*/
135 variable0
= variable1
;
136 variable1
= ((partial_order___PartialOrder___to_dot_header_t
)CALL( self
,COLOR_partial_order___PartialOrder___to_dot_header
))( self
) /*PartialOrder::to_dot_header*/;
137 ((string___String___append_t
)CALL( variable0
/*s*/,COLOR_abstract_collection___IndexedCollection___append
))( variable0
/*s*/, variable1
) /*String::append*/;
138 variable1
= ATTR_partial_order___PartialOrder____elements( self
) /*PartialOrder::_elements*/;
139 variable1
= ((abstract_collection___Map___iterator_t
)CALL(variable1
,COLOR_abstract_collection___Collection___iterator
))(variable1
) /*Map::iterator*/;
140 while (true) { /*for*/
141 variable2
= ((abstract_collection___Iterator___is_ok_t
)CALL(variable1
,COLOR_abstract_collection___Iterator___is_ok
))(variable1
) /*MapIterator::is_ok*/;
142 if (!UNTAG_Bool(variable2
)) break; /*for*/
143 variable2
= ((abstract_collection___Iterator___item_t
)CALL(variable1
,COLOR_abstract_collection___Iterator___item
))(variable1
) /*MapIterator::item*/;
144 variable3
= ((partial_order___PartialOrderElement___value_t
)CALL( variable2
/*e*/,COLOR_partial_order___PartialOrderElement___value
))( variable2
/*e*/) /*PartialOrderElement::value*/;
145 variable3
= ((partial_order___PartialOrder___to_dot_node_t
)CALL( self
,COLOR_partial_order___PartialOrder___to_dot_node
))( self
, variable3
) /*PartialOrder::to_dot_node*/;
146 ((string___String___append_t
)CALL( variable0
/*s*/,COLOR_abstract_collection___IndexedCollection___append
))( variable0
/*s*/, variable3
) /*String::append*/;
147 variable3
= ((partial_order___PartialOrderElement___direct_greaters_t
)CALL( variable2
/*e*/,COLOR_partial_order___PartialOrderElement___direct_greaters
))( variable2
/*e*/) /*PartialOrderElement::direct_greaters*/;
148 variable3
= ((array___AbstractArray___iterator_t
)CALL(variable3
,COLOR_abstract_collection___Collection___iterator
))(variable3
) /*Array::iterator*/;
149 while (true) { /*for*/
150 variable4
= ((array___ArrayIterator___is_ok_t
)CALL(variable3
,COLOR_abstract_collection___Iterator___is_ok
))(variable3
) /*ArrayIterator::is_ok*/;
151 if (!UNTAG_Bool(variable4
)) break; /*for*/
152 variable4
= ((array___ArrayIterator___item_t
)CALL(variable3
,COLOR_abstract_collection___Iterator___item
))(variable3
) /*ArrayIterator::item*/;
153 variable5
= ((partial_order___PartialOrderElement___value_t
)CALL( variable2
/*e*/,COLOR_partial_order___PartialOrderElement___value
))( variable2
/*e*/) /*PartialOrderElement::value*/;
154 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*/;
155 ((string___String___append_t
)CALL( variable0
/*s*/,COLOR_abstract_collection___IndexedCollection___append
))( variable0
/*s*/, variable5
) /*String::append*/;
156 continue_10
: while(0);
157 ((array___ArrayIterator___next_t
)CALL(variable3
,COLOR_abstract_collection___Iterator___next
))(variable3
) /*ArrayIterator::next*/;
160 continue_9
: while(0);
161 ((abstract_collection___Iterator___next_t
)CALL(variable1
,COLOR_abstract_collection___Iterator___next
))(variable1
) /*MapIterator::next*/;
164 variable1
= NEW_string___String___with_native(BOX_NativeString("}\n"), TAG_Int(2)); /*new String*/
165 ((string___String___append_t
)CALL( variable0
/*s*/,COLOR_abstract_collection___IndexedCollection___append
))( variable0
/*s*/, variable1
) /*String::append*/;
166 variable0
= variable0
/*s*/;
168 return_label8
: while(false);
169 tracehead
= trace
.prev
;
172 val_t
partial_order___PartialOrder___to_dot_header(val_t self
) {
173 struct trace_t trace
= {NULL
, "partial_order::PartialOrder::to_dot_header (src/metamodel//partial_order.nit:83,2--86:46)"};
175 trace
.prev
= tracehead
; tracehead
= &trace
;
176 variable0
= NEW_string___String___with_native(BOX_NativeString("digraph G {\ngraph [rankdir=BT];\n"), TAG_Int(32)); /*new String*/
178 return_label11
: while(false);
179 tracehead
= trace
.prev
;
182 val_t
partial_order___PartialOrder___to_dot_node(val_t self
, val_t param0
) {
183 struct trace_t trace
= {NULL
, "partial_order::PartialOrder::to_dot_node (src/metamodel//partial_order.nit:89,2--92:21)"};
191 trace
.prev
= tracehead
; tracehead
= &trace
;
193 variable1
= NEW_string___String___init(); /*new String*/
194 variable2
= NEW_string___String___with_native(BOX_NativeString("\""), TAG_Int(1)); /*new String*/
195 variable3
= variable2
;
196 ((string___String___append_t
)CALL(variable1
,COLOR_abstract_collection___IndexedCollection___append
))(variable1
, variable3
) /*String::append*/;
197 variable4
= variable0
/*e*/;
198 variable4
= ((string___String___to_s_t
)CALL(variable4
,COLOR_string___Object___to_s
))(variable4
) /*String::to_s*/;
199 ((string___String___append_t
)CALL(variable1
,COLOR_abstract_collection___IndexedCollection___append
))(variable1
, variable4
) /*String::append*/;
200 variable5
= NEW_string___String___with_native(BOX_NativeString("\";\n"), TAG_Int(3)); /*new String*/
201 variable6
= variable5
;
202 ((string___String___append_t
)CALL(variable1
,COLOR_abstract_collection___IndexedCollection___append
))(variable1
, variable6
) /*String::append*/;
204 return_label12
: while(false);
205 tracehead
= trace
.prev
;
208 val_t
partial_order___PartialOrder___to_dot_edge(val_t self
, val_t param0
, val_t param1
) {
209 struct trace_t trace
= {NULL
, "partial_order::PartialOrder::to_dot_edge (src/metamodel//partial_order.nit:95,2--98:34)"};
221 trace
.prev
= tracehead
; tracehead
= &trace
;
224 variable2
= NEW_string___String___init(); /*new String*/
225 variable3
= NEW_string___String___with_native(BOX_NativeString("\""), TAG_Int(1)); /*new String*/
226 variable4
= variable3
;
227 ((string___String___append_t
)CALL(variable2
,COLOR_abstract_collection___IndexedCollection___append
))(variable2
, variable4
) /*String::append*/;
228 variable5
= variable0
/*e1*/;
229 variable5
= ((string___String___to_s_t
)CALL(variable5
,COLOR_string___Object___to_s
))(variable5
) /*String::to_s*/;
230 ((string___String___append_t
)CALL(variable2
,COLOR_abstract_collection___IndexedCollection___append
))(variable2
, variable5
) /*String::append*/;
231 variable6
= NEW_string___String___with_native(BOX_NativeString("\" -> \""), TAG_Int(6)); /*new String*/
232 variable7
= variable6
;
233 ((string___String___append_t
)CALL(variable2
,COLOR_abstract_collection___IndexedCollection___append
))(variable2
, variable7
) /*String::append*/;
234 variable8
= variable1
/*e2*/;
235 variable8
= ((string___String___to_s_t
)CALL(variable8
,COLOR_string___Object___to_s
))(variable8
) /*String::to_s*/;
236 ((string___String___append_t
)CALL(variable2
,COLOR_abstract_collection___IndexedCollection___append
))(variable2
, variable8
) /*String::append*/;
237 variable9
= NEW_string___String___with_native(BOX_NativeString("\";\n"), TAG_Int(3)); /*new String*/
238 variable10
= variable9
;
239 ((string___String___append_t
)CALL(variable2
,COLOR_abstract_collection___IndexedCollection___append
))(variable2
, variable10
) /*String::append*/;
241 return_label13
: while(false);
242 tracehead
= trace
.prev
;
245 val_t
partial_order___PartialOrder___select_smallests(val_t self
, val_t param0
) {
246 struct trace_t trace
= {NULL
, "partial_order::PartialOrder::select_smallests (src/metamodel//partial_order.nit:101,2--119:12)"};
254 trace
.prev
= tracehead
; tracehead
= &trace
;
256 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::==*/)))));
257 if (UNTAG_Bool(variable1
)) { /*if*/
258 variable1
= NEW_array___Array___init(); /*new Array[E]*/
261 variable1
= ((partial_order___PartialOrder___has_all_t
)CALL( self
,COLOR_partial_order___PartialOrder___has_all
))( self
, variable0
/*c*/) /*PartialOrder::has_all*/;
262 if (!UNTAG_Bool(variable1
)) { fprintf(stderr
, "Assert failed: src/metamodel//partial_order.nit:105,3--18\n"); nit_exit(1);}
263 variable2
= ((abstract_collection___Collection___length_t
)CALL( variable0
/*c*/,COLOR_abstract_collection___Collection___length
))( variable0
/*c*/) /*Collection::length*/;
264 variable3
= NEW_array___Array___with_capacity(variable2
); /*new Array[E]*/
265 variable2
= variable3
;
266 variable1
= variable2
;
267 variable3
= ((abstract_collection___Collection___length_t
)CALL( variable0
/*c*/,COLOR_abstract_collection___Collection___length
))( variable0
/*c*/) /*Collection::length*/;
268 variable4
= NEW_array___Array___with_capacity(variable3
); /*new Array[E]*/
269 variable3
= variable4
;
270 variable2
= variable3
;
271 variable3
= ((abstract_collection___Collection___iterator_t
)CALL( variable0
/*c*/,COLOR_abstract_collection___Collection___iterator
))( variable0
/*c*/) /*Collection::iterator*/;
272 while (true) { /*for*/
273 variable4
= ((abstract_collection___Iterator___is_ok_t
)CALL(variable3
,COLOR_abstract_collection___Iterator___is_ok
))(variable3
) /*Iterator::is_ok*/;
274 if (!UNTAG_Bool(variable4
)) break; /*for*/
275 variable4
= ((abstract_collection___Iterator___item_t
)CALL(variable3
,COLOR_abstract_collection___Iterator___item
))(variable3
) /*Iterator::item*/;
276 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*/;
277 variable5
= variable6
;
278 if (UNTAG_Bool( variable5
/*r*/)) { /*if*/
279 variable6
= variable2
/*tmp*/;
280 variable2
= variable1
/*res*/ /*tmp=*/;
281 variable1
= variable6
/*t*/ /*res=*/;
283 continue_15
: while(0);
284 ((abstract_collection___Iterator___next_t
)CALL(variable3
,COLOR_abstract_collection___Iterator___next
))(variable3
) /*Iterator::next*/;
287 variable1
= variable1
/*res*/;
289 return_label14
: while(false);
290 tracehead
= trace
.prev
;
293 val_t
partial_order___PartialOrder___add(val_t self
, val_t param0
, val_t param1
) {
294 struct trace_t trace
= {NULL
, "partial_order::PartialOrder::add (src/metamodel//partial_order.nit:122,2--134:12)"};
301 trace
.prev
= tracehead
; tracehead
= &trace
;
304 variable2
= ((partial_order___PartialOrder___has_t
)CALL( self
,COLOR_abstract_collection___Collection___has
))( self
, variable0
/*e*/) /*PartialOrder::has*/;
305 if (!UNTAG_Bool( TAG_Bool(!UNTAG_Bool(variable2
)))) { fprintf(stderr
, "Assert failed: src/metamodel//partial_order.nit:125,3--18\n"); nit_exit(1);}
306 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::==*/)))));
307 variable3
= variable2
;
308 if (!UNTAG_Bool(variable3
)) { /* or */
309 variable3
= ((partial_order___PartialOrder___has_all_t
)CALL( self
,COLOR_partial_order___PartialOrder___has_all
))( self
, variable1
/*supers*/) /*PartialOrder::has_all*/;
311 variable2
= variable3
;
312 if (!UNTAG_Bool(variable2
)) { fprintf(stderr
, "Assert failed: src/metamodel//partial_order.nit:126,3--41\n"); nit_exit(1);}
313 variable3
= ((partial_order___PartialOrder___select_smallests_t
)CALL( self
,COLOR_partial_order___PartialOrder___select_smallests
))( self
, variable1
/*supers*/) /*PartialOrder::select_smallests*/;
314 variable2
= variable3
;
315 variable4
= ((partial_order___PartialOrder___new_poe_t
)CALL( self
,COLOR_partial_order___PartialOrder___new_poe
))( self
, variable0
/*e*/, variable2
/*directs*/) /*PartialOrder::new_poe*/;
316 variable3
= variable4
;
317 variable4
= ATTR_partial_order___PartialOrder____elements( self
) /*PartialOrder::_elements*/;
318 ((abstract_collection___Map_____braeq_t
)CALL(variable4
,COLOR_abstract_collection___Map_____braeq
))(variable4
, variable0
/*e*/, variable3
/*poe*/) /*Map::[]=*/;
319 variable4
= ATTR_partial_order___PartialOrder____elements_list( self
) /*PartialOrder::_elements_list*/;
320 ((array___AbstractArray___add_t
)CALL(variable4
,COLOR_abstract_collection___SimpleCollection___add
))(variable4
, variable0
/*e*/) /*Array::add*/;
321 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::==*/)))));
322 variable5
= variable4
;
323 if (!UNTAG_Bool(variable5
)) { /* or */
324 variable5
= ((abstract_collection___Collection___is_empty_t
)CALL( variable1
/*supers*/,COLOR_abstract_collection___Collection___is_empty
))( variable1
/*supers*/) /*Collection::is_empty*/;
326 variable4
= variable5
;
327 if (UNTAG_Bool(variable4
)) { /*if*/
328 variable4
= ATTR_partial_order___PartialOrder____roots( self
) /*PartialOrder::_roots*/;
329 ((array___AbstractArray___add_t
)CALL(variable4
,COLOR_abstract_collection___SimpleCollection___add
))(variable4
, variable0
/*e*/) /*Array::add*/;
331 variable2
= variable3
/*poe*/;
333 return_label16
: while(false);
334 tracehead
= trace
.prev
;
337 val_t
partial_order___PartialOrder___has_all(val_t self
, val_t param0
) {
338 struct trace_t trace
= {NULL
, "partial_order::PartialOrder::has_all (src/metamodel//partial_order.nit:137,2--145:13)"};
343 trace
.prev
= tracehead
; tracehead
= &trace
;
345 variable1
= ((abstract_collection___Collection___iterator_t
)CALL( variable0
/*e*/,COLOR_abstract_collection___Collection___iterator
))( variable0
/*e*/) /*Collection::iterator*/;
346 while (true) { /*for*/
347 variable2
= ((abstract_collection___Iterator___is_ok_t
)CALL(variable1
,COLOR_abstract_collection___Iterator___is_ok
))(variable1
) /*Iterator::is_ok*/;
348 if (!UNTAG_Bool(variable2
)) break; /*for*/
349 variable2
= ((abstract_collection___Iterator___item_t
)CALL(variable1
,COLOR_abstract_collection___Iterator___item
))(variable1
) /*Iterator::item*/;
350 variable3
= ((partial_order___PartialOrder___has_t
)CALL( self
,COLOR_abstract_collection___Collection___has
))( self
, variable2
/*i*/) /*PartialOrder::has*/;
351 if (UNTAG_Bool( TAG_Bool(!UNTAG_Bool(variable3
)))) { /*if*/
352 variable1
= TAG_Bool(false);
355 continue_18
: while(0);
356 ((abstract_collection___Iterator___next_t
)CALL(variable1
,COLOR_abstract_collection___Iterator___next
))(variable1
) /*Iterator::next*/;
359 variable1
= TAG_Bool(true);
361 return_label17
: while(false);
362 tracehead
= trace
.prev
;
365 val_t
partial_order___PartialOrder___new_poe(val_t self
, val_t param0
, val_t param1
) {
366 struct trace_t trace
= {NULL
, "partial_order::PartialOrder::new_poe (src/metamodel//partial_order.nit:148,2--151:52)"};
370 trace
.prev
= tracehead
; tracehead
= &trace
;
373 variable2
= NEW_partial_order___PartialOrderElement___init( self
, variable0
/*e*/, variable1
/*directs*/); /*new PartialOrderElement[E]*/
375 return_label19
: while(false);
376 tracehead
= trace
.prev
;
379 val_t
partial_order___PartialOrder___add_to_smallests(val_t self
, val_t param0
, val_t param1
, val_t param2
) {
380 struct trace_t trace
= {NULL
, "partial_order::PartialOrder::add_to_smallests (src/metamodel//partial_order.nit:154,2--172:13)"};
388 trace
.prev
= tracehead
; tracehead
= &trace
;
392 ((array___AbstractArray___clear_t
)CALL( variable2
/*to*/,COLOR_abstract_collection___RemovableCollection___clear
))( variable2
/*to*/) /*Array::clear*/;
393 variable4
= ((partial_order___PartialOrder_____bra_t
)CALL( self
,COLOR_partial_order___PartialOrder_____bra
))( self
, variable0
/*e*/) /*PartialOrder::[]*/;
394 variable3
= variable4
;
395 variable4
= ((array___AbstractArray___iterator_t
)CALL( variable1
/*from*/,COLOR_abstract_collection___Collection___iterator
))( variable1
/*from*/) /*Array::iterator*/;
396 while (true) { /*for*/
397 variable5
= ((array___ArrayIterator___is_ok_t
)CALL(variable4
,COLOR_abstract_collection___Iterator___is_ok
))(variable4
) /*ArrayIterator::is_ok*/;
398 if (!UNTAG_Bool(variable5
)) break; /*for*/
399 variable5
= ((array___ArrayIterator___item_t
)CALL(variable4
,COLOR_abstract_collection___Iterator___item
))(variable4
) /*ArrayIterator::item*/;
400 variable6
= ((partial_order___PartialOrderElement_____g_t
)CALL( variable3
/*poe*/,COLOR_partial_order___PartialOrderElement_____g
))( variable3
/*poe*/, variable5
/*i*/) /*PartialOrderElement::>*/;
401 if (UNTAG_Bool(variable6
)) { /*if*/
402 variable3
= TAG_Bool(false);
405 variable6
= ((partial_order___PartialOrderElement_____l_t
)CALL( variable3
/*poe*/,COLOR_partial_order___PartialOrderElement_____l
))( variable3
/*poe*/, variable5
/*i*/) /*PartialOrderElement::<*/;
406 if (UNTAG_Bool( TAG_Bool(!UNTAG_Bool(variable6
)))) { /*if*/
407 ((array___AbstractArray___add_t
)CALL( variable2
/*to*/,COLOR_abstract_collection___SimpleCollection___add
))( variable2
/*to*/, variable5
/*i*/) /*Array::add*/;
409 continue_21
: while(0);
410 ((array___ArrayIterator___next_t
)CALL(variable4
,COLOR_abstract_collection___Iterator___next
))(variable4
) /*ArrayIterator::next*/;
413 ((array___AbstractArray___add_t
)CALL( variable2
/*to*/,COLOR_abstract_collection___SimpleCollection___add
))( variable2
/*to*/, variable0
/*e*/) /*Array::add*/;
414 variable3
= TAG_Bool(true);
416 return_label20
: while(false);
417 tracehead
= trace
.prev
;
420 void partial_order___PartialOrder___compute_smallers_for(val_t self
, val_t param0
, val_t param1
) {
421 struct trace_t trace
= {NULL
, "partial_order::PartialOrder::compute_smallers_for (src/metamodel//partial_order.nit:175,2--180:19)"};
428 trace
.prev
= tracehead
; tracehead
= &trace
;
431 variable3
= ((partial_order___PartialOrderElement___value_t
)CALL( variable0
/*poe*/,COLOR_partial_order___PartialOrderElement___value
))( variable0
/*poe*/) /*PartialOrderElement::value*/;
432 variable2
= variable3
;
433 variable3
= ATTR_partial_order___PartialOrder____elements( self
) /*PartialOrder::_elements*/;
434 variable3
= ((abstract_collection___Map___iterator_t
)CALL(variable3
,COLOR_abstract_collection___Collection___iterator
))(variable3
) /*Map::iterator*/;
435 while (true) { /*for*/
436 variable4
= ((abstract_collection___Iterator___is_ok_t
)CALL(variable3
,COLOR_abstract_collection___Iterator___is_ok
))(variable3
) /*MapIterator::is_ok*/;
437 if (!UNTAG_Bool(variable4
)) break; /*for*/
438 variable4
= ((abstract_collection___Iterator___item_t
)CALL(variable3
,COLOR_abstract_collection___Iterator___item
))(variable3
) /*MapIterator::item*/;
439 variable5
= ((partial_order___PartialOrderElement_____l_t
)CALL( variable4
/*s*/,COLOR_partial_order___PartialOrderElement_____l
))( variable4
/*s*/, variable2
/*e*/) /*PartialOrderElement::<*/;
440 if (UNTAG_Bool(variable5
)) { /*if*/
441 variable5
= ((partial_order___PartialOrderElement___value_t
)CALL( variable4
/*s*/,COLOR_partial_order___PartialOrderElement___value
))( variable4
/*s*/) /*PartialOrderElement::value*/;
442 ((abstract_collection___SimpleCollection___add_t
)CALL( variable1
/*set*/,COLOR_abstract_collection___SimpleCollection___add
))( variable1
/*set*/, variable5
) /*Set::add*/;
444 continue_23
: while(0);
445 ((abstract_collection___Iterator___next_t
)CALL(variable3
,COLOR_abstract_collection___Iterator___next
))(variable3
) /*MapIterator::next*/;
448 tracehead
= trace
.prev
;
451 void partial_order___PartialOrder___init(val_t self
, int* init_table
) {
452 struct trace_t trace
= {NULL
, "partial_order::PartialOrder::init (src/metamodel//partial_order.nit:185,2--189:22)"};
454 trace
.prev
= tracehead
; tracehead
= &trace
;
455 if (init_table
[VAL2OBJ( self
)->vft
[INIT_TABLE_POS_PartialOrder
].i
]) return;
456 variable0
= NEW_hash___HashMap___init(); /*new HashMap[E, PartialOrderElement[E]]*/
457 ATTR_partial_order___PartialOrder____elements( self
) /*PartialOrder::_elements*/ = variable0
;
458 variable0
= NEW_array___Array___init(); /*new Array[E]*/
459 ATTR_partial_order___PartialOrder____elements_list( self
) /*PartialOrder::_elements_list*/ = variable0
;
460 variable0
= NEW_array___Array___init(); /*new Array[E]*/
461 ATTR_partial_order___PartialOrder____roots( self
) /*PartialOrder::_roots*/ = variable0
;
462 init_table
[VAL2OBJ( self
)->vft
[INIT_TABLE_POS_PartialOrder
].i
] = 1;
463 tracehead
= trace
.prev
;
466 val_t
partial_order___PartialOrderElement___order(val_t self
) {
467 struct trace_t trace
= {NULL
, "partial_order::PartialOrderElement::order (src/metamodel//partial_order.nit:194,2--195:37)"};
468 trace
.prev
= tracehead
; tracehead
= &trace
;
469 tracehead
= trace
.prev
;
470 return ATTR_partial_order___PartialOrderElement____order( self
) /*PartialOrderElement::_order*/;
472 val_t
partial_order___PartialOrderElement___value(val_t self
) {
473 struct trace_t trace
= {NULL
, "partial_order::PartialOrderElement::value (src/metamodel//partial_order.nit:197,2--198:24)"};
474 trace
.prev
= tracehead
; tracehead
= &trace
;
475 tracehead
= trace
.prev
;
476 return ATTR_partial_order___PartialOrderElement____value( self
) /*PartialOrderElement::_value*/;
478 val_t
partial_order___PartialOrderElement___rank(val_t self
) {
479 struct trace_t trace
= {NULL
, "partial_order::PartialOrderElement::rank (src/metamodel//partial_order.nit:200,2--204:25)"};
480 trace
.prev
= tracehead
; tracehead
= &trace
;
481 tracehead
= trace
.prev
;
482 return ATTR_partial_order___PartialOrderElement____rank( self
) /*PartialOrderElement::_rank*/;
484 val_t
partial_order___PartialOrderElement___direct_greaters(val_t self
) {
485 struct trace_t trace
= {NULL
, "partial_order::PartialOrderElement::direct_greaters (src/metamodel//partial_order.nit:206,2--207:40)"};
486 trace
.prev
= tracehead
; tracehead
= &trace
;
487 tracehead
= trace
.prev
;
488 return ATTR_partial_order___PartialOrderElement____direct_greaters( self
) /*PartialOrderElement::_direct_greaters*/;
490 val_t
partial_order___PartialOrderElement___direct_smallers(val_t self
) {
491 struct trace_t trace
= {NULL
, "partial_order::PartialOrderElement::direct_smallers (src/metamodel//partial_order.nit:209,2--210:40)"};
492 trace
.prev
= tracehead
; tracehead
= &trace
;
493 tracehead
= trace
.prev
;
494 return ATTR_partial_order___PartialOrderElement____direct_smallers( self
) /*PartialOrderElement::_direct_smallers*/;
496 val_t
partial_order___PartialOrderElement___greaters(val_t self
) {
497 struct trace_t trace
= {NULL
, "partial_order::PartialOrderElement::greaters (src/metamodel//partial_order.nit:212,2--213:31)"};
498 trace
.prev
= tracehead
; tracehead
= &trace
;
499 tracehead
= trace
.prev
;
500 return ATTR_partial_order___PartialOrderElement____greaters( self
) /*PartialOrderElement::_greaters*/;
502 val_t
partial_order___PartialOrderElement___greaters_and_self(val_t self
) {
503 struct trace_t trace
= {NULL
, "partial_order::PartialOrderElement::greaters_and_self (src/metamodel//partial_order.nit:218,2--225:33)"};
506 trace
.prev
= tracehead
; tracehead
= &trace
;
507 variable0
= ATTR_partial_order___PartialOrderElement____greaters_and_self_cache( self
) /*PartialOrderElement::_greaters_and_self_cache*/;
508 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::==*/)));
509 if (UNTAG_Bool(variable0
)) { /*if*/
510 variable0
= ATTR_partial_order___PartialOrderElement____greaters( self
) /*PartialOrderElement::_greaters*/;
511 variable0
= ((array___Collection___to_a_t
)CALL(variable0
,COLOR_array___Collection___to_a
))(variable0
) /*Set::to_a*/;
512 ATTR_partial_order___PartialOrderElement____greaters_and_self_cache( self
) /*PartialOrderElement::_greaters_and_self_cache*/ = variable0
;
513 variable0
= ATTR_partial_order___PartialOrderElement____greaters_and_self_cache( self
) /*PartialOrderElement::_greaters_and_self_cache*/;
514 variable1
= ATTR_partial_order___PartialOrderElement____value( self
) /*PartialOrderElement::_value*/;
515 ((array___AbstractArray___add_t
)CALL(variable0
,COLOR_abstract_collection___SimpleCollection___add
))(variable0
, variable1
) /*Array::add*/;
517 variable0
= ATTR_partial_order___PartialOrderElement____greaters_and_self_cache( self
) /*PartialOrderElement::_greaters_and_self_cache*/;
519 return_label25
: while(false);
520 tracehead
= trace
.prev
;
523 val_t
partial_order___PartialOrderElement___smallers(val_t self
) {
524 struct trace_t trace
= {NULL
, "partial_order::PartialOrderElement::smallers (src/metamodel//partial_order.nit:234,2--241:24)"};
527 trace
.prev
= tracehead
; tracehead
= &trace
;
528 variable0
= ATTR_partial_order___PartialOrderElement____smallers_last_length( self
) /*PartialOrderElement::_smallers_last_length*/;
529 variable1
= ATTR_partial_order___PartialOrderElement____order( self
) /*PartialOrderElement::_order*/;
530 variable1
= ((partial_order___PartialOrder___length_t
)CALL(variable1
,COLOR_abstract_collection___Collection___length
))(variable1
) /*PartialOrder::length*/;
531 variable0
= TAG_Bool(UNTAG_Int(variable0
)<UNTAG_Int(variable1
));
532 if (UNTAG_Bool(variable0
)) { /*if*/
533 variable0
= ATTR_partial_order___PartialOrderElement____order( self
) /*PartialOrderElement::_order*/;
534 variable1
= ATTR_partial_order___PartialOrderElement____smallers_cache( self
) /*PartialOrderElement::_smallers_cache*/;
535 ((partial_order___PartialOrder___compute_smallers_for_t
)CALL(variable0
,COLOR_partial_order___PartialOrder___compute_smallers_for
))(variable0
, self
, variable1
) /*PartialOrder::compute_smallers_for*/;
536 variable0
= ATTR_partial_order___PartialOrderElement____order( self
) /*PartialOrderElement::_order*/;
537 variable0
= ((partial_order___PartialOrder___length_t
)CALL(variable0
,COLOR_abstract_collection___Collection___length
))(variable0
) /*PartialOrder::length*/;
538 ATTR_partial_order___PartialOrderElement____smallers_last_length( self
) /*PartialOrderElement::_smallers_last_length*/ = variable0
;
540 variable0
= ATTR_partial_order___PartialOrderElement____smallers_cache( self
) /*PartialOrderElement::_smallers_cache*/;
542 return_label26
: while(false);
543 tracehead
= trace
.prev
;
546 val_t
partial_order___PartialOrderElement___linear_extension(val_t self
) {
547 struct trace_t trace
= {NULL
, "partial_order::PartialOrderElement::linear_extension (src/metamodel//partial_order.nit:247,2--269:32)"};
556 trace
.prev
= tracehead
; tracehead
= &trace
;
557 variable0
= ATTR_partial_order___PartialOrderElement____linear_extension_cache( self
) /*PartialOrderElement::_linear_extension_cache*/;
558 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::==*/)));
559 if (UNTAG_Bool(variable0
)) { /*if*/
560 variable1
= NEW_array___Array___init(); /*new Array[E]*/
561 variable0
= variable1
;
562 variable2
= NEW_array___Array___init(); /*new Array[E]*/
563 variable1
= variable2
;
564 variable2
= ((partial_order___PartialOrderElement___value_t
)CALL( self
,COLOR_partial_order___PartialOrderElement___value
))( self
) /*PartialOrderElement::value*/;
565 ((array___AbstractArray___add_t
)CALL( variable0
/*res*/,COLOR_abstract_collection___SimpleCollection___add
))( variable0
/*res*/, variable2
) /*Array::add*/;
566 variable2
= ((partial_order___PartialOrderElement___direct_greaters_t
)CALL( self
,COLOR_partial_order___PartialOrderElement___direct_greaters
))( self
) /*PartialOrderElement::direct_greaters*/;
567 variable2
= ((array___AbstractArray___iterator_t
)CALL(variable2
,COLOR_abstract_collection___Collection___iterator
))(variable2
) /*Array::iterator*/;
568 while (true) { /*for*/
569 variable3
= ((array___ArrayIterator___is_ok_t
)CALL(variable2
,COLOR_abstract_collection___Iterator___is_ok
))(variable2
) /*ArrayIterator::is_ok*/;
570 if (!UNTAG_Bool(variable3
)) break; /*for*/
571 variable3
= ((array___ArrayIterator___item_t
)CALL(variable2
,COLOR_abstract_collection___Iterator___item
))(variable2
) /*ArrayIterator::item*/;
572 variable5
= ((partial_order___PartialOrderElement___order_t
)CALL( self
,COLOR_partial_order___PartialOrderElement___order
))( self
) /*PartialOrderElement::order*/;
573 variable5
= ((partial_order___PartialOrder_____bra_t
)CALL(variable5
,COLOR_partial_order___PartialOrder_____bra
))(variable5
, variable3
/*s*/) /*PartialOrder::[]*/;
574 variable5
= ((partial_order___PartialOrderElement___linear_extension_t
)CALL(variable5
,COLOR_partial_order___PartialOrderElement___linear_extension
))(variable5
) /*PartialOrderElement::linear_extension*/;
575 variable4
= variable5
;
576 ((array___AbstractArray___clear_t
)CALL( variable1
/*res2*/,COLOR_abstract_collection___RemovableCollection___clear
))( variable1
/*res2*/) /*Array::clear*/;
577 variable5
= ((array___AbstractArray___iterator_t
)CALL( variable0
/*res*/,COLOR_abstract_collection___Collection___iterator
))( variable0
/*res*/) /*Array::iterator*/;
578 while (true) { /*for*/
579 variable6
= ((array___ArrayIterator___is_ok_t
)CALL(variable5
,COLOR_abstract_collection___Iterator___is_ok
))(variable5
) /*ArrayIterator::is_ok*/;
580 if (!UNTAG_Bool(variable6
)) break; /*for*/
581 variable6
= ((array___ArrayIterator___item_t
)CALL(variable5
,COLOR_abstract_collection___Iterator___item
))(variable5
) /*ArrayIterator::item*/;
582 variable7
= ((array___AbstractArray___has_t
)CALL( variable4
/*sl*/,COLOR_abstract_collection___Collection___has
))( variable4
/*sl*/, variable6
/*e*/) /*Array::has*/;
583 if (UNTAG_Bool( TAG_Bool(!UNTAG_Bool(variable7
)))) { /*if*/
584 ((array___AbstractArray___add_t
)CALL( variable1
/*res2*/,COLOR_abstract_collection___SimpleCollection___add
))( variable1
/*res2*/, variable6
/*e*/) /*Array::add*/;
586 continue_29
: while(0);
587 ((array___ArrayIterator___next_t
)CALL(variable5
,COLOR_abstract_collection___Iterator___next
))(variable5
) /*ArrayIterator::next*/;
590 ((abstract_collection___IndexedCollection___append_t
)CALL( variable1
/*res2*/,COLOR_abstract_collection___IndexedCollection___append
))( variable1
/*res2*/, variable4
/*sl*/) /*Array::append*/;
591 variable5
= variable0
/*res*/;
592 variable0
= variable1
/*res2*/ /*res=*/;
593 variable1
= variable5
/*tmp*/ /*res2=*/;
594 continue_28
: while(0);
595 ((array___ArrayIterator___next_t
)CALL(variable2
,COLOR_abstract_collection___Iterator___next
))(variable2
) /*ArrayIterator::next*/;
598 ATTR_partial_order___PartialOrderElement____linear_extension_cache( self
) /*PartialOrderElement::_linear_extension_cache*/ = variable0
/*res*/;
600 variable0
= ATTR_partial_order___PartialOrderElement____linear_extension_cache( self
) /*PartialOrderElement::_linear_extension_cache*/;
602 return_label27
: while(false);
603 tracehead
= trace
.prev
;
606 val_t
partial_order___PartialOrderElement___reverse_linear_extension(val_t self
) {
607 struct trace_t trace
= {NULL
, "partial_order::PartialOrderElement::reverse_linear_extension (src/metamodel//partial_order.nit:275,2--288:32)"};
613 trace
.prev
= tracehead
; tracehead
= &trace
;
614 variable0
= ATTR_partial_order___PartialOrderElement____reverse_linear_extension_cache( self
) /*PartialOrderElement::_reverse_linear_extension_cache*/;
615 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::==*/)));
616 if (UNTAG_Bool(variable0
)) { /*if*/
617 variable1
= NEW_hash___HashSet___init(); /*new HashSet[E]*/
618 variable0
= variable1
;
619 variable1
= ((partial_order___PartialOrderElement___direct_greaters_t
)CALL( self
,COLOR_partial_order___PartialOrderElement___direct_greaters
))( self
) /*PartialOrderElement::direct_greaters*/;
620 variable1
= ((array___AbstractArray___iterator_t
)CALL(variable1
,COLOR_abstract_collection___Collection___iterator
))(variable1
) /*Array::iterator*/;
621 while (true) { /*for*/
622 variable2
= ((array___ArrayIterator___is_ok_t
)CALL(variable1
,COLOR_abstract_collection___Iterator___is_ok
))(variable1
) /*ArrayIterator::is_ok*/;
623 if (!UNTAG_Bool(variable2
)) break; /*for*/
624 variable2
= ((array___ArrayIterator___item_t
)CALL(variable1
,COLOR_abstract_collection___Iterator___item
))(variable1
) /*ArrayIterator::item*/;
625 variable4
= ((partial_order___PartialOrderElement___order_t
)CALL( self
,COLOR_partial_order___PartialOrderElement___order
))( self
) /*PartialOrderElement::order*/;
626 variable4
= ((partial_order___PartialOrder_____bra_t
)CALL(variable4
,COLOR_partial_order___PartialOrder_____bra
))(variable4
, variable2
/*s*/) /*PartialOrder::[]*/;
627 variable4
= ((partial_order___PartialOrderElement___linear_extension_t
)CALL(variable4
,COLOR_partial_order___PartialOrderElement___linear_extension
))(variable4
) /*PartialOrderElement::linear_extension*/;
628 variable3
= variable4
;
629 ((abstract_collection___SimpleCollection___add_all_t
)CALL( variable0
/*res*/,COLOR_abstract_collection___SimpleCollection___add_all
))( variable0
/*res*/, variable3
/*sl*/) /*HashSet::add_all*/;
630 continue_31
: while(0);
631 ((array___ArrayIterator___next_t
)CALL(variable1
,COLOR_abstract_collection___Iterator___next
))(variable1
) /*ArrayIterator::next*/;
634 variable1
= ((partial_order___PartialOrderElement___value_t
)CALL( self
,COLOR_partial_order___PartialOrderElement___value
))( self
) /*PartialOrderElement::value*/;
635 ((hash___HashSet___add_t
)CALL( variable0
/*res*/,COLOR_abstract_collection___SimpleCollection___add
))( variable0
/*res*/, variable1
) /*HashSet::add*/;
636 variable1
= ((array___Collection___to_a_t
)CALL( variable0
/*res*/,COLOR_array___Collection___to_a
))( variable0
/*res*/) /*HashSet::to_a*/;
637 ATTR_partial_order___PartialOrderElement____linear_extension_cache( self
) /*PartialOrderElement::_linear_extension_cache*/ = variable1
;
639 variable0
= ATTR_partial_order___PartialOrderElement____linear_extension_cache( self
) /*PartialOrderElement::_linear_extension_cache*/;
641 return_label30
: while(false);
642 tracehead
= trace
.prev
;
645 val_t
partial_order___PartialOrderElement_____l(val_t self
, val_t param0
) {
646 struct trace_t trace
= {NULL
, "partial_order::PartialOrderElement::< (src/metamodel//partial_order.nit:291,2--294:24)"};
649 trace
.prev
= tracehead
; tracehead
= &trace
;
651 variable1
= ATTR_partial_order___PartialOrderElement____greaters( self
) /*PartialOrderElement::_greaters*/;
652 variable1
= ((abstract_collection___Collection___has_t
)CALL(variable1
,COLOR_abstract_collection___Collection___has
))(variable1
, variable0
/*o*/) /*Set::has*/;
654 return_label32
: while(false);
655 tracehead
= trace
.prev
;
658 val_t
partial_order___PartialOrderElement_____leq(val_t self
, val_t param0
) {
659 struct trace_t trace
= {NULL
, "partial_order::PartialOrderElement::<= (src/metamodel//partial_order.nit:297,2--300:39)"};
663 trace
.prev
= tracehead
; tracehead
= &trace
;
665 variable1
= ATTR_partial_order___PartialOrderElement____value( self
) /*PartialOrderElement::_value*/;
666 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::==*/)))));
667 variable2
= variable1
;
668 if (!UNTAG_Bool(variable2
)) { /* or */
669 variable2
= ATTR_partial_order___PartialOrderElement____greaters( self
) /*PartialOrderElement::_greaters*/;
670 variable2
= ((abstract_collection___Collection___has_t
)CALL(variable2
,COLOR_abstract_collection___Collection___has
))(variable2
, variable0
/*o*/) /*Set::has*/;
672 variable1
= variable2
;
674 return_label33
: while(false);
675 tracehead
= trace
.prev
;
678 val_t
partial_order___PartialOrderElement_____g(val_t self
, val_t param0
) {
679 struct trace_t trace
= {NULL
, "partial_order::PartialOrderElement::> (src/metamodel//partial_order.nit:303,2--306:27)"};
683 trace
.prev
= tracehead
; tracehead
= &trace
;
685 variable1
= ATTR_partial_order___PartialOrderElement____order( self
) /*PartialOrderElement::_order*/;
686 variable1
= ((partial_order___PartialOrder_____bra_t
)CALL(variable1
,COLOR_partial_order___PartialOrder_____bra
))(variable1
, variable0
/*o*/) /*PartialOrder::[]*/;
687 variable2
= ATTR_partial_order___PartialOrderElement____value( self
) /*PartialOrderElement::_value*/;
688 variable1
= ((partial_order___PartialOrderElement_____l_t
)CALL(variable1
,COLOR_partial_order___PartialOrderElement_____l
))(variable1
, variable2
) /*PartialOrderElement::<*/;
690 return_label34
: while(false);
691 tracehead
= trace
.prev
;
694 val_t
partial_order___PartialOrderElement_____geq(val_t self
, val_t param0
) {
695 struct trace_t trace
= {NULL
, "partial_order::PartialOrderElement::>= (src/metamodel//partial_order.nit:309,2--312:42)"};
700 trace
.prev
= tracehead
; tracehead
= &trace
;
702 variable1
= ATTR_partial_order___PartialOrderElement____value( self
) /*PartialOrderElement::_value*/;
703 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::==*/)))));
704 variable2
= variable1
;
705 if (!UNTAG_Bool(variable2
)) { /* or */
706 variable2
= ATTR_partial_order___PartialOrderElement____order( self
) /*PartialOrderElement::_order*/;
707 variable2
= ((partial_order___PartialOrder_____bra_t
)CALL(variable2
,COLOR_partial_order___PartialOrder_____bra
))(variable2
, variable0
/*o*/) /*PartialOrder::[]*/;
708 variable3
= ATTR_partial_order___PartialOrderElement____value( self
) /*PartialOrderElement::_value*/;
709 variable2
= ((partial_order___PartialOrderElement_____l_t
)CALL(variable2
,COLOR_partial_order___PartialOrderElement_____l
))(variable2
, variable3
) /*PartialOrderElement::<*/;
711 variable1
= variable2
;
713 return_label35
: while(false);
714 tracehead
= trace
.prev
;
717 void partial_order___PartialOrderElement___register_direct_smallers(val_t self
, val_t param0
) {
718 struct trace_t trace
= {NULL
, "partial_order::PartialOrderElement::register_direct_smallers (src/metamodel//partial_order.nit:315,2--317:24)"};
721 trace
.prev
= tracehead
; tracehead
= &trace
;
723 variable1
= ATTR_partial_order___PartialOrderElement____direct_smallers( self
) /*PartialOrderElement::_direct_smallers*/;
724 ((array___AbstractArray___add_t
)CALL(variable1
,COLOR_abstract_collection___SimpleCollection___add
))(variable1
, variable0
/*e*/) /*Array::add*/;
725 tracehead
= trace
.prev
;
728 void partial_order___PartialOrderElement___init(val_t self
, val_t param0
, val_t param1
, val_t param2
, int* init_table
) {
729 struct trace_t trace
= {NULL
, "partial_order::PartialOrderElement::init (src/metamodel//partial_order.nit:320,2--343:11)"};
740 trace
.prev
= tracehead
; tracehead
= &trace
;
744 if (init_table
[VAL2OBJ( self
)->vft
[INIT_TABLE_POS_PartialOrderElement
].i
]) return;
745 ATTR_partial_order___PartialOrderElement____order( self
) /*PartialOrderElement::_order*/ = variable0
/*o*/;
746 ATTR_partial_order___PartialOrderElement____value( self
) /*PartialOrderElement::_value*/ = variable1
/*e*/;
747 ATTR_partial_order___PartialOrderElement____direct_greaters( self
) /*PartialOrderElement::_direct_greaters*/ = variable2
/*directs*/;
748 variable3
= NEW_array___Array___init(); /*new Array[E]*/
749 ATTR_partial_order___PartialOrderElement____direct_smallers( self
) /*PartialOrderElement::_direct_smallers*/ = variable3
;
750 variable3
= NEW_hash___HashSet___init(); /*new HashSet[E]*/
751 ATTR_partial_order___PartialOrderElement____greaters( self
) /*PartialOrderElement::_greaters*/ = variable3
;
752 variable3
= NEW_hash___HashSet___init(); /*new HashSet[E]*/
753 ATTR_partial_order___PartialOrderElement____smallers_cache( self
) /*PartialOrderElement::_smallers_cache*/ = variable3
;
754 variable4
= ATTR_partial_order___PartialOrderElement____greaters( self
) /*PartialOrderElement::_greaters*/;
755 variable3
= variable4
;
756 variable4
= TAG_Int(0);
757 variable5
= ((array___AbstractArray___iterator_t
)CALL( variable2
/*directs*/,COLOR_abstract_collection___Collection___iterator
))( variable2
/*directs*/) /*Array::iterator*/;
758 while (true) { /*for*/
759 variable6
= ((array___ArrayIterator___is_ok_t
)CALL(variable5
,COLOR_abstract_collection___Iterator___is_ok
))(variable5
) /*ArrayIterator::is_ok*/;
760 if (!UNTAG_Bool(variable6
)) break; /*for*/
761 variable6
= ((array___ArrayIterator___item_t
)CALL(variable5
,COLOR_abstract_collection___Iterator___item
))(variable5
) /*ArrayIterator::item*/;
762 ((abstract_collection___SimpleCollection___add_t
)CALL( variable3
/*g*/,COLOR_abstract_collection___SimpleCollection___add
))( variable3
/*g*/, variable6
/*ee*/) /*Set::add*/;
763 variable8
= ATTR_partial_order___PartialOrderElement____order( self
) /*PartialOrderElement::_order*/;
764 variable8
= ((partial_order___PartialOrder_____bra_t
)CALL(variable8
,COLOR_partial_order___PartialOrder_____bra
))(variable8
, variable6
/*ee*/) /*PartialOrder::[]*/;
765 variable7
= variable8
;
766 variable8
= ((partial_order___PartialOrderElement___rank_t
)CALL( variable7
/*poee*/,COLOR_partial_order___PartialOrderElement___rank
))( variable7
/*poee*/) /*PartialOrderElement::rank*/;
767 variable8
= TAG_Bool(UNTAG_Int(variable8
)>=UNTAG_Int( variable4
/*r*/));
768 if (UNTAG_Bool(variable8
)) { /*if*/
769 variable8
= ((partial_order___PartialOrderElement___rank_t
)CALL( variable7
/*poee*/,COLOR_partial_order___PartialOrderElement___rank
))( variable7
/*poee*/) /*PartialOrderElement::rank*/;
770 variable8
= TAG_Int(UNTAG_Int(variable8
)+UNTAG_Int( TAG_Int(1)));
771 variable4
= variable8
/*r=*/;
773 ((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*/;
774 variable8
= ((partial_order___PartialOrderElement___greaters_t
)CALL( variable7
/*poee*/,COLOR_partial_order___PartialOrderElement___greaters
))( variable7
/*poee*/) /*PartialOrderElement::greaters*/;
775 variable8
= ((abstract_collection___Collection___iterator_t
)CALL(variable8
,COLOR_abstract_collection___Collection___iterator
))(variable8
) /*Set::iterator*/;
776 while (true) { /*for*/
777 variable9
= ((abstract_collection___Iterator___is_ok_t
)CALL(variable8
,COLOR_abstract_collection___Iterator___is_ok
))(variable8
) /*Iterator::is_ok*/;
778 if (!UNTAG_Bool(variable9
)) break; /*for*/
779 variable9
= ((abstract_collection___Iterator___item_t
)CALL(variable8
,COLOR_abstract_collection___Iterator___item
))(variable8
) /*Iterator::item*/;
780 ((abstract_collection___SimpleCollection___add_t
)CALL( variable3
/*g*/,COLOR_abstract_collection___SimpleCollection___add
))( variable3
/*g*/, variable9
/*eee*/) /*Set::add*/;
781 continue_39
: while(0);
782 ((abstract_collection___Iterator___next_t
)CALL(variable8
,COLOR_abstract_collection___Iterator___next
))(variable8
) /*Iterator::next*/;
785 continue_38
: while(0);
786 ((array___ArrayIterator___next_t
)CALL(variable5
,COLOR_abstract_collection___Iterator___next
))(variable5
) /*ArrayIterator::next*/;
789 ATTR_partial_order___PartialOrderElement____rank( self
) /*PartialOrderElement::_rank*/ = variable4
/*r*/;
790 init_table
[VAL2OBJ( self
)->vft
[INIT_TABLE_POS_PartialOrderElement
].i
] = 1;
791 tracehead
= trace
.prev
;