/* This C file is generated by NIT to compile module partial_order. */
#include "partial_order._sep.h"
-val_t partial_order___PartialOrder___roots(val_t self) {
- struct trace_t trace = {NULL, LOCATE_partial_order, 30, LOCATE_partial_order___PartialOrder___roots};
- trace.prev = tracehead; tracehead = &trace;
- tracehead = trace.prev;
- return ATTR_partial_order___PartialOrder____roots( self) /*PartialOrder::_roots*/;
-}
-val_t partial_order___PartialOrder___is_empty(val_t self) {
- struct trace_t trace = {NULL, LOCATE_partial_order, 35, LOCATE_partial_order___PartialOrder___is_empty};
- val_t variable0;
- trace.prev = tracehead; tracehead = &trace;
- variable0 = ATTR_partial_order___PartialOrder____elements( self) /*PartialOrder::_elements*/;
- variable0 = ((abstract_collection___Collection___is_empty_t)CALL(variable0,COLOR_abstract_collection___Collection___is_empty))(variable0) /*Collection::is_empty*/;
- goto return_label0;
- return_label0: while(false);
- tracehead = trace.prev;
- return variable0;
-}
-val_t partial_order___PartialOrder___length(val_t self) {
- struct trace_t trace = {NULL, LOCATE_partial_order, 37, LOCATE_partial_order___PartialOrder___length};
- val_t variable0;
- trace.prev = tracehead; tracehead = &trace;
- variable0 = ATTR_partial_order___PartialOrder____elements( self) /*PartialOrder::_elements*/;
- variable0 = ((abstract_collection___Collection___length_t)CALL(variable0,COLOR_abstract_collection___Collection___length))(variable0) /*Collection::length*/;
- goto return_label1;
- return_label1: while(false);
- tracehead = trace.prev;
- return variable0;
-}
-val_t partial_order___PartialOrder___first(val_t self) {
- struct trace_t trace = {NULL, LOCATE_partial_order, 39, LOCATE_partial_order___PartialOrder___first};
- val_t variable0;
- trace.prev = tracehead; tracehead = &trace;
- variable0 = ATTR_partial_order___PartialOrder____elements_list( self) /*PartialOrder::_elements_list*/;
- variable0 = ((abstract_collection___IndexedCollection___first_t)CALL(variable0,COLOR_abstract_collection___Collection___first))(variable0) /*IndexedCollection::first*/;
- goto return_label2;
- return_label2: while(false);
- tracehead = trace.prev;
- return variable0;
-}
-val_t partial_order___PartialOrder___has(val_t self, val_t param0) {
- struct trace_t trace = {NULL, LOCATE_partial_order, 41, LOCATE_partial_order___PartialOrder___has};
- val_t variable0;
- val_t variable1;
- trace.prev = tracehead; tracehead = &trace;
- variable0 = param0;
- variable1 = ATTR_partial_order___PartialOrder____elements( self) /*PartialOrder::_elements*/;
- variable1 = ((abstract_collection___Map___has_key_t)CALL(variable1,COLOR_abstract_collection___Map___has_key))(variable1, variable0 /*e*/) /*Map::has_key*/;
- goto return_label3;
- return_label3: while(false);
- tracehead = trace.prev;
- return variable1;
-}
-val_t partial_order___PartialOrder___has_only(val_t self, val_t param0) {
- struct trace_t trace = {NULL, LOCATE_partial_order, 43, LOCATE_partial_order___PartialOrder___has_only};
- val_t variable0;
- val_t variable1;
- val_t variable2;
- trace.prev = tracehead; tracehead = &trace;
- variable0 = param0;
- variable1 = ATTR_partial_order___PartialOrder____elements( self) /*PartialOrder::_elements*/;
- variable1 = ((abstract_collection___Collection___length_t)CALL(variable1,COLOR_abstract_collection___Collection___length))(variable1) /*Collection::length*/;
- variable1 = TAG_Bool((variable1)==( TAG_Int(1)));
- variable2 = variable1;
- if (UNTAG_Bool(variable2)) { /* and */
- variable2 = ATTR_partial_order___PartialOrder____elements( self) /*PartialOrder::_elements*/;
- variable2 = ((abstract_collection___Collection___first_t)CALL(variable2,COLOR_abstract_collection___Collection___first))(variable2) /*Collection::first*/;
- variable2 = TAG_Bool((variable2 == variable0 /*e*/) || ((variable2 != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL(variable2,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable2, variable0 /*e*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable2,COLOR_kernel___Object_____eqeq))(variable2, variable0 /*e*/) /*Object::==*/)))));
- }
- variable1 = variable2;
- goto return_label4;
- return_label4: while(false);
- tracehead = trace.prev;
- return variable1;
-}
-val_t partial_order___PartialOrder___count(val_t self, val_t param0) {
- struct trace_t trace = {NULL, LOCATE_partial_order, 45, LOCATE_partial_order___PartialOrder___count};
- val_t variable0;
- val_t variable1;
- trace.prev = tracehead; tracehead = &trace;
- variable0 = param0;
- variable1 = ((partial_order___PartialOrder___has_t)CALL( self,COLOR_abstract_collection___Collection___has))( self, variable0 /*e*/) /*PartialOrder::has*/;
- if (UNTAG_Bool(variable1)) { /*if*/
- variable1 = TAG_Int(1);
- goto return_label5;
- } else { /*if*/
- variable1 = TAG_Int(0);
- goto return_label5;
- }
- return_label5: while(false);
- tracehead = trace.prev;
- return variable1;
-}
-val_t partial_order___PartialOrder___iterator(val_t self) {
- struct trace_t trace = {NULL, LOCATE_partial_order, 54, LOCATE_partial_order___PartialOrder___iterator};
- val_t variable0;
- trace.prev = tracehead; tracehead = &trace;
- variable0 = ATTR_partial_order___PartialOrder____elements_list( self) /*PartialOrder::_elements_list*/;
- variable0 = ((array___AbstractArray___iterator_t)CALL(variable0,COLOR_abstract_collection___Collection___iterator))(variable0) /*AbstractArray::iterator*/;
- goto return_label6;
- return_label6: while(false);
- tracehead = trace.prev;
- return variable0;
-}
-val_t partial_order___PartialOrder_____bra(val_t self, val_t param0) {
- struct trace_t trace = {NULL, LOCATE_partial_order, 58, LOCATE_partial_order___PartialOrder_____bra};
- val_t variable0;
- val_t variable1;
- trace.prev = tracehead; tracehead = &trace;
- variable0 = param0;
- variable1 = ATTR_partial_order___PartialOrder____elements( self) /*PartialOrder::_elements*/;
- variable1 = ((abstract_collection___Map___has_key_t)CALL(variable1,COLOR_abstract_collection___Map___has_key))(variable1, variable0 /*e*/) /*Map::has_key*/;
- if (UNTAG_Bool(variable1)) { /*if*/
- variable1 = ATTR_partial_order___PartialOrder____elements( self) /*PartialOrder::_elements*/;
- variable1 = ((abstract_collection___Map_____bra_t)CALL(variable1,COLOR_abstract_collection___Map_____bra))(variable1, variable0 /*e*/) /*Map::[]*/;
- goto return_label7;
- } else { /*if*/
- variable1 = NIT_NULL /*null*/;
- goto return_label7;
- }
- return_label7: while(false);
- tracehead = trace.prev;
- return variable1;
-}
-val_t partial_order___PartialOrder___to_dot(val_t self) {
- struct trace_t trace = {NULL, LOCATE_partial_order, 68, LOCATE_partial_order___PartialOrder___to_dot};
- val_t variable0;
- val_t variable1;
- val_t variable2;
- val_t variable3;
- val_t variable4;
- val_t variable5;
- trace.prev = tracehead; tracehead = &trace;
- variable1 = NEW_string___String___init(); /*new String*/
- variable0 = variable1;
- variable1 = ((partial_order___PartialOrder___to_dot_header_t)CALL( self,COLOR_partial_order___PartialOrder___to_dot_header))( self) /*PartialOrder::to_dot_header*/;
- ((string___String___append_t)CALL( variable0 /*s*/,COLOR_abstract_collection___IndexedCollection___append))( variable0 /*s*/, variable1) /*String::append*/;
- variable1 = ATTR_partial_order___PartialOrder____elements( self) /*PartialOrder::_elements*/;
- variable1 = ((abstract_collection___Map___iterator_t)CALL(variable1,COLOR_abstract_collection___Collection___iterator))(variable1) /*Map::iterator*/;
- while (true) { /*for*/
- variable2 = ((abstract_collection___Iterator___is_ok_t)CALL(variable1,COLOR_abstract_collection___Iterator___is_ok))(variable1) /*Iterator::is_ok*/;
- if (!UNTAG_Bool(variable2)) break; /*for*/
- variable2 = ((abstract_collection___Iterator___item_t)CALL(variable1,COLOR_abstract_collection___Iterator___item))(variable1) /*Iterator::item*/;
- variable3 = ((partial_order___PartialOrderElement___value_t)CALL( variable2 /*e*/,COLOR_partial_order___PartialOrderElement___value))( variable2 /*e*/) /*PartialOrderElement::value*/;
- variable3 = ((partial_order___PartialOrder___to_dot_node_t)CALL( self,COLOR_partial_order___PartialOrder___to_dot_node))( self, variable3) /*PartialOrder::to_dot_node*/;
- ((string___String___append_t)CALL( variable0 /*s*/,COLOR_abstract_collection___IndexedCollection___append))( variable0 /*s*/, variable3) /*String::append*/;
- variable3 = ((partial_order___PartialOrderElement___direct_greaters_t)CALL( variable2 /*e*/,COLOR_partial_order___PartialOrderElement___direct_greaters))( variable2 /*e*/) /*PartialOrderElement::direct_greaters*/;
- variable3 = ((array___AbstractArray___iterator_t)CALL(variable3,COLOR_abstract_collection___Collection___iterator))(variable3) /*AbstractArray::iterator*/;
- while (true) { /*for*/
- variable4 = ((array___ArrayIterator___is_ok_t)CALL(variable3,COLOR_abstract_collection___Iterator___is_ok))(variable3) /*ArrayIterator::is_ok*/;
- if (!UNTAG_Bool(variable4)) break; /*for*/
- variable4 = ((array___ArrayIterator___item_t)CALL(variable3,COLOR_abstract_collection___Iterator___item))(variable3) /*ArrayIterator::item*/;
- variable5 = ((partial_order___PartialOrderElement___value_t)CALL( variable2 /*e*/,COLOR_partial_order___PartialOrderElement___value))( variable2 /*e*/) /*PartialOrderElement::value*/;
- variable5 = ((partial_order___PartialOrder___to_dot_edge_t)CALL( self,COLOR_partial_order___PartialOrder___to_dot_edge))( self, variable5, variable4 /*d*/) /*PartialOrder::to_dot_edge*/;
- ((string___String___append_t)CALL( variable0 /*s*/,COLOR_abstract_collection___IndexedCollection___append))( variable0 /*s*/, variable5) /*String::append*/;
- continue_10: while(0);
- ((array___ArrayIterator___next_t)CALL(variable3,COLOR_abstract_collection___Iterator___next))(variable3) /*ArrayIterator::next*/;
+val_t partial_order___PartialOrder___iterator(val_t p0){
+ struct {struct stack_frame_t me;} fra;
+ val_t REGB0;
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_partial_order;
+ fra.me.line = 54;
+ fra.me.meth = LOCATE_partial_order___PartialOrder___iterator;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 1;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ REGB0 = TAG_Bool(ATTR_partial_order___PartialOrder____elements_list(fra.me.REG[0])!=NIT_NULL);
+ /* ./metamodel//partial_order.nit:54 */
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ fprintf(stderr, "Uninitialized attribute %s", "_elements_list");
+ fprintf(stderr, " (%s:%d)\n", LOCATE_partial_order, 54);
+ nit_exit(1);
+ }
+ fra.me.REG[0] = ATTR_partial_order___PartialOrder____elements_list(fra.me.REG[0]);
+ fra.me.REG[0] = CALL_abstract_collection___Collection___iterator(fra.me.REG[0])(fra.me.REG[0]);
+ goto label1;
+ label1: while(0);
+ stack_frame_head = fra.me.prev;
+ return fra.me.REG[0];
+}
+val_t partial_order___PartialOrder___is_empty(val_t p0){
+ struct {struct stack_frame_t me;} fra;
+ val_t REGB0;
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_partial_order;
+ fra.me.line = 35;
+ fra.me.meth = LOCATE_partial_order___PartialOrder___is_empty;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 1;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ REGB0 = TAG_Bool(ATTR_partial_order___PartialOrder____elements(fra.me.REG[0])!=NIT_NULL);
+ /* ./metamodel//partial_order.nit:35 */
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ fprintf(stderr, "Uninitialized attribute %s", "_elements");
+ fprintf(stderr, " (%s:%d)\n", LOCATE_partial_order, 35);
+ nit_exit(1);
+ }
+ fra.me.REG[0] = ATTR_partial_order___PartialOrder____elements(fra.me.REG[0]);
+ REGB0 = CALL_abstract_collection___Collection___is_empty(fra.me.REG[0])(fra.me.REG[0]);
+ goto label1;
+ label1: while(0);
+ stack_frame_head = fra.me.prev;
+ return REGB0;
+}
+val_t partial_order___PartialOrder___length(val_t p0){
+ struct {struct stack_frame_t me;} fra;
+ val_t REGB0;
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_partial_order;
+ fra.me.line = 37;
+ fra.me.meth = LOCATE_partial_order___PartialOrder___length;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 1;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ REGB0 = TAG_Bool(ATTR_partial_order___PartialOrder____elements(fra.me.REG[0])!=NIT_NULL);
+ /* ./metamodel//partial_order.nit:37 */
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ fprintf(stderr, "Uninitialized attribute %s", "_elements");
+ fprintf(stderr, " (%s:%d)\n", LOCATE_partial_order, 37);
+ nit_exit(1);
+ }
+ fra.me.REG[0] = ATTR_partial_order___PartialOrder____elements(fra.me.REG[0]);
+ REGB0 = CALL_abstract_collection___Collection___length(fra.me.REG[0])(fra.me.REG[0]);
+ goto label1;
+ label1: while(0);
+ stack_frame_head = fra.me.prev;
+ return REGB0;
+}
+val_t partial_order___PartialOrder___has(val_t p0, val_t p1){
+ struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
+ val_t REGB0;
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_partial_order;
+ fra.me.line = 41;
+ fra.me.meth = LOCATE_partial_order___PartialOrder___has;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 2;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[1] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ fra.me.REG[1] = p1;
+ REGB0 = TAG_Bool(ATTR_partial_order___PartialOrder____elements(fra.me.REG[0])!=NIT_NULL);
+ /* ./metamodel//partial_order.nit:41 */
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ fprintf(stderr, "Uninitialized attribute %s", "_elements");
+ fprintf(stderr, " (%s:%d)\n", LOCATE_partial_order, 41);
+ nit_exit(1);
+ }
+ fra.me.REG[0] = ATTR_partial_order___PartialOrder____elements(fra.me.REG[0]);
+ REGB0 = CALL_abstract_collection___MapRead___has_key(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1]);
+ goto label1;
+ label1: while(0);
+ stack_frame_head = fra.me.prev;
+ return REGB0;
+}
+val_t partial_order___PartialOrder___has_only(val_t p0, val_t p1){
+ struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
+ val_t REGB0;
+ val_t REGB1;
+ val_t REGB2;
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_partial_order;
+ fra.me.line = 43;
+ fra.me.meth = LOCATE_partial_order___PartialOrder___has_only;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 3;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[1] = NIT_NULL;
+ fra.me.REG[2] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ fra.me.REG[1] = p1;
+ REGB0 = TAG_Bool(ATTR_partial_order___PartialOrder____elements(fra.me.REG[0])!=NIT_NULL);
+ /* ./metamodel//partial_order.nit:43 */
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ fprintf(stderr, "Uninitialized attribute %s", "_elements");
+ fprintf(stderr, " (%s:%d)\n", LOCATE_partial_order, 43);
+ nit_exit(1);
+ }
+ fra.me.REG[2] = ATTR_partial_order___PartialOrder____elements(fra.me.REG[0]);
+ REGB0 = CALL_abstract_collection___Collection___length(fra.me.REG[2])(fra.me.REG[2]);
+ REGB1 = TAG_Int(1);
+ REGB2 = TAG_Bool(IS_EQUAL_OO(REGB0,REGB1));
+ if (UNTAG_Bool(REGB2)) {
+ } else {
+ REGB1 = TAG_Bool((REGB0)==(REGB1));
+ REGB2 = REGB1;
+ /* ./metamodel//partial_order.nit:43 */
+ }
+ if (UNTAG_Bool(REGB2)) {
+ REGB2 = TAG_Bool(ATTR_partial_order___PartialOrder____elements(fra.me.REG[0])!=NIT_NULL);
+ if (UNTAG_Bool(REGB2)) {
+ } else {
+ fprintf(stderr, "Uninitialized attribute %s", "_elements");
+ fprintf(stderr, " (%s:%d)\n", LOCATE_partial_order, 43);
+ nit_exit(1);
}
- break_10: while(0);
- continue_9: while(0);
- ((abstract_collection___Iterator___next_t)CALL(variable1,COLOR_abstract_collection___Iterator___next))(variable1) /*Iterator::next*/;
- }
- break_9: while(0);
- variable1 = NEW_string___String___with_native(BOX_NativeString("}\n"), TAG_Int(2)); /*new String*/
- ((string___String___append_t)CALL( variable0 /*s*/,COLOR_abstract_collection___IndexedCollection___append))( variable0 /*s*/, variable1) /*String::append*/;
- variable0 = variable0 /*s*/;
- goto return_label8;
- return_label8: while(false);
- tracehead = trace.prev;
- return variable0;
-}
-val_t partial_order___PartialOrder___to_dot_header(val_t self) {
- struct trace_t trace = {NULL, LOCATE_partial_order, 83, LOCATE_partial_order___PartialOrder___to_dot_header};
- val_t variable0;
- trace.prev = tracehead; tracehead = &trace;
- variable0 = NEW_string___String___with_native(BOX_NativeString("digraph G {\ngraph [rankdir=BT];\n"), TAG_Int(32)); /*new String*/
- goto return_label11;
- return_label11: while(false);
- tracehead = trace.prev;
- return variable0;
-}
-val_t partial_order___PartialOrder___to_dot_node(val_t self, val_t param0) {
- struct trace_t trace = {NULL, LOCATE_partial_order, 89, LOCATE_partial_order___PartialOrder___to_dot_node};
- val_t variable0;
- val_t variable1;
- val_t variable2;
- val_t variable3;
- val_t variable4;
- val_t variable5;
- val_t variable6;
- trace.prev = tracehead; tracehead = &trace;
- variable0 = param0;
- variable1 = NEW_string___String___init(); /*new String*/
- variable2 = NEW_string___String___with_native(BOX_NativeString("\""), TAG_Int(1)); /*new String*/
- variable3 = variable2;
- ((string___String___append_t)CALL(variable1,COLOR_abstract_collection___IndexedCollection___append))(variable1, variable3) /*String::append*/;
- variable4 = variable0 /*e*/;
- variable4 = ((string___String___to_s_t)CALL(variable4,COLOR_string___Object___to_s))(variable4) /*String::to_s*/;
- ((string___String___append_t)CALL(variable1,COLOR_abstract_collection___IndexedCollection___append))(variable1, variable4) /*String::append*/;
- variable5 = NEW_string___String___with_native(BOX_NativeString("\";\n"), TAG_Int(3)); /*new String*/
- variable6 = variable5;
- ((string___String___append_t)CALL(variable1,COLOR_abstract_collection___IndexedCollection___append))(variable1, variable6) /*String::append*/;
- goto return_label12;
- return_label12: while(false);
- tracehead = trace.prev;
- return variable1;
-}
-val_t partial_order___PartialOrder___to_dot_edge(val_t self, val_t param0, val_t param1) {
- struct trace_t trace = {NULL, LOCATE_partial_order, 95, LOCATE_partial_order___PartialOrder___to_dot_edge};
- val_t variable0;
- val_t variable1;
- val_t variable2;
- val_t variable3;
- val_t variable4;
- val_t variable5;
- val_t variable6;
- val_t variable7;
- val_t variable8;
- val_t variable9;
- val_t variable10;
- trace.prev = tracehead; tracehead = &trace;
- variable0 = param0;
- variable1 = param1;
- variable2 = NEW_string___String___init(); /*new String*/
- variable3 = NEW_string___String___with_native(BOX_NativeString("\""), TAG_Int(1)); /*new String*/
- variable4 = variable3;
- ((string___String___append_t)CALL(variable2,COLOR_abstract_collection___IndexedCollection___append))(variable2, variable4) /*String::append*/;
- variable5 = variable0 /*e1*/;
- variable5 = ((string___String___to_s_t)CALL(variable5,COLOR_string___Object___to_s))(variable5) /*String::to_s*/;
- ((string___String___append_t)CALL(variable2,COLOR_abstract_collection___IndexedCollection___append))(variable2, variable5) /*String::append*/;
- variable6 = NEW_string___String___with_native(BOX_NativeString("\" -> \""), TAG_Int(6)); /*new String*/
- variable7 = variable6;
- ((string___String___append_t)CALL(variable2,COLOR_abstract_collection___IndexedCollection___append))(variable2, variable7) /*String::append*/;
- variable8 = variable1 /*e2*/;
- variable8 = ((string___String___to_s_t)CALL(variable8,COLOR_string___Object___to_s))(variable8) /*String::to_s*/;
- ((string___String___append_t)CALL(variable2,COLOR_abstract_collection___IndexedCollection___append))(variable2, variable8) /*String::append*/;
- variable9 = NEW_string___String___with_native(BOX_NativeString("\";\n"), TAG_Int(3)); /*new String*/
- variable10 = variable9;
- ((string___String___append_t)CALL(variable2,COLOR_abstract_collection___IndexedCollection___append))(variable2, variable10) /*String::append*/;
- goto return_label13;
- return_label13: while(false);
- tracehead = trace.prev;
- return variable2;
-}
-val_t partial_order___PartialOrder___select_smallests(val_t self, val_t param0) {
- struct trace_t trace = {NULL, LOCATE_partial_order, 101, LOCATE_partial_order___PartialOrder___select_smallests};
- val_t variable0;
- val_t variable1;
- val_t variable2;
- val_t variable3;
- val_t variable4;
- val_t variable5;
- val_t variable6;
- trace.prev = tracehead; tracehead = &trace;
- variable0 = param0;
- variable1 = TAG_Bool(( variable0 /*c*/ == NIT_NULL /*null*/) || (( variable0 /*c*/ != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL( variable0 /*c*/,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable0 /*c*/, NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL( variable0 /*c*/,COLOR_kernel___Object_____eqeq))( variable0 /*c*/, NIT_NULL /*null*/) /*Object::==*/)))));
- if (UNTAG_Bool(variable1)) { /*if*/
- variable1 = NEW_array___Array___init(); /*new Array[E]*/
- goto return_label14;
- }
- variable1 = ((partial_order___PartialOrder___has_all_t)CALL( self,COLOR_partial_order___PartialOrder___has_all))( self, variable0 /*c*/) /*PartialOrder::has_all*/;
- if (!UNTAG_Bool(variable1)) { fprintf(stderr, "Assert%s failed", ""); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_partial_order___PartialOrder___select_smallests, LOCATE_partial_order, 105); nit_exit(1);}
- variable2 = ((abstract_collection___Collection___length_t)CALL( variable0 /*c*/,COLOR_abstract_collection___Collection___length))( variable0 /*c*/) /*Collection::length*/;
- variable3 = NEW_array___Array___with_capacity(variable2); /*new Array[E]*/
- variable2 = variable3;
- variable1 = variable2;
- variable3 = ((abstract_collection___Collection___length_t)CALL( variable0 /*c*/,COLOR_abstract_collection___Collection___length))( variable0 /*c*/) /*Collection::length*/;
- variable4 = NEW_array___Array___with_capacity(variable3); /*new Array[E]*/
- variable3 = variable4;
- variable2 = variable3;
- variable3 = ((abstract_collection___Collection___iterator_t)CALL( variable0 /*c*/,COLOR_abstract_collection___Collection___iterator))( variable0 /*c*/) /*Collection::iterator*/;
- while (true) { /*for*/
- variable4 = ((abstract_collection___Iterator___is_ok_t)CALL(variable3,COLOR_abstract_collection___Iterator___is_ok))(variable3) /*Iterator::is_ok*/;
- if (!UNTAG_Bool(variable4)) break; /*for*/
- variable4 = ((abstract_collection___Iterator___item_t)CALL(variable3,COLOR_abstract_collection___Iterator___item))(variable3) /*Iterator::item*/;
- variable6 = ((partial_order___PartialOrder___add_to_smallests_t)CALL( self,COLOR_partial_order___PartialOrder___add_to_smallests))( self, variable4 /*e*/, variable1 /*res*/, variable2 /*tmp*/) /*PartialOrder::add_to_smallests*/;
- variable5 = variable6;
- if (UNTAG_Bool( variable5 /*r*/)) { /*if*/
- variable6 = variable2 /*tmp*/;
- variable2 = variable1 /*res*/ /*tmp=*/;
- variable1 = variable6 /*t*/ /*res=*/;
+ fra.me.REG[0] = ATTR_partial_order___PartialOrder____elements(fra.me.REG[0]);
+ fra.me.REG[0] = CALL_abstract_collection___Collection___first(fra.me.REG[0])(fra.me.REG[0]);
+ REGB2 = TAG_Bool(IS_EQUAL_NN(fra.me.REG[0],fra.me.REG[1]));
+ if (UNTAG_Bool(REGB2)) {
+ } else {
+ REGB1 = TAG_Bool(fra.me.REG[0]==NIT_NULL);
+ if (UNTAG_Bool(REGB1)) {
+ REGB1 = TAG_Bool(false);
+ REGB2 = REGB1;
+ } else {
+ REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1]);
+ REGB2 = REGB1;
+ }
}
- continue_15: while(0);
- ((abstract_collection___Iterator___next_t)CALL(variable3,COLOR_abstract_collection___Iterator___next))(variable3) /*Iterator::next*/;
- }
- break_15: while(0);
- variable1 = variable1 /*res*/;
- goto return_label14;
- return_label14: while(false);
- tracehead = trace.prev;
- return variable1;
-}
-val_t partial_order___PartialOrder___add(val_t self, val_t param0, val_t param1) {
- struct trace_t trace = {NULL, LOCATE_partial_order, 122, LOCATE_partial_order___PartialOrder___add};
- val_t variable0;
- val_t variable1;
- val_t variable2;
- val_t variable3;
- val_t variable4;
- val_t variable5;
- trace.prev = tracehead; tracehead = &trace;
- variable0 = param0;
- variable1 = param1;
- variable2 = ((partial_order___PartialOrder___has_t)CALL( self,COLOR_abstract_collection___Collection___has))( self, variable0 /*e*/) /*PartialOrder::has*/;
- if (!UNTAG_Bool( TAG_Bool(!UNTAG_Bool(variable2)))) { fprintf(stderr, "Assert%s failed", ""); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_partial_order___PartialOrder___add, LOCATE_partial_order, 125); nit_exit(1);}
- variable2 = TAG_Bool(( variable1 /*supers*/ == NIT_NULL /*null*/) || (( variable1 /*supers*/ != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL( variable1 /*supers*/,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable1 /*supers*/, NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL( variable1 /*supers*/,COLOR_kernel___Object_____eqeq))( variable1 /*supers*/, NIT_NULL /*null*/) /*Object::==*/)))));
- variable3 = variable2;
- if (!UNTAG_Bool(variable3)) { /* or */
- variable3 = ((partial_order___PartialOrder___has_all_t)CALL( self,COLOR_partial_order___PartialOrder___has_all))( self, variable1 /*supers*/) /*PartialOrder::has_all*/;
- }
- variable2 = variable3;
- if (!UNTAG_Bool(variable2)) { fprintf(stderr, "Assert%s failed", ""); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_partial_order___PartialOrder___add, LOCATE_partial_order, 126); nit_exit(1);}
- variable3 = ((partial_order___PartialOrder___select_smallests_t)CALL( self,COLOR_partial_order___PartialOrder___select_smallests))( self, variable1 /*supers*/) /*PartialOrder::select_smallests*/;
- variable2 = variable3;
- variable4 = ((partial_order___PartialOrder___new_poe_t)CALL( self,COLOR_partial_order___PartialOrder___new_poe))( self, variable0 /*e*/, variable2 /*directs*/) /*PartialOrder::new_poe*/;
- variable3 = variable4;
- variable4 = ATTR_partial_order___PartialOrder____elements( self) /*PartialOrder::_elements*/;
- ((abstract_collection___Map_____braeq_t)CALL(variable4,COLOR_abstract_collection___Map_____braeq))(variable4, variable0 /*e*/, variable3 /*poe*/) /*Map::[]=*/;
- variable4 = ATTR_partial_order___PartialOrder____elements_list( self) /*PartialOrder::_elements_list*/;
- ((array___AbstractArray___add_t)CALL(variable4,COLOR_abstract_collection___SimpleCollection___add))(variable4, variable0 /*e*/) /*AbstractArray::add*/;
- variable4 = TAG_Bool(( variable1 /*supers*/ == NIT_NULL /*null*/) || (( variable1 /*supers*/ != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL( variable1 /*supers*/,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable1 /*supers*/, NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL( variable1 /*supers*/,COLOR_kernel___Object_____eqeq))( variable1 /*supers*/, NIT_NULL /*null*/) /*Object::==*/)))));
- variable5 = variable4;
- if (!UNTAG_Bool(variable5)) { /* or */
- variable5 = ((abstract_collection___Collection___is_empty_t)CALL( variable1 /*supers*/,COLOR_abstract_collection___Collection___is_empty))( variable1 /*supers*/) /*Collection::is_empty*/;
- }
- variable4 = variable5;
- if (UNTAG_Bool(variable4)) { /*if*/
- variable4 = ATTR_partial_order___PartialOrder____roots( self) /*PartialOrder::_roots*/;
- ((array___AbstractArray___add_t)CALL(variable4,COLOR_abstract_collection___SimpleCollection___add))(variable4, variable0 /*e*/) /*AbstractArray::add*/;
- }
- variable2 = variable3 /*poe*/;
- goto return_label16;
- return_label16: while(false);
- tracehead = trace.prev;
- return variable2;
-}
-val_t partial_order___PartialOrder___has_all(val_t self, val_t param0) {
- struct trace_t trace = {NULL, LOCATE_partial_order, 137, LOCATE_partial_order___PartialOrder___has_all};
- val_t variable0;
- val_t variable1;
- val_t variable2;
- val_t variable3;
- trace.prev = tracehead; tracehead = &trace;
- variable0 = param0;
- variable1 = ((abstract_collection___Collection___iterator_t)CALL( variable0 /*e*/,COLOR_abstract_collection___Collection___iterator))( variable0 /*e*/) /*Collection::iterator*/;
- while (true) { /*for*/
- variable2 = ((abstract_collection___Iterator___is_ok_t)CALL(variable1,COLOR_abstract_collection___Iterator___is_ok))(variable1) /*Iterator::is_ok*/;
- if (!UNTAG_Bool(variable2)) break; /*for*/
- variable2 = ((abstract_collection___Iterator___item_t)CALL(variable1,COLOR_abstract_collection___Iterator___item))(variable1) /*Iterator::item*/;
- variable3 = ((partial_order___PartialOrder___has_t)CALL( self,COLOR_abstract_collection___Collection___has))( self, variable2 /*i*/) /*PartialOrder::has*/;
- if (UNTAG_Bool( TAG_Bool(!UNTAG_Bool(variable3)))) { /*if*/
- variable1 = TAG_Bool(false);
- goto return_label17;
+ } else {
+ REGB1 = TAG_Bool(false);
+ REGB2 = REGB1;
+ }
+ goto label1;
+ label1: while(0);
+ stack_frame_head = fra.me.prev;
+ return REGB2;
+}
+val_t partial_order___PartialOrder___count(val_t p0, val_t p1){
+ struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
+ val_t REGB0;
+ val_t REGB1;
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_partial_order;
+ fra.me.line = 45;
+ fra.me.meth = LOCATE_partial_order___PartialOrder___count;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 2;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[1] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ fra.me.REG[1] = p1;
+ REGB0 = CALL_abstract_collection___Collection___has(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1]);
+ /* ./metamodel//partial_order.nit:47 */
+ if (UNTAG_Bool(REGB0)) {
+ REGB0 = TAG_Int(1);
+ /* ./metamodel//partial_order.nit:48 */
+ goto label1;
+ } else {
+ REGB1 = TAG_Int(0);
+ REGB0 = REGB1;
+ /* ./metamodel//partial_order.nit:50 */
+ goto label1;
+ }
+ label1: while(0);
+ stack_frame_head = fra.me.prev;
+ return REGB0;
+}
+val_t partial_order___PartialOrder___first(val_t p0){
+ struct {struct stack_frame_t me;} fra;
+ val_t REGB0;
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_partial_order;
+ fra.me.line = 39;
+ fra.me.meth = LOCATE_partial_order___PartialOrder___first;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 1;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ REGB0 = TAG_Bool(ATTR_partial_order___PartialOrder____elements_list(fra.me.REG[0])!=NIT_NULL);
+ /* ./metamodel//partial_order.nit:39 */
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ fprintf(stderr, "Uninitialized attribute %s", "_elements_list");
+ fprintf(stderr, " (%s:%d)\n", LOCATE_partial_order, 39);
+ nit_exit(1);
+ }
+ fra.me.REG[0] = ATTR_partial_order___PartialOrder____elements_list(fra.me.REG[0]);
+ fra.me.REG[0] = CALL_abstract_collection___Collection___first(fra.me.REG[0])(fra.me.REG[0]);
+ goto label1;
+ label1: while(0);
+ stack_frame_head = fra.me.prev;
+ return fra.me.REG[0];
+}
+val_t partial_order___PartialOrder___roots(val_t p0){
+ struct {struct stack_frame_t me;} fra;
+ val_t REGB0;
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_partial_order;
+ fra.me.line = 30;
+ fra.me.meth = LOCATE_partial_order___PartialOrder___roots;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 1;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ REGB0 = TAG_Bool(ATTR_partial_order___PartialOrder____roots(fra.me.REG[0])!=NIT_NULL);
+ /* ./metamodel//partial_order.nit:30 */
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ fprintf(stderr, "Uninitialized attribute %s", "_roots");
+ fprintf(stderr, " (%s:%d)\n", LOCATE_partial_order, 30);
+ nit_exit(1);
+ }
+ fra.me.REG[0] = ATTR_partial_order___PartialOrder____roots(fra.me.REG[0]);
+ stack_frame_head = fra.me.prev;
+ return fra.me.REG[0];
+}
+val_t partial_order___PartialOrder_____bra(val_t p0, val_t p1){
+ struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
+ val_t REGB0;
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_partial_order;
+ fra.me.line = 58;
+ fra.me.meth = LOCATE_partial_order___PartialOrder_____bra;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 2;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[1] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ fra.me.REG[1] = p1;
+ REGB0 = TAG_Bool(ATTR_partial_order___PartialOrder____elements(fra.me.REG[0])!=NIT_NULL);
+ /* ./metamodel//partial_order.nit:61 */
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ fprintf(stderr, "Uninitialized attribute %s", "_elements");
+ fprintf(stderr, " (%s:%d)\n", LOCATE_partial_order, 61);
+ nit_exit(1);
+ }
+ fra.me.REG[0] = ATTR_partial_order___PartialOrder____elements(fra.me.REG[0]);
+ fra.me.REG[1] = CALL_abstract_collection___MapRead_____bra(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1]);
+ goto label1;
+ label1: while(0);
+ stack_frame_head = fra.me.prev;
+ return fra.me.REG[1];
+}
+val_t partial_order___PartialOrder___to_dot(val_t p0){
+ struct {struct stack_frame_t me; val_t MORE_REG[6];} fra;
+ val_t REGB0;
+ val_t tmp;
+ static val_t once_value_3; /* Once value */
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_partial_order;
+ fra.me.line = 64;
+ fra.me.meth = LOCATE_partial_order___PartialOrder___to_dot;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 7;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[1] = NIT_NULL;
+ fra.me.REG[2] = NIT_NULL;
+ fra.me.REG[3] = NIT_NULL;
+ fra.me.REG[4] = NIT_NULL;
+ fra.me.REG[5] = NIT_NULL;
+ fra.me.REG[6] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ fra.me.REG[1] = NEW_Buffer_string___Buffer___init();
+ fra.me.REG[2] = CALL_partial_order___PartialOrder___to_dot_header(fra.me.REG[0])(fra.me.REG[0]);
+ /* ./metamodel//partial_order.nit:68 */
+ CALL_abstract_collection___Sequence___append(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[2]);
+ REGB0 = TAG_Bool(ATTR_partial_order___PartialOrder____elements(fra.me.REG[0])!=NIT_NULL);
+ /* ./metamodel//partial_order.nit:69 */
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ fprintf(stderr, "Uninitialized attribute %s", "_elements");
+ fprintf(stderr, " (%s:%d)\n", LOCATE_partial_order, 69);
+ nit_exit(1);
+ }
+ fra.me.REG[2] = ATTR_partial_order___PartialOrder____elements(fra.me.REG[0]);
+ fra.me.REG[2] = CALL_abstract_collection___Collection___iterator(fra.me.REG[2])(fra.me.REG[2]);
+ while(1) {
+ REGB0 = CALL_abstract_collection___Iterator___is_ok(fra.me.REG[2])(fra.me.REG[2]);
+ if (UNTAG_Bool(REGB0)) {
+ fra.me.REG[3] = CALL_abstract_collection___Iterator___item(fra.me.REG[2])(fra.me.REG[2]);
+ fra.me.REG[4] = CALL_partial_order___PartialOrderElement___value(fra.me.REG[3])(fra.me.REG[3]);
+ fra.me.REG[4] = CALL_partial_order___PartialOrder___to_dot_node(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[4]);
+ /* ./metamodel//partial_order.nit:70 */
+ CALL_abstract_collection___Sequence___append(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[4]);
+ fra.me.REG[4] = CALL_partial_order___PartialOrderElement___direct_greaters(fra.me.REG[3])(fra.me.REG[3]);
+ fra.me.REG[4] = CALL_abstract_collection___Collection___iterator(fra.me.REG[4])(fra.me.REG[4]);
+ /* ./metamodel//partial_order.nit:71 */
+ while(1) {
+ REGB0 = CALL_abstract_collection___Iterator___is_ok(fra.me.REG[4])(fra.me.REG[4]);
+ if (UNTAG_Bool(REGB0)) {
+ fra.me.REG[5] = CALL_abstract_collection___Iterator___item(fra.me.REG[4])(fra.me.REG[4]);
+ fra.me.REG[6] = CALL_partial_order___PartialOrderElement___value(fra.me.REG[3])(fra.me.REG[3]);
+ fra.me.REG[5] = CALL_partial_order___PartialOrder___to_dot_edge(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[6], fra.me.REG[5]);
+ /* ./metamodel//partial_order.nit:72 */
+ CALL_abstract_collection___Sequence___append(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[5]);
+ } else {
+ /* ./metamodel//partial_order.nit:71 */
+ goto label1;
+ }
+ CALL_abstract_collection___Iterator___next(fra.me.REG[4])(fra.me.REG[4]);
+ }
+ label1: while(0);
+ } else {
+ /* ./metamodel//partial_order.nit:69 */
+ goto label2;
}
- continue_18: while(0);
- ((abstract_collection___Iterator___next_t)CALL(variable1,COLOR_abstract_collection___Iterator___next))(variable1) /*Iterator::next*/;
- }
- break_18: while(0);
- variable1 = TAG_Bool(true);
- goto return_label17;
- return_label17: while(false);
- tracehead = trace.prev;
- return variable1;
-}
-val_t partial_order___PartialOrder___new_poe(val_t self, val_t param0, val_t param1) {
- struct trace_t trace = {NULL, LOCATE_partial_order, 148, LOCATE_partial_order___PartialOrder___new_poe};
- val_t variable0;
- val_t variable1;
- val_t variable2;
- trace.prev = tracehead; tracehead = &trace;
- variable0 = param0;
- variable1 = param1;
- variable2 = NEW_partial_order___PartialOrderElement___init( self, variable0 /*e*/, variable1 /*directs*/); /*new PartialOrderElement[E]*/
- goto return_label19;
- return_label19: while(false);
- tracehead = trace.prev;
- return variable2;
-}
-val_t partial_order___PartialOrder___add_to_smallests(val_t self, val_t param0, val_t param1, val_t param2) {
- struct trace_t trace = {NULL, LOCATE_partial_order, 154, LOCATE_partial_order___PartialOrder___add_to_smallests};
- val_t variable0;
- val_t variable1;
- val_t variable2;
- val_t variable3;
- val_t variable4;
- val_t variable5;
- val_t variable6;
- trace.prev = tracehead; tracehead = &trace;
- variable0 = param0;
- variable1 = param1;
- variable2 = param2;
- ((array___AbstractArray___clear_t)CALL( variable2 /*to*/,COLOR_abstract_collection___RemovableCollection___clear))( variable2 /*to*/) /*AbstractArray::clear*/;
- variable4 = ((partial_order___PartialOrder_____bra_t)CALL( self,COLOR_partial_order___PartialOrder_____bra))( self, variable0 /*e*/) /*PartialOrder::[]*/;
- variable3 = variable4;
- variable4 = ((array___AbstractArray___iterator_t)CALL( variable1 /*from*/,COLOR_abstract_collection___Collection___iterator))( variable1 /*from*/) /*AbstractArray::iterator*/;
- while (true) { /*for*/
- variable5 = ((array___ArrayIterator___is_ok_t)CALL(variable4,COLOR_abstract_collection___Iterator___is_ok))(variable4) /*ArrayIterator::is_ok*/;
- if (!UNTAG_Bool(variable5)) break; /*for*/
- variable5 = ((array___ArrayIterator___item_t)CALL(variable4,COLOR_abstract_collection___Iterator___item))(variable4) /*ArrayIterator::item*/;
- variable6 = ((partial_order___PartialOrderElement_____g_t)CALL( variable3 /*poe*/,COLOR_partial_order___PartialOrderElement_____g))( variable3 /*poe*/, variable5 /*i*/) /*PartialOrderElement::>*/;
- if (UNTAG_Bool(variable6)) { /*if*/
- variable3 = TAG_Bool(false);
- goto return_label20;
+ CALL_abstract_collection___Iterator___next(fra.me.REG[2])(fra.me.REG[2]);
+ }
+ label2: while(0);
+ /* ./metamodel//partial_order.nit:75 */
+ if (!once_value_3) {
+ fra.me.REG[2] = BOX_NativeString("}\n");
+ REGB0 = TAG_Int(2);
+ fra.me.REG[2] = NEW_String_string___String___with_native(fra.me.REG[2], REGB0);
+ once_value_3 = fra.me.REG[2];
+ register_static_object(&once_value_3);
+ } else fra.me.REG[2] = once_value_3;
+ CALL_abstract_collection___Sequence___append(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[2]);
+ fra.me.REG[1] = CALL_string___Object___to_s(fra.me.REG[1])(fra.me.REG[1]);
+ /* ./metamodel//partial_order.nit:76 */
+ goto label4;
+ label4: while(0);
+ stack_frame_head = fra.me.prev;
+ return fra.me.REG[1];
+}
+val_t partial_order___PartialOrder___to_dot_header(val_t p0){
+ struct {struct stack_frame_t me;} fra;
+ val_t REGB0;
+ val_t tmp;
+ static val_t once_value_1; /* Once value */
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_partial_order;
+ fra.me.line = 79;
+ fra.me.meth = LOCATE_partial_order___PartialOrder___to_dot_header;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 1;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ /* ./metamodel//partial_order.nit:82 */
+ if (!once_value_1) {
+ fra.me.REG[0] = BOX_NativeString("digraph G {\ngraph [rankdir=BT];\n");
+ REGB0 = TAG_Int(32);
+ fra.me.REG[0] = NEW_String_string___String___with_native(fra.me.REG[0], REGB0);
+ once_value_1 = fra.me.REG[0];
+ register_static_object(&once_value_1);
+ } else fra.me.REG[0] = once_value_1;
+ goto label2;
+ label2: while(0);
+ stack_frame_head = fra.me.prev;
+ return fra.me.REG[0];
+}
+val_t partial_order___PartialOrder___to_dot_node(val_t p0, val_t p1){
+ struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
+ val_t REGB0;
+ val_t tmp;
+ static val_t once_value_1; /* Once value */
+ static val_t once_value_2; /* Once value */
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_partial_order;
+ fra.me.line = 85;
+ fra.me.meth = LOCATE_partial_order___PartialOrder___to_dot_node;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 3;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[1] = NIT_NULL;
+ fra.me.REG[2] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ fra.me.REG[1] = p1;
+ REGB0 = TAG_Int(3);
+ fra.me.REG[0] = NEW_Array_array___Array___with_capacity(REGB0);
+ /* ./metamodel//partial_order.nit:88 */
+ if (!once_value_1) {
+ fra.me.REG[2] = BOX_NativeString("\"");
+ REGB0 = TAG_Int(1);
+ fra.me.REG[2] = NEW_String_string___String___with_native(fra.me.REG[2], REGB0);
+ once_value_1 = fra.me.REG[2];
+ register_static_object(&once_value_1);
+ } else fra.me.REG[2] = once_value_1;
+ array___Array___add(fra.me.REG[0], fra.me.REG[2]);
+ fra.me.REG[1] = CALL_string___Object___to_s(fra.me.REG[1])(fra.me.REG[1]);
+ array___Array___add(fra.me.REG[0], fra.me.REG[1]);
+ if (!once_value_2) {
+ fra.me.REG[1] = BOX_NativeString("\";\n");
+ REGB0 = TAG_Int(3);
+ fra.me.REG[1] = NEW_String_string___String___with_native(fra.me.REG[1], REGB0);
+ once_value_2 = fra.me.REG[1];
+ register_static_object(&once_value_2);
+ } else fra.me.REG[1] = once_value_2;
+ array___Array___add(fra.me.REG[0], fra.me.REG[1]);
+ fra.me.REG[0] = CALL_string___Object___to_s(fra.me.REG[0])(fra.me.REG[0]);
+ goto label3;
+ label3: while(0);
+ stack_frame_head = fra.me.prev;
+ return fra.me.REG[0];
+}
+val_t partial_order___PartialOrder___to_dot_edge(val_t p0, val_t p1, val_t p2){
+ struct {struct stack_frame_t me; val_t MORE_REG[3];} fra;
+ val_t REGB0;
+ val_t tmp;
+ static val_t once_value_1; /* Once value */
+ static val_t once_value_2; /* Once value */
+ static val_t once_value_3; /* Once value */
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_partial_order;
+ fra.me.line = 91;
+ fra.me.meth = LOCATE_partial_order___PartialOrder___to_dot_edge;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 4;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[1] = NIT_NULL;
+ fra.me.REG[2] = NIT_NULL;
+ fra.me.REG[3] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ fra.me.REG[1] = p1;
+ fra.me.REG[2] = p2;
+ REGB0 = TAG_Int(5);
+ fra.me.REG[0] = NEW_Array_array___Array___with_capacity(REGB0);
+ /* ./metamodel//partial_order.nit:94 */
+ if (!once_value_1) {
+ fra.me.REG[3] = BOX_NativeString("\"");
+ REGB0 = TAG_Int(1);
+ fra.me.REG[3] = NEW_String_string___String___with_native(fra.me.REG[3], REGB0);
+ once_value_1 = fra.me.REG[3];
+ register_static_object(&once_value_1);
+ } else fra.me.REG[3] = once_value_1;
+ array___Array___add(fra.me.REG[0], fra.me.REG[3]);
+ fra.me.REG[1] = CALL_string___Object___to_s(fra.me.REG[1])(fra.me.REG[1]);
+ array___Array___add(fra.me.REG[0], fra.me.REG[1]);
+ if (!once_value_2) {
+ fra.me.REG[1] = BOX_NativeString("\" -> \"");
+ REGB0 = TAG_Int(6);
+ fra.me.REG[1] = NEW_String_string___String___with_native(fra.me.REG[1], REGB0);
+ once_value_2 = fra.me.REG[1];
+ register_static_object(&once_value_2);
+ } else fra.me.REG[1] = once_value_2;
+ array___Array___add(fra.me.REG[0], fra.me.REG[1]);
+ fra.me.REG[2] = CALL_string___Object___to_s(fra.me.REG[2])(fra.me.REG[2]);
+ array___Array___add(fra.me.REG[0], fra.me.REG[2]);
+ if (!once_value_3) {
+ fra.me.REG[2] = BOX_NativeString("\";\n");
+ REGB0 = TAG_Int(3);
+ fra.me.REG[2] = NEW_String_string___String___with_native(fra.me.REG[2], REGB0);
+ once_value_3 = fra.me.REG[2];
+ register_static_object(&once_value_3);
+ } else fra.me.REG[2] = once_value_3;
+ array___Array___add(fra.me.REG[0], fra.me.REG[2]);
+ fra.me.REG[0] = CALL_string___Object___to_s(fra.me.REG[0])(fra.me.REG[0]);
+ goto label4;
+ label4: while(0);
+ stack_frame_head = fra.me.prev;
+ return fra.me.REG[0];
+}
+val_t partial_order___PartialOrder___select_smallests(val_t p0, val_t p1){
+ struct {struct stack_frame_t me; val_t MORE_REG[5];} fra;
+ val_t REGB0;
+ val_t REGB1;
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_partial_order;
+ fra.me.line = 97;
+ fra.me.meth = LOCATE_partial_order___PartialOrder___select_smallests;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 6;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[1] = NIT_NULL;
+ fra.me.REG[2] = NIT_NULL;
+ fra.me.REG[3] = NIT_NULL;
+ fra.me.REG[4] = NIT_NULL;
+ fra.me.REG[5] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ fra.me.REG[1] = p1;
+ REGB0 = TAG_Bool(fra.me.REG[1]==NIT_NULL);
+ /* ./metamodel//partial_order.nit:100 */
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ REGB1 = TAG_Bool(fra.me.REG[1]==NIT_NULL);
+ if (UNTAG_Bool(REGB1)) {
+ REGB1 = TAG_Bool(false);
+ REGB0 = REGB1;
+ } else {
+ REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[1])(fra.me.REG[1], NIT_NULL);
+ REGB0 = REGB1;
}
- variable6 = ((partial_order___PartialOrderElement_____l_t)CALL( variable3 /*poe*/,COLOR_partial_order___PartialOrderElement_____l))( variable3 /*poe*/, variable5 /*i*/) /*PartialOrderElement::<*/;
- if (UNTAG_Bool( TAG_Bool(!UNTAG_Bool(variable6)))) { /*if*/
- ((array___AbstractArray___add_t)CALL( variable2 /*to*/,COLOR_abstract_collection___SimpleCollection___add))( variable2 /*to*/, variable5 /*i*/) /*AbstractArray::add*/;
+ }
+ if (UNTAG_Bool(REGB0)) {
+ fra.me.REG[2] = NEW_Array_array___Array___init();
+ goto label1;
+ }
+ REGB0 = CALL_partial_order___PartialOrder___has_all(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1]);
+ /* ./metamodel//partial_order.nit:101 */
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ fprintf(stderr, "Assert failed");
+ fprintf(stderr, " (%s:%d)\n", LOCATE_partial_order, 101);
+ nit_exit(1);
+ }
+ REGB0 = TAG_Bool(fra.me.REG[1]==NIT_NULL);
+ /* ./metamodel//partial_order.nit:102 */
+ if (UNTAG_Bool(REGB0)) {
+ fprintf(stderr, "Reciever is null");
+ fprintf(stderr, " (%s:%d)\n", LOCATE_partial_order, 102);
+ nit_exit(1);
+ }
+ REGB0 = CALL_abstract_collection___Collection___length(fra.me.REG[1])(fra.me.REG[1]);
+ fra.me.REG[3] = NEW_Array_array___Array___with_capacity(REGB0);
+ REGB0 = TAG_Bool(fra.me.REG[1]==NIT_NULL);
+ /* ./metamodel//partial_order.nit:103 */
+ if (UNTAG_Bool(REGB0)) {
+ fprintf(stderr, "Reciever is null");
+ fprintf(stderr, " (%s:%d)\n", LOCATE_partial_order, 103);
+ nit_exit(1);
+ }
+ REGB0 = CALL_abstract_collection___Collection___length(fra.me.REG[1])(fra.me.REG[1]);
+ fra.me.REG[4] = NEW_Array_array___Array___with_capacity(REGB0);
+ fra.me.REG[1] = CALL_abstract_collection___Collection___iterator(fra.me.REG[1])(fra.me.REG[1]);
+ /* ./metamodel//partial_order.nit:104 */
+ while(1) {
+ REGB0 = CALL_abstract_collection___Iterator___is_ok(fra.me.REG[1])(fra.me.REG[1]);
+ if (UNTAG_Bool(REGB0)) {
+ fra.me.REG[5] = CALL_abstract_collection___Iterator___item(fra.me.REG[1])(fra.me.REG[1]);
+ REGB0 = CALL_partial_order___PartialOrder___add_to_smallests(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[5], fra.me.REG[3], fra.me.REG[4]);
+ /* ./metamodel//partial_order.nit:107 */
+ if (UNTAG_Bool(REGB0)) {
+ fra.me.REG[5] = fra.me.REG[4];
+ fra.me.REG[4] = fra.me.REG[3];
+ fra.me.REG[3] = fra.me.REG[5];
+ /* ./metamodel//partial_order.nit:112 */
+ }
+ } else {
+ /* ./metamodel//partial_order.nit:104 */
+ goto label2;
+ }
+ CALL_abstract_collection___Iterator___next(fra.me.REG[1])(fra.me.REG[1]);
+ }
+ label2: while(0);
+ fra.me.REG[2] = fra.me.REG[3];
+ /* ./metamodel//partial_order.nit:115 */
+ goto label1;
+ label1: while(0);
+ stack_frame_head = fra.me.prev;
+ return fra.me.REG[2];
+}
+val_t partial_order___PartialOrder___add(val_t p0, val_t p1, val_t p2){
+ struct {struct stack_frame_t me; val_t MORE_REG[4];} fra;
+ val_t REGB0;
+ val_t REGB1;
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_partial_order;
+ fra.me.line = 118;
+ fra.me.meth = LOCATE_partial_order___PartialOrder___add;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 5;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[1] = NIT_NULL;
+ fra.me.REG[2] = NIT_NULL;
+ fra.me.REG[3] = NIT_NULL;
+ fra.me.REG[4] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ fra.me.REG[1] = p1;
+ fra.me.REG[2] = p2;
+ REGB0 = CALL_abstract_collection___Collection___has(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1]);
+ REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
+ /* ./metamodel//partial_order.nit:121 */
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ fprintf(stderr, "Assert failed");
+ fprintf(stderr, " (%s:%d)\n", LOCATE_partial_order, 121);
+ nit_exit(1);
+ }
+ REGB0 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
+ /* ./metamodel//partial_order.nit:122 */
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ REGB1 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
+ if (UNTAG_Bool(REGB1)) {
+ REGB1 = TAG_Bool(false);
+ REGB0 = REGB1;
+ } else {
+ REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[2])(fra.me.REG[2], NIT_NULL);
+ REGB0 = REGB1;
+ }
+ }
+ if (UNTAG_Bool(REGB0)) {
+ REGB0 = TAG_Bool(true);
+ } else {
+ REGB1 = CALL_partial_order___PartialOrder___has_all(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[2]);
+ REGB0 = REGB1;
+ }
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ fprintf(stderr, "Assert failed");
+ fprintf(stderr, " (%s:%d)\n", LOCATE_partial_order, 122);
+ nit_exit(1);
+ }
+ fra.me.REG[3] = CALL_partial_order___PartialOrder___select_smallests(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[2]);
+ fra.me.REG[3] = CALL_partial_order___PartialOrder___new_poe(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1], fra.me.REG[3]);
+ REGB0 = TAG_Bool(ATTR_partial_order___PartialOrder____elements(fra.me.REG[0])!=NIT_NULL);
+ /* ./metamodel//partial_order.nit:125 */
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ fprintf(stderr, "Uninitialized attribute %s", "_elements");
+ fprintf(stderr, " (%s:%d)\n", LOCATE_partial_order, 125);
+ nit_exit(1);
+ }
+ fra.me.REG[4] = ATTR_partial_order___PartialOrder____elements(fra.me.REG[0]);
+ CALL_abstract_collection___Map_____braeq(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[1], fra.me.REG[3]);
+ REGB0 = TAG_Bool(ATTR_partial_order___PartialOrder____elements_list(fra.me.REG[0])!=NIT_NULL);
+ /* ./metamodel//partial_order.nit:126 */
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ fprintf(stderr, "Uninitialized attribute %s", "_elements_list");
+ fprintf(stderr, " (%s:%d)\n", LOCATE_partial_order, 126);
+ nit_exit(1);
+ }
+ fra.me.REG[4] = ATTR_partial_order___PartialOrder____elements_list(fra.me.REG[0]);
+ array___Array___add(fra.me.REG[4], fra.me.REG[1]);
+ REGB0 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
+ /* ./metamodel//partial_order.nit:127 */
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ REGB1 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
+ if (UNTAG_Bool(REGB1)) {
+ REGB1 = TAG_Bool(false);
+ REGB0 = REGB1;
+ } else {
+ REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[2])(fra.me.REG[2], NIT_NULL);
+ REGB0 = REGB1;
+ }
+ }
+ if (UNTAG_Bool(REGB0)) {
+ REGB0 = TAG_Bool(true);
+ } else {
+ REGB1 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
+ if (UNTAG_Bool(REGB1)) {
+ fprintf(stderr, "Reciever is null");
+ fprintf(stderr, " (%s:%d)\n", LOCATE_partial_order, 127);
+ nit_exit(1);
+ }
+ REGB1 = CALL_abstract_collection___Collection___is_empty(fra.me.REG[2])(fra.me.REG[2]);
+ REGB0 = REGB1;
+ }
+ if (UNTAG_Bool(REGB0)) {
+ REGB0 = TAG_Bool(ATTR_partial_order___PartialOrder____roots(fra.me.REG[0])!=NIT_NULL);
+ /* ./metamodel//partial_order.nit:128 */
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ fprintf(stderr, "Uninitialized attribute %s", "_roots");
+ fprintf(stderr, " (%s:%d)\n", LOCATE_partial_order, 128);
+ nit_exit(1);
+ }
+ fra.me.REG[0] = ATTR_partial_order___PartialOrder____roots(fra.me.REG[0]);
+ array___Array___add(fra.me.REG[0], fra.me.REG[1]);
+ }
+ /* ./metamodel//partial_order.nit:130 */
+ goto label1;
+ label1: while(0);
+ stack_frame_head = fra.me.prev;
+ return fra.me.REG[3];
+}
+val_t partial_order___PartialOrder___has_all(val_t p0, val_t p1){
+ struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
+ val_t REGB0;
+ val_t REGB1;
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_partial_order;
+ fra.me.line = 133;
+ fra.me.meth = LOCATE_partial_order___PartialOrder___has_all;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 3;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[1] = NIT_NULL;
+ fra.me.REG[2] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ fra.me.REG[1] = p1;
+ fra.me.REG[1] = CALL_abstract_collection___Collection___iterator(fra.me.REG[1])(fra.me.REG[1]);
+ /* ./metamodel//partial_order.nit:136 */
+ while(1) {
+ REGB0 = CALL_abstract_collection___Iterator___is_ok(fra.me.REG[1])(fra.me.REG[1]);
+ if (UNTAG_Bool(REGB0)) {
+ fra.me.REG[2] = CALL_abstract_collection___Iterator___item(fra.me.REG[1])(fra.me.REG[1]);
+ REGB0 = CALL_abstract_collection___Collection___has(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[2]);
+ REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
+ /* ./metamodel//partial_order.nit:137 */
+ if (UNTAG_Bool(REGB0)) {
+ REGB0 = TAG_Bool(false);
+ /* ./metamodel//partial_order.nit:138 */
+ goto label1;
+ }
+ } else {
+ /* ./metamodel//partial_order.nit:136 */
+ goto label2;
}
- continue_21: while(0);
- ((array___ArrayIterator___next_t)CALL(variable4,COLOR_abstract_collection___Iterator___next))(variable4) /*ArrayIterator::next*/;
- }
- break_21: while(0);
- ((array___AbstractArray___add_t)CALL( variable2 /*to*/,COLOR_abstract_collection___SimpleCollection___add))( variable2 /*to*/, variable0 /*e*/) /*AbstractArray::add*/;
- variable3 = TAG_Bool(true);
- goto return_label20;
- return_label20: while(false);
- tracehead = trace.prev;
- return variable3;
-}
-void partial_order___PartialOrder___compute_smallers_for(val_t self, val_t param0, val_t param1) {
- struct trace_t trace = {NULL, LOCATE_partial_order, 175, LOCATE_partial_order___PartialOrder___compute_smallers_for};
- val_t variable0;
- val_t variable1;
- val_t variable2;
- val_t variable3;
- val_t variable4;
- val_t variable5;
- trace.prev = tracehead; tracehead = &trace;
- variable0 = param0;
- variable1 = param1;
- variable3 = ((partial_order___PartialOrderElement___value_t)CALL( variable0 /*poe*/,COLOR_partial_order___PartialOrderElement___value))( variable0 /*poe*/) /*PartialOrderElement::value*/;
- variable2 = variable3;
- variable3 = ATTR_partial_order___PartialOrder____elements( self) /*PartialOrder::_elements*/;
- variable3 = ((abstract_collection___Map___iterator_t)CALL(variable3,COLOR_abstract_collection___Collection___iterator))(variable3) /*Map::iterator*/;
- while (true) { /*for*/
- variable4 = ((abstract_collection___Iterator___is_ok_t)CALL(variable3,COLOR_abstract_collection___Iterator___is_ok))(variable3) /*Iterator::is_ok*/;
- if (!UNTAG_Bool(variable4)) break; /*for*/
- variable4 = ((abstract_collection___Iterator___item_t)CALL(variable3,COLOR_abstract_collection___Iterator___item))(variable3) /*Iterator::item*/;
- variable5 = ((partial_order___PartialOrderElement_____l_t)CALL( variable4 /*s*/,COLOR_partial_order___PartialOrderElement_____l))( variable4 /*s*/, variable2 /*e*/) /*PartialOrderElement::<*/;
- if (UNTAG_Bool(variable5)) { /*if*/
- variable5 = ((partial_order___PartialOrderElement___value_t)CALL( variable4 /*s*/,COLOR_partial_order___PartialOrderElement___value))( variable4 /*s*/) /*PartialOrderElement::value*/;
- ((abstract_collection___SimpleCollection___add_t)CALL( variable1 /*set*/,COLOR_abstract_collection___SimpleCollection___add))( variable1 /*set*/, variable5) /*SimpleCollection::add*/;
+ CALL_abstract_collection___Iterator___next(fra.me.REG[1])(fra.me.REG[1]);
+ }
+ label2: while(0);
+ REGB1 = TAG_Bool(true);
+ REGB0 = REGB1;
+ /* ./metamodel//partial_order.nit:141 */
+ goto label1;
+ label1: while(0);
+ stack_frame_head = fra.me.prev;
+ return REGB0;
+}
+val_t partial_order___PartialOrder___new_poe(val_t p0, val_t p1, val_t p2){
+ struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_partial_order;
+ fra.me.line = 144;
+ fra.me.meth = LOCATE_partial_order___PartialOrder___new_poe;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 3;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[1] = NIT_NULL;
+ fra.me.REG[2] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ fra.me.REG[1] = p1;
+ fra.me.REG[2] = p2;
+ fra.me.REG[2] = NEW_PartialOrderElement_partial_order___PartialOrderElement___init(fra.me.REG[0], fra.me.REG[1], fra.me.REG[2]);
+ /* ./metamodel//partial_order.nit:147 */
+ goto label1;
+ label1: while(0);
+ stack_frame_head = fra.me.prev;
+ return fra.me.REG[2];
+}
+val_t partial_order___PartialOrder___add_to_smallests(val_t p0, val_t p1, val_t p2, val_t p3){
+ struct {struct stack_frame_t me; val_t MORE_REG[4];} fra;
+ val_t REGB0;
+ val_t REGB1;
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_partial_order;
+ fra.me.line = 150;
+ fra.me.meth = LOCATE_partial_order___PartialOrder___add_to_smallests;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 5;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[1] = NIT_NULL;
+ fra.me.REG[2] = NIT_NULL;
+ fra.me.REG[3] = NIT_NULL;
+ fra.me.REG[4] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ fra.me.REG[1] = p1;
+ fra.me.REG[2] = p2;
+ fra.me.REG[3] = p3;
+ /* ./metamodel//partial_order.nit:157 */
+ CALL_abstract_collection___RemovableCollection___clear(fra.me.REG[3])(fra.me.REG[3]);
+ fra.me.REG[0] = CALL_partial_order___PartialOrder_____bra(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1]);
+ fra.me.REG[2] = CALL_abstract_collection___Collection___iterator(fra.me.REG[2])(fra.me.REG[2]);
+ /* ./metamodel//partial_order.nit:159 */
+ while(1) {
+ REGB0 = CALL_abstract_collection___Iterator___is_ok(fra.me.REG[2])(fra.me.REG[2]);
+ if (UNTAG_Bool(REGB0)) {
+ fra.me.REG[4] = CALL_abstract_collection___Iterator___item(fra.me.REG[2])(fra.me.REG[2]);
+ REGB0 = CALL_partial_order___PartialOrderElement_____g(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[4]);
+ /* ./metamodel//partial_order.nit:160 */
+ if (UNTAG_Bool(REGB0)) {
+ REGB0 = TAG_Bool(false);
+ /* ./metamodel//partial_order.nit:161 */
+ goto label1;
+ }
+ REGB1 = CALL_partial_order___PartialOrderElement_____l(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[4]);
+ REGB1 = TAG_Bool(!UNTAG_Bool(REGB1));
+ /* ./metamodel//partial_order.nit:163 */
+ if (UNTAG_Bool(REGB1)) {
+ /* ./metamodel//partial_order.nit:164 */
+ array___Array___add(fra.me.REG[3], fra.me.REG[4]);
+ }
+ } else {
+ /* ./metamodel//partial_order.nit:159 */
+ goto label2;
+ }
+ CALL_abstract_collection___Iterator___next(fra.me.REG[2])(fra.me.REG[2]);
+ }
+ label2: while(0);
+ /* ./metamodel//partial_order.nit:167 */
+ array___Array___add(fra.me.REG[3], fra.me.REG[1]);
+ REGB1 = TAG_Bool(true);
+ REGB0 = REGB1;
+ /* ./metamodel//partial_order.nit:168 */
+ goto label1;
+ label1: while(0);
+ stack_frame_head = fra.me.prev;
+ return REGB0;
+}
+void partial_order___PartialOrder___compute_smallers_for(val_t p0, val_t p1, val_t p2){
+ struct {struct stack_frame_t me; val_t MORE_REG[3];} fra;
+ val_t REGB0;
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_partial_order;
+ fra.me.line = 171;
+ fra.me.meth = LOCATE_partial_order___PartialOrder___compute_smallers_for;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 4;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[1] = NIT_NULL;
+ fra.me.REG[2] = NIT_NULL;
+ fra.me.REG[3] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ fra.me.REG[1] = p1;
+ fra.me.REG[2] = p2;
+ fra.me.REG[1] = CALL_partial_order___PartialOrderElement___value(fra.me.REG[1])(fra.me.REG[1]);
+ REGB0 = TAG_Bool(ATTR_partial_order___PartialOrder____elements(fra.me.REG[0])!=NIT_NULL);
+ /* ./metamodel//partial_order.nit:174 */
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ fprintf(stderr, "Uninitialized attribute %s", "_elements");
+ fprintf(stderr, " (%s:%d)\n", LOCATE_partial_order, 174);
+ nit_exit(1);
+ }
+ fra.me.REG[0] = ATTR_partial_order___PartialOrder____elements(fra.me.REG[0]);
+ fra.me.REG[0] = CALL_abstract_collection___Collection___iterator(fra.me.REG[0])(fra.me.REG[0]);
+ while(1) {
+ REGB0 = CALL_abstract_collection___Iterator___is_ok(fra.me.REG[0])(fra.me.REG[0]);
+ if (UNTAG_Bool(REGB0)) {
+ fra.me.REG[3] = CALL_abstract_collection___Iterator___item(fra.me.REG[0])(fra.me.REG[0]);
+ REGB0 = CALL_partial_order___PartialOrderElement_____l(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[1]);
+ /* ./metamodel//partial_order.nit:175 */
+ if (UNTAG_Bool(REGB0)) {
+ fra.me.REG[3] = CALL_partial_order___PartialOrderElement___value(fra.me.REG[3])(fra.me.REG[3]);
+ /* ./metamodel//partial_order.nit:176 */
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[3]);
+ }
+ } else {
+ /* ./metamodel//partial_order.nit:174 */
+ goto label1;
}
- continue_23: while(0);
- ((abstract_collection___Iterator___next_t)CALL(variable3,COLOR_abstract_collection___Iterator___next))(variable3) /*Iterator::next*/;
+ CALL_abstract_collection___Iterator___next(fra.me.REG[0])(fra.me.REG[0]);
}
- break_23: while(0);
- tracehead = trace.prev;
+ label1: while(0);
+ stack_frame_head = fra.me.prev;
return;
}
-void partial_order___PartialOrder___init(val_t self, int* init_table) {
- struct trace_t trace = {NULL, LOCATE_partial_order, 185, LOCATE_partial_order___PartialOrder___init};
- val_t variable0;
- trace.prev = tracehead; tracehead = &trace;
- if (init_table[VAL2OBJ( self)->vft[INIT_TABLE_POS_PartialOrder].i]) return;
- variable0 = NEW_hash___HashMap___init(); /*new HashMap[K, V]*/
- ATTR_partial_order___PartialOrder____elements( self) /*PartialOrder::_elements*/ = variable0;
- variable0 = NEW_array___Array___init(); /*new Array[E]*/
- ATTR_partial_order___PartialOrder____elements_list( self) /*PartialOrder::_elements_list*/ = variable0;
- variable0 = NEW_array___Array___init(); /*new Array[E]*/
- ATTR_partial_order___PartialOrder____roots( self) /*PartialOrder::_roots*/ = variable0;
- init_table[VAL2OBJ( self)->vft[INIT_TABLE_POS_PartialOrder].i] = 1;
- tracehead = trace.prev;
+void partial_order___PartialOrder___init(val_t p0, int* init_table){
+ int itpos0 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_PartialOrder].i;
+ struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
+ val_t tmp;
+ if (init_table[itpos0]) return;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_partial_order;
+ fra.me.line = 181;
+ fra.me.meth = LOCATE_partial_order___PartialOrder___init;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 2;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[1] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ fra.me.REG[1] = NEW_HashMap_hash_collection___HashMap___init();
+ /* ./metamodel//partial_order.nit:183 */
+ ATTR_partial_order___PartialOrder____elements(fra.me.REG[0]) = fra.me.REG[1];
+ fra.me.REG[1] = NEW_Array_array___Array___init();
+ /* ./metamodel//partial_order.nit:184 */
+ ATTR_partial_order___PartialOrder____elements_list(fra.me.REG[0]) = fra.me.REG[1];
+ fra.me.REG[1] = NEW_Array_array___Array___init();
+ /* ./metamodel//partial_order.nit:185 */
+ ATTR_partial_order___PartialOrder____roots(fra.me.REG[0]) = fra.me.REG[1];
+ stack_frame_head = fra.me.prev;
+ init_table[itpos0] = 1;
return;
}
-val_t partial_order___PartialOrderElement___order(val_t self) {
- struct trace_t trace = {NULL, LOCATE_partial_order, 194, LOCATE_partial_order___PartialOrderElement___order};
- trace.prev = tracehead; tracehead = &trace;
- tracehead = trace.prev;
- return ATTR_partial_order___PartialOrderElement____order( self) /*PartialOrderElement::_order*/;
-}
-val_t partial_order___PartialOrderElement___value(val_t self) {
- struct trace_t trace = {NULL, LOCATE_partial_order, 197, LOCATE_partial_order___PartialOrderElement___value};
- trace.prev = tracehead; tracehead = &trace;
- tracehead = trace.prev;
- return ATTR_partial_order___PartialOrderElement____value( self) /*PartialOrderElement::_value*/;
-}
-val_t partial_order___PartialOrderElement___rank(val_t self) {
- struct trace_t trace = {NULL, LOCATE_partial_order, 200, LOCATE_partial_order___PartialOrderElement___rank};
- trace.prev = tracehead; tracehead = &trace;
- tracehead = trace.prev;
- return ATTR_partial_order___PartialOrderElement____rank( self) /*PartialOrderElement::_rank*/;
-}
-val_t partial_order___PartialOrderElement___direct_greaters(val_t self) {
- struct trace_t trace = {NULL, LOCATE_partial_order, 206, LOCATE_partial_order___PartialOrderElement___direct_greaters};
- trace.prev = tracehead; tracehead = &trace;
- tracehead = trace.prev;
- return ATTR_partial_order___PartialOrderElement____direct_greaters( self) /*PartialOrderElement::_direct_greaters*/;
-}
-val_t partial_order___PartialOrderElement___direct_smallers(val_t self) {
- struct trace_t trace = {NULL, LOCATE_partial_order, 209, LOCATE_partial_order___PartialOrderElement___direct_smallers};
- trace.prev = tracehead; tracehead = &trace;
- tracehead = trace.prev;
- return ATTR_partial_order___PartialOrderElement____direct_smallers( self) /*PartialOrderElement::_direct_smallers*/;
-}
-val_t partial_order___PartialOrderElement___greaters(val_t self) {
- struct trace_t trace = {NULL, LOCATE_partial_order, 212, LOCATE_partial_order___PartialOrderElement___greaters};
- trace.prev = tracehead; tracehead = &trace;
- tracehead = trace.prev;
- return ATTR_partial_order___PartialOrderElement____greaters( self) /*PartialOrderElement::_greaters*/;
-}
-val_t partial_order___PartialOrderElement___greaters_and_self(val_t self) {
- struct trace_t trace = {NULL, LOCATE_partial_order, 218, LOCATE_partial_order___PartialOrderElement___greaters_and_self};
- val_t variable0;
- val_t variable1;
- trace.prev = tracehead; tracehead = &trace;
- variable0 = ATTR_partial_order___PartialOrderElement____greaters_and_self_cache( self) /*PartialOrderElement::_greaters_and_self_cache*/;
- variable0 = TAG_Bool((variable0 == NIT_NULL /*null*/) || ((variable0 != NIT_NULL) && UNTAG_Bool(((array___AbstractArray_____eqeq_t)CALL(variable0,COLOR_kernel___Object_____eqeq))(variable0, NIT_NULL /*null*/) /*AbstractArray::==*/)));
- if (UNTAG_Bool(variable0)) { /*if*/
- variable0 = ATTR_partial_order___PartialOrderElement____greaters( self) /*PartialOrderElement::_greaters*/;
- variable0 = ((array___Collection___to_a_t)CALL(variable0,COLOR_array___Collection___to_a))(variable0) /*Collection::to_a*/;
- ATTR_partial_order___PartialOrderElement____greaters_and_self_cache( self) /*PartialOrderElement::_greaters_and_self_cache*/ = variable0;
- variable0 = ATTR_partial_order___PartialOrderElement____greaters_and_self_cache( self) /*PartialOrderElement::_greaters_and_self_cache*/;
- variable1 = ATTR_partial_order___PartialOrderElement____value( self) /*PartialOrderElement::_value*/;
- ((array___AbstractArray___add_t)CALL(variable0,COLOR_abstract_collection___SimpleCollection___add))(variable0, variable1) /*AbstractArray::add*/;
- }
- variable0 = ATTR_partial_order___PartialOrderElement____greaters_and_self_cache( self) /*PartialOrderElement::_greaters_and_self_cache*/;
- goto return_label25;
- return_label25: while(false);
- tracehead = trace.prev;
- return variable0;
-}
-val_t partial_order___PartialOrderElement___smallers(val_t self) {
- struct trace_t trace = {NULL, LOCATE_partial_order, 234, LOCATE_partial_order___PartialOrderElement___smallers};
- val_t variable0;
- val_t variable1;
- trace.prev = tracehead; tracehead = &trace;
- variable0 = ATTR_partial_order___PartialOrderElement____smallers_last_length( self) /*PartialOrderElement::_smallers_last_length*/;
- variable1 = ATTR_partial_order___PartialOrderElement____order( self) /*PartialOrderElement::_order*/;
- variable1 = ((partial_order___PartialOrder___length_t)CALL(variable1,COLOR_abstract_collection___Collection___length))(variable1) /*PartialOrder::length*/;
- variable0 = TAG_Bool(UNTAG_Int(variable0)<UNTAG_Int(variable1));
- if (UNTAG_Bool(variable0)) { /*if*/
- variable0 = ATTR_partial_order___PartialOrderElement____order( self) /*PartialOrderElement::_order*/;
- variable1 = ATTR_partial_order___PartialOrderElement____smallers_cache( self) /*PartialOrderElement::_smallers_cache*/;
- ((partial_order___PartialOrder___compute_smallers_for_t)CALL(variable0,COLOR_partial_order___PartialOrder___compute_smallers_for))(variable0, self, variable1) /*PartialOrder::compute_smallers_for*/;
- variable0 = ATTR_partial_order___PartialOrderElement____order( self) /*PartialOrderElement::_order*/;
- variable0 = ((partial_order___PartialOrder___length_t)CALL(variable0,COLOR_abstract_collection___Collection___length))(variable0) /*PartialOrder::length*/;
- ATTR_partial_order___PartialOrderElement____smallers_last_length( self) /*PartialOrderElement::_smallers_last_length*/ = variable0;
- }
- variable0 = ATTR_partial_order___PartialOrderElement____smallers_cache( self) /*PartialOrderElement::_smallers_cache*/;
- goto return_label26;
- return_label26: while(false);
- tracehead = trace.prev;
- return variable0;
-}
-val_t partial_order___PartialOrderElement___linear_extension(val_t self) {
- struct trace_t trace = {NULL, LOCATE_partial_order, 247, LOCATE_partial_order___PartialOrderElement___linear_extension};
- val_t variable0;
- val_t variable1;
- val_t variable2;
- val_t variable3;
- val_t variable4;
- val_t variable5;
- val_t variable6;
- val_t variable7;
- trace.prev = tracehead; tracehead = &trace;
- variable0 = ATTR_partial_order___PartialOrderElement____linear_extension_cache( self) /*PartialOrderElement::_linear_extension_cache*/;
- variable0 = TAG_Bool((variable0 == NIT_NULL /*null*/) || ((variable0 != NIT_NULL) && UNTAG_Bool(((array___AbstractArray_____eqeq_t)CALL(variable0,COLOR_kernel___Object_____eqeq))(variable0, NIT_NULL /*null*/) /*AbstractArray::==*/)));
- if (UNTAG_Bool(variable0)) { /*if*/
- variable1 = NEW_array___Array___init(); /*new Array[E]*/
- variable0 = variable1;
- variable2 = NEW_array___Array___init(); /*new Array[E]*/
- variable1 = variable2;
- variable2 = ((partial_order___PartialOrderElement___value_t)CALL( self,COLOR_partial_order___PartialOrderElement___value))( self) /*PartialOrderElement::value*/;
- ((array___AbstractArray___add_t)CALL( variable0 /*res*/,COLOR_abstract_collection___SimpleCollection___add))( variable0 /*res*/, variable2) /*AbstractArray::add*/;
- variable2 = ((partial_order___PartialOrderElement___direct_greaters_t)CALL( self,COLOR_partial_order___PartialOrderElement___direct_greaters))( self) /*PartialOrderElement::direct_greaters*/;
- variable2 = ((array___AbstractArray___iterator_t)CALL(variable2,COLOR_abstract_collection___Collection___iterator))(variable2) /*AbstractArray::iterator*/;
- while (true) { /*for*/
- variable3 = ((array___ArrayIterator___is_ok_t)CALL(variable2,COLOR_abstract_collection___Iterator___is_ok))(variable2) /*ArrayIterator::is_ok*/;
- if (!UNTAG_Bool(variable3)) break; /*for*/
- variable3 = ((array___ArrayIterator___item_t)CALL(variable2,COLOR_abstract_collection___Iterator___item))(variable2) /*ArrayIterator::item*/;
- variable5 = ((partial_order___PartialOrderElement___order_t)CALL( self,COLOR_partial_order___PartialOrderElement___order))( self) /*PartialOrderElement::order*/;
- variable5 = ((partial_order___PartialOrder_____bra_t)CALL(variable5,COLOR_partial_order___PartialOrder_____bra))(variable5, variable3 /*s*/) /*PartialOrder::[]*/;
- variable5 = ((partial_order___PartialOrderElement___linear_extension_t)CALL(variable5,COLOR_partial_order___PartialOrderElement___linear_extension))(variable5) /*PartialOrderElement::linear_extension*/;
- variable4 = variable5;
- ((array___AbstractArray___clear_t)CALL( variable1 /*res2*/,COLOR_abstract_collection___RemovableCollection___clear))( variable1 /*res2*/) /*AbstractArray::clear*/;
- variable5 = ((array___AbstractArray___iterator_t)CALL( variable0 /*res*/,COLOR_abstract_collection___Collection___iterator))( variable0 /*res*/) /*AbstractArray::iterator*/;
- while (true) { /*for*/
- variable6 = ((array___ArrayIterator___is_ok_t)CALL(variable5,COLOR_abstract_collection___Iterator___is_ok))(variable5) /*ArrayIterator::is_ok*/;
- if (!UNTAG_Bool(variable6)) break; /*for*/
- variable6 = ((array___ArrayIterator___item_t)CALL(variable5,COLOR_abstract_collection___Iterator___item))(variable5) /*ArrayIterator::item*/;
- variable7 = ((array___AbstractArray___has_t)CALL( variable4 /*sl*/,COLOR_abstract_collection___Collection___has))( variable4 /*sl*/, variable6 /*e*/) /*AbstractArray::has*/;
- if (UNTAG_Bool( TAG_Bool(!UNTAG_Bool(variable7)))) { /*if*/
- ((array___AbstractArray___add_t)CALL( variable1 /*res2*/,COLOR_abstract_collection___SimpleCollection___add))( variable1 /*res2*/, variable6 /*e*/) /*AbstractArray::add*/;
+val_t partial_order___PartialOrderElement___order(val_t p0){
+ struct {struct stack_frame_t me;} fra;
+ val_t REGB0;
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_partial_order;
+ fra.me.line = 190;
+ fra.me.meth = LOCATE_partial_order___PartialOrderElement___order;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 1;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ REGB0 = TAG_Bool(ATTR_partial_order___PartialOrderElement____order(fra.me.REG[0])!=NIT_NULL);
+ /* ./metamodel//partial_order.nit:190 */
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ fprintf(stderr, "Uninitialized attribute %s", "_order");
+ fprintf(stderr, " (%s:%d)\n", LOCATE_partial_order, 190);
+ nit_exit(1);
+ }
+ fra.me.REG[0] = ATTR_partial_order___PartialOrderElement____order(fra.me.REG[0]);
+ stack_frame_head = fra.me.prev;
+ return fra.me.REG[0];
+}
+val_t partial_order___PartialOrderElement___value(val_t p0){
+ struct {struct stack_frame_t me;} fra;
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_partial_order;
+ fra.me.line = 193;
+ fra.me.meth = LOCATE_partial_order___PartialOrderElement___value;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 1;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ fra.me.REG[0] = ATTR_partial_order___PartialOrderElement____value(fra.me.REG[0]);
+ /* ./metamodel//partial_order.nit:193 */
+ stack_frame_head = fra.me.prev;
+ return fra.me.REG[0];
+}
+val_t partial_order___PartialOrderElement___rank(val_t p0){
+ struct {struct stack_frame_t me;} fra;
+ val_t REGB0;
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_partial_order;
+ fra.me.line = 196;
+ fra.me.meth = LOCATE_partial_order___PartialOrderElement___rank;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 1;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ REGB0 = TAG_Bool(ATTR_partial_order___PartialOrderElement____rank(fra.me.REG[0])!=NIT_NULL);
+ /* ./metamodel//partial_order.nit:196 */
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ fprintf(stderr, "Uninitialized attribute %s", "_rank");
+ fprintf(stderr, " (%s:%d)\n", LOCATE_partial_order, 196);
+ nit_exit(1);
+ }
+ REGB0 = ATTR_partial_order___PartialOrderElement____rank(fra.me.REG[0]);
+ stack_frame_head = fra.me.prev;
+ return REGB0;
+}
+val_t partial_order___PartialOrderElement___direct_greaters(val_t p0){
+ struct {struct stack_frame_t me;} fra;
+ val_t REGB0;
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_partial_order;
+ fra.me.line = 202;
+ fra.me.meth = LOCATE_partial_order___PartialOrderElement___direct_greaters;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 1;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ REGB0 = TAG_Bool(ATTR_partial_order___PartialOrderElement____direct_greaters(fra.me.REG[0])!=NIT_NULL);
+ /* ./metamodel//partial_order.nit:202 */
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ fprintf(stderr, "Uninitialized attribute %s", "_direct_greaters");
+ fprintf(stderr, " (%s:%d)\n", LOCATE_partial_order, 202);
+ nit_exit(1);
+ }
+ fra.me.REG[0] = ATTR_partial_order___PartialOrderElement____direct_greaters(fra.me.REG[0]);
+ stack_frame_head = fra.me.prev;
+ return fra.me.REG[0];
+}
+val_t partial_order___PartialOrderElement___direct_smallers(val_t p0){
+ struct {struct stack_frame_t me;} fra;
+ val_t REGB0;
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_partial_order;
+ fra.me.line = 205;
+ fra.me.meth = LOCATE_partial_order___PartialOrderElement___direct_smallers;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 1;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ REGB0 = TAG_Bool(ATTR_partial_order___PartialOrderElement____direct_smallers(fra.me.REG[0])!=NIT_NULL);
+ /* ./metamodel//partial_order.nit:205 */
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ fprintf(stderr, "Uninitialized attribute %s", "_direct_smallers");
+ fprintf(stderr, " (%s:%d)\n", LOCATE_partial_order, 205);
+ nit_exit(1);
+ }
+ fra.me.REG[0] = ATTR_partial_order___PartialOrderElement____direct_smallers(fra.me.REG[0]);
+ stack_frame_head = fra.me.prev;
+ return fra.me.REG[0];
+}
+val_t partial_order___PartialOrderElement___greaters(val_t p0){
+ struct {struct stack_frame_t me;} fra;
+ val_t REGB0;
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_partial_order;
+ fra.me.line = 208;
+ fra.me.meth = LOCATE_partial_order___PartialOrderElement___greaters;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 1;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ REGB0 = TAG_Bool(ATTR_partial_order___PartialOrderElement____greaters(fra.me.REG[0])!=NIT_NULL);
+ /* ./metamodel//partial_order.nit:208 */
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ fprintf(stderr, "Uninitialized attribute %s", "_greaters");
+ fprintf(stderr, " (%s:%d)\n", LOCATE_partial_order, 208);
+ nit_exit(1);
+ }
+ fra.me.REG[0] = ATTR_partial_order___PartialOrderElement____greaters(fra.me.REG[0]);
+ stack_frame_head = fra.me.prev;
+ return fra.me.REG[0];
+}
+val_t partial_order___PartialOrderElement___greaters_and_self(val_t p0){
+ struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
+ val_t REGB0;
+ val_t REGB1;
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_partial_order;
+ fra.me.line = 214;
+ fra.me.meth = LOCATE_partial_order___PartialOrderElement___greaters_and_self;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 3;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[1] = NIT_NULL;
+ fra.me.REG[2] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ fra.me.REG[1] = ATTR_partial_order___PartialOrderElement____greaters_and_self_cache(fra.me.REG[0]);
+ REGB0 = TAG_Bool(fra.me.REG[1]==NIT_NULL);
+ /* ./metamodel//partial_order.nit:217 */
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ REGB1 = TAG_Bool(fra.me.REG[1]==NIT_NULL);
+ if (UNTAG_Bool(REGB1)) {
+ REGB1 = TAG_Bool(false);
+ REGB0 = REGB1;
+ } else {
+ REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[1])(fra.me.REG[1], NIT_NULL);
+ REGB0 = REGB1;
+ }
+ }
+ if (UNTAG_Bool(REGB0)) {
+ REGB0 = TAG_Bool(ATTR_partial_order___PartialOrderElement____greaters(fra.me.REG[0])!=NIT_NULL);
+ /* ./metamodel//partial_order.nit:218 */
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ fprintf(stderr, "Uninitialized attribute %s", "_greaters");
+ fprintf(stderr, " (%s:%d)\n", LOCATE_partial_order, 218);
+ nit_exit(1);
+ }
+ fra.me.REG[1] = ATTR_partial_order___PartialOrderElement____greaters(fra.me.REG[0]);
+ fra.me.REG[1] = CALL_array___Collection___to_a(fra.me.REG[1])(fra.me.REG[1]);
+ ATTR_partial_order___PartialOrderElement____greaters_and_self_cache(fra.me.REG[0]) = fra.me.REG[1];
+ fra.me.REG[1] = ATTR_partial_order___PartialOrderElement____greaters_and_self_cache(fra.me.REG[0]);
+ fra.me.REG[2] = ATTR_partial_order___PartialOrderElement____value(fra.me.REG[0]);
+ REGB0 = TAG_Bool(fra.me.REG[1]==NIT_NULL);
+ /* ./metamodel//partial_order.nit:219 */
+ if (UNTAG_Bool(REGB0)) {
+ fprintf(stderr, "Reciever is null");
+ fprintf(stderr, " (%s:%d)\n", LOCATE_partial_order, 219);
+ nit_exit(1);
+ }
+ array___Array___add(fra.me.REG[1], fra.me.REG[2]);
+ }
+ fra.me.REG[0] = ATTR_partial_order___PartialOrderElement____greaters_and_self_cache(fra.me.REG[0]);
+ REGB0 = TAG_Bool(fra.me.REG[0]!=NIT_NULL);
+ /* ./metamodel//partial_order.nit:221 */
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ fprintf(stderr, "Cast failed");
+ fprintf(stderr, " (%s:%d)\n", LOCATE_partial_order, 221);
+ nit_exit(1);
+ }
+ goto label1;
+ label1: while(0);
+ stack_frame_head = fra.me.prev;
+ return fra.me.REG[0];
+}
+val_t partial_order___PartialOrderElement___smallers(val_t p0){
+ struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
+ val_t REGB0;
+ val_t REGB1;
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_partial_order;
+ fra.me.line = 230;
+ fra.me.meth = LOCATE_partial_order___PartialOrderElement___smallers;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 3;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[1] = NIT_NULL;
+ fra.me.REG[2] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ REGB0 = TAG_Bool(ATTR_partial_order___PartialOrderElement____smallers_last_length(fra.me.REG[0])!=NIT_NULL);
+ /* ./metamodel//partial_order.nit:233 */
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ fprintf(stderr, "Uninitialized attribute %s", "_smallers_last_length");
+ fprintf(stderr, " (%s:%d)\n", LOCATE_partial_order, 233);
+ nit_exit(1);
+ }
+ REGB0 = ATTR_partial_order___PartialOrderElement____smallers_last_length(fra.me.REG[0]);
+ REGB1 = TAG_Bool(ATTR_partial_order___PartialOrderElement____order(fra.me.REG[0])!=NIT_NULL);
+ if (UNTAG_Bool(REGB1)) {
+ } else {
+ fprintf(stderr, "Uninitialized attribute %s", "_order");
+ fprintf(stderr, " (%s:%d)\n", LOCATE_partial_order, 233);
+ nit_exit(1);
+ }
+ fra.me.REG[1] = ATTR_partial_order___PartialOrderElement____order(fra.me.REG[0]);
+ REGB1 = CALL_abstract_collection___Collection___length(fra.me.REG[1])(fra.me.REG[1]);
+ REGB1 = TAG_Bool(UNTAG_Int(REGB0)<UNTAG_Int(REGB1));
+ /* ./metamodel//partial_order.nit:233 */
+ if (UNTAG_Bool(REGB1)) {
+ REGB1 = TAG_Bool(ATTR_partial_order___PartialOrderElement____order(fra.me.REG[0])!=NIT_NULL);
+ /* ./metamodel//partial_order.nit:234 */
+ if (UNTAG_Bool(REGB1)) {
+ } else {
+ fprintf(stderr, "Uninitialized attribute %s", "_order");
+ fprintf(stderr, " (%s:%d)\n", LOCATE_partial_order, 234);
+ nit_exit(1);
+ }
+ fra.me.REG[1] = ATTR_partial_order___PartialOrderElement____order(fra.me.REG[0]);
+ REGB1 = TAG_Bool(ATTR_partial_order___PartialOrderElement____smallers_cache(fra.me.REG[0])!=NIT_NULL);
+ if (UNTAG_Bool(REGB1)) {
+ } else {
+ fprintf(stderr, "Uninitialized attribute %s", "_smallers_cache");
+ fprintf(stderr, " (%s:%d)\n", LOCATE_partial_order, 234);
+ nit_exit(1);
+ }
+ fra.me.REG[2] = ATTR_partial_order___PartialOrderElement____smallers_cache(fra.me.REG[0]);
+ CALL_partial_order___PartialOrder___compute_smallers_for(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[0], fra.me.REG[2]);
+ REGB1 = TAG_Bool(ATTR_partial_order___PartialOrderElement____order(fra.me.REG[0])!=NIT_NULL);
+ /* ./metamodel//partial_order.nit:235 */
+ if (UNTAG_Bool(REGB1)) {
+ } else {
+ fprintf(stderr, "Uninitialized attribute %s", "_order");
+ fprintf(stderr, " (%s:%d)\n", LOCATE_partial_order, 235);
+ nit_exit(1);
+ }
+ fra.me.REG[2] = ATTR_partial_order___PartialOrderElement____order(fra.me.REG[0]);
+ REGB1 = CALL_abstract_collection___Collection___length(fra.me.REG[2])(fra.me.REG[2]);
+ ATTR_partial_order___PartialOrderElement____smallers_last_length(fra.me.REG[0]) = REGB1;
+ }
+ REGB1 = TAG_Bool(ATTR_partial_order___PartialOrderElement____smallers_cache(fra.me.REG[0])!=NIT_NULL);
+ /* ./metamodel//partial_order.nit:237 */
+ if (UNTAG_Bool(REGB1)) {
+ } else {
+ fprintf(stderr, "Uninitialized attribute %s", "_smallers_cache");
+ fprintf(stderr, " (%s:%d)\n", LOCATE_partial_order, 237);
+ nit_exit(1);
+ }
+ fra.me.REG[0] = ATTR_partial_order___PartialOrderElement____smallers_cache(fra.me.REG[0]);
+ goto label1;
+ label1: while(0);
+ stack_frame_head = fra.me.prev;
+ return fra.me.REG[0];
+}
+val_t partial_order___PartialOrderElement___linear_extension(val_t p0){
+ struct {struct stack_frame_t me; val_t MORE_REG[6];} fra;
+ val_t REGB0;
+ val_t REGB1;
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_partial_order;
+ fra.me.line = 243;
+ fra.me.meth = LOCATE_partial_order___PartialOrderElement___linear_extension;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 7;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[1] = NIT_NULL;
+ fra.me.REG[2] = NIT_NULL;
+ fra.me.REG[3] = NIT_NULL;
+ fra.me.REG[4] = NIT_NULL;
+ fra.me.REG[5] = NIT_NULL;
+ fra.me.REG[6] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ fra.me.REG[1] = ATTR_partial_order___PartialOrderElement____linear_extension_cache(fra.me.REG[0]);
+ REGB0 = TAG_Bool(fra.me.REG[1]==NIT_NULL);
+ /* ./metamodel//partial_order.nit:247 */
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ REGB1 = TAG_Bool(fra.me.REG[1]==NIT_NULL);
+ if (UNTAG_Bool(REGB1)) {
+ REGB1 = TAG_Bool(false);
+ REGB0 = REGB1;
+ } else {
+ REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[1])(fra.me.REG[1], NIT_NULL);
+ REGB0 = REGB1;
+ }
+ }
+ if (UNTAG_Bool(REGB0)) {
+ fra.me.REG[1] = NEW_Array_array___Array___init();
+ fra.me.REG[2] = NEW_Array_array___Array___init();
+ fra.me.REG[3] = CALL_partial_order___PartialOrderElement___value(fra.me.REG[0])(fra.me.REG[0]);
+ /* ./metamodel//partial_order.nit:250 */
+ array___Array___add(fra.me.REG[1], fra.me.REG[3]);
+ fra.me.REG[3] = CALL_partial_order___PartialOrderElement___direct_greaters(fra.me.REG[0])(fra.me.REG[0]);
+ fra.me.REG[3] = CALL_abstract_collection___Collection___iterator(fra.me.REG[3])(fra.me.REG[3]);
+ /* ./metamodel//partial_order.nit:251 */
+ while(1) {
+ REGB0 = CALL_abstract_collection___Iterator___is_ok(fra.me.REG[3])(fra.me.REG[3]);
+ if (UNTAG_Bool(REGB0)) {
+ fra.me.REG[4] = CALL_abstract_collection___Iterator___item(fra.me.REG[3])(fra.me.REG[3]);
+ fra.me.REG[5] = CALL_partial_order___PartialOrderElement___order(fra.me.REG[0])(fra.me.REG[0]);
+ fra.me.REG[4] = CALL_partial_order___PartialOrder_____bra(fra.me.REG[5])(fra.me.REG[5], fra.me.REG[4]);
+ fra.me.REG[4] = CALL_partial_order___PartialOrderElement___linear_extension(fra.me.REG[4])(fra.me.REG[4]);
+ /* ./metamodel//partial_order.nit:253 */
+ CALL_abstract_collection___RemovableCollection___clear(fra.me.REG[2])(fra.me.REG[2]);
+ fra.me.REG[5] = CALL_abstract_collection___Collection___iterator(fra.me.REG[1])(fra.me.REG[1]);
+ /* ./metamodel//partial_order.nit:254 */
+ while(1) {
+ REGB0 = CALL_abstract_collection___Iterator___is_ok(fra.me.REG[5])(fra.me.REG[5]);
+ if (UNTAG_Bool(REGB0)) {
+ fra.me.REG[6] = CALL_abstract_collection___Iterator___item(fra.me.REG[5])(fra.me.REG[5]);
+ REGB0 = CALL_abstract_collection___Collection___has(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[6]);
+ REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
+ /* ./metamodel//partial_order.nit:255 */
+ if (UNTAG_Bool(REGB0)) {
+ array___Array___add(fra.me.REG[2], fra.me.REG[6]);
+ }
+ } else {
+ /* ./metamodel//partial_order.nit:254 */
+ goto label1;
+ }
+ CALL_abstract_collection___Iterator___next(fra.me.REG[5])(fra.me.REG[5]);
}
- continue_29: while(0);
- ((array___ArrayIterator___next_t)CALL(variable5,COLOR_abstract_collection___Iterator___next))(variable5) /*ArrayIterator::next*/;
+ label1: while(0);
+ /* ./metamodel//partial_order.nit:257 */
+ CALL_abstract_collection___Sequence___append(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[4]);
+ fra.me.REG[4] = fra.me.REG[1];
+ fra.me.REG[1] = fra.me.REG[2];
+ fra.me.REG[2] = fra.me.REG[4];
+ /* ./metamodel//partial_order.nit:261 */
+ } else {
+ /* ./metamodel//partial_order.nit:251 */
+ goto label2;
}
- break_29: while(0);
- ((abstract_collection___IndexedCollection___append_t)CALL( variable1 /*res2*/,COLOR_abstract_collection___IndexedCollection___append))( variable1 /*res2*/, variable4 /*sl*/) /*IndexedCollection::append*/;
- variable5 = variable0 /*res*/;
- variable0 = variable1 /*res2*/ /*res=*/;
- variable1 = variable5 /*tmp*/ /*res2=*/;
- continue_28: while(0);
- ((array___ArrayIterator___next_t)CALL(variable2,COLOR_abstract_collection___Iterator___next))(variable2) /*ArrayIterator::next*/;
+ CALL_abstract_collection___Iterator___next(fra.me.REG[3])(fra.me.REG[3]);
}
- break_28: while(0);
- ATTR_partial_order___PartialOrderElement____linear_extension_cache( self) /*PartialOrderElement::_linear_extension_cache*/ = variable0 /*res*/;
- }
- variable0 = ATTR_partial_order___PartialOrderElement____linear_extension_cache( self) /*PartialOrderElement::_linear_extension_cache*/;
- goto return_label27;
- return_label27: while(false);
- tracehead = trace.prev;
- return variable0;
-}
-val_t partial_order___PartialOrderElement___reverse_linear_extension(val_t self) {
- struct trace_t trace = {NULL, LOCATE_partial_order, 275, LOCATE_partial_order___PartialOrderElement___reverse_linear_extension};
- val_t variable0;
- val_t variable1;
- val_t variable2;
- val_t variable3;
- val_t variable4;
- trace.prev = tracehead; tracehead = &trace;
- variable0 = ATTR_partial_order___PartialOrderElement____reverse_linear_extension_cache( self) /*PartialOrderElement::_reverse_linear_extension_cache*/;
- variable0 = TAG_Bool((variable0 == NIT_NULL /*null*/) || ((variable0 != NIT_NULL) && UNTAG_Bool(((array___AbstractArray_____eqeq_t)CALL(variable0,COLOR_kernel___Object_____eqeq))(variable0, NIT_NULL /*null*/) /*AbstractArray::==*/)));
- if (UNTAG_Bool(variable0)) { /*if*/
- variable1 = NEW_hash___HashSet___init(); /*new HashSet[E]*/
- variable0 = variable1;
- variable1 = ((partial_order___PartialOrderElement___direct_greaters_t)CALL( self,COLOR_partial_order___PartialOrderElement___direct_greaters))( self) /*PartialOrderElement::direct_greaters*/;
- variable1 = ((array___AbstractArray___iterator_t)CALL(variable1,COLOR_abstract_collection___Collection___iterator))(variable1) /*AbstractArray::iterator*/;
- while (true) { /*for*/
- variable2 = ((array___ArrayIterator___is_ok_t)CALL(variable1,COLOR_abstract_collection___Iterator___is_ok))(variable1) /*ArrayIterator::is_ok*/;
- if (!UNTAG_Bool(variable2)) break; /*for*/
- variable2 = ((array___ArrayIterator___item_t)CALL(variable1,COLOR_abstract_collection___Iterator___item))(variable1) /*ArrayIterator::item*/;
- variable4 = ((partial_order___PartialOrderElement___order_t)CALL( self,COLOR_partial_order___PartialOrderElement___order))( self) /*PartialOrderElement::order*/;
- variable4 = ((partial_order___PartialOrder_____bra_t)CALL(variable4,COLOR_partial_order___PartialOrder_____bra))(variable4, variable2 /*s*/) /*PartialOrder::[]*/;
- variable4 = ((partial_order___PartialOrderElement___linear_extension_t)CALL(variable4,COLOR_partial_order___PartialOrderElement___linear_extension))(variable4) /*PartialOrderElement::linear_extension*/;
- variable3 = variable4;
- ((abstract_collection___SimpleCollection___add_all_t)CALL( variable0 /*res*/,COLOR_abstract_collection___SimpleCollection___add_all))( variable0 /*res*/, variable3 /*sl*/) /*SimpleCollection::add_all*/;
- continue_31: while(0);
- ((array___ArrayIterator___next_t)CALL(variable1,COLOR_abstract_collection___Iterator___next))(variable1) /*ArrayIterator::next*/;
+ label2: while(0);
+ /* ./metamodel//partial_order.nit:263 */
+ ATTR_partial_order___PartialOrderElement____linear_extension_cache(fra.me.REG[0]) = fra.me.REG[1];
+ }
+ fra.me.REG[0] = ATTR_partial_order___PartialOrderElement____linear_extension_cache(fra.me.REG[0]);
+ REGB0 = TAG_Bool(fra.me.REG[0]!=NIT_NULL);
+ /* ./metamodel//partial_order.nit:265 */
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ fprintf(stderr, "Cast failed");
+ fprintf(stderr, " (%s:%d)\n", LOCATE_partial_order, 265);
+ nit_exit(1);
+ }
+ goto label3;
+ label3: while(0);
+ stack_frame_head = fra.me.prev;
+ return fra.me.REG[0];
+}
+val_t partial_order___PartialOrderElement___reverse_linear_extension(val_t p0){
+ struct {struct stack_frame_t me; val_t MORE_REG[4];} fra;
+ val_t REGB0;
+ val_t REGB1;
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_partial_order;
+ fra.me.line = 271;
+ fra.me.meth = LOCATE_partial_order___PartialOrderElement___reverse_linear_extension;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 5;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[1] = NIT_NULL;
+ fra.me.REG[2] = NIT_NULL;
+ fra.me.REG[3] = NIT_NULL;
+ fra.me.REG[4] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ fra.me.REG[1] = ATTR_partial_order___PartialOrderElement____reverse_linear_extension_cache(fra.me.REG[0]);
+ REGB0 = TAG_Bool(fra.me.REG[1]==NIT_NULL);
+ /* ./metamodel//partial_order.nit:275 */
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ REGB1 = TAG_Bool(fra.me.REG[1]==NIT_NULL);
+ if (UNTAG_Bool(REGB1)) {
+ REGB1 = TAG_Bool(false);
+ REGB0 = REGB1;
+ } else {
+ REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[1])(fra.me.REG[1], NIT_NULL);
+ REGB0 = REGB1;
}
- break_31: while(0);
- variable1 = ((partial_order___PartialOrderElement___value_t)CALL( self,COLOR_partial_order___PartialOrderElement___value))( self) /*PartialOrderElement::value*/;
- ((hash___HashSet___add_t)CALL( variable0 /*res*/,COLOR_abstract_collection___SimpleCollection___add))( variable0 /*res*/, variable1) /*HashSet::add*/;
- variable1 = ((array___Collection___to_a_t)CALL( variable0 /*res*/,COLOR_array___Collection___to_a))( variable0 /*res*/) /*Collection::to_a*/;
- ATTR_partial_order___PartialOrderElement____linear_extension_cache( self) /*PartialOrderElement::_linear_extension_cache*/ = variable1;
- }
- variable0 = ATTR_partial_order___PartialOrderElement____linear_extension_cache( self) /*PartialOrderElement::_linear_extension_cache*/;
- goto return_label30;
- return_label30: while(false);
- tracehead = trace.prev;
- return variable0;
-}
-val_t partial_order___PartialOrderElement_____l(val_t self, val_t param0) {
- struct trace_t trace = {NULL, LOCATE_partial_order, 291, LOCATE_partial_order___PartialOrderElement_____l};
- val_t variable0;
- val_t variable1;
- trace.prev = tracehead; tracehead = &trace;
- variable0 = param0;
- variable1 = ATTR_partial_order___PartialOrderElement____greaters( self) /*PartialOrderElement::_greaters*/;
- variable1 = ((abstract_collection___Collection___has_t)CALL(variable1,COLOR_abstract_collection___Collection___has))(variable1, variable0 /*o*/) /*Collection::has*/;
- goto return_label32;
- return_label32: while(false);
- tracehead = trace.prev;
- return variable1;
-}
-val_t partial_order___PartialOrderElement_____leq(val_t self, val_t param0) {
- struct trace_t trace = {NULL, LOCATE_partial_order, 297, LOCATE_partial_order___PartialOrderElement_____leq};
- val_t variable0;
- val_t variable1;
- val_t variable2;
- trace.prev = tracehead; tracehead = &trace;
- variable0 = param0;
- variable1 = ATTR_partial_order___PartialOrderElement____value( self) /*PartialOrderElement::_value*/;
- variable1 = TAG_Bool((variable1 == variable0 /*o*/) || ((variable1 != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL(variable1,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable1, variable0 /*o*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable1,COLOR_kernel___Object_____eqeq))(variable1, variable0 /*o*/) /*Object::==*/)))));
- variable2 = variable1;
- if (!UNTAG_Bool(variable2)) { /* or */
- variable2 = ATTR_partial_order___PartialOrderElement____greaters( self) /*PartialOrderElement::_greaters*/;
- variable2 = ((abstract_collection___Collection___has_t)CALL(variable2,COLOR_abstract_collection___Collection___has))(variable2, variable0 /*o*/) /*Collection::has*/;
- }
- variable1 = variable2;
- goto return_label33;
- return_label33: while(false);
- tracehead = trace.prev;
- return variable1;
-}
-val_t partial_order___PartialOrderElement_____g(val_t self, val_t param0) {
- struct trace_t trace = {NULL, LOCATE_partial_order, 303, LOCATE_partial_order___PartialOrderElement_____g};
- val_t variable0;
- val_t variable1;
- val_t variable2;
- trace.prev = tracehead; tracehead = &trace;
- variable0 = param0;
- variable1 = ATTR_partial_order___PartialOrderElement____order( self) /*PartialOrderElement::_order*/;
- variable1 = ((partial_order___PartialOrder_____bra_t)CALL(variable1,COLOR_partial_order___PartialOrder_____bra))(variable1, variable0 /*o*/) /*PartialOrder::[]*/;
- variable2 = ATTR_partial_order___PartialOrderElement____value( self) /*PartialOrderElement::_value*/;
- variable1 = ((partial_order___PartialOrderElement_____l_t)CALL(variable1,COLOR_partial_order___PartialOrderElement_____l))(variable1, variable2) /*PartialOrderElement::<*/;
- goto return_label34;
- return_label34: while(false);
- tracehead = trace.prev;
- return variable1;
-}
-val_t partial_order___PartialOrderElement_____geq(val_t self, val_t param0) {
- struct trace_t trace = {NULL, LOCATE_partial_order, 309, LOCATE_partial_order___PartialOrderElement_____geq};
- val_t variable0;
- val_t variable1;
- val_t variable2;
- val_t variable3;
- trace.prev = tracehead; tracehead = &trace;
- variable0 = param0;
- variable1 = ATTR_partial_order___PartialOrderElement____value( self) /*PartialOrderElement::_value*/;
- variable1 = TAG_Bool((variable1 == variable0 /*o*/) || ((variable1 != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL(variable1,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable1, variable0 /*o*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable1,COLOR_kernel___Object_____eqeq))(variable1, variable0 /*o*/) /*Object::==*/)))));
- variable2 = variable1;
- if (!UNTAG_Bool(variable2)) { /* or */
- variable2 = ATTR_partial_order___PartialOrderElement____order( self) /*PartialOrderElement::_order*/;
- variable2 = ((partial_order___PartialOrder_____bra_t)CALL(variable2,COLOR_partial_order___PartialOrder_____bra))(variable2, variable0 /*o*/) /*PartialOrder::[]*/;
- variable3 = ATTR_partial_order___PartialOrderElement____value( self) /*PartialOrderElement::_value*/;
- variable2 = ((partial_order___PartialOrderElement_____l_t)CALL(variable2,COLOR_partial_order___PartialOrderElement_____l))(variable2, variable3) /*PartialOrderElement::<*/;
- }
- variable1 = variable2;
- goto return_label35;
- return_label35: while(false);
- tracehead = trace.prev;
- return variable1;
-}
-void partial_order___PartialOrderElement___register_direct_smallers(val_t self, val_t param0) {
- struct trace_t trace = {NULL, LOCATE_partial_order, 315, LOCATE_partial_order___PartialOrderElement___register_direct_smallers};
- val_t variable0;
- val_t variable1;
- trace.prev = tracehead; tracehead = &trace;
- variable0 = param0;
- variable1 = ATTR_partial_order___PartialOrderElement____direct_smallers( self) /*PartialOrderElement::_direct_smallers*/;
- ((array___AbstractArray___add_t)CALL(variable1,COLOR_abstract_collection___SimpleCollection___add))(variable1, variable0 /*e*/) /*AbstractArray::add*/;
- tracehead = trace.prev;
- return;
+ }
+ if (UNTAG_Bool(REGB0)) {
+ fra.me.REG[1] = NEW_HashSet_hash_collection___HashSet___init();
+ fra.me.REG[2] = CALL_partial_order___PartialOrderElement___direct_greaters(fra.me.REG[0])(fra.me.REG[0]);
+ fra.me.REG[2] = CALL_abstract_collection___Collection___iterator(fra.me.REG[2])(fra.me.REG[2]);
+ /* ./metamodel//partial_order.nit:277 */
+ while(1) {
+ REGB0 = CALL_abstract_collection___Iterator___is_ok(fra.me.REG[2])(fra.me.REG[2]);
+ if (UNTAG_Bool(REGB0)) {
+ fra.me.REG[3] = CALL_abstract_collection___Iterator___item(fra.me.REG[2])(fra.me.REG[2]);
+ fra.me.REG[4] = CALL_partial_order___PartialOrderElement___order(fra.me.REG[0])(fra.me.REG[0]);
+ fra.me.REG[3] = CALL_partial_order___PartialOrder_____bra(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[3]);
+ fra.me.REG[3] = CALL_partial_order___PartialOrderElement___linear_extension(fra.me.REG[3])(fra.me.REG[3]);
+ /* ./metamodel//partial_order.nit:279 */
+ CALL_abstract_collection___SimpleCollection___add_all(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[3]);
+ } else {
+ /* ./metamodel//partial_order.nit:277 */
+ goto label1;
+ }
+ CALL_abstract_collection___Iterator___next(fra.me.REG[2])(fra.me.REG[2]);
+ }
+ label1: while(0);
+ fra.me.REG[2] = CALL_partial_order___PartialOrderElement___value(fra.me.REG[0])(fra.me.REG[0]);
+ /* ./metamodel//partial_order.nit:281 */
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[2]);
+ fra.me.REG[1] = CALL_array___Collection___to_a(fra.me.REG[1])(fra.me.REG[1]);
+ /* ./metamodel//partial_order.nit:282 */
+ ATTR_partial_order___PartialOrderElement____linear_extension_cache(fra.me.REG[0]) = fra.me.REG[1];
+ }
+ fra.me.REG[0] = ATTR_partial_order___PartialOrderElement____linear_extension_cache(fra.me.REG[0]);
+ REGB0 = TAG_Bool(fra.me.REG[0]!=NIT_NULL);
+ /* ./metamodel//partial_order.nit:284 */
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ fprintf(stderr, "Cast failed");
+ fprintf(stderr, " (%s:%d)\n", LOCATE_partial_order, 284);
+ nit_exit(1);
+ }
+ goto label2;
+ label2: while(0);
+ stack_frame_head = fra.me.prev;
+ return fra.me.REG[0];
+}
+val_t partial_order___PartialOrderElement_____l(val_t p0, val_t p1){
+ struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
+ val_t REGB0;
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_partial_order;
+ fra.me.line = 287;
+ fra.me.meth = LOCATE_partial_order___PartialOrderElement_____l;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 2;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[1] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ fra.me.REG[1] = p1;
+ REGB0 = TAG_Bool(ATTR_partial_order___PartialOrderElement____greaters(fra.me.REG[0])!=NIT_NULL);
+ /* ./metamodel//partial_order.nit:290 */
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ fprintf(stderr, "Uninitialized attribute %s", "_greaters");
+ fprintf(stderr, " (%s:%d)\n", LOCATE_partial_order, 290);
+ nit_exit(1);
+ }
+ fra.me.REG[0] = ATTR_partial_order___PartialOrderElement____greaters(fra.me.REG[0]);
+ REGB0 = CALL_abstract_collection___Collection___has(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1]);
+ goto label1;
+ label1: while(0);
+ stack_frame_head = fra.me.prev;
+ return REGB0;
+}
+val_t partial_order___PartialOrderElement_____leq(val_t p0, val_t p1){
+ struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
+ val_t REGB0;
+ val_t REGB1;
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_partial_order;
+ fra.me.line = 293;
+ fra.me.meth = LOCATE_partial_order___PartialOrderElement_____leq;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 3;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[1] = NIT_NULL;
+ fra.me.REG[2] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ fra.me.REG[1] = p1;
+ fra.me.REG[2] = ATTR_partial_order___PartialOrderElement____value(fra.me.REG[0]);
+ REGB0 = TAG_Bool(IS_EQUAL_NN(fra.me.REG[2],fra.me.REG[1]));
+ /* ./metamodel//partial_order.nit:296 */
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ REGB1 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
+ if (UNTAG_Bool(REGB1)) {
+ REGB1 = TAG_Bool(false);
+ REGB0 = REGB1;
+ } else {
+ REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[1]);
+ REGB0 = REGB1;
+ }
+ }
+ if (UNTAG_Bool(REGB0)) {
+ REGB0 = TAG_Bool(true);
+ } else {
+ REGB1 = TAG_Bool(ATTR_partial_order___PartialOrderElement____greaters(fra.me.REG[0])!=NIT_NULL);
+ if (UNTAG_Bool(REGB1)) {
+ } else {
+ fprintf(stderr, "Uninitialized attribute %s", "_greaters");
+ fprintf(stderr, " (%s:%d)\n", LOCATE_partial_order, 296);
+ nit_exit(1);
+ }
+ fra.me.REG[0] = ATTR_partial_order___PartialOrderElement____greaters(fra.me.REG[0]);
+ REGB1 = CALL_abstract_collection___Collection___has(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1]);
+ REGB0 = REGB1;
+ }
+ goto label1;
+ label1: while(0);
+ stack_frame_head = fra.me.prev;
+ return REGB0;
}
-void partial_order___PartialOrderElement___init(val_t self, val_t param0, val_t param1, val_t param2, int* init_table) {
- struct trace_t trace = {NULL, LOCATE_partial_order, 320, LOCATE_partial_order___PartialOrderElement___init};
- val_t variable0;
- val_t variable1;
- val_t variable2;
- val_t variable3;
- val_t variable4;
- val_t variable5;
- val_t variable6;
- val_t variable7;
- val_t variable8;
- val_t variable9;
- trace.prev = tracehead; tracehead = &trace;
- variable0 = param0;
- variable1 = param1;
- variable2 = param2;
- if (init_table[VAL2OBJ( self)->vft[INIT_TABLE_POS_PartialOrderElement].i]) return;
- ATTR_partial_order___PartialOrderElement____order( self) /*PartialOrderElement::_order*/ = variable0 /*o*/;
- ATTR_partial_order___PartialOrderElement____value( self) /*PartialOrderElement::_value*/ = variable1 /*e*/;
- ATTR_partial_order___PartialOrderElement____direct_greaters( self) /*PartialOrderElement::_direct_greaters*/ = variable2 /*directs*/;
- variable3 = NEW_array___Array___init(); /*new Array[E]*/
- ATTR_partial_order___PartialOrderElement____direct_smallers( self) /*PartialOrderElement::_direct_smallers*/ = variable3;
- variable3 = NEW_hash___HashSet___init(); /*new HashSet[E]*/
- ATTR_partial_order___PartialOrderElement____greaters( self) /*PartialOrderElement::_greaters*/ = variable3;
- variable3 = NEW_hash___HashSet___init(); /*new HashSet[E]*/
- ATTR_partial_order___PartialOrderElement____smallers_cache( self) /*PartialOrderElement::_smallers_cache*/ = variable3;
- variable4 = ATTR_partial_order___PartialOrderElement____greaters( self) /*PartialOrderElement::_greaters*/;
- variable3 = variable4;
- variable4 = TAG_Int(0);
- variable5 = ((array___AbstractArray___iterator_t)CALL( variable2 /*directs*/,COLOR_abstract_collection___Collection___iterator))( variable2 /*directs*/) /*AbstractArray::iterator*/;
- while (true) { /*for*/
- variable6 = ((array___ArrayIterator___is_ok_t)CALL(variable5,COLOR_abstract_collection___Iterator___is_ok))(variable5) /*ArrayIterator::is_ok*/;
- if (!UNTAG_Bool(variable6)) break; /*for*/
- variable6 = ((array___ArrayIterator___item_t)CALL(variable5,COLOR_abstract_collection___Iterator___item))(variable5) /*ArrayIterator::item*/;
- ((abstract_collection___SimpleCollection___add_t)CALL( variable3 /*g*/,COLOR_abstract_collection___SimpleCollection___add))( variable3 /*g*/, variable6 /*ee*/) /*SimpleCollection::add*/;
- variable8 = ATTR_partial_order___PartialOrderElement____order( self) /*PartialOrderElement::_order*/;
- variable8 = ((partial_order___PartialOrder_____bra_t)CALL(variable8,COLOR_partial_order___PartialOrder_____bra))(variable8, variable6 /*ee*/) /*PartialOrder::[]*/;
- variable7 = variable8;
- variable8 = ((partial_order___PartialOrderElement___rank_t)CALL( variable7 /*poee*/,COLOR_partial_order___PartialOrderElement___rank))( variable7 /*poee*/) /*PartialOrderElement::rank*/;
- variable8 = TAG_Bool(UNTAG_Int(variable8)>=UNTAG_Int( variable4 /*r*/));
- if (UNTAG_Bool(variable8)) { /*if*/
- variable8 = ((partial_order___PartialOrderElement___rank_t)CALL( variable7 /*poee*/,COLOR_partial_order___PartialOrderElement___rank))( variable7 /*poee*/) /*PartialOrderElement::rank*/;
- variable8 = TAG_Int(UNTAG_Int(variable8)+UNTAG_Int( TAG_Int(1)));
- variable4 = variable8 /*r=*/;
+val_t partial_order___PartialOrderElement_____g(val_t p0, val_t p1){
+ struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
+ val_t REGB0;
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_partial_order;
+ fra.me.line = 299;
+ fra.me.meth = LOCATE_partial_order___PartialOrderElement_____g;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 3;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[1] = NIT_NULL;
+ fra.me.REG[2] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ fra.me.REG[1] = p1;
+ REGB0 = TAG_Bool(ATTR_partial_order___PartialOrderElement____order(fra.me.REG[0])!=NIT_NULL);
+ /* ./metamodel//partial_order.nit:302 */
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ fprintf(stderr, "Uninitialized attribute %s", "_order");
+ fprintf(stderr, " (%s:%d)\n", LOCATE_partial_order, 302);
+ nit_exit(1);
+ }
+ fra.me.REG[2] = ATTR_partial_order___PartialOrderElement____order(fra.me.REG[0]);
+ fra.me.REG[1] = CALL_partial_order___PartialOrder_____bra(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[1]);
+ fra.me.REG[0] = ATTR_partial_order___PartialOrderElement____value(fra.me.REG[0]);
+ REGB0 = CALL_partial_order___PartialOrderElement_____l(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[0]);
+ goto label1;
+ label1: while(0);
+ stack_frame_head = fra.me.prev;
+ return REGB0;
+}
+val_t partial_order___PartialOrderElement_____geq(val_t p0, val_t p1){
+ struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
+ val_t REGB0;
+ val_t REGB1;
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_partial_order;
+ fra.me.line = 305;
+ fra.me.meth = LOCATE_partial_order___PartialOrderElement_____geq;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 3;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[1] = NIT_NULL;
+ fra.me.REG[2] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ fra.me.REG[1] = p1;
+ fra.me.REG[2] = ATTR_partial_order___PartialOrderElement____value(fra.me.REG[0]);
+ REGB0 = TAG_Bool(IS_EQUAL_NN(fra.me.REG[2],fra.me.REG[1]));
+ /* ./metamodel//partial_order.nit:308 */
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ REGB1 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
+ if (UNTAG_Bool(REGB1)) {
+ REGB1 = TAG_Bool(false);
+ REGB0 = REGB1;
+ } else {
+ REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[1]);
+ REGB0 = REGB1;
}
- ((partial_order___PartialOrderElement___register_direct_smallers_t)CALL( variable7 /*poee*/,COLOR_partial_order___PartialOrderElement___register_direct_smallers))( variable7 /*poee*/, variable1 /*e*/) /*PartialOrderElement::register_direct_smallers*/;
- variable8 = ((partial_order___PartialOrderElement___greaters_t)CALL( variable7 /*poee*/,COLOR_partial_order___PartialOrderElement___greaters))( variable7 /*poee*/) /*PartialOrderElement::greaters*/;
- variable8 = ((abstract_collection___Collection___iterator_t)CALL(variable8,COLOR_abstract_collection___Collection___iterator))(variable8) /*Collection::iterator*/;
- while (true) { /*for*/
- variable9 = ((abstract_collection___Iterator___is_ok_t)CALL(variable8,COLOR_abstract_collection___Iterator___is_ok))(variable8) /*Iterator::is_ok*/;
- if (!UNTAG_Bool(variable9)) break; /*for*/
- variable9 = ((abstract_collection___Iterator___item_t)CALL(variable8,COLOR_abstract_collection___Iterator___item))(variable8) /*Iterator::item*/;
- ((abstract_collection___SimpleCollection___add_t)CALL( variable3 /*g*/,COLOR_abstract_collection___SimpleCollection___add))( variable3 /*g*/, variable9 /*eee*/) /*SimpleCollection::add*/;
- continue_39: while(0);
- ((abstract_collection___Iterator___next_t)CALL(variable8,COLOR_abstract_collection___Iterator___next))(variable8) /*Iterator::next*/;
+ }
+ if (UNTAG_Bool(REGB0)) {
+ REGB0 = TAG_Bool(true);
+ } else {
+ REGB1 = TAG_Bool(ATTR_partial_order___PartialOrderElement____order(fra.me.REG[0])!=NIT_NULL);
+ if (UNTAG_Bool(REGB1)) {
+ } else {
+ fprintf(stderr, "Uninitialized attribute %s", "_order");
+ fprintf(stderr, " (%s:%d)\n", LOCATE_partial_order, 308);
+ nit_exit(1);
}
- break_39: while(0);
- continue_38: while(0);
- ((array___ArrayIterator___next_t)CALL(variable5,COLOR_abstract_collection___Iterator___next))(variable5) /*ArrayIterator::next*/;
- }
- break_38: while(0);
- ATTR_partial_order___PartialOrderElement____rank( self) /*PartialOrderElement::_rank*/ = variable4 /*r*/;
- init_table[VAL2OBJ( self)->vft[INIT_TABLE_POS_PartialOrderElement].i] = 1;
- tracehead = trace.prev;
+ fra.me.REG[2] = ATTR_partial_order___PartialOrderElement____order(fra.me.REG[0]);
+ fra.me.REG[1] = CALL_partial_order___PartialOrder_____bra(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[1]);
+ fra.me.REG[0] = ATTR_partial_order___PartialOrderElement____value(fra.me.REG[0]);
+ REGB1 = CALL_partial_order___PartialOrderElement_____l(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[0]);
+ REGB0 = REGB1;
+ }
+ goto label1;
+ label1: while(0);
+ stack_frame_head = fra.me.prev;
+ return REGB0;
+}
+void partial_order___PartialOrderElement___register_direct_smallers(val_t p0, val_t p1){
+ struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
+ val_t REGB0;
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_partial_order;
+ fra.me.line = 311;
+ fra.me.meth = LOCATE_partial_order___PartialOrderElement___register_direct_smallers;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 2;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[1] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ fra.me.REG[1] = p1;
+ REGB0 = TAG_Bool(ATTR_partial_order___PartialOrderElement____direct_smallers(fra.me.REG[0])!=NIT_NULL);
+ /* ./metamodel//partial_order.nit:313 */
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ fprintf(stderr, "Uninitialized attribute %s", "_direct_smallers");
+ fprintf(stderr, " (%s:%d)\n", LOCATE_partial_order, 313);
+ nit_exit(1);
+ }
+ fra.me.REG[0] = ATTR_partial_order___PartialOrderElement____direct_smallers(fra.me.REG[0]);
+ array___Array___add(fra.me.REG[0], fra.me.REG[1]);
+ stack_frame_head = fra.me.prev;
+ return;
+}
+void partial_order___PartialOrderElement___init(val_t p0, val_t p1, val_t p2, val_t p3, int* init_table){
+ int itpos1 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_PartialOrderElement].i;
+ struct {struct stack_frame_t me; val_t MORE_REG[5];} fra;
+ val_t REGB0;
+ val_t REGB1;
+ val_t REGB2;
+ val_t tmp;
+ if (init_table[itpos1]) return;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_partial_order;
+ fra.me.line = 316;
+ fra.me.meth = LOCATE_partial_order___PartialOrderElement___init;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 6;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[1] = NIT_NULL;
+ fra.me.REG[2] = NIT_NULL;
+ fra.me.REG[3] = NIT_NULL;
+ fra.me.REG[4] = NIT_NULL;
+ fra.me.REG[5] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ fra.me.REG[1] = p1;
+ fra.me.REG[2] = p2;
+ fra.me.REG[3] = p3;
+ /* ./metamodel//partial_order.nit:318 */
+ ATTR_partial_order___PartialOrderElement____order(fra.me.REG[0]) = fra.me.REG[1];
+ /* ./metamodel//partial_order.nit:319 */
+ ATTR_partial_order___PartialOrderElement____value(fra.me.REG[0]) = fra.me.REG[2];
+ /* ./metamodel//partial_order.nit:320 */
+ ATTR_partial_order___PartialOrderElement____direct_greaters(fra.me.REG[0]) = fra.me.REG[3];
+ fra.me.REG[1] = NEW_Array_array___Array___init();
+ /* ./metamodel//partial_order.nit:321 */
+ ATTR_partial_order___PartialOrderElement____direct_smallers(fra.me.REG[0]) = fra.me.REG[1];
+ fra.me.REG[1] = NEW_HashSet_hash_collection___HashSet___init();
+ /* ./metamodel//partial_order.nit:323 */
+ ATTR_partial_order___PartialOrderElement____greaters(fra.me.REG[0]) = fra.me.REG[1];
+ fra.me.REG[1] = NEW_HashSet_hash_collection___HashSet___init();
+ /* ./metamodel//partial_order.nit:324 */
+ ATTR_partial_order___PartialOrderElement____smallers_cache(fra.me.REG[0]) = fra.me.REG[1];
+ REGB0 = TAG_Bool(ATTR_partial_order___PartialOrderElement____greaters(fra.me.REG[0])!=NIT_NULL);
+ /* ./metamodel//partial_order.nit:326 */
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ fprintf(stderr, "Uninitialized attribute %s", "_greaters");
+ fprintf(stderr, " (%s:%d)\n", LOCATE_partial_order, 326);
+ nit_exit(1);
+ }
+ fra.me.REG[1] = ATTR_partial_order___PartialOrderElement____greaters(fra.me.REG[0]);
+ REGB0 = TAG_Int(0);
+ fra.me.REG[3] = CALL_abstract_collection___Collection___iterator(fra.me.REG[3])(fra.me.REG[3]);
+ /* ./metamodel//partial_order.nit:328 */
+ while(1) {
+ REGB1 = CALL_abstract_collection___Iterator___is_ok(fra.me.REG[3])(fra.me.REG[3]);
+ if (UNTAG_Bool(REGB1)) {
+ fra.me.REG[4] = CALL_abstract_collection___Iterator___item(fra.me.REG[3])(fra.me.REG[3]);
+ /* ./metamodel//partial_order.nit:329 */
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[4]);
+ REGB1 = TAG_Bool(ATTR_partial_order___PartialOrderElement____order(fra.me.REG[0])!=NIT_NULL);
+ /* ./metamodel//partial_order.nit:330 */
+ if (UNTAG_Bool(REGB1)) {
+ } else {
+ fprintf(stderr, "Uninitialized attribute %s", "_order");
+ fprintf(stderr, " (%s:%d)\n", LOCATE_partial_order, 330);
+ nit_exit(1);
+ }
+ fra.me.REG[5] = ATTR_partial_order___PartialOrderElement____order(fra.me.REG[0]);
+ fra.me.REG[4] = CALL_partial_order___PartialOrder_____bra(fra.me.REG[5])(fra.me.REG[5], fra.me.REG[4]);
+ REGB1 = CALL_partial_order___PartialOrderElement___rank(fra.me.REG[4])(fra.me.REG[4]);
+ REGB1 = TAG_Bool(UNTAG_Int(REGB1)>=UNTAG_Int(REGB0));
+ /* ./metamodel//partial_order.nit:331 */
+ if (UNTAG_Bool(REGB1)) {
+ REGB1 = CALL_partial_order___PartialOrderElement___rank(fra.me.REG[4])(fra.me.REG[4]);
+ REGB2 = TAG_Int(1);
+ REGB2 = TAG_Int(UNTAG_Int(REGB1)+UNTAG_Int(REGB2));
+ REGB0 = REGB2;
+ /* ./metamodel//partial_order.nit:332 */
+ }
+ /* ./metamodel//partial_order.nit:334 */
+ CALL_partial_order___PartialOrderElement___register_direct_smallers(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[2]);
+ fra.me.REG[4] = CALL_partial_order___PartialOrderElement___greaters(fra.me.REG[4])(fra.me.REG[4]);
+ fra.me.REG[4] = CALL_abstract_collection___Collection___iterator(fra.me.REG[4])(fra.me.REG[4]);
+ /* ./metamodel//partial_order.nit:335 */
+ while(1) {
+ REGB2 = CALL_abstract_collection___Iterator___is_ok(fra.me.REG[4])(fra.me.REG[4]);
+ if (UNTAG_Bool(REGB2)) {
+ fra.me.REG[5] = CALL_abstract_collection___Iterator___item(fra.me.REG[4])(fra.me.REG[4]);
+ /* ./metamodel//partial_order.nit:336 */
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[5]);
+ } else {
+ /* ./metamodel//partial_order.nit:335 */
+ goto label1;
+ }
+ CALL_abstract_collection___Iterator___next(fra.me.REG[4])(fra.me.REG[4]);
+ }
+ label1: while(0);
+ } else {
+ /* ./metamodel//partial_order.nit:328 */
+ goto label2;
+ }
+ CALL_abstract_collection___Iterator___next(fra.me.REG[3])(fra.me.REG[3]);
+ }
+ label2: while(0);
+ /* ./metamodel//partial_order.nit:339 */
+ ATTR_partial_order___PartialOrderElement____rank(fra.me.REG[0]) = REGB0;
+ stack_frame_head = fra.me.prev;
+ init_table[itpos1] = 1;
return;
}