%
%           This module defines the commands that can be used
%            to compile the CTR source code and programs
%

 

% The "init" command can be run during  an XSB session
% to load and compile the CTR source code.
%

init :-
        compile(ctr),
        compile(updates),
        compile(parser),
        compile(upload),
        compile(optim1),
        compile(optim2),
        reconsult(ctr),
        reconsult(updates),
        reconsult(parser),
        reconsult(upload),
        reconsult(optim1),
        reconsult(optim2).


% The command "ctr_comp" compiles and optimizes the database
% and transaction rules that are part of the CTR programs. The 
%  input file extensions used should be .db and .ctr respectively
% .

ctr_comp(X) :-
        comp_db(X),
        comp_trans(X),
        opt1_trans(X),
        opt2_trans(X).