1:- if((set_prolog_flag(expect_pfc_file,always), 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 */

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