8d98d7dec96be494b04be037df402ab4d5e22e24
[nit.git] / c_src / inheritance._sep.c
1 /* This C file is generated by NIT to compile module inheritance. */
2 #include "inheritance._sep.h"
3 val_t inheritance___MMModule___type_any(val_t self) {
4 struct trace_t trace = {NULL, LOCATE_inheritance, 24, LOCATE_inheritance___MMModule___type_any};
5 val_t variable0;
6 val_t variable1;
7 static val_t once_value_variable1_1; static int once_bool_variable1_1;
8 trace.prev = tracehead; tracehead = &trace;
9 if (once_bool_variable1_1) variable1 = once_value_variable1_1;
10 else {
11 variable1 = NEW_string___String___with_native(BOX_NativeString("Object"), TAG_Int(6)); /*new String*/
12 variable1 = ((symbol___String___to_symbol_t)CALL(variable1,COLOR_symbol___String___to_symbol))(variable1) /*String::to_symbol*/;
13 once_value_variable1_1 = variable1;
14 once_bool_variable1_1 = true;
15 }
16 variable1 = ((abstractmetamodel___MMModule___class_by_name_t)CALL( self,COLOR_abstractmetamodel___MMModule___class_by_name))( self, variable1) /*MMModule::class_by_name*/;
17 variable0 = variable1;
18 variable1 = ((static_type___MMLocalClass___get_type_t)CALL( variable0 /*c_name*/,COLOR_static_type___MMLocalClass___get_type))( variable0 /*c_name*/) /*MMLocalClass::get_type*/;
19 variable0 = variable1;
20 goto return_label0;
21 return_label0: while(false);
22 tracehead = trace.prev;
23 return variable0;
24 }
25 void inheritance___MMModule___import_global_classes(val_t self) {
26 struct trace_t trace = {NULL, LOCATE_inheritance, 31, LOCATE_inheritance___MMModule___import_global_classes};
27 val_t variable0;
28 val_t variable1;
29 val_t variable2;
30 val_t variable3;
31 val_t variable4;
32 val_t variable5;
33 val_t variable6;
34 trace.prev = tracehead; tracehead = &trace;
35 variable1 = NEW_hash___HashMap___init(); /*new HashMap[K, V]*/
36 variable0 = variable1;
37 variable1 = ((abstractmetamodel___MMModule___mhe_t)CALL( self,COLOR_abstractmetamodel___MMModule___mhe))( self) /*MMModule::mhe*/;
38 variable1 = TAG_Bool(!UNTAG_Bool(TAG_Bool((variable1 == NIT_NULL /*null*/) || ((variable1 != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL(variable1,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable1, NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable1,COLOR_kernel___Object_____eqeq))(variable1, NIT_NULL /*null*/) /*Object::==*/)))))));
39 if (!UNTAG_Bool(variable1)) { fprintf(stderr, "Assert%s failed", ""); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_inheritance___MMModule___import_global_classes, LOCATE_inheritance, 35); nit_exit(1);}
40 variable1 = ((abstractmetamodel___MMModule___mhe_t)CALL( self,COLOR_abstractmetamodel___MMModule___mhe))( self) /*MMModule::mhe*/;
41 variable1 = ((partial_order___PartialOrderElement___direct_greaters_t)CALL(variable1,COLOR_partial_order___PartialOrderElement___direct_greaters))(variable1) /*PartialOrderElement::direct_greaters*/;
42 variable1 = ((array___AbstractArray___iterator_t)CALL(variable1,COLOR_abstract_collection___Collection___iterator))(variable1) /*AbstractArray::iterator*/;
43 while (true) { /*for*/
44 variable2 = ((array___ArrayIterator___is_ok_t)CALL(variable1,COLOR_abstract_collection___Iterator___is_ok))(variable1) /*ArrayIterator::is_ok*/;
45 if (!UNTAG_Bool(variable2)) break; /*for*/
46 variable2 = ((array___ArrayIterator___item_t)CALL(variable1,COLOR_abstract_collection___Iterator___item))(variable1) /*ArrayIterator::item*/;
47 variable3 = ((abstractmetamodel___MMModule___global_classes_t)CALL( variable2 /*mod*/,COLOR_abstractmetamodel___MMModule___global_classes))( variable2 /*mod*/) /*MMModule::global_classes*/;
48 variable3 = ((array___AbstractArray___iterator_t)CALL(variable3,COLOR_abstract_collection___Collection___iterator))(variable3) /*AbstractArray::iterator*/;
49 while (true) { /*for*/
50 variable4 = ((array___ArrayIterator___is_ok_t)CALL(variable3,COLOR_abstract_collection___Iterator___is_ok))(variable3) /*ArrayIterator::is_ok*/;
51 if (!UNTAG_Bool(variable4)) break; /*for*/
52 variable4 = ((array___ArrayIterator___item_t)CALL(variable3,COLOR_abstract_collection___Iterator___item))(variable3) /*ArrayIterator::item*/;
53 variable5 = ((abstractmetamodel___MMModule___global_classes_t)CALL( self,COLOR_abstractmetamodel___MMModule___global_classes))( self) /*MMModule::global_classes*/;
54 variable5 = ((array___AbstractArray___has_t)CALL(variable5,COLOR_abstract_collection___Collection___has))(variable5, variable4 /*glob*/) /*AbstractArray::has*/;
55 if (UNTAG_Bool(variable5)) { /*if*/
56 goto continue_4;
57 }
58 variable5 = ATTR_abstractmetamodel___MMModule____global_classes( self) /*MMModule::_global_classes*/;
59 ((array___AbstractArray___add_t)CALL(variable5,COLOR_abstract_collection___SimpleCollection___add))(variable5, variable4 /*glob*/) /*AbstractArray::add*/;
60 variable5 = ATTR_abstractmetamodel___MMModule____global_class_by_name( self) /*MMModule::_global_class_by_name*/;
61 variable6 = ((abstractmetamodel___MMGlobalClass___name_t)CALL( variable4 /*glob*/,COLOR_abstractmetamodel___MMGlobalClass___name))( variable4 /*glob*/) /*MMGlobalClass::name*/;
62 ((abstract_collection___Map_____braeq_t)CALL(variable5,COLOR_abstract_collection___Map_____braeq))(variable5, variable6, variable4 /*glob*/) /*Map::[]=*/;
63 continue_4: while(0);
64 ((array___ArrayIterator___next_t)CALL(variable3,COLOR_abstract_collection___Iterator___next))(variable3) /*ArrayIterator::next*/;
65 }
66 break_4: while(0);
67 continue_3: while(0);
68 ((array___ArrayIterator___next_t)CALL(variable1,COLOR_abstract_collection___Iterator___next))(variable1) /*ArrayIterator::next*/;
69 }
70 break_3: while(0);
71 tracehead = trace.prev;
72 return;
73 }
74 void inheritance___MMModule___import_local_classes(val_t self) {
75 struct trace_t trace = {NULL, LOCATE_inheritance, 46, LOCATE_inheritance___MMModule___import_local_classes};
76 val_t variable0;
77 val_t variable1;
78 val_t variable2;
79 val_t variable3;
80 trace.prev = tracehead; tracehead = &trace;
81 variable0 = ATTR_abstractmetamodel___MMModule____global_classes( self) /*MMModule::_global_classes*/;
82 variable0 = ((array___AbstractArray___iterator_t)CALL(variable0,COLOR_abstract_collection___Collection___iterator))(variable0) /*AbstractArray::iterator*/;
83 while (true) { /*for*/
84 variable1 = ((array___ArrayIterator___is_ok_t)CALL(variable0,COLOR_abstract_collection___Iterator___is_ok))(variable0) /*ArrayIterator::is_ok*/;
85 if (!UNTAG_Bool(variable1)) break; /*for*/
86 variable1 = ((array___ArrayIterator___item_t)CALL(variable0,COLOR_abstract_collection___Iterator___item))(variable0) /*ArrayIterator::item*/;
87 variable2 = ((abstractmetamodel___MMModule_____bra_t)CALL( self,COLOR_abstractmetamodel___MMModule_____bra))( self, variable1 /*g*/) /*MMModule::[]*/;
88 variable2 = TAG_Bool(!UNTAG_Bool(TAG_Bool((variable2 == NIT_NULL /*null*/) || ((variable2 != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL(variable2,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable2, NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable2,COLOR_kernel___Object_____eqeq))(variable2, NIT_NULL /*null*/) /*Object::==*/)))))));
89 if (UNTAG_Bool(variable2)) { /*if*/
90 goto continue_6;
91 }
92 variable3 = NEW_inheritance___MMImplicitLocalClass___init( self, variable1 /*g*/); /*new MMImplicitLocalClass*/
93 variable2 = variable3;
94 continue_6: while(0);
95 ((array___ArrayIterator___next_t)CALL(variable0,COLOR_abstract_collection___Iterator___next))(variable0) /*ArrayIterator::next*/;
96 }
97 break_6: while(0);
98 tracehead = trace.prev;
99 return;
100 }
101 void inheritance___MMLocalClass___compute_super_classes(val_t self) {
102 struct trace_t trace = {NULL, LOCATE_inheritance, 64, LOCATE_inheritance___MMLocalClass___compute_super_classes};
103 val_t variable0;
104 val_t variable1;
105 val_t variable2;
106 val_t variable3;
107 val_t variable4;
108 val_t variable5;
109 val_t variable6;
110 trace.prev = tracehead; tracehead = &trace;
111 variable0 = ((inheritance___MMLocalClass___computed_super_classes_t)CALL( self,COLOR_inheritance___MMLocalClass___computed_super_classes))( self) /*MMLocalClass::computed_super_classes*/;
112 if (UNTAG_Bool(variable0)) { /*if*/
113 goto return_label7;
114 } else { /*if*/
115 variable0 = ATTR_inheritance___MMLocalClass____computing_super( self) /*MMLocalClass::_computing_super*/;
116 if (UNTAG_Bool(variable0)) { /*if*/
117 variable0 = ((file___Object___stderr_t)CALL( self,COLOR_file___Object___stderr))( self) /*Object::stderr*/;
118 variable1 = NEW_string___String___init(); /*new String*/
119 variable2 = NEW_string___String___with_native(BOX_NativeString("Fatal error: Inheritance loop for class "), TAG_Int(40)); /*new String*/
120 variable3 = variable2;
121 ((string___String___append_t)CALL(variable1,COLOR_abstract_collection___IndexedCollection___append))(variable1, variable3) /*String::append*/;
122 variable4 = self;
123 variable4 = ((string___String___to_s_t)CALL(variable4,COLOR_string___Object___to_s))(variable4) /*String::to_s*/;
124 ((string___String___append_t)CALL(variable1,COLOR_abstract_collection___IndexedCollection___append))(variable1, variable4) /*String::append*/;
125 variable5 = NEW_string___String___with_native(BOX_NativeString("\n"), TAG_Int(1)); /*new String*/
126 variable6 = variable5;
127 ((string___String___append_t)CALL(variable1,COLOR_abstract_collection___IndexedCollection___append))(variable1, variable6) /*String::append*/;
128 ((file___OFStream___write_t)CALL(variable0,COLOR_stream___OStream___write))(variable0, variable1) /*OFStream::write*/;
129 exit(UNTAG_Int( TAG_Int(1)));
130 }
131 }
132 ATTR_inheritance___MMLocalClass____computing_super( self) /*MMLocalClass::_computing_super*/ = TAG_Bool(true);
133 variable1 = NEW_array___Array___init(); /*new Array[E]*/
134 variable0 = variable1;
135 ((inheritance___MMLocalClass___add_explicit_classes_t)CALL( self,COLOR_inheritance___MMLocalClass___add_explicit_classes))( self, variable0 /*supers*/) /*MMLocalClass::add_explicit_classes*/;
136 ((inheritance___MMLocalClass___add_super_classes_t)CALL( self,COLOR_inheritance___MMLocalClass___add_super_classes))( self, variable0 /*supers*/) /*MMLocalClass::add_super_classes*/;
137 ((inheritance___MMLocalClass___add_default_any_class_t)CALL( self,COLOR_inheritance___MMLocalClass___add_default_any_class))( self, variable0 /*supers*/) /*MMLocalClass::add_default_any_class*/;
138 ((inheritance___MMLocalClass___compute_super_parents_t)CALL( self,COLOR_inheritance___MMLocalClass___compute_super_parents))( self, variable0 /*supers*/) /*MMLocalClass::compute_super_parents*/;
139 variable2 = NEW_hash___HashSet___init(); /*new HashSet[E]*/
140 variable1 = variable2;
141 ((abstract_collection___SimpleCollection___add_all_t)CALL( variable1 /*set*/,COLOR_abstract_collection___SimpleCollection___add_all))( variable1 /*set*/, variable0 /*supers*/) /*SimpleCollection::add_all*/;
142 variable3 = ((array___Collection___to_a_t)CALL( variable1 /*set*/,COLOR_array___Collection___to_a))( variable1 /*set*/) /*Collection::to_a*/;
143 variable2 = variable3;
144 variable3 = ((abstractmetamodel___MMLocalClass___module_t)CALL( self,COLOR_abstractmetamodel___MMLocalClass___module))( self) /*MMLocalClass::module*/;
145 ((abstractmetamodel___MMModule___set_supers_class_t)CALL(variable3,COLOR_abstractmetamodel___MMModule___set_supers_class))(variable3, self, variable2 /*u*/) /*MMModule::set_supers_class*/;
146 variable3 = ATTR_abstractmetamodel___MMLocalClass____crhe( self) /*MMLocalClass::_crhe*/;
147 variable3 = TAG_Bool(!UNTAG_Bool(TAG_Bool((variable3 == NIT_NULL /*null*/) || ((variable3 != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL(variable3,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable3, NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable3,COLOR_kernel___Object_____eqeq))(variable3, NIT_NULL /*null*/) /*Object::==*/)))))));
148 if (!UNTAG_Bool(variable3)) { fprintf(stderr, "Assert%s failed", ""); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_inheritance___MMLocalClass___compute_super_classes, LOCATE_inheritance, 85); nit_exit(1);}
149 variable3 = ATTR_abstractmetamodel___MMLocalClass____cshe( self) /*MMLocalClass::_cshe*/;
150 variable3 = TAG_Bool(!UNTAG_Bool(TAG_Bool((variable3 == NIT_NULL /*null*/) || ((variable3 != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL(variable3,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable3, NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable3,COLOR_kernel___Object_____eqeq))(variable3, NIT_NULL /*null*/) /*Object::==*/)))))));
151 if (!UNTAG_Bool(variable3)) { fprintf(stderr, "Assert%s failed", ""); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_inheritance___MMLocalClass___compute_super_classes, LOCATE_inheritance, 86); nit_exit(1);}
152 ATTR_inheritance___MMLocalClass____computing_super( self) /*MMLocalClass::_computing_super*/ = TAG_Bool(false);
153 return_label7: while(false);
154 tracehead = trace.prev;
155 return;
156 }
157 void inheritance___MMLocalClass___compute_ancestors(val_t self) {
158 struct trace_t trace = {NULL, LOCATE_inheritance, 90, LOCATE_inheritance___MMLocalClass___compute_ancestors};
159 val_t variable0;
160 val_t variable1;
161 val_t variable2;
162 val_t variable3;
163 val_t variable4;
164 trace.prev = tracehead; tracehead = &trace;
165 variable0 = ((inheritance___MMLocalClass___computed_super_classes_t)CALL( self,COLOR_inheritance___MMLocalClass___computed_super_classes))( self) /*MMLocalClass::computed_super_classes*/;
166 if (!UNTAG_Bool(variable0)) { fprintf(stderr, "Assert%s failed", ""); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_inheritance___MMLocalClass___compute_ancestors, LOCATE_inheritance, 93); nit_exit(1);}
167 variable0 = ((inheritance___MMLocalClass___computed_ancestors_t)CALL( self,COLOR_inheritance___MMLocalClass___computed_ancestors))( self) /*MMLocalClass::computed_ancestors*/;
168 if (UNTAG_Bool(variable0)) { /*if*/
169 goto return_label8;
170 }
171 variable1 = ((inheritance___MMLocalClass___build_ancestors_t)CALL( self,COLOR_inheritance___MMLocalClass___build_ancestors))( self) /*MMLocalClass::build_ancestors*/;
172 variable1 = ((inheritance___MMLocalClass___group_ancestors_t)CALL( self,COLOR_inheritance___MMLocalClass___group_ancestors))( self, variable1) /*MMLocalClass::group_ancestors*/;
173 variable0 = variable1;
174 variable1 = NEW_hash___HashMap___init(); /*new HashMap[K, V]*/
175 ATTR_static_type___MMLocalClass____ancestors( self) /*MMLocalClass::_ancestors*/ = variable1;
176 variable1 = ((abstract_collection___Map___iterator_t)CALL( variable0 /*ancestors*/,COLOR_abstract_collection___Collection___iterator))( variable0 /*ancestors*/) /*Map::iterator*/;
177 while (true) { /*for*/
178 variable2 = ((abstract_collection___Iterator___is_ok_t)CALL(variable1,COLOR_abstract_collection___Iterator___is_ok))(variable1) /*Iterator::is_ok*/;
179 if (!UNTAG_Bool(variable2)) break; /*for*/
180 variable2 = ((abstract_collection___Iterator___item_t)CALL(variable1,COLOR_abstract_collection___Iterator___item))(variable1) /*Iterator::item*/;
181 variable3 = ((abstract_collection___Collection___length_t)CALL( variable2 /*set*/,COLOR_abstract_collection___Collection___length))( variable2 /*set*/) /*Collection::length*/;
182 variable3 = TAG_Bool((variable3)==( TAG_Int(1)));
183 if (UNTAG_Bool(variable3)) { /*if*/
184 variable3 = ((abstract_collection___Collection___first_t)CALL( variable2 /*set*/,COLOR_abstract_collection___Collection___first))( variable2 /*set*/) /*Collection::first*/;
185 ((static_type___MMLocalClass___add_ancestor_t)CALL( self,COLOR_static_type___MMLocalClass___add_ancestor))( self, variable3) /*MMLocalClass::add_ancestor*/;
186 } else { /*if*/
187 variable4 = ((inheritance___MMLocalClass___merge_ancestors_t)CALL( self,COLOR_inheritance___MMLocalClass___merge_ancestors))( self, variable2 /*set*/) /*MMLocalClass::merge_ancestors*/;
188 variable3 = variable4;
189 variable4 = ((inheritance___MMLocalClass___merge_ancestors_t)CALL( self,COLOR_inheritance___MMLocalClass___merge_ancestors))( self, variable2 /*set*/) /*MMLocalClass::merge_ancestors*/;
190 ((static_type___MMLocalClass___add_ancestor_t)CALL( self,COLOR_static_type___MMLocalClass___add_ancestor))( self, variable4) /*MMLocalClass::add_ancestor*/;
191 }
192 continue_9: while(0);
193 ((abstract_collection___Iterator___next_t)CALL(variable1,COLOR_abstract_collection___Iterator___next))(variable1) /*Iterator::next*/;
194 }
195 break_9: while(0);
196 return_label8: while(false);
197 tracehead = trace.prev;
198 return;
199 }
200 void inheritance___MMLocalClass___inherit_global_properties(val_t self) {
201 struct trace_t trace = {NULL, LOCATE_inheritance, 109, LOCATE_inheritance___MMLocalClass___inherit_global_properties};
202 val_t variable0;
203 val_t variable1;
204 val_t variable2;
205 val_t variable3;
206 val_t variable4;
207 val_t variable5;
208 val_t variable6;
209 val_t variable7;
210 val_t variable8;
211 trace.prev = tracehead; tracehead = &trace;
212 variable0 = ATTR_abstractmetamodel___MMLocalClass____global_properties( self) /*MMLocalClass::_global_properties*/;
213 variable0 = TAG_Bool(!UNTAG_Bool(TAG_Bool((variable0 == NIT_NULL /*null*/) || ((variable0 != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL(variable0,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable0, NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable0,COLOR_kernel___Object_____eqeq))(variable0, NIT_NULL /*null*/) /*Object::==*/)))))));
214 if (UNTAG_Bool(variable0)) { /*if*/
215 goto return_label10;
216 }
217 variable0 = NEW_hash___HashSet___init(); /*new HashSet[E]*/
218 ATTR_abstractmetamodel___MMLocalClass____global_properties( self) /*MMLocalClass::_global_properties*/ = variable0;
219 variable0 = NEW_hash___HashMap___init(); /*new HashMap[K, V]*/
220 ATTR_abstractmetamodel___MMLocalClass____properties_by_name( self) /*MMLocalClass::_properties_by_name*/ = variable0;
221 variable0 = NEW_hash___HashMap___init(); /*new HashMap[K, V]*/
222 ATTR_abstractmetamodel___MMLocalClass____local_property_by_global( self) /*MMLocalClass::_local_property_by_global*/ = variable0;
223 variable1 = ATTR_abstractmetamodel___MMLocalClass____properties_by_name( self) /*MMLocalClass::_properties_by_name*/;
224 variable0 = variable1;
225 variable2 = ATTR_abstractmetamodel___MMLocalClass____global_properties( self) /*MMLocalClass::_global_properties*/;
226 variable1 = variable2;
227 variable2 = ((abstractmetamodel___MMLocalClass___che_t)CALL( self,COLOR_abstractmetamodel___MMLocalClass___che))( self) /*MMLocalClass::che*/;
228 variable2 = ((partial_order___PartialOrderElement___direct_greaters_t)CALL(variable2,COLOR_partial_order___PartialOrderElement___direct_greaters))(variable2) /*PartialOrderElement::direct_greaters*/;
229 variable2 = ((array___AbstractArray___iterator_t)CALL(variable2,COLOR_abstract_collection___Collection___iterator))(variable2) /*AbstractArray::iterator*/;
230 while (true) { /*for*/
231 variable3 = ((array___ArrayIterator___is_ok_t)CALL(variable2,COLOR_abstract_collection___Iterator___is_ok))(variable2) /*ArrayIterator::is_ok*/;
232 if (!UNTAG_Bool(variable3)) break; /*for*/
233 variable3 = ((array___ArrayIterator___item_t)CALL(variable2,COLOR_abstract_collection___Iterator___item))(variable2) /*ArrayIterator::item*/;
234 variable4 = ((abstractmetamodel___MMLocalClass___global_properties_t)CALL( variable3 /*c*/,COLOR_abstractmetamodel___MMLocalClass___global_properties))( variable3 /*c*/) /*MMLocalClass::global_properties*/;
235 variable4 = ((abstract_collection___Collection___iterator_t)CALL(variable4,COLOR_abstract_collection___Collection___iterator))(variable4) /*Collection::iterator*/;
236 while (true) { /*for*/
237 variable5 = ((abstract_collection___Iterator___is_ok_t)CALL(variable4,COLOR_abstract_collection___Iterator___is_ok))(variable4) /*Iterator::is_ok*/;
238 if (!UNTAG_Bool(variable5)) break; /*for*/
239 variable5 = ((abstract_collection___Iterator___item_t)CALL(variable4,COLOR_abstract_collection___Iterator___item))(variable4) /*Iterator::item*/;
240 variable6 = ((abstract_collection___Collection___has_t)CALL( variable1 /*set*/,COLOR_abstract_collection___Collection___has))( variable1 /*set*/, variable5 /*glob*/) /*Collection::has*/;
241 if (UNTAG_Bool(variable6)) { /*if*/
242 goto continue_12;
243 }
244 ((abstract_collection___SimpleCollection___add_t)CALL( variable1 /*set*/,COLOR_abstract_collection___SimpleCollection___add))( variable1 /*set*/, variable5 /*glob*/) /*SimpleCollection::add*/;
245 variable6 = ((abstractmetamodel___MMGlobalProperty___is_init_t)CALL( variable5 /*glob*/,COLOR_abstractmetamodel___MMGlobalProperty___is_init))( variable5 /*glob*/) /*MMGlobalProperty::is_init*/;
246 variable7 = variable6;
247 if (UNTAG_Bool(variable7)) { /* and */
248 variable7 = ((abstractmetamodel___MMGlobalProperty___intro_t)CALL( variable5 /*glob*/,COLOR_abstractmetamodel___MMGlobalProperty___intro))( variable5 /*glob*/) /*MMGlobalProperty::intro*/;
249 variable7 = ((abstractmetamodel___MMLocalProperty___local_class_t)CALL(variable7,COLOR_abstractmetamodel___MMLocalProperty___local_class))(variable7) /*MMLocalProperty::local_class*/;
250 variable7 = ((abstractmetamodel___MMLocalClass___global_t)CALL(variable7,COLOR_abstractmetamodel___MMLocalClass___global))(variable7) /*MMLocalClass::global*/;
251 variable8 = ((abstractmetamodel___MMLocalClass___global_t)CALL( self,COLOR_abstractmetamodel___MMLocalClass___global))( self) /*MMLocalClass::global*/;
252 variable7 = TAG_Bool(!UNTAG_Bool(TAG_Bool((variable7 == variable8) || ((variable7 != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL(variable7,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable7,variable8)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable7,COLOR_kernel___Object_____eqeq))(variable7, variable8) /*Object::==*/)))))));
253 }
254 variable6 = variable7;
255 if (UNTAG_Bool(variable6)) { /*if*/
256 goto continue_12;
257 }
258 variable7 = ((abstractmetamodel___MMGlobalProperty___intro_t)CALL( variable5 /*glob*/,COLOR_abstractmetamodel___MMGlobalProperty___intro))( variable5 /*glob*/) /*MMGlobalProperty::intro*/;
259 variable7 = ((abstractmetamodel___MMLocalProperty___name_t)CALL(variable7,COLOR_abstractmetamodel___MMLocalProperty___name))(variable7) /*MMLocalProperty::name*/;
260 variable6 = variable7;
261 variable7 = NIT_NULL /*decl variable conf_set*/;
262 variable8 = ((abstract_collection___Map___has_key_t)CALL( variable0 /*names*/,COLOR_abstract_collection___Map___has_key))( variable0 /*names*/, variable6 /*gname*/) /*Map::has_key*/;
263 if (UNTAG_Bool(variable8)) { /*if*/
264 variable8 = ((abstract_collection___Map_____bra_t)CALL( variable0 /*names*/,COLOR_abstract_collection___Map_____bra))( variable0 /*names*/, variable6 /*gname*/) /*Map::[]*/;
265 variable7 = variable8 /*conf_set=*/;
266 } else { /*if*/
267 variable8 = NEW_array___Array___init(); /*new Array[E]*/
268 variable7 = variable8 /*conf_set=*/;
269 ((abstract_collection___Map_____braeq_t)CALL( variable0 /*names*/,COLOR_abstract_collection___Map_____braeq))( variable0 /*names*/, variable6 /*gname*/, variable7 /*conf_set*/) /*Map::[]=*/;
270 }
271 ((array___AbstractArray___add_t)CALL( variable7 /*conf_set*/,COLOR_abstract_collection___SimpleCollection___add))( variable7 /*conf_set*/, variable5 /*glob*/) /*AbstractArray::add*/;
272 continue_12: while(0);
273 ((abstract_collection___Iterator___next_t)CALL(variable4,COLOR_abstract_collection___Iterator___next))(variable4) /*Iterator::next*/;
274 }
275 break_12: while(0);
276 continue_11: while(0);
277 ((array___ArrayIterator___next_t)CALL(variable2,COLOR_abstract_collection___Iterator___next))(variable2) /*ArrayIterator::next*/;
278 }
279 break_11: while(0);
280 return_label10: while(false);
281 tracehead = trace.prev;
282 return;
283 }
284 void inheritance___MMLocalClass___add_direct_parent(val_t self, val_t param0) {
285 struct trace_t trace = {NULL, LOCATE_inheritance, 146, LOCATE_inheritance___MMLocalClass___add_direct_parent};
286 val_t variable0;
287 val_t variable1;
288 trace.prev = tracehead; tracehead = &trace;
289 variable0 = param0;
290 variable1 = ATTR_inheritance___MMLocalClass____direct_parents( self) /*MMLocalClass::_direct_parents*/;
291 ((array___AbstractArray___add_t)CALL(variable1,COLOR_abstract_collection___SimpleCollection___add))(variable1, variable0 /*p*/) /*AbstractArray::add*/;
292 tracehead = trace.prev;
293 return;
294 }
295 val_t inheritance___MMLocalClass___computed_super_classes(val_t self) {
296 struct trace_t trace = {NULL, LOCATE_inheritance, 152, LOCATE_inheritance___MMLocalClass___computed_super_classes};
297 val_t variable0;
298 val_t variable1;
299 trace.prev = tracehead; tracehead = &trace;
300 variable0 = ATTR_abstractmetamodel___MMLocalClass____crhe( self) /*MMLocalClass::_crhe*/;
301 variable0 = TAG_Bool(!UNTAG_Bool(TAG_Bool((variable0 == NIT_NULL /*null*/) || ((variable0 != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL(variable0,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable0, NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable0,COLOR_kernel___Object_____eqeq))(variable0, NIT_NULL /*null*/) /*Object::==*/)))))));
302 variable1 = variable0;
303 if (UNTAG_Bool(variable1)) { /* and */
304 variable1 = ATTR_abstractmetamodel___MMLocalClass____cshe( self) /*MMLocalClass::_cshe*/;
305 variable1 = TAG_Bool(!UNTAG_Bool(TAG_Bool((variable1 == NIT_NULL /*null*/) || ((variable1 != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL(variable1,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable1, NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable1,COLOR_kernel___Object_____eqeq))(variable1, NIT_NULL /*null*/) /*Object::==*/)))))));
306 }
307 variable0 = variable1;
308 goto return_label14;
309 return_label14: while(false);
310 tracehead = trace.prev;
311 return variable0;
312 }
313 val_t inheritance___MMLocalClass___computed_ancestors(val_t self) {
314 struct trace_t trace = {NULL, LOCATE_inheritance, 158, LOCATE_inheritance___MMLocalClass___computed_ancestors};
315 val_t variable0;
316 trace.prev = tracehead; tracehead = &trace;
317 variable0 = ATTR_static_type___MMLocalClass____ancestors( self) /*MMLocalClass::_ancestors*/;
318 variable0 = TAG_Bool(!UNTAG_Bool(TAG_Bool((variable0 == NIT_NULL /*null*/) || ((variable0 != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL(variable0,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable0, NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable0,COLOR_kernel___Object_____eqeq))(variable0, NIT_NULL /*null*/) /*Object::==*/)))))));
319 goto return_label15;
320 return_label15: while(false);
321 tracehead = trace.prev;
322 return variable0;
323 }
324 val_t inheritance___MMLocalClass___ancestor_for(val_t self, val_t param0) {
325 struct trace_t trace = {NULL, LOCATE_inheritance, 164, LOCATE_inheritance___MMLocalClass___ancestor_for};
326 val_t variable0;
327 val_t variable1;
328 val_t variable2;
329 val_t variable3;
330 val_t variable4;
331 val_t variable5;
332 trace.prev = tracehead; tracehead = &trace;
333 variable0 = param0;
334 variable1 = ((static_type___MMLocalClass___ancestors_t)CALL( self,COLOR_static_type___MMLocalClass___ancestors))( self) /*MMLocalClass::ancestors*/;
335 variable1 = TAG_Bool(!UNTAG_Bool(TAG_Bool((variable1 == NIT_NULL /*null*/) || ((variable1 != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL(variable1,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable1, NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable1,COLOR_kernel___Object_____eqeq))(variable1, NIT_NULL /*null*/) /*Object::==*/)))))));
336 if (!UNTAG_Bool(variable1)) { fprintf(stderr, "Assert%s failed", ""); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_inheritance___MMLocalClass___ancestor_for, LOCATE_inheritance, 168); nit_exit(1);}
337 variable1 = ATTR_static_type___MMLocalClass____ancestors( self) /*MMLocalClass::_ancestors*/;
338 variable1 = ((abstract_collection___Map___has_key_t)CALL(variable1,COLOR_abstract_collection___Map___has_key))(variable1, variable0 /*c*/) /*Map::has_key*/;
339 if (UNTAG_Bool(variable1)) { /*if*/
340 variable1 = ATTR_static_type___MMLocalClass____ancestors( self) /*MMLocalClass::_ancestors*/;
341 variable1 = ((abstract_collection___Map_____bra_t)CALL(variable1,COLOR_abstract_collection___Map_____bra))(variable1, variable0 /*c*/) /*Map::[]*/;
342 goto return_label16;
343 }
344 variable2 = ((abstractmetamodel___MMLocalClass___module_t)CALL( self,COLOR_abstractmetamodel___MMLocalClass___module))( self) /*MMLocalClass::module*/;
345 variable2 = ((abstractmetamodel___MMLocalClass___for_module_t)CALL( variable0 /*c*/,COLOR_abstractmetamodel___MMLocalClass___for_module))( variable0 /*c*/, variable2) /*MMLocalClass::for_module*/;
346 variable1 = variable2;
347 variable2 = ((abstractmetamodel___MMLocalClass___cshe_t)CALL( self,COLOR_abstractmetamodel___MMLocalClass___cshe))( self) /*MMLocalClass::cshe*/;
348 variable2 = ((partial_order___PartialOrderElement_____leq_t)CALL(variable2,COLOR_partial_order___PartialOrderElement_____leq))(variable2, variable1 /*a*/) /*PartialOrderElement::<=*/;
349 if (!UNTAG_Bool(variable2)) { fprintf(stderr, "Assert%s failed", ""); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_inheritance___MMLocalClass___ancestor_for, LOCATE_inheritance, 174); nit_exit(1);}
350 variable2 = NIT_NULL /*decl variable ra*/;
351 variable3 = ATTR_static_type___MMLocalClass____ancestors( self) /*MMLocalClass::_ancestors*/;
352 variable3 = ((abstract_collection___Map___has_key_t)CALL(variable3,COLOR_abstract_collection___Map___has_key))(variable3, variable1 /*a*/) /*Map::has_key*/;
353 if (UNTAG_Bool(variable3)) { /*if*/
354 variable3 = ATTR_static_type___MMLocalClass____ancestors( self) /*MMLocalClass::_ancestors*/;
355 variable3 = ((abstract_collection___Map_____bra_t)CALL(variable3,COLOR_abstract_collection___Map_____bra))(variable3, variable1 /*a*/) /*Map::[]*/;
356 variable2 = variable3 /*ra=*/;
357 } else { /*if*/
358 variable3 = ((abstractmetamodel___MMLocalClass___global_t)CALL( variable0 /*c*/,COLOR_abstractmetamodel___MMLocalClass___global))( variable0 /*c*/) /*MMLocalClass::global*/;
359 variable4 = ATTR_abstractmetamodel___MMLocalClass____global( self) /*MMLocalClass::_global*/;
360 variable3 = TAG_Bool((variable3 == variable4) || ((variable3 != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL(variable3,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable3,variable4)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable3,COLOR_kernel___Object_____eqeq))(variable3, variable4) /*Object::==*/)))));
361 if (UNTAG_Bool(variable3)) { /*if*/
362 variable3 = NEW_inheritance___MMRefineAncestor___init( self, variable0 /*c*/); /*new MMRefineAncestor*/
363 variable2 = variable3 /*ra=*/;
364 } else { /*if*/
365 variable3 = ((static_type___MMLocalClass___get_type_t)CALL( self,COLOR_static_type___MMLocalClass___get_type))( self) /*MMLocalClass::get_type*/;
366 variable4 = ((static_type___MMLocalClass___get_type_t)CALL( variable0 /*c*/,COLOR_static_type___MMLocalClass___get_type))( variable0 /*c*/) /*MMLocalClass::get_type*/;
367 variable5 = NEW_inheritance___MMSpecAncestor___init(variable3, variable4); /*new MMSpecAncestor*/
368 variable3 = variable5;
369 variable2 = variable3 /*ra=*/;
370 }
371 }
372 variable3 = ATTR_static_type___MMLocalClass____ancestors( self) /*MMLocalClass::_ancestors*/;
373 ((abstract_collection___Map_____braeq_t)CALL(variable3,COLOR_abstract_collection___Map_____braeq))(variable3, variable0 /*c*/, variable2 /*ra*/) /*Map::[]=*/;
374 variable1 = variable2 /*ra*/;
375 goto return_label16;
376 return_label16: while(false);
377 tracehead = trace.prev;
378 return variable1;
379 }
380 val_t inheritance___MMLocalClass_____bra(val_t self, val_t param0) {
381 struct trace_t trace = {NULL, LOCATE_inheritance, 187, LOCATE_inheritance___MMLocalClass_____bra};
382 val_t variable0;
383 val_t variable1;
384 val_t variable2;
385 val_t variable3;
386 trace.prev = tracehead; tracehead = &trace;
387 variable0 = param0;
388 variable2 = ((inheritance___MMLocalClass_____bra_t)CALL( self,COLOR_SUPER_inheritance___MMLocalClass_____bra))( self, variable0 /*glob*/) /*super MMLocalClass::[]*/;
389 variable1 = variable2;
390 variable2 = TAG_Bool(( variable1 /*prop*/ == NIT_NULL /*null*/) || (( variable1 /*prop*/ != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL( variable1 /*prop*/,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable1 /*prop*/, NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL( variable1 /*prop*/,COLOR_kernel___Object_____eqeq))( variable1 /*prop*/, NIT_NULL /*null*/) /*Object::==*/)))));
391 variable3 = variable2;
392 if (UNTAG_Bool(variable3)) { /* and */
393 variable3 = ATTR_abstractmetamodel___MMLocalClass____global_properties( self) /*MMLocalClass::_global_properties*/;
394 variable3 = ((abstract_collection___Collection___has_t)CALL(variable3,COLOR_abstract_collection___Collection___has))(variable3, variable0 /*glob*/) /*Collection::has*/;
395 }
396 variable2 = variable3;
397 if (UNTAG_Bool(variable2)) { /*if*/
398 variable2 = ((inheritance___MMLocalClass___inherit_local_property_t)CALL( self,COLOR_inheritance___MMLocalClass___inherit_local_property))( self, variable0 /*glob*/) /*MMLocalClass::inherit_local_property*/;
399 variable1 = variable2 /*prop=*/;
400 }
401 variable1 = variable1 /*prop*/;
402 goto return_label17;
403 return_label17: while(false);
404 tracehead = trace.prev;
405 return variable1;
406 }
407 void inheritance___MMLocalClass___add_default_any_class(val_t self, val_t param0) {
408 struct trace_t trace = {NULL, LOCATE_inheritance, 196, LOCATE_inheritance___MMLocalClass___add_default_any_class};
409 val_t variable0;
410 val_t variable1;
411 val_t variable2;
412 val_t variable3;
413 static val_t once_value_variable3_19; static int once_bool_variable3_19;
414 trace.prev = tracehead; tracehead = &trace;
415 variable0 = param0;
416 variable1 = ((array___AbstractArray___is_empty_t)CALL( variable0 /*supers*/,COLOR_abstract_collection___Collection___is_empty))( variable0 /*supers*/) /*AbstractArray::is_empty*/;
417 variable2 = variable1;
418 if (UNTAG_Bool(variable2)) { /* and */
419 variable2 = ((abstractmetamodel___MMLocalClass___name_t)CALL( self,COLOR_abstractmetamodel___MMLocalClass___name))( self) /*MMLocalClass::name*/;
420 if (once_bool_variable3_19) variable3 = once_value_variable3_19;
421 else {
422 variable3 = NEW_string___String___with_native(BOX_NativeString("Object"), TAG_Int(6)); /*new String*/
423 variable3 = ((symbol___String___to_symbol_t)CALL(variable3,COLOR_symbol___String___to_symbol))(variable3) /*String::to_symbol*/;
424 once_value_variable3_19 = variable3;
425 once_bool_variable3_19 = true;
426 }
427 variable2 = TAG_Bool(!UNTAG_Bool(TAG_Bool((variable2 == variable3) || ((variable2 != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL(variable2,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable2,variable3)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable2,COLOR_kernel___Object_____eqeq))(variable2, variable3) /*Object::==*/)))))));
428 }
429 variable1 = variable2;
430 if (UNTAG_Bool(variable1)) { /*if*/
431 variable2 = ((abstractmetamodel___MMLocalClass___module_t)CALL( self,COLOR_abstractmetamodel___MMLocalClass___module))( self) /*MMLocalClass::module*/;
432 variable2 = ((inheritance___MMModule___type_any_t)CALL(variable2,COLOR_inheritance___MMModule___type_any))(variable2) /*MMModule::type_any*/;
433 variable1 = variable2;
434 variable2 = ((static_type___MMType___local_class_t)CALL( variable1 /*t_any*/,COLOR_static_type___MMType___local_class))( variable1 /*t_any*/) /*MMType::local_class*/;
435 ((array___AbstractArray___add_t)CALL( variable0 /*supers*/,COLOR_abstract_collection___SimpleCollection___add))( variable0 /*supers*/, variable2) /*AbstractArray::add*/;
436 variable3 = NEW_inheritance___MMDefaultAncestor___init( self, variable1 /*t_any*/); /*new MMDefaultAncestor*/
437 variable2 = variable3;
438 ((inheritance___MMLocalClass___add_direct_parent_t)CALL( self,COLOR_inheritance___MMLocalClass___add_direct_parent))( self, variable2 /*default*/) /*MMLocalClass::add_direct_parent*/;
439 }
440 tracehead = trace.prev;
441 return;
442 }
443 void inheritance___MMLocalClass___add_super_classes(val_t self, val_t param0) {
444 struct trace_t trace = {NULL, LOCATE_inheritance, 207, LOCATE_inheritance___MMLocalClass___add_super_classes};
445 val_t variable0;
446 val_t variable1;
447 val_t variable2;
448 val_t variable3;
449 val_t variable4;
450 val_t variable5;
451 val_t variable6;
452 trace.prev = tracehead; tracehead = &trace;
453 variable0 = param0;
454 variable1 = ATTR_abstractmetamodel___MMLocalClass____crhe( self) /*MMLocalClass::_crhe*/;
455 variable1 = TAG_Bool(!UNTAG_Bool(TAG_Bool((variable1 == NIT_NULL /*null*/) || ((variable1 != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL(variable1,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable1, NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable1,COLOR_kernel___Object_____eqeq))(variable1, NIT_NULL /*null*/) /*Object::==*/)))))));
456 if (!UNTAG_Bool(variable1)) { fprintf(stderr, "Assert%s failed", ""); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_inheritance___MMLocalClass___add_super_classes, LOCATE_inheritance, 210); nit_exit(1);}
457 variable1 = ATTR_abstractmetamodel___MMLocalClass____crhe( self) /*MMLocalClass::_crhe*/;
458 variable1 = ((partial_order___PartialOrderElement___direct_greaters_t)CALL(variable1,COLOR_partial_order___PartialOrderElement___direct_greaters))(variable1) /*PartialOrderElement::direct_greaters*/;
459 variable1 = ((array___AbstractArray___iterator_t)CALL(variable1,COLOR_abstract_collection___Collection___iterator))(variable1) /*AbstractArray::iterator*/;
460 while (true) { /*for*/
461 variable2 = ((array___ArrayIterator___is_ok_t)CALL(variable1,COLOR_abstract_collection___Iterator___is_ok))(variable1) /*ArrayIterator::is_ok*/;
462 if (!UNTAG_Bool(variable2)) break; /*for*/
463 variable2 = ((array___ArrayIterator___item_t)CALL(variable1,COLOR_abstract_collection___Iterator___item))(variable1) /*ArrayIterator::item*/;
464 variable3 = ((abstractmetamodel___MMLocalClass___cshe_t)CALL( variable2 /*ref*/,COLOR_abstractmetamodel___MMLocalClass___cshe))( variable2 /*ref*/) /*MMLocalClass::cshe*/;
465 variable3 = TAG_Bool(!UNTAG_Bool(TAG_Bool((variable3 == NIT_NULL /*null*/) || ((variable3 != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL(variable3,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable3, NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable3,COLOR_kernel___Object_____eqeq))(variable3, NIT_NULL /*null*/) /*Object::==*/)))))));
466 if (!UNTAG_Bool(variable3)) { fprintf(stderr, "Assert%s failed", ""); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_inheritance___MMLocalClass___add_super_classes, LOCATE_inheritance, 212); nit_exit(1);}
467 variable3 = ((abstractmetamodel___MMLocalClass___cshe_t)CALL( variable2 /*ref*/,COLOR_abstractmetamodel___MMLocalClass___cshe))( variable2 /*ref*/) /*MMLocalClass::cshe*/;
468 variable3 = ((partial_order___PartialOrderElement___direct_greaters_t)CALL(variable3,COLOR_partial_order___PartialOrderElement___direct_greaters))(variable3) /*PartialOrderElement::direct_greaters*/;
469 variable3 = ((array___AbstractArray___iterator_t)CALL(variable3,COLOR_abstract_collection___Collection___iterator))(variable3) /*AbstractArray::iterator*/;
470 while (true) { /*for*/
471 variable4 = ((array___ArrayIterator___is_ok_t)CALL(variable3,COLOR_abstract_collection___Iterator___is_ok))(variable3) /*ArrayIterator::is_ok*/;
472 if (!UNTAG_Bool(variable4)) break; /*for*/
473 variable4 = ((array___ArrayIterator___item_t)CALL(variable3,COLOR_abstract_collection___Iterator___item))(variable3) /*ArrayIterator::item*/;
474 variable6 = ATTR_abstractmetamodel___MMLocalClass____module( self) /*MMLocalClass::_module*/;
475 variable6 = ((abstractmetamodel___MMLocalClass___for_module_t)CALL( variable4 /*sup*/,COLOR_abstractmetamodel___MMLocalClass___for_module))( variable4 /*sup*/, variable6) /*MMLocalClass::for_module*/;
476 variable5 = variable6;
477 variable6 = TAG_Bool(!UNTAG_Bool(TAG_Bool(( variable5 /*cla*/ == NIT_NULL /*null*/) || (( variable5 /*cla*/ != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL( variable5 /*cla*/,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable5 /*cla*/, NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL( variable5 /*cla*/,COLOR_kernel___Object_____eqeq))( variable5 /*cla*/, NIT_NULL /*null*/) /*Object::==*/)))))));
478 if (!UNTAG_Bool(variable6)) { fprintf(stderr, "Assert%s failed", ""); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_inheritance___MMLocalClass___add_super_classes, LOCATE_inheritance, 215); nit_exit(1);}
479 ((array___AbstractArray___add_t)CALL( variable0 /*supers*/,COLOR_abstract_collection___SimpleCollection___add))( variable0 /*supers*/, variable5 /*cla*/) /*AbstractArray::add*/;
480 continue_22: while(0);
481 ((array___ArrayIterator___next_t)CALL(variable3,COLOR_abstract_collection___Iterator___next))(variable3) /*ArrayIterator::next*/;
482 }
483 break_22: while(0);
484 continue_21: while(0);
485 ((array___ArrayIterator___next_t)CALL(variable1,COLOR_abstract_collection___Iterator___next))(variable1) /*ArrayIterator::next*/;
486 }
487 break_21: while(0);
488 tracehead = trace.prev;
489 return;
490 }
491 void inheritance___MMLocalClass___add_explicit_classes(val_t self, val_t param0) {
492 struct trace_t trace = {NULL, LOCATE_inheritance, 221, LOCATE_inheritance___MMLocalClass___add_explicit_classes};
493 val_t variable0;
494 val_t variable1;
495 val_t variable2;
496 val_t variable3;
497 trace.prev = tracehead; tracehead = &trace;
498 variable0 = param0;
499 variable1 = ATTR_inheritance___MMLocalClass____direct_parents( self) /*MMLocalClass::_direct_parents*/;
500 variable1 = ((array___AbstractArray___iterator_t)CALL(variable1,COLOR_abstract_collection___Collection___iterator))(variable1) /*AbstractArray::iterator*/;
501 while (true) { /*for*/
502 variable2 = ((array___ArrayIterator___is_ok_t)CALL(variable1,COLOR_abstract_collection___Iterator___is_ok))(variable1) /*ArrayIterator::is_ok*/;
503 if (!UNTAG_Bool(variable2)) break; /*for*/
504 variable2 = ((array___ArrayIterator___item_t)CALL(variable1,COLOR_abstract_collection___Iterator___item))(variable1) /*ArrayIterator::item*/;
505 variable3 = ((static_type___MMAncestor___local_class_t)CALL( variable2 /*p*/,COLOR_static_type___MMAncestor___local_class))( variable2 /*p*/) /*MMAncestor::local_class*/;
506 ((array___AbstractArray___add_t)CALL( variable0 /*supers*/,COLOR_abstract_collection___SimpleCollection___add))( variable0 /*supers*/, variable3) /*AbstractArray::add*/;
507 continue_24: while(0);
508 ((array___ArrayIterator___next_t)CALL(variable1,COLOR_abstract_collection___Iterator___next))(variable1) /*ArrayIterator::next*/;
509 }
510 break_24: while(0);
511 tracehead = trace.prev;
512 return;
513 }
514 void inheritance___MMLocalClass___compute_super_parents(val_t self, val_t param0) {
515 struct trace_t trace = {NULL, LOCATE_inheritance, 229, LOCATE_inheritance___MMLocalClass___compute_super_parents};
516 val_t variable0;
517 val_t variable1;
518 val_t variable2;
519 val_t variable3;
520 trace.prev = tracehead; tracehead = &trace;
521 variable0 = param0;
522 variable1 = ((array___AbstractArray___iterator_t)CALL( variable0 /*supers*/,COLOR_abstract_collection___Collection___iterator))( variable0 /*supers*/) /*AbstractArray::iterator*/;
523 while (true) { /*for*/
524 variable2 = ((array___ArrayIterator___is_ok_t)CALL(variable1,COLOR_abstract_collection___Iterator___is_ok))(variable1) /*ArrayIterator::is_ok*/;
525 if (!UNTAG_Bool(variable2)) break; /*for*/
526 variable2 = ((array___ArrayIterator___item_t)CALL(variable1,COLOR_abstract_collection___Iterator___item))(variable1) /*ArrayIterator::item*/;
527 variable3 = TAG_Bool(!UNTAG_Bool(TAG_Bool(( variable2 /*p*/ == NIT_NULL /*null*/) || (( variable2 /*p*/ != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL( variable2 /*p*/,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable2 /*p*/, NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL( variable2 /*p*/,COLOR_kernel___Object_____eqeq))( variable2 /*p*/, NIT_NULL /*null*/) /*Object::==*/)))))));
528 if (!UNTAG_Bool(variable3)) { fprintf(stderr, "Assert%s failed", ""); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_inheritance___MMLocalClass___compute_super_parents, LOCATE_inheritance, 233); nit_exit(1);}
529 ((inheritance___MMLocalClass___compute_super_classes_t)CALL( variable2 /*p*/,COLOR_inheritance___MMLocalClass___compute_super_classes))( variable2 /*p*/) /*MMLocalClass::compute_super_classes*/;
530 continue_26: while(0);
531 ((array___ArrayIterator___next_t)CALL(variable1,COLOR_abstract_collection___Iterator___next))(variable1) /*ArrayIterator::next*/;
532 }
533 break_26: while(0);
534 tracehead = trace.prev;
535 return;
536 }
537 val_t inheritance___MMLocalClass___build_ancestors(val_t self) {
538 struct trace_t trace = {NULL, LOCATE_inheritance, 238, LOCATE_inheritance___MMLocalClass___build_ancestors};
539 val_t variable0;
540 val_t variable1;
541 val_t variable2;
542 val_t variable3;
543 val_t variable4;
544 trace.prev = tracehead; tracehead = &trace;
545 variable1 = NEW_array___Array___init(); /*new Array[E]*/
546 variable0 = variable1;
547 variable1 = ATTR_abstractmetamodel___MMLocalClass____crhe( self) /*MMLocalClass::_crhe*/;
548 variable1 = TAG_Bool(!UNTAG_Bool(TAG_Bool((variable1 == NIT_NULL /*null*/) || ((variable1 != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL(variable1,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable1, NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable1,COLOR_kernel___Object_____eqeq))(variable1, NIT_NULL /*null*/) /*Object::==*/)))))));
549 if (!UNTAG_Bool(variable1)) { fprintf(stderr, "Assert%s failed", ""); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_inheritance___MMLocalClass___build_ancestors, LOCATE_inheritance, 243); nit_exit(1);}
550 variable1 = ATTR_abstractmetamodel___MMLocalClass____crhe( self) /*MMLocalClass::_crhe*/;
551 variable1 = ((partial_order___PartialOrderElement___direct_greaters_t)CALL(variable1,COLOR_partial_order___PartialOrderElement___direct_greaters))(variable1) /*PartialOrderElement::direct_greaters*/;
552 variable1 = ((array___AbstractArray___iterator_t)CALL(variable1,COLOR_abstract_collection___Collection___iterator))(variable1) /*AbstractArray::iterator*/;
553 while (true) { /*for*/
554 variable2 = ((array___ArrayIterator___is_ok_t)CALL(variable1,COLOR_abstract_collection___Iterator___is_ok))(variable1) /*ArrayIterator::is_ok*/;
555 if (!UNTAG_Bool(variable2)) break; /*for*/
556 variable2 = ((array___ArrayIterator___item_t)CALL(variable1,COLOR_abstract_collection___Iterator___item))(variable1) /*ArrayIterator::item*/;
557 variable3 = TAG_Bool(!UNTAG_Bool(TAG_Bool(( variable2 /*p*/ == self) || (( variable2 /*p*/ != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL( variable2 /*p*/,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable2 /*p*/, self)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL( variable2 /*p*/,COLOR_kernel___Object_____eqeq))( variable2 /*p*/, self) /*Object::==*/)))))));
558 if (!UNTAG_Bool(variable3)) { fprintf(stderr, "Assert%s failed", ""); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_inheritance___MMLocalClass___build_ancestors, LOCATE_inheritance, 245); nit_exit(1);}
559 variable4 = NEW_inheritance___MMRefineAncestor___init( self, variable2 /*p*/); /*new MMRefineAncestor*/
560 variable3 = variable4;
561 ((inheritance___MMAncestor___add_in_t)CALL( variable3 /*anc*/,COLOR_inheritance___MMAncestor___add_in))( variable3 /*anc*/, variable0 /*all_ancestors*/) /*MMAncestor::add_in*/;
562 continue_28: while(0);
563 ((array___ArrayIterator___next_t)CALL(variable1,COLOR_abstract_collection___Iterator___next))(variable1) /*ArrayIterator::next*/;
564 }
565 break_28: while(0);
566 variable1 = ATTR_inheritance___MMLocalClass____direct_parents( self) /*MMLocalClass::_direct_parents*/;
567 variable1 = ((array___AbstractArray___iterator_t)CALL(variable1,COLOR_abstract_collection___Collection___iterator))(variable1) /*AbstractArray::iterator*/;
568 while (true) { /*for*/
569 variable2 = ((array___ArrayIterator___is_ok_t)CALL(variable1,COLOR_abstract_collection___Iterator___is_ok))(variable1) /*ArrayIterator::is_ok*/;
570 if (!UNTAG_Bool(variable2)) break; /*for*/
571 variable2 = ((array___ArrayIterator___item_t)CALL(variable1,COLOR_abstract_collection___Iterator___item))(variable1) /*ArrayIterator::item*/;
572 variable3 = ((static_type___MMAncestor___local_class_t)CALL( variable2 /*anc*/,COLOR_static_type___MMAncestor___local_class))( variable2 /*anc*/) /*MMAncestor::local_class*/;
573 variable3 = TAG_Bool(!UNTAG_Bool(TAG_Bool((variable3 == self) || ((variable3 != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL(variable3,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable3, self)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable3,COLOR_kernel___Object_____eqeq))(variable3, self) /*Object::==*/)))))));
574 if (!UNTAG_Bool(variable3)) { fprintf(stderr, "Assert%s failed", ""); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_inheritance___MMLocalClass___build_ancestors, LOCATE_inheritance, 250); nit_exit(1);}
575 ((inheritance___MMAncestor___add_in_t)CALL( variable2 /*anc*/,COLOR_inheritance___MMAncestor___add_in))( variable2 /*anc*/, variable0 /*all_ancestors*/) /*MMAncestor::add_in*/;
576 continue_29: while(0);
577 ((array___ArrayIterator___next_t)CALL(variable1,COLOR_abstract_collection___Iterator___next))(variable1) /*ArrayIterator::next*/;
578 }
579 break_29: while(0);
580 variable0 = variable0 /*all_ancestors*/;
581 goto return_label27;
582 return_label27: while(false);
583 tracehead = trace.prev;
584 return variable0;
585 }
586 val_t inheritance___MMLocalClass___group_ancestors(val_t self, val_t param0) {
587 struct trace_t trace = {NULL, LOCATE_inheritance, 256, LOCATE_inheritance___MMLocalClass___group_ancestors};
588 val_t variable0;
589 val_t variable1;
590 val_t variable2;
591 val_t variable3;
592 val_t variable4;
593 val_t variable5;
594 val_t variable6;
595 trace.prev = tracehead; tracehead = &trace;
596 variable0 = param0;
597 variable2 = NEW_hash___HashMap___init(); /*new HashMap[K, V]*/
598 variable1 = variable2;
599 variable2 = ((array___AbstractArray___iterator_t)CALL( variable0 /*all*/,COLOR_abstract_collection___Collection___iterator))( variable0 /*all*/) /*AbstractArray::iterator*/;
600 while (true) { /*for*/
601 variable3 = ((array___ArrayIterator___is_ok_t)CALL(variable2,COLOR_abstract_collection___Iterator___is_ok))(variable2) /*ArrayIterator::is_ok*/;
602 if (!UNTAG_Bool(variable3)) break; /*for*/
603 variable3 = ((array___ArrayIterator___item_t)CALL(variable2,COLOR_abstract_collection___Iterator___item))(variable2) /*ArrayIterator::item*/;
604 variable5 = ((static_type___MMAncestor___local_class_t)CALL( variable3 /*a*/,COLOR_static_type___MMAncestor___local_class))( variable3 /*a*/) /*MMAncestor::local_class*/;
605 variable4 = variable5;
606 variable5 = NIT_NULL /*decl variable set*/;
607 ((inheritance___MMLocalClass___compute_ancestors_t)CALL( variable4 /*c*/,COLOR_inheritance___MMLocalClass___compute_ancestors))( variable4 /*c*/) /*MMLocalClass::compute_ancestors*/;
608 variable6 = ((abstract_collection___CoupleMap___has_key_t)CALL( variable1 /*map*/,COLOR_abstract_collection___Map___has_key))( variable1 /*map*/, variable4 /*c*/) /*CoupleMap::has_key*/;
609 if (UNTAG_Bool(variable6)) { /*if*/
610 variable6 = ((abstract_collection___CoupleMap_____bra_t)CALL( variable1 /*map*/,COLOR_abstract_collection___Map_____bra))( variable1 /*map*/, variable4 /*c*/) /*CoupleMap::[]*/;
611 variable5 = variable6 /*set=*/;
612 } else { /*if*/
613 variable6 = NEW_hash___HashSet___init(); /*new HashSet[E]*/
614 variable5 = variable6 /*set=*/;
615 ((hash___HashMap_____braeq_t)CALL( variable1 /*map*/,COLOR_abstract_collection___Map_____braeq))( variable1 /*map*/, variable4 /*c*/, variable5 /*set*/) /*HashMap::[]=*/;
616 }
617 ((abstract_collection___SimpleCollection___add_t)CALL( variable5 /*set*/,COLOR_abstract_collection___SimpleCollection___add))( variable5 /*set*/, variable3 /*a*/) /*SimpleCollection::add*/;
618 continue_31: while(0);
619 ((array___ArrayIterator___next_t)CALL(variable2,COLOR_abstract_collection___Iterator___next))(variable2) /*ArrayIterator::next*/;
620 }
621 break_31: while(0);
622 variable1 = variable1 /*map*/;
623 goto return_label30;
624 return_label30: while(false);
625 tracehead = trace.prev;
626 return variable1;
627 }
628 val_t inheritance___MMLocalClass___merge_ancestors(val_t self, val_t param0) {
629 struct trace_t trace = {NULL, LOCATE_inheritance, 278, LOCATE_inheritance___MMLocalClass___merge_ancestors};
630 val_t variable0;
631 val_t variable1;
632 val_t variable2;
633 val_t variable3;
634 val_t variable4;
635 val_t variable5;
636 val_t variable6;
637 val_t variable7;
638 val_t variable8;
639 val_t variable9;
640 val_t variable10;
641 val_t variable11;
642 val_t variable12;
643 val_t variable13;
644 val_t variable14;
645 trace.prev = tracehead; tracehead = &trace;
646 variable0 = param0;
647 variable2 = NEW_hash___HashSet___init(); /*new HashSet[E]*/
648 variable1 = variable2;
649 variable3 = NEW_array___Array___init(); /*new Array[E]*/
650 variable2 = variable3;
651 variable3 = ((abstract_collection___Collection___iterator_t)CALL( variable0 /*set*/,COLOR_abstract_collection___Collection___iterator))( variable0 /*set*/) /*Collection::iterator*/;
652 while (true) { /*for*/
653 variable4 = ((abstract_collection___Iterator___is_ok_t)CALL(variable3,COLOR_abstract_collection___Iterator___is_ok))(variable3) /*Iterator::is_ok*/;
654 if (!UNTAG_Bool(variable4)) break; /*for*/
655 variable4 = ((abstract_collection___Iterator___item_t)CALL(variable3,COLOR_abstract_collection___Iterator___item))(variable3) /*Iterator::item*/;
656 variable6 = ((abstract_collection___Collection___iterator_t)CALL( variable0 /*set*/,COLOR_abstract_collection___Collection___iterator))( variable0 /*set*/) /*Collection::iterator*/;
657 variable5 = variable6;
658 variable6 = TAG_Bool(true);
659 while (true) { /*while*/
660 variable7 = ((abstract_collection___Iterator___is_ok_t)CALL( variable5 /*it*/,COLOR_abstract_collection___Iterator___is_ok))( variable5 /*it*/) /*Iterator::is_ok*/;
661 variable8 = variable7;
662 if (UNTAG_Bool(variable8)) { /* and */
663 variable8 = variable6 /*search*/;
664 }
665 variable7 = variable8;
666 if (!UNTAG_Bool(variable7)) break; /* while*/
667 variable8 = ((abstract_collection___Iterator___item_t)CALL( variable5 /*it*/,COLOR_abstract_collection___Iterator___item))( variable5 /*it*/) /*Iterator::item*/;
668 variable8 = TAG_Bool(( variable4 /*t*/ == variable8) || (( variable4 /*t*/ != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL( variable4 /*t*/,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable4 /*t*/,variable8)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL( variable4 /*t*/,COLOR_kernel___Object_____eqeq))( variable4 /*t*/, variable8) /*Object::==*/)))));
669 variable7 = variable8;
670 variable8 = ((abstract_collection___Iterator___item_t)CALL( variable5 /*it*/,COLOR_abstract_collection___Iterator___item))( variable5 /*it*/) /*Iterator::item*/;
671 variable8 = ((hash___HashSet___has_t)CALL( variable1 /*marks*/,COLOR_abstract_collection___Collection___has))( variable1 /*marks*/, variable8) /*HashSet::has*/;
672 variable7 = variable8 /*a=*/;
673 variable8 = ((abstract_collection___Iterator___item_t)CALL( variable5 /*it*/,COLOR_abstract_collection___Iterator___item))( variable5 /*it*/) /*Iterator::item*/;
674 variable8 = ((static_type___MMAncestor___stype_t)CALL(variable8,COLOR_static_type___MMAncestor___stype))(variable8) /*MMAncestor::stype*/;
675 variable9 = ((static_type___MMAncestor___stype_t)CALL( variable4 /*t*/,COLOR_static_type___MMAncestor___stype))( variable4 /*t*/) /*MMAncestor::stype*/;
676 variable8 = ((static_type___MMType_____l_t)CALL(variable8,COLOR_static_type___MMType_____l))(variable8, variable9) /*MMType::<*/;
677 variable7 = variable8 /*a=*/;
678 variable8 = ((abstract_collection___Iterator___item_t)CALL( variable5 /*it*/,COLOR_abstract_collection___Iterator___item))( variable5 /*it*/) /*Iterator::item*/;
679 variable8 = TAG_Bool(( variable4 /*t*/ == variable8) || (( variable4 /*t*/ != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL( variable4 /*t*/,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable4 /*t*/,variable8)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL( variable4 /*t*/,COLOR_kernel___Object_____eqeq))( variable4 /*t*/, variable8) /*Object::==*/)))));
680 variable9 = variable8;
681 if (!UNTAG_Bool(variable9)) { /* or */
682 variable9 = ((abstract_collection___Iterator___item_t)CALL( variable5 /*it*/,COLOR_abstract_collection___Iterator___item))( variable5 /*it*/) /*Iterator::item*/;
683 variable9 = ((hash___HashSet___has_t)CALL( variable1 /*marks*/,COLOR_abstract_collection___Collection___has))( variable1 /*marks*/, variable9) /*HashSet::has*/;
684 }
685 variable8 = variable9;
686 variable8 = TAG_Bool(!UNTAG_Bool(variable8));
687 if (UNTAG_Bool(variable8)) { /* and */
688 variable8 = ((abstract_collection___Iterator___item_t)CALL( variable5 /*it*/,COLOR_abstract_collection___Iterator___item))( variable5 /*it*/) /*Iterator::item*/;
689 variable8 = ((static_type___MMAncestor___stype_t)CALL(variable8,COLOR_static_type___MMAncestor___stype))(variable8) /*MMAncestor::stype*/;
690 variable9 = ((static_type___MMAncestor___stype_t)CALL( variable4 /*t*/,COLOR_static_type___MMAncestor___stype))( variable4 /*t*/) /*MMAncestor::stype*/;
691 variable8 = ((static_type___MMType_____l_t)CALL(variable8,COLOR_static_type___MMType_____l))(variable8, variable9) /*MMType::<*/;
692 }
693 if (UNTAG_Bool(variable8)) { /*if*/
694 ((hash___HashSet___add_t)CALL( variable1 /*marks*/,COLOR_abstract_collection___SimpleCollection___add))( variable1 /*marks*/, variable4 /*t*/) /*HashSet::add*/;
695 variable6 = TAG_Bool(false) /*search=*/;
696 }
697 ((abstract_collection___Iterator___next_t)CALL( variable5 /*it*/,COLOR_abstract_collection___Iterator___next))( variable5 /*it*/) /*Iterator::next*/;
698 continue_34: while(0);
699 }
700 break_34: while(0);
701 variable7 = ((hash___HashSet___has_t)CALL( variable1 /*marks*/,COLOR_abstract_collection___Collection___has))( variable1 /*marks*/, variable4 /*t*/) /*HashSet::has*/;
702 if (UNTAG_Bool( TAG_Bool(!UNTAG_Bool(variable7)))) { /*if*/
703 ((array___AbstractArray___add_t)CALL( variable2 /*res*/,COLOR_abstract_collection___SimpleCollection___add))( variable2 /*res*/, variable4 /*t*/) /*AbstractArray::add*/;
704 }
705 continue_33: while(0);
706 ((abstract_collection___Iterator___next_t)CALL(variable3,COLOR_abstract_collection___Iterator___next))(variable3) /*Iterator::next*/;
707 }
708 break_33: while(0);
709 variable3 = ((array___AbstractArray___length_t)CALL( variable2 /*res*/,COLOR_abstract_collection___Collection___length))( variable2 /*res*/) /*AbstractArray::length*/;
710 variable3 = TAG_Bool(UNTAG_Int(variable3)>UNTAG_Int( TAG_Int(1)));
711 if (UNTAG_Bool(variable3)) { /*if*/
712 variable3 = ((file___Object___stderr_t)CALL( self,COLOR_file___Object___stderr))( self) /*Object::stderr*/;
713 variable4 = NEW_string___String___init(); /*new String*/
714 variable5 = NEW_string___String___with_native(BOX_NativeString("Fatal error: Incompatibles ancestors for "), TAG_Int(41)); /*new String*/
715 variable6 = variable5;
716 ((string___String___append_t)CALL(variable4,COLOR_abstract_collection___IndexedCollection___append))(variable4, variable6) /*String::append*/;
717 variable7 = ((abstractmetamodel___MMLocalClass___name_t)CALL( self,COLOR_abstractmetamodel___MMLocalClass___name))( self) /*MMLocalClass::name*/;
718 variable8 = variable7;
719 variable8 = ((string___String___to_s_t)CALL(variable8,COLOR_string___Object___to_s))(variable8) /*String::to_s*/;
720 ((string___String___append_t)CALL(variable4,COLOR_abstract_collection___IndexedCollection___append))(variable4, variable8) /*String::append*/;
721 variable9 = NEW_string___String___with_native(BOX_NativeString(": "), TAG_Int(2)); /*new String*/
722 variable10 = variable9;
723 ((string___String___append_t)CALL(variable4,COLOR_abstract_collection___IndexedCollection___append))(variable4, variable10) /*String::append*/;
724 variable11 = NEW_string___String___with_native(BOX_NativeString(", "), TAG_Int(2)); /*new String*/
725 variable11 = ((string___Collection___join_t)CALL( variable2 /*res*/,COLOR_string___Collection___join))( variable2 /*res*/, variable11) /*Collection::join*/;
726 variable12 = variable11;
727 ((string___String___append_t)CALL(variable4,COLOR_abstract_collection___IndexedCollection___append))(variable4, variable12) /*String::append*/;
728 variable13 = NEW_string___String___with_native(BOX_NativeString("\n"), TAG_Int(1)); /*new String*/
729 variable14 = variable13;
730 ((string___String___append_t)CALL(variable4,COLOR_abstract_collection___IndexedCollection___append))(variable4, variable14) /*String::append*/;
731 ((file___OFStream___write_t)CALL(variable3,COLOR_stream___OStream___write))(variable3, variable4) /*OFStream::write*/;
732 exit(UNTAG_Int( TAG_Int(1)));
733 }
734 variable3 = ((abstract_collection___IndexedCollection___first_t)CALL( variable2 /*res*/,COLOR_abstract_collection___Collection___first))( variable2 /*res*/) /*IndexedCollection::first*/;
735 variable1 = variable3;
736 goto return_label32;
737 return_label32: while(false);
738 tracehead = trace.prev;
739 return variable1;
740 }
741 val_t inheritance___MMLocalClass___inherit_local_property(val_t self, val_t param0) {
742 struct trace_t trace = {NULL, LOCATE_inheritance, 311, LOCATE_inheritance___MMLocalClass___inherit_local_property};
743 val_t variable0;
744 val_t variable1;
745 val_t variable2;
746 val_t variable3;
747 val_t variable4;
748 val_t variable5;
749 val_t variable6;
750 val_t variable7;
751 val_t variable8;
752 val_t variable9;
753 val_t variable10;
754 val_t variable11;
755 val_t variable12;
756 val_t variable13;
757 val_t variable14;
758 val_t variable15;
759 val_t variable16;
760 val_t variable17;
761 val_t variable18;
762 val_t variable19;
763 trace.prev = tracehead; tracehead = &trace;
764 variable0 = param0;
765 variable1 = ATTR_abstractmetamodel___MMLocalClass____local_property_by_global( self) /*MMLocalClass::_local_property_by_global*/;
766 variable1 = ((abstract_collection___Map___has_key_t)CALL(variable1,COLOR_abstract_collection___Map___has_key))(variable1, variable0 /*glob*/) /*Map::has_key*/;
767 if (!UNTAG_Bool( TAG_Bool(!UNTAG_Bool(variable1)))) { fprintf(stderr, "Assert%s failed", ""); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_inheritance___MMLocalClass___inherit_local_property, LOCATE_inheritance, 316); nit_exit(1);}
768 variable1 = TAG_Bool(!UNTAG_Bool(TAG_Bool(( variable0 /*glob*/ == NIT_NULL /*null*/) || (( variable0 /*glob*/ != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL( variable0 /*glob*/,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable0 /*glob*/, NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL( variable0 /*glob*/,COLOR_kernel___Object_____eqeq))( variable0 /*glob*/, NIT_NULL /*null*/) /*Object::==*/)))))));
769 if (!UNTAG_Bool(variable1)) { fprintf(stderr, "Assert%s failed", ""); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_inheritance___MMLocalClass___inherit_local_property, LOCATE_inheritance, 317); nit_exit(1);}
770 variable1 = NIT_NULL /*decl variable impl*/;
771 variable3 = ((abstractmetamodel___MMGlobalProperty___property_hierarchy_t)CALL( variable0 /*glob*/,COLOR_abstractmetamodel___MMGlobalProperty___property_hierarchy))( variable0 /*glob*/) /*MMGlobalProperty::property_hierarchy*/;
772 variable2 = variable3;
773 variable4 = ((abstractmetamodel___MMLocalClass___che_t)CALL( self,COLOR_abstractmetamodel___MMLocalClass___che))( self) /*MMLocalClass::che*/;
774 variable4 = ((partial_order___PartialOrderElement___direct_greaters_t)CALL(variable4,COLOR_partial_order___PartialOrderElement___direct_greaters))(variable4) /*PartialOrderElement::direct_greaters*/;
775 variable3 = variable4;
776 variable4 = ((partial_order___PartialOrder___length_t)CALL( variable2 /*ghier*/,COLOR_abstract_collection___Collection___length))( variable2 /*ghier*/) /*PartialOrder::length*/;
777 variable4 = TAG_Bool((variable4)==( TAG_Int(1)));
778 if (UNTAG_Bool(variable4)) { /*if*/
779 variable4 = ((abstractmetamodel___MMGlobalProperty___intro_t)CALL( variable0 /*glob*/,COLOR_abstractmetamodel___MMGlobalProperty___intro))( variable0 /*glob*/) /*MMGlobalProperty::intro*/;
780 variable1 = variable4 /*impl=*/;
781 } else { /*if*/
782 variable4 = ((array___AbstractArray___length_t)CALL( variable3 /*supers*/,COLOR_abstract_collection___Collection___length))( variable3 /*supers*/) /*AbstractArray::length*/;
783 variable4 = TAG_Bool((variable4)==( TAG_Int(1)));
784 if (UNTAG_Bool(variable4)) { /*if*/
785 variable4 = ((abstract_collection___IndexedCollection___first_t)CALL( variable3 /*supers*/,COLOR_abstract_collection___Collection___first))( variable3 /*supers*/) /*IndexedCollection::first*/;
786 variable4 = ((inheritance___MMLocalClass_____bra_t)CALL(variable4,COLOR_abstractmetamodel___MMLocalClass_____bra))(variable4, variable0 /*glob*/) /*MMLocalClass::[]*/;
787 variable1 = variable4 /*impl=*/;
788 } else { /*if*/
789 variable5 = NEW_array___ArraySet___init(); /*new ArraySet[E]*/
790 variable4 = variable5;
791 variable5 = ((array___AbstractArray___iterator_t)CALL( variable3 /*supers*/,COLOR_abstract_collection___Collection___iterator))( variable3 /*supers*/) /*AbstractArray::iterator*/;
792 while (true) { /*for*/
793 variable6 = ((array___ArrayIterator___is_ok_t)CALL(variable5,COLOR_abstract_collection___Iterator___is_ok))(variable5) /*ArrayIterator::is_ok*/;
794 if (!UNTAG_Bool(variable6)) break; /*for*/
795 variable6 = ((array___ArrayIterator___item_t)CALL(variable5,COLOR_abstract_collection___Iterator___item))(variable5) /*ArrayIterator::item*/;
796 variable8 = ((inheritance___MMLocalClass_____bra_t)CALL( variable6 /*sc*/,COLOR_abstractmetamodel___MMLocalClass_____bra))( variable6 /*sc*/, variable0 /*glob*/) /*MMLocalClass::[]*/;
797 variable7 = variable8;
798 variable8 = TAG_Bool(!UNTAG_Bool(TAG_Bool(( variable7 /*p*/ == NIT_NULL /*null*/) || (( variable7 /*p*/ != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL( variable7 /*p*/,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable7 /*p*/, NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL( variable7 /*p*/,COLOR_kernel___Object_____eqeq))( variable7 /*p*/, NIT_NULL /*null*/) /*Object::==*/)))))));
799 if (UNTAG_Bool(variable8)) { /*if*/
800 ((array___ArraySet___add_t)CALL( variable4 /*impls*/,COLOR_abstract_collection___SimpleCollection___add))( variable4 /*impls*/, variable7 /*p*/) /*ArraySet::add*/;
801 }
802 continue_36: while(0);
803 ((array___ArrayIterator___next_t)CALL(variable5,COLOR_abstract_collection___Iterator___next))(variable5) /*ArrayIterator::next*/;
804 }
805 break_36: while(0);
806 variable6 = ((partial_order___PartialOrder___select_smallests_t)CALL( variable2 /*ghier*/,COLOR_partial_order___PartialOrder___select_smallests))( variable2 /*ghier*/, variable4 /*impls*/) /*PartialOrder::select_smallests*/;
807 variable5 = variable6;
808 variable6 = ((array___AbstractArray___length_t)CALL( variable5 /*impls2*/,COLOR_abstract_collection___Collection___length))( variable5 /*impls2*/) /*AbstractArray::length*/;
809 variable6 = TAG_Bool((variable6)!=( TAG_Int(1)));
810 if (UNTAG_Bool(variable6)) { /*if*/
811 variable6 = ((file___Object___stderr_t)CALL( self,COLOR_file___Object___stderr))( self) /*Object::stderr*/;
812 variable7 = NEW_string___String___with_native(BOX_NativeString("Fatal error: inherit_local_property error\n"), TAG_Int(42)); /*new String*/
813 ((file___OFStream___write_t)CALL(variable6,COLOR_stream___OStream___write))(variable6, variable7) /*OFStream::write*/;
814 variable6 = NEW_string___String___init(); /*new String*/
815 variable7 = NEW_string___String___with_native(BOX_NativeString("------- "), TAG_Int(8)); /*new String*/
816 variable8 = variable7;
817 ((string___String___append_t)CALL(variable6,COLOR_abstract_collection___IndexedCollection___append))(variable6, variable8) /*String::append*/;
818 variable9 = ((abstractmetamodel___MMLocalClass___module_t)CALL( self,COLOR_abstractmetamodel___MMLocalClass___module))( self) /*MMLocalClass::module*/;
819 variable10 = variable9;
820 variable10 = ((string___String___to_s_t)CALL(variable10,COLOR_string___Object___to_s))(variable10) /*String::to_s*/;
821 ((string___String___append_t)CALL(variable6,COLOR_abstract_collection___IndexedCollection___append))(variable6, variable10) /*String::append*/;
822 variable11 = NEW_string___String___with_native(BOX_NativeString("::"), TAG_Int(2)); /*new String*/
823 variable12 = variable11;
824 ((string___String___append_t)CALL(variable6,COLOR_abstract_collection___IndexedCollection___append))(variable6, variable12) /*String::append*/;
825 variable13 = self;
826 variable13 = ((string___String___to_s_t)CALL(variable13,COLOR_string___Object___to_s))(variable13) /*String::to_s*/;
827 ((string___String___append_t)CALL(variable6,COLOR_abstract_collection___IndexedCollection___append))(variable6, variable13) /*String::append*/;
828 variable14 = NEW_string___String___with_native(BOX_NativeString(" "), TAG_Int(1)); /*new String*/
829 variable15 = variable14;
830 ((string___String___append_t)CALL(variable6,COLOR_abstract_collection___IndexedCollection___append))(variable6, variable15) /*String::append*/;
831 variable16 = ((abstractmetamodel___MMGlobalProperty___intro_t)CALL( variable0 /*glob*/,COLOR_abstractmetamodel___MMGlobalProperty___intro))( variable0 /*glob*/) /*MMGlobalProperty::intro*/;
832 variable16 = ((abstractmetamodel___MMLocalProperty___full_name_t)CALL(variable16,COLOR_abstractmetamodel___MMLocalProperty___full_name))(variable16) /*MMLocalProperty::full_name*/;
833 variable17 = variable16;
834 ((string___String___append_t)CALL(variable6,COLOR_abstract_collection___IndexedCollection___append))(variable6, variable17) /*String::append*/;
835 variable18 = NEW_string___String___with_native(BOX_NativeString(""), TAG_Int(0)); /*new String*/
836 variable19 = variable18;
837 ((string___String___append_t)CALL(variable6,COLOR_abstract_collection___IndexedCollection___append))(variable6, variable19) /*String::append*/;
838 ((file___Object___print_t)CALL( self,COLOR_file___Object___print))( self, variable6) /*Object::print*/;
839 variable6 = ((array___AbstractArray___iterator_t)CALL( variable5 /*impls2*/,COLOR_abstract_collection___Collection___iterator))( variable5 /*impls2*/) /*AbstractArray::iterator*/;
840 while (true) { /*for*/
841 variable7 = ((array___ArrayIterator___is_ok_t)CALL(variable6,COLOR_abstract_collection___Iterator___is_ok))(variable6) /*ArrayIterator::is_ok*/;
842 if (!UNTAG_Bool(variable7)) break; /*for*/
843 variable7 = ((array___ArrayIterator___item_t)CALL(variable6,COLOR_abstract_collection___Iterator___item))(variable6) /*ArrayIterator::item*/;
844 variable8 = NEW_string___String___init(); /*new String*/
845 variable9 = NEW_string___String___with_native(BOX_NativeString(" "), TAG_Int(3)); /*new String*/
846 variable10 = variable9;
847 ((string___String___append_t)CALL(variable8,COLOR_abstract_collection___IndexedCollection___append))(variable8, variable10) /*String::append*/;
848 variable11 = ((abstractmetamodel___MMLocalProperty___full_name_t)CALL( variable7 /*i*/,COLOR_abstractmetamodel___MMLocalProperty___full_name))( variable7 /*i*/) /*MMLocalProperty::full_name*/;
849 variable12 = variable11;
850 ((string___String___append_t)CALL(variable8,COLOR_abstract_collection___IndexedCollection___append))(variable8, variable12) /*String::append*/;
851 variable13 = NEW_string___String___with_native(BOX_NativeString(""), TAG_Int(0)); /*new String*/
852 variable14 = variable13;
853 ((string___String___append_t)CALL(variable8,COLOR_abstract_collection___IndexedCollection___append))(variable8, variable14) /*String::append*/;
854 ((file___Object___print_t)CALL( self,COLOR_file___Object___print))( self, variable8) /*Object::print*/;
855 continue_37: while(0);
856 ((array___ArrayIterator___next_t)CALL(variable6,COLOR_abstract_collection___Iterator___next))(variable6) /*ArrayIterator::next*/;
857 }
858 break_37: while(0);
859 variable6 = NEW_string___String___init(); /*new String*/
860 variable7 = NEW_string___String___with_native(BOX_NativeString("------- "), TAG_Int(8)); /*new String*/
861 variable8 = variable7;
862 ((string___String___append_t)CALL(variable6,COLOR_abstract_collection___IndexedCollection___append))(variable6, variable8) /*String::append*/;
863 variable9 = ((abstractmetamodel___MMGlobalProperty___property_hierarchy_t)CALL( variable0 /*glob*/,COLOR_abstractmetamodel___MMGlobalProperty___property_hierarchy))( variable0 /*glob*/) /*MMGlobalProperty::property_hierarchy*/;
864 variable9 = ((partial_order___PartialOrder___first_t)CALL(variable9,COLOR_abstract_collection___Collection___first))(variable9) /*PartialOrder::first*/;
865 variable10 = variable9;
866 variable10 = ((string___String___to_s_t)CALL(variable10,COLOR_string___Object___to_s))(variable10) /*String::to_s*/;
867 ((string___String___append_t)CALL(variable6,COLOR_abstract_collection___IndexedCollection___append))(variable6, variable10) /*String::append*/;
868 variable11 = NEW_string___String___with_native(BOX_NativeString(""), TAG_Int(0)); /*new String*/
869 variable12 = variable11;
870 ((string___String___append_t)CALL(variable6,COLOR_abstract_collection___IndexedCollection___append))(variable6, variable12) /*String::append*/;
871 ((file___Object___print_t)CALL( self,COLOR_file___Object___print))( self, variable6) /*Object::print*/;
872 variable6 = NEW_string___String___init(); /*new String*/
873 variable7 = NEW_string___String___with_native(BOX_NativeString("------- "), TAG_Int(8)); /*new String*/
874 variable8 = variable7;
875 ((string___String___append_t)CALL(variable6,COLOR_abstract_collection___IndexedCollection___append))(variable6, variable8) /*String::append*/;
876 variable9 = ((abstractmetamodel___MMGlobalProperty___property_hierarchy_t)CALL( variable0 /*glob*/,COLOR_abstractmetamodel___MMGlobalProperty___property_hierarchy))( variable0 /*glob*/) /*MMGlobalProperty::property_hierarchy*/;
877 variable9 = ((partial_order___PartialOrder___to_dot_t)CALL(variable9,COLOR_partial_order___PartialOrder___to_dot))(variable9) /*PartialOrder::to_dot*/;
878 variable10 = variable9;
879 ((string___String___append_t)CALL(variable6,COLOR_abstract_collection___IndexedCollection___append))(variable6, variable10) /*String::append*/;
880 variable11 = NEW_string___String___with_native(BOX_NativeString(""), TAG_Int(0)); /*new String*/
881 variable12 = variable11;
882 ((string___String___append_t)CALL(variable6,COLOR_abstract_collection___IndexedCollection___append))(variable6, variable12) /*String::append*/;
883 ((file___Object___print_t)CALL( self,COLOR_file___Object___print))( self, variable6) /*Object::print*/;
884 exit(UNTAG_Int( TAG_Int(1)));
885 }
886 variable6 = ((abstract_collection___IndexedCollection___first_t)CALL( variable5 /*impls2*/,COLOR_abstract_collection___Collection___first))( variable5 /*impls2*/) /*IndexedCollection::first*/;
887 variable1 = variable6 /*impl=*/;
888 }
889 }
890 variable4 = ATTR_abstractmetamodel___MMLocalClass____local_property_by_global( self) /*MMLocalClass::_local_property_by_global*/;
891 ((abstract_collection___Map_____braeq_t)CALL(variable4,COLOR_abstract_collection___Map_____braeq))(variable4, variable0 /*glob*/, variable1 /*impl*/) /*Map::[]=*/;
892 variable1 = variable1 /*impl*/;
893 goto return_label35;
894 return_label35: while(false);
895 tracehead = trace.prev;
896 return variable1;
897 }
898 void inheritance___MMLocalProperty___inherit_global(val_t self, val_t param0) {
899 struct trace_t trace = {NULL, LOCATE_inheritance, 367, LOCATE_inheritance___MMLocalProperty___inherit_global};
900 val_t variable0;
901 val_t variable1;
902 val_t variable2;
903 val_t variable3;
904 val_t variable4;
905 val_t variable5;
906 trace.prev = tracehead; tracehead = &trace;
907 variable0 = param0;
908 ((abstractmetamodel___MMLocalProperty___set_global_t)CALL( self,COLOR_abstractmetamodel___MMLocalProperty___set_global))( self, variable0 /*g*/) /*MMLocalProperty::set_global*/;
909 variable2 = NEW_array___Array___init(); /*new Array[E]*/
910 variable1 = variable2;
911 variable2 = ((abstractmetamodel___MMLocalProperty___local_class_t)CALL( self,COLOR_abstractmetamodel___MMLocalProperty___local_class))( self) /*MMLocalProperty::local_class*/;
912 variable2 = ((abstractmetamodel___MMLocalClass___che_t)CALL(variable2,COLOR_abstractmetamodel___MMLocalClass___che))(variable2) /*MMLocalClass::che*/;
913 variable2 = ((partial_order___PartialOrderElement___direct_greaters_t)CALL(variable2,COLOR_partial_order___PartialOrderElement___direct_greaters))(variable2) /*PartialOrderElement::direct_greaters*/;
914 variable2 = ((array___AbstractArray___iterator_t)CALL(variable2,COLOR_abstract_collection___Collection___iterator))(variable2) /*AbstractArray::iterator*/;
915 while (true) { /*for*/
916 variable3 = ((array___ArrayIterator___is_ok_t)CALL(variable2,COLOR_abstract_collection___Iterator___is_ok))(variable2) /*ArrayIterator::is_ok*/;
917 if (!UNTAG_Bool(variable3)) break; /*for*/
918 variable3 = ((array___ArrayIterator___item_t)CALL(variable2,COLOR_abstract_collection___Iterator___item))(variable2) /*ArrayIterator::item*/;
919 variable5 = ((inheritance___MMLocalClass_____bra_t)CALL( variable3 /*sc*/,COLOR_abstractmetamodel___MMLocalClass_____bra))( variable3 /*sc*/, variable0 /*g*/) /*MMLocalClass::[]*/;
920 variable4 = variable5;
921 variable5 = TAG_Bool(( variable4 /*p*/ == NIT_NULL /*null*/) || (( variable4 /*p*/ != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL( variable4 /*p*/,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable4 /*p*/, NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL( variable4 /*p*/,COLOR_kernel___Object_____eqeq))( variable4 /*p*/, NIT_NULL /*null*/) /*Object::==*/)))));
922 if (UNTAG_Bool(variable5)) { /*if*/
923 goto continue_39;
924 }
925 ((array___AbstractArray___add_t)CALL( variable1 /*impls*/,COLOR_abstract_collection___SimpleCollection___add))( variable1 /*impls*/, variable4 /*p*/) /*AbstractArray::add*/;
926 continue_39: while(0);
927 ((array___ArrayIterator___next_t)CALL(variable2,COLOR_abstract_collection___Iterator___next))(variable2) /*ArrayIterator::next*/;
928 }
929 break_39: while(0);
930 ((abstractmetamodel___MMGlobalProperty___add_local_property_t)CALL( variable0 /*g*/,COLOR_abstractmetamodel___MMGlobalProperty___add_local_property))( variable0 /*g*/, self, variable1 /*impls*/) /*MMGlobalProperty::add_local_property*/;
931 tracehead = trace.prev;
932 return;
933 }
934 void inheritance___MMAncestor___add_in(val_t self, val_t param0) {
935 struct trace_t trace = {NULL, LOCATE_inheritance, 382, LOCATE_inheritance___MMAncestor___add_in};
936 val_t variable0;
937 val_t variable1;
938 val_t variable2;
939 val_t variable3;
940 val_t variable4;
941 val_t variable5;
942 val_t variable6;
943 val_t variable7;
944 val_t variable8;
945 trace.prev = tracehead; tracehead = &trace;
946 variable0 = param0;
947 variable1 = ((static_type___MMAncestor___stype_t)CALL( self,COLOR_static_type___MMAncestor___stype))( self) /*MMAncestor::stype*/;
948 variable1 = TAG_Bool(!UNTAG_Bool(TAG_Bool((variable1 == NIT_NULL /*null*/) || ((variable1 != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL(variable1,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable1, NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable1,COLOR_kernel___Object_____eqeq))(variable1, NIT_NULL /*null*/) /*Object::==*/)))))));
949 if (!UNTAG_Bool(variable1)) { fprintf(stderr, "Assert%s failed", " 'ancestor' "); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_inheritance___MMAncestor___add_in, LOCATE_inheritance, 385); nit_exit(1);}
950 variable1 = ((static_type___MMAncestor___stype_t)CALL( self,COLOR_static_type___MMAncestor___stype))( self) /*MMAncestor::stype*/;
951 variable1 = ((static_type___MMType___local_class_t)CALL(variable1,COLOR_static_type___MMType___local_class))(variable1) /*MMType::local_class*/;
952 variable1 = TAG_Bool(!UNTAG_Bool(TAG_Bool((variable1 == NIT_NULL /*null*/) || ((variable1 != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL(variable1,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable1, NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable1,COLOR_kernel___Object_____eqeq))(variable1, NIT_NULL /*null*/) /*Object::==*/)))))));
953 if (!UNTAG_Bool(variable1)) { fprintf(stderr, "Assert%s failed", " 'local_class' "); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_inheritance___MMAncestor___add_in, LOCATE_inheritance, 386); nit_exit(1);}
954 ((array___AbstractArray___add_t)CALL( variable0 /*tab*/,COLOR_abstract_collection___SimpleCollection___add))( variable0 /*tab*/, self) /*AbstractArray::add*/;
955 variable1 = ((static_type___MMAncestor___stype_t)CALL( self,COLOR_static_type___MMAncestor___stype))( self) /*MMAncestor::stype*/;
956 variable1 = ((static_type___MMType___local_class_t)CALL(variable1,COLOR_static_type___MMType___local_class))(variable1) /*MMType::local_class*/;
957 ((inheritance___MMLocalClass___compute_ancestors_t)CALL(variable1,COLOR_inheritance___MMLocalClass___compute_ancestors))(variable1) /*MMLocalClass::compute_ancestors*/;
958 variable1 = ((static_type___MMAncestor___stype_t)CALL( self,COLOR_static_type___MMAncestor___stype))( self) /*MMAncestor::stype*/;
959 variable1 = ((static_type___MMType___local_class_t)CALL(variable1,COLOR_static_type___MMType___local_class))(variable1) /*MMType::local_class*/;
960 variable1 = ((static_type___MMLocalClass___ancestors_t)CALL(variable1,COLOR_static_type___MMLocalClass___ancestors))(variable1) /*MMLocalClass::ancestors*/;
961 variable1 = ((abstract_collection___Map___iterator_t)CALL(variable1,COLOR_abstract_collection___Collection___iterator))(variable1) /*Map::iterator*/;
962 while (true) { /*for*/
963 variable2 = ((abstract_collection___Iterator___is_ok_t)CALL(variable1,COLOR_abstract_collection___Iterator___is_ok))(variable1) /*Iterator::is_ok*/;
964 if (!UNTAG_Bool(variable2)) break; /*for*/
965 variable2 = ((abstract_collection___Iterator___item_t)CALL(variable1,COLOR_abstract_collection___Iterator___item))(variable1) /*Iterator::item*/;
966 variable4 = ((static_type___MMAncestor___stype_t)CALL( variable2 /*anc*/,COLOR_static_type___MMAncestor___stype))( variable2 /*anc*/) /*MMAncestor::stype*/;
967 variable5 = ((static_type___MMAncestor___stype_t)CALL( self,COLOR_static_type___MMAncestor___stype))( self) /*MMAncestor::stype*/;
968 variable5 = ((static_type___MMType___module_t)CALL(variable5,COLOR_static_type___MMType___module))(variable5) /*MMType::module*/;
969 variable4 = ((static_type___MMType___for_module_t)CALL(variable4,COLOR_static_type___MMType___for_module))(variable4, variable5) /*MMType::for_module*/;
970 variable3 = variable4;
971 variable5 = ((static_type___MMAncestor___stype_t)CALL( self,COLOR_static_type___MMAncestor___stype))( self) /*MMAncestor::stype*/;
972 variable5 = ((static_type___MMType___adapt_to_t)CALL( variable3 /*aaa*/,COLOR_static_type___MMType___adapt_to))( variable3 /*aaa*/, variable5) /*MMType::adapt_to*/;
973 variable6 = ((static_type___MMAncestor___inheriter_t)CALL( self,COLOR_static_type___MMAncestor___inheriter))( self) /*MMAncestor::inheriter*/;
974 variable6 = ((static_type___MMType___module_t)CALL(variable6,COLOR_static_type___MMType___module))(variable6) /*MMType::module*/;
975 variable5 = ((static_type___MMType___for_module_t)CALL(variable5,COLOR_static_type___MMType___for_module))(variable5, variable6) /*MMType::for_module*/;
976 variable4 = variable5;
977 variable5 = ((static_type___MMType___local_class_t)CALL( variable4 /*a*/,COLOR_static_type___MMType___local_class))( variable4 /*a*/) /*MMType::local_class*/;
978 variable6 = ((static_type___MMAncestor___inheriter_t)CALL( self,COLOR_static_type___MMAncestor___inheriter))( self) /*MMAncestor::inheriter*/;
979 variable6 = ((static_type___MMType___local_class_t)CALL(variable6,COLOR_static_type___MMType___local_class))(variable6) /*MMType::local_class*/;
980 variable5 = TAG_Bool(!UNTAG_Bool(TAG_Bool((variable5 == variable6) || ((variable5 != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL(variable5,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable5,variable6)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable5,COLOR_kernel___Object_____eqeq))(variable5, variable6) /*Object::==*/)))))));
981 if (UNTAG_Bool(variable5)) { /*if*/
982 variable6 = ((array___AbstractArray___iterator_t)CALL( variable0 /*tab*/,COLOR_abstract_collection___Collection___iterator))( variable0 /*tab*/) /*AbstractArray::iterator*/;
983 variable5 = variable6;
984 variable6 = TAG_Bool(true);
985 while (true) { /*while*/
986 variable7 = ((array___ArrayIterator___is_ok_t)CALL( variable5 /*it*/,COLOR_abstract_collection___Iterator___is_ok))( variable5 /*it*/) /*ArrayIterator::is_ok*/;
987 variable8 = variable7;
988 if (UNTAG_Bool(variable8)) { /* and */
989 variable8 = variable6 /*b*/;
990 }
991 variable7 = variable8;
992 if (!UNTAG_Bool(variable7)) break; /* while*/
993 variable7 = ((array___ArrayIterator___item_t)CALL( variable5 /*it*/,COLOR_abstract_collection___Iterator___item))( variable5 /*it*/) /*ArrayIterator::item*/;
994 variable7 = ((static_type___MMAncestor___inheriter_t)CALL(variable7,COLOR_static_type___MMAncestor___inheriter))(variable7) /*MMAncestor::inheriter*/;
995 variable8 = ((static_type___MMAncestor___inheriter_t)CALL( self,COLOR_static_type___MMAncestor___inheriter))( self) /*MMAncestor::inheriter*/;
996 variable7 = TAG_Bool((variable7 == variable8) || ((variable7 != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL(variable7,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable7,variable8)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable7,COLOR_kernel___Object_____eqeq))(variable7, variable8) /*Object::==*/)))));
997 variable8 = variable7;
998 if (UNTAG_Bool(variable8)) { /* and */
999 variable8 = ((array___ArrayIterator___item_t)CALL( variable5 /*it*/,COLOR_abstract_collection___Iterator___item))( variable5 /*it*/) /*ArrayIterator::item*/;
1000 variable8 = ((static_type___MMAncestor___stype_t)CALL(variable8,COLOR_static_type___MMAncestor___stype))(variable8) /*MMAncestor::stype*/;
1001 variable8 = TAG_Bool((variable8 == variable4 /*a*/) || ((variable8 != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL(variable8,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable8, variable4 /*a*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable8,COLOR_kernel___Object_____eqeq))(variable8, variable4 /*a*/) /*Object::==*/)))));
1002 }
1003 variable7 = variable8;
1004 variable6 = TAG_Bool(!UNTAG_Bool(variable7)) /*b=*/;
1005 ((array___ArrayIterator___next_t)CALL( variable5 /*it*/,COLOR_abstract_collection___Iterator___next))( variable5 /*it*/) /*ArrayIterator::next*/;
1006 continue_42: while(0);
1007 }
1008 break_42: while(0);
1009 if (UNTAG_Bool( variable6 /*b*/)) { /*if*/
1010 variable7 = ((static_type___MMAncestor___inheriter_t)CALL( self,COLOR_static_type___MMAncestor___inheriter))( self) /*MMAncestor::inheriter*/;
1011 variable8 = NEW_inheritance___MMSpecAncestor___init(variable7, variable4 /*a*/); /*new MMSpecAncestor*/
1012 variable7 = variable8;
1013 ((array___AbstractArray___add_t)CALL( variable0 /*tab*/,COLOR_abstract_collection___SimpleCollection___add))( variable0 /*tab*/, variable7) /*AbstractArray::add*/;
1014 }
1015 }
1016 continue_41: while(0);
1017 ((abstract_collection___Iterator___next_t)CALL(variable1,COLOR_abstract_collection___Iterator___next))(variable1) /*Iterator::next*/;
1018 }
1019 break_41: while(0);
1020 tracehead = trace.prev;
1021 return;
1022 }
1023 void inheritance___MMImplicitLocalClass___init(val_t self, val_t param0, val_t param1, int* init_table) {
1024 struct trace_t trace = {NULL, LOCATE_inheritance, 412, LOCATE_inheritance___MMImplicitLocalClass___init};
1025 val_t variable0;
1026 val_t variable1;
1027 val_t variable2;
1028 val_t variable3;
1029 val_t variable4;
1030 trace.prev = tracehead; tracehead = &trace;
1031 variable0 = param0;
1032 variable1 = param1;
1033 if (init_table[VAL2OBJ( self)->vft[INIT_TABLE_POS_MMImplicitLocalClass].i]) return;
1034 variable3 = ((abstractmetamodel___MMGlobalClass___intro_t)CALL( variable1 /*g*/,COLOR_abstractmetamodel___MMGlobalClass___intro))( variable1 /*g*/) /*MMGlobalClass::intro*/;
1035 variable2 = variable3;
1036 variable3 = ((abstractmetamodel___MMLocalClass___name_t)CALL( variable2 /*cla*/,COLOR_abstractmetamodel___MMLocalClass___name))( variable2 /*cla*/) /*MMLocalClass::name*/;
1037 variable4 = ((abstractmetamodel___MMLocalClass___arity_t)CALL( variable2 /*cla*/,COLOR_abstractmetamodel___MMLocalClass___arity))( variable2 /*cla*/) /*MMLocalClass::arity*/;
1038 ((abstractmetamodel___MMLocalClass___init_t)CALL( self,COLOR_abstractmetamodel___MMLocalClass___init))( self, variable3, variable4, init_table /*YYY*/) /*MMLocalClass::init*/;
1039 ((abstractmetamodel___MMModule___add_local_class_t)CALL( variable0 /*mod*/,COLOR_abstractmetamodel___MMModule___add_local_class))( variable0 /*mod*/, self) /*MMModule::add_local_class*/;
1040 ((abstractmetamodel___MMLocalClass___set_global_t)CALL( self,COLOR_abstractmetamodel___MMLocalClass___set_global))( self, variable1 /*g*/) /*MMLocalClass::set_global*/;
1041 init_table[VAL2OBJ( self)->vft[INIT_TABLE_POS_MMImplicitLocalClass].i] = 1;
1042 tracehead = trace.prev;
1043 return;
1044 }
1045 val_t inheritance___MMRefineAncestor___local_class(val_t self) {
1046 struct trace_t trace = {NULL, LOCATE_inheritance, 423, LOCATE_inheritance___MMRefineAncestor___local_class};
1047 trace.prev = tracehead; tracehead = &trace;
1048 tracehead = trace.prev;
1049 return ATTR_inheritance___MMRefineAncestor____local_class( self) /*MMRefineAncestor::_local_class*/;
1050 }
1051 void inheritance___MMRefineAncestor___init(val_t self, val_t param0, val_t param1, int* init_table) {
1052 struct trace_t trace = {NULL, LOCATE_inheritance, 425, LOCATE_inheritance___MMRefineAncestor___init};
1053 val_t variable0;
1054 val_t variable1;
1055 val_t variable2;
1056 trace.prev = tracehead; tracehead = &trace;
1057 variable0 = param0;
1058 variable1 = param1;
1059 if (init_table[VAL2OBJ( self)->vft[INIT_TABLE_POS_MMRefineAncestor].i]) return;
1060 ATTR_inheritance___MMRefineAncestor____local_class( self) /*MMRefineAncestor::_local_class*/ = variable1 /*a*/;
1061 variable2 = ((static_type___MMLocalClass___get_type_t)CALL( variable0 /*b*/,COLOR_static_type___MMLocalClass___get_type))( variable0 /*b*/) /*MMLocalClass::get_type*/;
1062 ((static_type___MMAncestor___inheriter__eq_t)CALL( self,COLOR_static_type___MMAncestor___inheriter__eq))( self, variable2) /*MMAncestor::inheriter=*/;
1063 variable2 = ATTR_inheritance___MMRefineAncestor____local_class( self) /*MMRefineAncestor::_local_class*/;
1064 variable2 = ((static_type___MMLocalClass___get_type_t)CALL(variable2,COLOR_static_type___MMLocalClass___get_type))(variable2) /*MMLocalClass::get_type*/;
1065 ((static_type___MMAncestor___stype__eq_t)CALL( self,COLOR_static_type___MMAncestor___stype__eq))( self, variable2) /*MMAncestor::stype=*/;
1066 init_table[VAL2OBJ( self)->vft[INIT_TABLE_POS_MMRefineAncestor].i] = 1;
1067 tracehead = trace.prev;
1068 return;
1069 }
1070 val_t inheritance___MMSpecAncestor___local_class(val_t self) {
1071 struct trace_t trace = {NULL, LOCATE_inheritance, 436, LOCATE_inheritance___MMSpecAncestor___local_class};
1072 val_t variable0;
1073 trace.prev = tracehead; tracehead = &trace;
1074 variable0 = ((static_type___MMAncestor___stype_t)CALL( self,COLOR_static_type___MMAncestor___stype))( self) /*MMAncestor::stype*/;
1075 variable0 = ((static_type___MMType___local_class_t)CALL(variable0,COLOR_static_type___MMType___local_class))(variable0) /*MMType::local_class*/;
1076 goto return_label45;
1077 return_label45: while(false);
1078 tracehead = trace.prev;
1079 return variable0;
1080 }
1081 void inheritance___MMSpecAncestor___init(val_t self, val_t param0, val_t param1, int* init_table) {
1082 struct trace_t trace = {NULL, LOCATE_inheritance, 438, LOCATE_inheritance___MMSpecAncestor___init};
1083 val_t variable0;
1084 val_t variable1;
1085 trace.prev = tracehead; tracehead = &trace;
1086 variable0 = param0;
1087 variable1 = param1;
1088 if (init_table[VAL2OBJ( self)->vft[INIT_TABLE_POS_MMSpecAncestor].i]) return;
1089 ATTR_static_type___MMAncestor____inheriter( self) /*MMAncestor::_inheriter*/ = variable0 /*inheriter*/;
1090 ATTR_static_type___MMAncestor____stype( self) /*MMAncestor::_stype*/ = variable1 /*stype*/;
1091 init_table[VAL2OBJ( self)->vft[INIT_TABLE_POS_MMSpecAncestor].i] = 1;
1092 tracehead = trace.prev;
1093 return;
1094 }
1095 val_t inheritance___MMDefaultAncestor___local_class(val_t self) {
1096 struct trace_t trace = {NULL, LOCATE_inheritance, 447, LOCATE_inheritance___MMDefaultAncestor___local_class};
1097 val_t variable0;
1098 trace.prev = tracehead; tracehead = &trace;
1099 variable0 = ((static_type___MMAncestor___stype_t)CALL( self,COLOR_static_type___MMAncestor___stype))( self) /*MMAncestor::stype*/;
1100 variable0 = ((static_type___MMType___local_class_t)CALL(variable0,COLOR_static_type___MMType___local_class))(variable0) /*MMType::local_class*/;
1101 goto return_label47;
1102 return_label47: while(false);
1103 tracehead = trace.prev;
1104 return variable0;
1105 }
1106 void inheritance___MMDefaultAncestor___init(val_t self, val_t param0, val_t param1, int* init_table) {
1107 struct trace_t trace = {NULL, LOCATE_inheritance, 449, LOCATE_inheritance___MMDefaultAncestor___init};
1108 val_t variable0;
1109 val_t variable1;
1110 val_t variable2;
1111 trace.prev = tracehead; tracehead = &trace;
1112 variable0 = param0;
1113 variable1 = param1;
1114 if (init_table[VAL2OBJ( self)->vft[INIT_TABLE_POS_MMDefaultAncestor].i]) return;
1115 variable2 = TAG_Bool(!UNTAG_Bool(TAG_Bool(( variable0 /*b*/ == NIT_NULL /*null*/) || (( variable0 /*b*/ != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL( variable0 /*b*/,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable0 /*b*/, NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL( variable0 /*b*/,COLOR_kernel___Object_____eqeq))( variable0 /*b*/, NIT_NULL /*null*/) /*Object::==*/)))))));
1116 if (!UNTAG_Bool(variable2)) { fprintf(stderr, "Assert%s failed", ""); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_inheritance___MMDefaultAncestor___init, LOCATE_inheritance, 451); nit_exit(1);}
1117 variable2 = ((abstractmetamodel___MMLocalClass___module_t)CALL( variable0 /*b*/,COLOR_abstractmetamodel___MMLocalClass___module))( variable0 /*b*/) /*MMLocalClass::module*/;
1118 variable2 = TAG_Bool(!UNTAG_Bool(TAG_Bool((variable2 == NIT_NULL /*null*/) || ((variable2 != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL(variable2,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable2, NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable2,COLOR_kernel___Object_____eqeq))(variable2, NIT_NULL /*null*/) /*Object::==*/)))))));
1119 if (!UNTAG_Bool(variable2)) { fprintf(stderr, "Assert%s failed", ""); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_inheritance___MMDefaultAncestor___init, LOCATE_inheritance, 452); nit_exit(1);}
1120 variable2 = TAG_Bool(!UNTAG_Bool(TAG_Bool(( variable1 /*anc*/ == NIT_NULL /*null*/) || (( variable1 /*anc*/ != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL( variable1 /*anc*/,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable1 /*anc*/, NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL( variable1 /*anc*/,COLOR_kernel___Object_____eqeq))( variable1 /*anc*/, NIT_NULL /*null*/) /*Object::==*/)))))));
1121 if (!UNTAG_Bool(variable2)) { fprintf(stderr, "Assert%s failed", ""); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_inheritance___MMDefaultAncestor___init, LOCATE_inheritance, 453); nit_exit(1);}
1122 variable2 = ((static_type___MMLocalClass___get_type_t)CALL( variable0 /*b*/,COLOR_static_type___MMLocalClass___get_type))( variable0 /*b*/) /*MMLocalClass::get_type*/;
1123 ((static_type___MMAncestor___inheriter__eq_t)CALL( self,COLOR_static_type___MMAncestor___inheriter__eq))( self, variable2) /*MMAncestor::inheriter=*/;
1124 ((static_type___MMAncestor___stype__eq_t)CALL( self,COLOR_static_type___MMAncestor___stype__eq))( self, variable1 /*anc*/) /*MMAncestor::stype=*/;
1125 init_table[VAL2OBJ( self)->vft[INIT_TABLE_POS_MMDefaultAncestor].i] = 1;
1126 tracehead = trace.prev;
1127 return;
1128 }