%0 Null % Block Functor Any Any;Variable Functor Any;Label Functor Integer Stm;Eq Functor Any Any;Stm Functor Any Any Any % module % run goto_run(_c,_e,_e2,_upvals):-_upvals=[_run_c],(((_c = '[|]'(_c1,_l2),call(goto_run(_c1,_e,_e1),_upvals),call(goto_run(_l2,_e1,_e2),_upvals));(dif(_c,'[|]'(_c1,_l2)),(_c = [],_e = _e2);(dif(_c,[]),(_c = fc_Label(_a,_b),call_cl(_run_c,[_b,_e,_e2]),true);(dif(_c,fc_Label(_a,_b)),(_c = fc_Eq(_a,_b),true);(dif(_c,fc_Eq(_a,_b)),writeln_(_c),throw("incorrect statement"))))))). % run_c goto_run_c(_c,_e,_e2,_upvals):-_upvals=[_push],(((_c = '[|]'(_c1,_l2),call(goto_run_c(_c1,_e,_e1),_upvals),call(goto_run_c(_l2,_e1,_e2),_upvals));(dif(_c,'[|]'(_c1,_l2)),(_c = [],_e = _e2);(dif(_c,[]),(_c = fc_Eq(_a,_b),call_cl(_push,[_e,_e2,fc_Block(_a,_b)]));(dif(_c,fc_Eq(_a,_b)),writeln_(_c),throw("incorrect command")))))). % push goto_push(_e,_e2,_x,_upvals):-_upvals=[_table],(_x = fc_Block(_a,_b),get_(_table,"set",T8),_T7 = T8,call_cl(_T7,[_e,_a,_b,_e2])). % is_int goto_is_int(_x,_upvals):-_upvals=[_succ],(call_cl(_succ,[-1.0,_x])). % nat goto_nat(_x,_upvals):-_upvals=[_succ],(call_cl(_succ,[0.0,_x])). % succ goto_succ(_x,_y,_upvals):-_upvals=[],(calc(_x+1.0,T4),_y = T4;calc(_x+1.0,T6),call(goto_succ(T6,_T5),_upvals),_y = _T5). % inc goto_inc(_x,_y,_upvals):-_upvals=[],(calc(_x+1.0,T3),_y = T3). % main goto(X):-creq1("list2",_list,T1),call(T1,_list),creq1("table",_table,T2),call(T2,_table),_list1 = '[|]'(fc_Label(1.0,'[|]'(fc_Eq(_y,2.0),'[|]'(fc_Eq(_y,1.0),[]))),[]),_inc = clos([],goto_inc),_initial = 0.0,_succ = clos([],goto_succ),_nat = clos([_succ],goto_nat),_is_int = clos([_succ],goto_is_int),_push = clos([_table],goto_push),_run_c = clos([_push],goto_run_c),_run = clos([_run_c],goto_run),new(T9),_nil = T9,call_cl(_is_int,[_y]),dif(_y,0.0),dif(_y,1.0),call_cl(_run,[_list1,_nil,_e]),writeln_(_e).