% module :-style_check(-singleton),style_check(-no_effect),ensure_loaded("core3"). % main comp2main_main(_s,_upvals):-_upvals=[_exec,_comp],(writeln_(_args),writeln_(_L),writeln_(_s),call_cl(_comp,[_s]),!,call_cl(_exec,[_s])). % comp comp2main_comp(_name,_upvals):-_upvals=[_io,_io,_run,__prefix,_list,_io,_gen,_io],(get_(_io,"readFile",T20),_T19=T20,str(_name+".co",T21),call_cl(_T19,[T21,_s]),get_(_gen,"new_env",T23),_T22=T23,call_cl(_T22,[_e]),writeln_(_e),get_(_io,"write",T25),_T24=T25,call_cl(_T24,["--\nstart "]),writeln_(_name),_s0="",_args=[],((get_(_list,"has",T27),_T26=T27,call_cl(_T26,[_args,"--no-std"]),_s1=_s0,writeln_("std");_s1=_s0+__prefix)),!,str(_s1+_s,T28),call_cl(_run,[T28,_e,_e2,_fc,_l,_name]),writeln_("Generated:"),str(_fc+"\nmain(X) :- current_prolog_flag(argv, A), list_atom_string(A, B), "+_name+"(B).",T29),_code=T29,writeln_(_code),get_(_io,"writeln",T31),_T30=T31,call_cl(_T30,[_code]),get_(_io,"writeToFile",T33),_T32=T33,str(_fc,T35),str(_name+".pl",T34),call_cl(_T32,[T34,T35])). % exec comp2main_exec(_fname,_upvals):-_upvals=[],(_module=_fname,writeln_("--"),ensure_loaded(_fname),atom_string(_X,_fname),writeln_(_X),call(_X,_)). % core comp2main_core(_e,_upvals):-_upvals=[_run,_gen,_io],(get_(_io,"readFile",T10),_T9=T10,call_cl(_T9,["core.co",_s]),get_(_gen,"new_env",T12),_T11=T12,call_cl(_T11,[_e1]),call_cl(_run,[_s,_e1,_e2,_,_]),get_(_env,"vars",T14),_T13=T14,call_cl(_T13,[_e2,_vars]),get_(_env,"functors",T16),_T15=T16,call_cl(_T15,[_e2,_fcs]),get_(_env,"init",T18),_T17=T18,call_cl(_T17,[_e,[],_fcs,[],[]])). % run comp2main_run(_s,_e,_e2,_s1,_l,_fname,_upvals):-_upvals=[_gen,_io,_parser,_io],(get_(_io,"write",T2),_T1=T2,call_cl(_T1,["==\n"]),clock(_t0),get_(_parser,"run",T4),_T3=T4,call_cl(_T3,[_s,_fc]),!,clock(_t2),get_(_io,"write",T6),_T5=T6,call_cl(_T5,["==\n"]),writeln_("gen"),get_(_gen,"run",T8),_T7=T8,call_cl(_T7,[_fc,_s1,_fname,_e,_e2,_fname]),clock(_t3),_l='[|]'(_t0,'[|]'(_t1,'[|]'(_t2,'[|]'(_t3,[]))))). % halt comp2main_halt(_upvals):-_upvals=[],(halt). % main comp2main(X):-_halt=clos([],comp2main_halt),creq("parser2",_parser),creq("gen2",_gen),creq("env",_Env),creq("logic",_logic),creq("io",_io),creq("table",_table),creq("list",_list),creq("string",_string),__prefix="",_run=clos([_gen,_io,_parser,_io],comp2main_run),_core=clos([_run,_gen,_io],comp2main_core),_exec=clos([],comp2main_exec),_comp=clos([_io,_io,_run,__prefix,_list,_io,_gen,_io],comp2main_comp),_main=clos([_exec,_comp],comp2main_main),writeln_("-"),X=_s,!,writeln_(_s),!,call_cl(_main,[_s]),args(_L),writeln_(_L).