%      Production system KORE/IE (version 12.48)
%
%          (C)1992 Institute for New Generation Computer Technology
%                          (Read COPYRIGHT for detailed information)
%
%      1992.7 Check and refine every programs 
%                             for IFS (ICOT Free Software) release.
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%% IE_COMPILE %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%% IE_COMPILE
ie_compile :-
	write('Now compiling KORE/IE rules ...'),
	tell('.ie_compiling_tmp'),
	(structure(_,FN,_,A,_,_),
         functor(Call,FN,A),
         Call =.. [FN,Time_Tag,IN,on|WM],
         Call,
         write(Call),
         write('.'),
         nl,
         fail;
	 true),
       (structure(_,_,FNM,A,_,_),
         functor(WM,FNM,A),
         WM   =.. [FNM|WML],
         Call =.. [FNM,F,MR,RN,RB,VL,TT,NUS|WML],
         clause(Call,Body),
         saving_lhs(Body,Call),
         fail;
         saving_rhs(RB)),
        (structure(F,FNN,FNM,Arity,ANL,ATL),
         saving_structure(F,FNN,FNM,Arity,ANL,ATL),
         fail;
         true),
	told,    %% 1.8.1
	nl,
	no_style_check(all),
	compile('.ie_compiling_tmp'),
	style_check(all),
	unix(system('rm .ie_compiling_tmp')),
	nl,write('END...'),
        !.
