1/*   
    2  LogicMOO Base FOL/PFC Setup
    3% Dec 13, 2035
    4% Douglas Miles
    5
    6*/
    7:- if(current_prolog_flag(xref,true)).    8
    9:- module(pfc_mod,[use_pfc_mod/0]).   10use_pfc_mod.
   11
   12:- else.   13
   14:- if(('$current_source_module'(SM),'context_module'(M),'$current_typein_module'(CM),asserta(baseKB:'wusing_pfc'(M,CM,SM,pfc_mod)))).   15:- endif.   16
   17:- if((prolog_load_context(file,X),prolog_load_context(source,X))).   18 :- module(pfc_mod,[use_pfc_mod/0]).   19 :- abolish(use_pfc_mod/0).   20 %:- prolog_load_context(file,File),unload_file(File).
   21 :- asserta(use_pfc_mod).   22:- endif.   23
   24:- if(\+ current_prolog_flag(lm_pfc_lean,_)).   25:- set_prolog_flag(lm_no_autoload,true).   26:- set_prolog_flag(lm_pfc_lean,false).   27:- wdmsg("WARNING: PFC_LEAN").   28:- endif.   29
   30
   31:- if(current_prolog_flag(pfc_version,2.2)).   32:- reexport(pfc_lib_2_2).   33:- else.   34:- if(current_prolog_flag(pfc_version,1.2)).   35:- reexport(pfc_lib_1_2).   36:- else.   37:- reexport(pfc_lib).   38:- endif.   39:- endif.   40
   41:- ensure_loaded(library(file_scope)).   42:- set_prolog_flag_until_eof(debug_on_error,true).   43:- set_prolog_flag_until_eof(report_error,true).   44:- set_prolog_flag_until_eof(access_level,system).   45:- set_prolog_flag_until_eof(verbose_load,true).   46
   47:- retract(baseKB:'wusing_pfc'(M,CM,SM,pfc_mod)),
   48   (M==SM -> 
   49     (maybe_ensure_abox(SM),nop((M:ain(genlMt(SM,baseKB)))));
   50     wdmsg(baseKB:'lusing_pfc'(M,CM,SM,pfc_mod))),
   51   assert(baseKB:'using_pfc'(M,CM,SM,pfc_mod)),
   52   assert(baseKB:'using_pfc'(M,CM,SM,logicmoo_mod)).   53
   54:- retractall(t_l:disable_px).   55:- set_prolog_flag(mpred_te,true).   56%:- baseKB:ensure_loaded('pfclib/system_autoexec.pfc').
   57:- set_prolog_flag(pfc_booted,true).   58:- set_prolog_flag(pfc_ready, true).   59
   60:- statistics.   61
   62:- set_prolog_flag(retry_undefined, kb_shared).   63
   64:- endif.  % xref