1:- if( current_prolog_flag(xref,true) ;  \+ current_prolog_flag(pfc_booted,false) ).    2:- module(system_autoexec,[]).    3:- else.    4:- pfc_lib:use_module(library(pfc_lib)).    5:- set_fileAssertMt(baseKB).    6% :- '$set_source_module'(baseKB).
    7:- endif.

system_autoexec

% ============================================= % File 'system_autoexec.pfc' % Purpose: Agent Reactivity for SWI-Prolog % Maintainer: Douglas Miles % Contact: $Author: dmiles $@users.sourceforge.net ; % Version: 'interface' 1.0.0 % Revision: $Revision: 1.9 $ % Revised At: $Date: 2002/06/27 14:13:20 $ % ============================================= % % PFC is a language extension for prolog.. there is so much that can be done in this language extension to Prolog % % % props(Obj,[height(ObjHt)]) == t(height,Obj,ObjHt) == rdf(Obj,height,ObjHt) == t(height(Obj,ObjHt)). % padd(Obj,[height(ObjHt)]) == prop_set(height,Obj,ObjHt,...) == ain(height(Obj,ObjHt)) % [pdel/pclr](Obj,[height(ObjHt)]) == [del/clr](height,Obj,ObjHt) == [del/clr]svo(Obj,height,ObjHt) == [del/clr](height(Obj,ObjHt)) % keraseall(AnyTerm). % % ANTECEEDANT CONSEQUENT % % P = test nesc true assert(P),retract(~P) , enable(P). % ~ P = test nesc false assert(~P),retract(P), disable(P) % % ~ ~(P) = test possible (via not impossible) retract( ~(P)), enable(P). % \+ ~(P) = test impossiblity is unknown retract( ~(P)) % ~ \+(P) = same as P same as P % \+(P) = test naf(P) retract(P) % % Dec 13, 2035 % Douglas Miles */

   41%:- use_module(library(no_repeats)).
   42
   43 
   44:- add_to_search_path(pfclib,'.').   45
   46
   47  /*
   48  :-
   49         op(990,xfx,(':=')),
   50         op(250,yfx,('?')),
   51         op(1,fx,('$')),
   52         op(200,fy,('@')),
   53         op(100,yfx,('.')),
   54         op(400,yfx,('rdiv')),
   55         op(1150,fx,('meta_predicate')),
   56         op(400,yfx,('//')),
   57         op(500,yfx,('/\\')),
   58         op(1200,fx,('?-')),
   59         op(1150,fx,('module_transparent')),
   60         op(1150,fx,('multifile')),
   61         op(1150,fx,('public')),
   62         op(1150,fx,('thread_initialization')),
   63         op(200,fy,('-')),
   64         op(500,yfx,('-')),
   65         op(700,xfx,('=:=')),
   66         op(1150,fx,('thread_local')),
   67         op(700,xfx,('as')),
   68         op(700,xfx,('=\\=')),
   69         op(400,yfx,('mod')),
   70         op(700,xfx,('=@=')),
   71         op(700,xfx,('@>')),
   72         op(200,xfy,('^')),
   73         op(1200,xfx,('-->')),
   74         op(700,xfx,('=..')),
   75         op(1100,xfy,(';')),
   76         op(700,xfx,('>:<')),
   77         op(700,xfx,(':<')),
   78         op(700,xfx,('@<')),
   79         op(700,xfx,('@=<')),
   80         op(700,xfx,('@>=')),
   81         op(400,yfx,('div')),
   82         op(400,yfx,('/')),
   83         op(700,xfx,('\\=@=')),
   84         op(1150,fx,('discontiguous')),
   85         op(400,yfx,('rem')),
   86         op(700,xfx,('\\=')),
   87         op(1050,xfy,('->')),
   88         op(400,yfx,('>>')),
   89         op(200,fy,('\\')),
   90         op(900,fy,('\\+')),
   91         op(1105,xfy,('|')),
   92         op(700,xfx,('\\==')),
   93         op(200,xfx,('**')),
   94         op(1150,fx,('volatile')),
   95         op(500,yfx,('\\/')),
   96         op(1150,fx,('initialization')),
   97         op(400,yfx,('*')),
   98         op(1150,fx,('dynamic')),
   99         op(700,xfx,('>=')),
  100         op(700,xfx,('>')),
  101         op(200,fy,('+')),
  102         op(500,yfx,('+')),
  103         op(1050,xfy,('*->')),
  104         op(700,xfx,('=<')),
  105         op(700,xfx,('<')),
  106         op(700,xfx,('=')),
  107         op(700,xfx,('is')),
  108         op(600,xfy,(':')),
  109         op(400,yfx,('<<')),
  110         op(1200,fx,(':-')),
  111         op(1200,xfx,(':-')),
  112         op(400,yfx,('xor')),
  113      %   op(1000,xfy,(',')),
  114         op(700,xfx,('==')).
  115         */
  116/*
  117:-kb_shared((rtSententialOperator/1,
  118tReifiableFunction/1,
  119rtVariableArityRelation/1,
  120rtEvaluatableRelation/1,
  121tFunction/1,
  122rtCommutativeRelation/1,
  123prologHybrid/1,
  124rtUnaryPredicate/1,
  125first_std_provider/3)).
  126*/
  127
  128%:- ensure_abox(baseKB).
  129
  130:- set_fileAssertMt(baseKB).  131
  132:- dynamic(mpred_unload_option/2).  133
  134assert_if_newt(G):- (cwc,(clause_asserted_i(G)->true;call(assert,G))).
  135:-if(exists_file(bkb_neever)).  136
  137:- [bkb].  138
  139:- else.  140
  141:- baseKB:ensure_loaded('system_base.pfc').  142
  143% ensure this file does not get unloaded with mpred_reset
  144%:- mpred_trace_exec.
  145:- prolog_load_context(file,F), ain(mpred_unload_option(F,never)).  146
  147%:- mpred_notrace_exec.
  148:- listing(mpred_unload_option/2).  149
  150
  151:- baseKB:ensure_loaded('system_mdefault.pfc').  152:- baseKB:ensure_loaded('system_module_inheritance.pfc').  153:- baseKB:ensure_loaded('system_singleValued.pfc').  154
  155:- multifile(baseKB:locked_baseKB/0).  156:- dynamic(baseKB:locked_baseKB/0).  157:- asserta((baseKB:locked_baseKB)).  158
  159:- endif.