
/* ******************************************************
	main 4
******************************************************** */

:- op(1150,fx,[instrans]).

init :- 
	compile(naming4),
	compile(basic_funs4),
	compile(tr_basics4),
	compile(tr_appl4),
	compile(keys_basics4),
	compile(keys_appl4),
	compile(parser4),
	compile(query4),
	compile(upload4),
	initparser, 
	initkey, init_keyappl,
	dynpred(tracking), dynpred(tr),
	dynpred(track([])).



/* ***************************************************************** 
	Insert clause to transaction base
 ***************************************************************** */

instrans('<-'(Lhs,Rhs)) :-
	parse_body(Rhs,Passed,da),
	assert((Lhs :- (tr, Passed))).


instrans( Pred ) :-
	not(Pred = '<-'(_,_)),
	assert((Pred :- tr)).


