1/*****************************************************************************
    2 * This file is part of the Prolog Development Tool (PDT)
    3 * 
    4 * WWW: http://sewiki.iai.uni-bonn.de/research/pdt/start
    5 * Mail: pdt@lists.iai.uni-bonn.de
    6 * Copyright (C): 2004-2012, CS Dept. III, University of Bonn
    7 * 
    8 * All rights reserved. This program is  made available under the terms
    9 * of the Eclipse Public License v1.0 which accompanies this distribution,
   10 * and is available at http://www.eclipse.org/legal/epl-v10.html
   11 * 
   12 ****************************************************************************/
   13
   14:- module(pdt_factbase, [	fileT/3,
   15							predicateT/5, onloadT/3,
   16							directiveT/3, clauseT/5, literalT/6, metaT/6, headT/5,
   17							operatorT/8,
   18							dynamicT/2, transparentT/2, multifileT/2, meta_predT/2,
   19							termT/2,  
   20							call_edge/2, pred_edge/2, onload_edge/2, load_edge/4,
   21							call_built_in/4,
   22							fileT_ri/2, predicateT_ri/4, literalT_ri/4,  
   23							import_dir/2, export_dir/2, load_dir/3, property_dir/3, library_dir/3,
   24							pos_and_vars/3,
   25							filePosT/3,
   26							error/3, warning/3]).   27							
   28:- reexport('util/ctc_admin_copy.pl').   29
   30:- dynamic fileT/3.			%fileT(Id,FileName,Module)
   31
   32:- dynamic onloadT/3.		%onloadT(Id,FileId,Module)	
   33:- dynamic predicateT/5.	%predicateT(Id,FileId,Functor,Arity,Module)
   34
   35:- dynamic directiveT/3.	%directiveT(Id,FileId,Module)
   36:- dynamic clauseT/5.		%clauseT(Id,ParentId,Module,Functor,Arity)
   37:- dynamic literalT/6.		%literalT(Id,ParentId,EnclosingId,Module,Functor,Arity)
   38:- dynamic metaT/6.			%metaT(Id,ParentId,EnclosingId,Module,Functor,Arity)		<-- da soll wahrscheinlich noch mehr rein...
   39:- dynamic headT/5.			%headT(Id,ClauseId,Module,Functor,Arity)
   40
   41:- dynamic operatorT/8.		%operatorT(Id,ParentId,FileId,Module,Name,Arity,Type,Precedence)
   42
   43:- dynamic dynamicT/2.		%dynamicT(PredicateId,DynamicId)  			
   44:- dynamic transparentT/2.	%transparentT(PredicateId,DynamicId)		
   45:- dynamic multifileT/2.	%multifileT(PredicateId,DynamicId) 
   46:- dynamic meta_predT/2.	%meta_predT(PredicateId,DynamicId)		
   47
   48:- dynamic termT/2.			%termT(Id,Term)
   49:- dynamic filePosT/3.		%filePosT(Id,Pos,Len)    <-- should be coordinated with JTransformer slT/3 in the long run!!!!
   50
   51:- dynamic call_edge/2.		%call_edge(PredId,LiteralId)
   52:- dynamic pred_edge/2.		%pred_edge(ClauseId,PredId)					
   53:- dynamic onload_edge/2.	%onload_edge(DirId,OId)						
   54:- dynamic load_edge/4.		%load_edge(LoadingId,FileId,Imports,Directive)
   55
   56:- dynamic call_built_in/4.	%call_built_in(Functor, Arity, Module, LiteralId)
   57
   58:- dynamic fileT_ri/2.		%fileT_ri(FileName,Id)
   59:- dynamic predicateT_ri/4.	%predicateT_ri(Functor,Arity,Module,Id)		
   60:- dynamic literalT_ri/4.   %literalT_ri(Functor, Arity, Module, LiteralId)
   61
   62:- dynamic pos_and_vars/3.	%pos_and_vars(ClauseId,BodyPos,VarNames)
   63
   64:- dynamic import_dir/2.	%import_dir(FileId,DirectiveId)
   65:- dynamic export_dir/2.	%export_dir(Predicates,DirectiveId)
   66:- dynamic load_dir/3.		%load_dir(DirectiveId,Args,Imports)
   67:- dynamic property_dir/3.	%property_dir(DirectiveId,Functor,Args)
   68:- dynamic library_dir/3.	%library_dir(LibName,LibDir,DirectiveId)
   69
   70:- dynamic error/3.			%error(Error,Context,FileId)  
   71:- dynamic warning/3.		%warning(TreeElement,Type,AdditionalArgument)
   72		%TODO: warnings und errors mehr spezialisieren, so dass man sie spezieller updaten kann
   73		%		je nach Arbeitsschritt
   74		%		error aktuell nur zu Files (auf dauer wohl besser spezieller