-val_t partial_order___PartialOrderElement___order(val_t self) {
- struct trace_t trace = {NULL, NULL, 194, LOCATE_partial_order___PartialOrderElement___order};
- val_t *variable = NULL;
- void **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_partial_order;
- 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, NULL, 197, LOCATE_partial_order___PartialOrderElement___value};
- val_t *variable = NULL;
- void **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_partial_order;
- 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, NULL, 200, LOCATE_partial_order___PartialOrderElement___rank};
- val_t *variable = NULL;
- void **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_partial_order;
- 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, NULL, 206, LOCATE_partial_order___PartialOrderElement___direct_greaters};
- val_t *variable = NULL;
- void **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_partial_order;
- 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, NULL, 209, LOCATE_partial_order___PartialOrderElement___direct_smallers};
- val_t *variable = NULL;
- void **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_partial_order;
- 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, NULL, 212, LOCATE_partial_order___PartialOrderElement___greaters};
- val_t *variable = NULL;
- void **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_partial_order;
- 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, NULL, 218, LOCATE_partial_order___PartialOrderElement___greaters_and_self};
- val_t variable[4];
- void **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_partial_order;
- variable[0] = self;
- variable[2] = variable[0];
- variable[2] = ATTR_partial_order___PartialOrderElement____greaters_and_self_cache(variable[2]) /*PartialOrderElement::_greaters_and_self_cache*/;
- variable[2] = TAG_Bool((variable[2] == NIT_NULL /*null*/) || ((variable[2] != NIT_NULL) && UNTAG_Bool(((array___AbstractArray_____eqeq_t)CALL(variable[2],COLOR_kernel___Object_____eqeq))(variable[2], NIT_NULL /*null*/) /*AbstractArray::==*/)));
- if (UNTAG_Bool(variable[2])) { /*if*/
- variable[2] = variable[0];
- variable[3] = variable[0];
- variable[3] = ATTR_partial_order___PartialOrderElement____greaters(variable[3]) /*PartialOrderElement::_greaters*/;
- variable[3] = ((array___Collection___to_a_t)CALL(variable[3],COLOR_array___Collection___to_a))(variable[3]) /*Collection::to_a*/;
- ATTR_partial_order___PartialOrderElement____greaters_and_self_cache(variable[2]) /*PartialOrderElement::_greaters_and_self_cache*/ = variable[3];
- variable[2] = variable[0];
- variable[2] = ATTR_partial_order___PartialOrderElement____greaters_and_self_cache(variable[2]) /*PartialOrderElement::_greaters_and_self_cache*/;
- variable[3] = variable[0];
- variable[3] = ATTR_partial_order___PartialOrderElement____value(variable[3]) /*PartialOrderElement::_value*/;
- ((array___AbstractArray___add_t)CALL(variable[2],COLOR_abstract_collection___SimpleCollection___add))(variable[2], variable[3]) /*AbstractArray::add*/;
- }
- variable[2] = variable[0];
- variable[2] = ATTR_partial_order___PartialOrderElement____greaters_and_self_cache(variable[2]) /*PartialOrderElement::_greaters_and_self_cache*/;
- variable[1] = variable[2];
- goto return_label25;
- return_label25: while(false);
- tracehead = trace.prev;
- return variable[1];
-}
-val_t partial_order___PartialOrderElement___smallers(val_t self) {
- struct trace_t trace = {NULL, NULL, 234, LOCATE_partial_order___PartialOrderElement___smallers};
- val_t variable[5];
- void **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_partial_order;
- variable[0] = self;
- variable[2] = variable[0];
- variable[2] = ATTR_partial_order___PartialOrderElement____smallers_last_length(variable[2]) /*PartialOrderElement::_smallers_last_length*/;
- variable[3] = variable[0];
- variable[3] = ATTR_partial_order___PartialOrderElement____order(variable[3]) /*PartialOrderElement::_order*/;
- variable[3] = ((partial_order___PartialOrder___length_t)CALL(variable[3],COLOR_abstract_collection___Collection___length))(variable[3]) /*PartialOrder::length*/;
- variable[2] = TAG_Bool(UNTAG_Int(variable[2])<UNTAG_Int(variable[3]));
- if (UNTAG_Bool(variable[2])) { /*if*/
- variable[2] = variable[0];
- variable[2] = ATTR_partial_order___PartialOrderElement____order(variable[2]) /*PartialOrderElement::_order*/;
- variable[3] = variable[0];
- variable[4] = variable[0];
- variable[4] = ATTR_partial_order___PartialOrderElement____smallers_cache(variable[4]) /*PartialOrderElement::_smallers_cache*/;
- ((partial_order___PartialOrder___compute_smallers_for_t)CALL(variable[2],COLOR_partial_order___PartialOrder___compute_smallers_for))(variable[2], variable[3], variable[4]) /*PartialOrder::compute_smallers_for*/;
- variable[2] = variable[0];
- variable[3] = variable[0];
- variable[3] = ATTR_partial_order___PartialOrderElement____order(variable[3]) /*PartialOrderElement::_order*/;
- variable[3] = ((partial_order___PartialOrder___length_t)CALL(variable[3],COLOR_abstract_collection___Collection___length))(variable[3]) /*PartialOrder::length*/;
- ATTR_partial_order___PartialOrderElement____smallers_last_length(variable[2]) /*PartialOrderElement::_smallers_last_length*/ = variable[3];
- }
- variable[2] = variable[0];
- variable[2] = ATTR_partial_order___PartialOrderElement____smallers_cache(variable[2]) /*PartialOrderElement::_smallers_cache*/;
- variable[1] = variable[2];
- goto return_label26;
- return_label26: while(false);
- tracehead = trace.prev;
- return variable[1];
-}
-val_t partial_order___PartialOrderElement___linear_extension(val_t self) {
- struct trace_t trace = {NULL, NULL, 247, LOCATE_partial_order___PartialOrderElement___linear_extension};
- val_t variable[12];
- void **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_partial_order;
- variable[0] = self;
- variable[2] = variable[0];
- variable[2] = ATTR_partial_order___PartialOrderElement____linear_extension_cache(variable[2]) /*PartialOrderElement::_linear_extension_cache*/;
- variable[2] = TAG_Bool((variable[2] == NIT_NULL /*null*/) || ((variable[2] != NIT_NULL) && UNTAG_Bool(((array___AbstractArray_____eqeq_t)CALL(variable[2],COLOR_kernel___Object_____eqeq))(variable[2], NIT_NULL /*null*/) /*AbstractArray::==*/)));
- if (UNTAG_Bool(variable[2])) { /*if*/
- variable[3] = NEW_Array_array___Array___init(); /*new Array[E]*/
- variable[2] = variable[3];
- variable[4] = NEW_Array_array___Array___init(); /*new Array[E]*/
- variable[3] = variable[4];
- variable[4] = variable[0];
- variable[4] = ((partial_order___PartialOrderElement___value_t)CALL(variable[4],COLOR_partial_order___PartialOrderElement___value))(variable[4]) /*PartialOrderElement::value*/;
- ((array___AbstractArray___add_t)CALL( variable[2] /*res*/,COLOR_abstract_collection___SimpleCollection___add))( variable[2] /*res*/, variable[4]) /*AbstractArray::add*/;
- variable[4] = variable[0];
- variable[4] = ((partial_order___PartialOrderElement___direct_greaters_t)CALL(variable[4],COLOR_partial_order___PartialOrderElement___direct_greaters))(variable[4]) /*PartialOrderElement::direct_greaters*/;
- variable[4] = ((array___AbstractArray___iterator_t)CALL(variable[4],COLOR_abstract_collection___Collection___iterator))(variable[4]) /*AbstractArray::iterator*/;
- while (true) { /*for*/
- variable[5] = ((array___ArrayIterator___is_ok_t)CALL(variable[4],COLOR_abstract_collection___Iterator___is_ok))(variable[4]) /*ArrayIterator::is_ok*/;
- if (!UNTAG_Bool(variable[5])) break; /*for*/
- variable[5] = ((array___ArrayIterator___item_t)CALL(variable[4],COLOR_abstract_collection___Iterator___item))(variable[4]) /*ArrayIterator::item*/;
- variable[6] = variable[5];
- variable[8] = variable[0];
- variable[8] = ((partial_order___PartialOrderElement___order_t)CALL(variable[8],COLOR_partial_order___PartialOrderElement___order))(variable[8]) /*PartialOrderElement::order*/;
- variable[8] = ((partial_order___PartialOrder_____bra_t)CALL(variable[8],COLOR_partial_order___PartialOrder_____bra))(variable[8], variable[6] /*s*/) /*PartialOrder::[]*/;
- variable[8] = ((partial_order___PartialOrderElement___linear_extension_t)CALL(variable[8],COLOR_partial_order___PartialOrderElement___linear_extension))(variable[8]) /*PartialOrderElement::linear_extension*/;
- variable[7] = variable[8];
- ((array___AbstractArray___clear_t)CALL( variable[3] /*res2*/,COLOR_abstract_collection___RemovableCollection___clear))( variable[3] /*res2*/) /*AbstractArray::clear*/;
- variable[8] = ((array___AbstractArray___iterator_t)CALL( variable[2] /*res*/,COLOR_abstract_collection___Collection___iterator))( variable[2] /*res*/) /*AbstractArray::iterator*/;
- while (true) { /*for*/
- variable[9] = ((array___ArrayIterator___is_ok_t)CALL(variable[8],COLOR_abstract_collection___Iterator___is_ok))(variable[8]) /*ArrayIterator::is_ok*/;
- if (!UNTAG_Bool(variable[9])) break; /*for*/
- variable[9] = ((array___ArrayIterator___item_t)CALL(variable[8],COLOR_abstract_collection___Iterator___item))(variable[8]) /*ArrayIterator::item*/;
- variable[10] = variable[9];
- variable[11] = ((array___AbstractArray___has_t)CALL( variable[7] /*sl*/,COLOR_abstract_collection___Collection___has))( variable[7] /*sl*/, variable[10] /*e*/) /*AbstractArray::has*/;
- if (UNTAG_Bool( TAG_Bool(!UNTAG_Bool(variable[11])))) { /*if*/
- ((array___AbstractArray___add_t)CALL( variable[3] /*res2*/,COLOR_abstract_collection___SimpleCollection___add))( variable[3] /*res2*/, variable[10] /*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]);