/* ******************************************************
	main module of Prototype 3 in Sicstus Prolog
******************************************************** */

init :- 
	compile(basic_funs3),
	compile(naming3),
	compile(tr_basics3),
	compile(tr_appl3),
	compile(keys_basics3),
	compile(keys_appl3),
	compile(parser3),
	compile(query3),
	compile(upload3),
	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)).


