Coder Social home page Coder Social logo

logicmoo / logicmoo_workspace Goto Github PK

View Code? Open in Web Editor NEW
44.0 7.0 8.0 1.93 GB

https://jenkins.logicmoo.org/job/logicmoo_workspace https://logicmoo.org/xwiki/

Home Page: http://www.logicmoo.org/

License: Other

logicmoo prolog-programming-language planner mud game-server artifical-intelligence agi

logicmoo_workspace's Introduction

LogicMOO's Parent Project

Documentation http://logicmoo.org/xwiki/

=========

Install/Run Methods

From web-installer

source <(curl -sS https://raw.githubusercontent.com/logicmoo/logicmoo_workspace/master/web_install.sh)
cd /opt/logicmoo_workspace
./StartLogicmoo.sh

Developer's Docker

(Copies the git repo where things can be edited for development purposes. while running in Docker)

cd /opt
git clone --recurse-submodules https://logicmoo.org/gitlab/logicmoo/logicmoo_workspace.git
cd logicmoo_workspace
./runFromDocker.sh

RSync

mkdir -p /opt/logicmoo/.git
rsync -chaPlz -vv --progress rsync://logicmoo.org:12000/git /opt/logicmoo/.git
cd /opt/logicmoo/
git pull --recurse-submodules
./INSTALL.md
./StartLogicmoo.sh

Running

When ./StartLogicmoo.sh is ran a few minutes later you will see (in green every few minutes)

MAYBE (IN OTHER TERMINAL):  docker exec -it logicmoo sudo -u prologmud_server -- screen -rx LogicmooServer
OR (Bash IN OTHER TERMINAL):  docker exec -it logicmoo bash

Open a terminal new terminal and run

root@gitlab:/opt/logicmoo_workspace# lm
#*
#* DISPLAY=10.0.0.78:0.0
Finding/Setting LIBJVM...
#* LIBJVM=/usr/lib/jvm/java-11-openjdk-amd64/lib/server
Finding/Setting LD_LIBRARY_PATH...
#* LD_LIBRARY_PATH=/usr/lib/jvm/java-11-openjdk-amd64/lib/server:/usr/local/lib

 Executes one of the following commands in the LOGICMOO docker.

   lm [--no-x] [--no-env] [-v|-q] [--wd <path>] [--] <cmd> [<args>]

   ansi                  # Opens LOGICMOO Main Termninal
   emacs                 # Opens IDE in a web browser
   bfly                  # Opens LOGICMOO Main Termninal in web brower
   telnet                # Connect MUD via Telnet
   www                   # Display LOGICMOO WWW in a web browser
   cls                   # Clear the SCREEN
   bash                  # Opens Bash Terminal on your Docker image

Docker RUN on Linux

(output from ./runFromDocker.sh assuming /opt/logicmoo_workspace/ )

docker run --privileged=true --rm -it --no-healthcheck  -v /opt/logicmoo_workspace:/opt/logicmoo_workspace --name logicmoo -p 4000-4019:4000-4019 -p 4021-4199:4021-4199 -p 4243:443 -p 4280:80 -p 4020:3020  -p 3020:3020 -p 4222:22 -p 4220:3020 -p 4200:5900 -p 4201:9001 -p 4290:4090 -p 6079-6081:6079-6081 logicmoo/logicmoo_workspace:latest

Docker RUN on Windows (tested with Docker Desktop for Windows v20.10.7)

(output from ./runFromDocker.bat assuming c:/opt/logicmoo_workspace/ )

docker run --privileged=true --rm -it --no-healthcheck  -v C:\opt\logicmoo_workspace:/opt/logicmoo_workspace --name logicmoo -p 4000-4019:4000-4019 -p 4021-4199:4021-4199 -p 4243:443 -p 4280:80 -p 4020:3020  -p 3020:3020 -p 4222:22 -p 4220:3020 -p 4200:5900 -p 4201:9001 -p 4290:4090 -p 6079-6081:6079-6081 logicmoo/logicmoo_workspace:latest

Ignore the rest of this

(This exists for historical reasons)

Douglas' pastebin

docker kill logicmoo
docker exec -it $(docker ps -n 1 -q) bash
docker network create -d macvlan --subnet=10.0.0.0/24 --gateway=10.0.0.1 -o parent=eth0 pub_net
docker run ./runFromDocker.sh --network="logicmoo_workspace_prologmud_vlan"
docker kill $(docker ps -a -q)
docker image prune --all -f
docker rmi logicmoo/logicmoo_starter_image:latest

Old Way to Install (will now damage system if ran outside of docker)

cd /opt
git clone --recursive https://logicmoo.org/gitlab/logicmoo/logicmoo_workspace.git
cd logicmoo_workspace
./INSTALL.md
./StartLogicmoo.sh
code-insiders --user-data-dir=/opt/logicmoo_workspace/prologmud_server/.config/Code\ -\ Insiders/  --no-sandbox

Docker without installing (poor choice as it has to download and build everything from docker which can take an hour and fail)

docker run -it --name logicmoo --privileged=true -p 4000-4440:4000-4440 -p 4443:443 -p 3020:3020 logicmoo/logicmoo_workspace:latest

OLD Doc urls Initial Docs https://github.com/logicmoo/logicmoo_workspace/wiki

As well as https://docs.google.com/document/d/1fkOxnmI1LqxadvZuCRS-fGIEweIKyPn6AVGp5Yjse1I/edit

logicmoo_workspace's People

Contributors

921kiyo avatar andreafilippini avatar axettone avatar cas-am avatar cmungall avatar damianoazzolini avatar dependabot[bot] avatar ebellodi avatar edisonm avatar fnogatz avatar friguzzi avatar giuseta avatar harshakokel avatar hchiba1 avatar henrykmichalewski avatar janwielemaker avatar jboockmann avatar johanromme avatar lordmatthew96 avatar malbertife avatar matildamoro avatar mattiartio avatar michael-siebers avatar mndrix avatar nickf93 avatar pmoura avatar rzese avatar skwsm avatar teamspoon avatar wouterbeek avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

logicmoo_workspace's Issues

logicmoo.pfc.test.sanity_base.MPRED_PFC_TEST_01 JUnit

(cd /var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/pfc/t/sanity_base ; timeout --foreground --preserve-status -s SIGKILL -k 10s 10s lmoo-clif mpred_pfc_test_01.plt)

GH_MASTER_ISSUE_FINFO=77 OPEN logicmoo.pfc.test.sanity_base.MPRED_PFC_TEST_01 JUnit Test_9999, MPRED_PFC_TEST_01, logicmoo.pfc.test.sanity_base, unit_test 2021-09-18 13:09:27 +0000 UTC

GH_MASTER_ISSUE_ID=#77 'OPEN'

Latest: https://jenkins.logicmoo.org/job/logicmoo_workspace/lastBuild/testReport/logicmoo.pfc.test.sanity_base/MPRED_PFC_TEST_01/logicmoo_pfc_test_sanity_base_MPRED_PFC_TEST_01_JUnit/

This: https://jenkins.logicmoo.org/job/logicmoo_workspace/59/testReport/logicmoo.pfc.test.sanity_base/MPRED_PFC_TEST_01/logicmoo_pfc_test_sanity_base_MPRED_PFC_TEST_01_JUnit/

GITHUB: 44bc7af

GITLAB: https://logicmoo.org:2082/gitlab/logicmoo/logicmoo_workspace/-/commit/44bc7aff04076a8c635bf5c2e723d1db8cbc3513

ISSUE_SEARCH: https://github.com/logicmoo/logicmoo_workspace/issues?q=is%3Aissue+label%3AMPRED_PFC_TEST_01

%
running('/var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/pfc/t/sanity_base/mpred_pfc_test_01.plt'),
%~ this_test_might_need( :-( use_module( library(logicmoo_plarkc))))
%~ this_test_might_need( :-( expects_dialect(pfc)))


:- begin_tests(mpred_pfc_test_02_plt).

%~ message_hook_type(warning)
%~ message_hook(
%~    goal_failed(directive,baseKB:begin_tests(mpred_pfc_test_02_plt)),
%~    warning,
%~    [ 'Goal (~w) failed: ~p' - [ directive,
%~                                 baseKB : begin_tests(mpred_pfc_test_02_plt)]])
/*~
Goal (directive) failed: baseKB:begin_tests(mpred_pfc_test_02_plt)
Warning: Goal (directive) failed: baseKB:begin_tests(mpred_pfc_test_02_plt)
~*/


:- include('mpred_pfc_test_03').

%~ reload_of_test_header.
%~ this_test_might_need( :-( use_module( library(logicmoo_plarkc))))
%~ this_test_might_need( :-( expects_dialect(pfc)))
%~ mpred_test("Test_0001_Line_0036__BooQ2",baseKB:default_ooQ2(booQ2))
%~ FIlE: * https://logicmoo.org:2082/gitlab/logicmoo/logicmoo_workspace/-/blob/master/packs_sys/pfc/t/sanity_base/mpred_pfc_test_03.pl#L36  
%~ debugm( baseKB,
%~   show_success( baseKB,
%~     baseKB : mpred_withdraw( default_ooQ2(booQ2),
%~                ( mfl4(BaseKB,baseKB,'* https://logicmoo.org:2082/gitlab/logicmoo/logicmoo_workspace/-/blob/master/packs_sys/pfc/t/sanity_base/mpred_pfc_test_03.pl ',38) ,
%~                  ax))))
%~ mpred_test("Test_0002_Line_0048__BooQ2",baseKB:current_ooQ2(booQ2))
%~ /var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/pfc/t/sanity_base/mpred_pfc_test_03.pl:54 
%~ mpred_test("Test_0003_Line_0054__naf_BooQ2",baseKB:(\+current_ooQ2(booQ2)))
%~ debugm( baseKB,
%~   show_success( baseKB,
%~     baseKB : mpred_withdraw( current_ooQ2(fooQ2),
%~                ( mfl4(BaseKB,baseKB,'* https://logicmoo.org:2082/gitlab/logicmoo/logicmoo_workspace/-/blob/master/packs_sys/pfc/t/sanity_base/mpred_pfc_test_03.pl ',56) ,
%~                  ax))))
%~ /var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/pfc/t/sanity_base/mpred_pfc_test_03.pl:58 
%~ mpred_test("Test_0004_Line_0058__BooQ2",baseKB:current_ooQ2(booQ2))
%~ mpred_undo1( '$nt'( current_ooQ2(OoQ2),
%~                call_u_no_bc(current_ooQ2(OoQ21)),current_ooQ2(OoQ21)\=@=current_ooQ2(booQ2),
%~                rhs([current_ooQ2(booQ2)])))

totalTime=10

FAILED: /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-junit-minor -k mpred_pfc_test_01.plt (returned 137)

logicmoo.base.examples.fol.LEFTY_01 JUnit

(cd /var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/logicmoo_base/t/examples/fol ; timeout --foreground --preserve-status -s SIGKILL -k 10s 10s lmoo-clif lefty_01.pfc.pl)

GH_MASTER_ISSUE_FINFO=

GH_MASTER_ISSUE_ID=#

Latest: https://jenkins.logicmoo.org/job/logicmoo_workspace/lastBuild/testReport/logicmoo.base.examples.fol/LEFTY_01/logicmoo_base_examples_fol_LEFTY_01 JUnit/

This: https://jenkins.logicmoo.org/job/logicmoo_workspace/42/testReport/logicmoo.base.examples.fol/LEFTY_01/logicmoo_base_examples_fol_LEFTY_01 JUnit/

GIT: cafe456

%
running('/var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/logicmoo_base/t/examples/fol/lefty_01.pfc.pl'),
%~ this_test_might_need( :-( use_module( library(logicmoo_plarkc))))




:- include('test_header.pfc').
% :- process_this_script.

%=  setup pfc
%~ message_hook_type(error)
%~ message_hook(
%~    initialization_exception( error(existence_error(source_sink,'test_header.pfc'),Existence_error)),
%~    error,
%~    [ 'Prolog initialisation failed:',
%~      nl,
%~      '~w `~p\' does not exist'-[source_sink,'test_header.pfc']])
%~ unused(save_junit_results)

totalTime=1

FAILED: /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-junit-minor -k lefty_01.pfc.pl (returned 1)

logicmoo.base.examples.fol.FAMILY_INHERITANCE_01 JUnit

(cd /var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/logicmoo_base/t/examples/fol ; timeout --foreground --preserve-status -s SIGKILL -k 10s 10s swipl -x /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-clif family_inheritance_01.pfc.pl)

% EDIT: https://github.com/logicmoo/logicmoo_workspace/edit/master/packs_sys/logicmoo_base/t/examples/fol/family_inheritance_01.pfc.pl
% JENKINS: https://jenkins.logicmoo.org/job/logicmoo_workspace/lastBuild/testReport/logicmoo.base.examples.fol/FAMILY_INHERITANCE_01/logicmoo_base_examples_fol_FAMILY_INHERITANCE_01/
% ISSUE_SEARCH: https://github.com/logicmoo/logicmoo_workspace/issues?q=is%3Aissue+label%3AFAMILY_INHERITANCE_01
% ISSUE: #71

%~ init_phase(after_load)
%~ init_phase(restore_state)
%
running('/var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/logicmoo_base/t/examples/fol/family_inheritance_01.pfc.pl'),
%~ /var/lib/jenkins/.local/share/swi-prolog/pack/logicmoo_utils/prolog/logicmoo_test_header.pl:93 
%~ this_test_might_need( :-( use_module( library(logicmoo_plarkc))))


:- expects_dialect(pfc).

% :- process_this_script.

%= save compiled clauses using forward chaining storage (by default)
%= we are using forward chaining just so any logical errors, performance and program bugs manefest
%= immediately


% :- process_this_script.

%= save compiled clauses using forward chaining storage (by default)
%= we are using forward chaining just so any logical errors, performance and program bugs manefest
%= immediately
:- set_clause_compile(fwc).



must_is_entailed(G):- cwc, must(is_entailed_u(G)).



show_test(G):- cwc, defaultAssertMt(KB),printAll(must(KB:G)).

%= ````
%= logic tests...
%= ````
%:- debug_logicmoo(logicmoo(_)).

No source location!?
%~ message_hook_type(error)
%~ message_hook(
%~    error(
%~       permission_error(redefine,imported_procedure,common_logic_sanity:show_test/1),
%~       context(system:'$record_clause'/3,Context_Kw)),
%~    error,
%~    [ 'No permission to ~w ~w `~p\'' - [ redefine,
%~                                         imported_procedure,
%~                                         common_logic_sanity : show_test/1]])
/*~
No permission to redefine imported_procedure `common_logic_sanity:(show_test/1)'
ERROR: No permission to redefine imported_procedure `common_logic_sanity:(show_test/1)'
~*/


%= ````
%= logic tests...
%= ````
%:- debug_logicmoo(logicmoo(_)).

prologBuiltin(otherGender/2).

otherGender(male,female).

otherGender(female,male).



tCol(male).

:- dynamic((bore_offspring/2, gender/2)).

bore_offspring(C,P) <gt;=> bore_offspring(C,P).



(bore_offspring(C,P),gender(P,G1), otherGender(G1,G2))
     => gender(C,G2).


%~ message_hook_type(error)
%~ /var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/logicmoo_base/t/examples/fol/family_inheritance_01.pfc.pl:30 
%~ message_hook(
%~    error(permission_error(modify,static_procedure,(',')/2),context(system:assertz/1,Context_Kw)),
%~    error,
%~    [ '~q/~w: '-[assertz,1],
%~      'No permission to ~w static procedure `~p\'' - [ modify,
%~                                                       (',')/2],
%~      nl,
%~      '~w at ~w:~d'-['Defined','/var/lib/jenkins/workspace/logicmoo_workspace/lib/swipl/boot/init.pl',382]])
%~ message_hook_type(warning)
%~ message_hook(
%~    goal_failed( directive,
%~      baseKB : mpred_ain(
%~                  ( ( bore_offspring(C,P)  ,
%~                      gender(P,G1) ,
%~                      otherGender(G1,G2)) =>
%~                    gender(C,G2)),
%~                  ( mfl4(
%~                       [ 'C'=C, 'P'=P,'G1'=G1,
%~                         'G2'=G2],
%~                        baseKB, '/var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/logicmoo_base/t/examples/fol/family_inheritance_01.pfc.pl', 30) ,
%~                    ax))),
%~    warning,
%~    [ 'Goal (~w) failed: ~p' - [ directive,
%~                                 baseKB : mpred_ain(
%~                                             ( ( bore_offspring(C,P)  ,
%~                                                 gender(P,G1) ,
%~                                                 otherGender(G1,G2)) =>
%~                                               gender(C,G2)),
%~                                             ( mfl4(
%~                                                  [ 'C'=C, 'P'=P,'G1'=G1,
%~                                                    'G2'=G2],
%~                                                   baseKB, '/var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/logicmoo_base/t/examples/fol/family_inheritance_01.pfc.pl', 30) ,
%~                                               ax))]])
/*~
assertz/1: No permission to modify static procedure `(,/2)'
Defined at /var/lib/jenkins/workspace/logicmoo_workspace/lib/swipl/boot/init.pl:382
ERROR: assertz/1: No permission to modify static procedure `(,/2)'
ERROR: Defined at /var/lib/jenkins/workspace/logicmoo_workspace/lib/swipl/boot/init.pl:382
Goal (directive) failed: baseKB:mpred_ain((bore_offspring(_656,_660),gender(_660,_664),otherGender(_664,_668))=>gender(_656,_668),(mfl4(['C'=_656,'P'=_660,'G1'=_664,'G2'=_668],baseKB,'/var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/logicmoo_base/t/examples/fol/family_inheritance_01.pfc.pl':30,30),ax))
Warning: Goal (directive) failed: baseKB:mpred_ain((bore_offspring(_656,_660),gender(_660,_664),otherGender(_664,_668))=>gender(_656,_668),(mfl4(['C'=_656,'P'=_660,'G1'=_664,'G2'=_668],baseKB,'/var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/logicmoo_base/t/examples/fol/family_inheritance_01.pfc.pl':30,30),ax))
~*/



gender(P,male) <gt;=> male(P).

gender(P,female) <gt;=> female(P).



male(P) <gt;=> ~female(P).



% seven rules




% seven rules
(((parent(C,M) & female(M)) <gt;=> mother(C,M))).

==> clif(((parent(C,M) & female(M)) <gt;=> mother(C,M))).


%((parent(C,M) & female(M)) <gt;=> mother(C,M)).



%((parent(C,M) & female(M)) <gt;=> mother(C,M)).
:- must_is_entailed(((parent(C,M) & female(M)) <gt;=> mother(C,M))).


%~ make_dynamic_here(baseKB,mpred_warnings(true))
%~ /var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/logicmoo_base/t/examples/fol/family_inheritance_01.pfc.pl:46 
%~ debugm( pfc_lib,
%~   show_success( pfc_lib,
%~     pfc_lib : baseKB : assertz_mu( baseKB : '$spft'( baseKB,
%~                                               wid(rule1:0,rule,<gt;=>(parent(C,M)&female(M),mother(C,M))),
%~                                               mfl4(
%~                                                  [ 'C'=C,
%~                                                    'M'=M],
%~                                                   baseKB, '* https://logicmoo.org:2082/gitlab/logicmoo/logicmoo_workspace/-/edit/master/packs_sys/logicmoo_base/t/examples/fol/family_inheritance_01.pfc.pl ', 46),
%~                                               ax))))
%~ kifi = <gt;=>(parent(C,M)&female(M),mother(C,M)).
%~ kifm = nesc( <gt;=>(parent(C,M)&female(M),mother(C,M))).
%~ -( [ poss( ~( female(M))) :-
%~        fwc ,
%~        poss(~parent(C,M));nesc(parent(C,M)) ,
%~        poss(~parent(C,M));poss(~female(M)) ,
%~        nesc(mother(C,M));nesc(mother(C,M)) ,
%~        ( nesc( mother(C,M)) ;
%~          poss( nesc(parent(C,M)),poss(~female(M)))) ,
%~        ( poss( nesc(female(M)),poss(~parent(C,M))) ;
%~          nesc( mother(C,M))) ,
%~        ( poss( nesc(female(M)),poss(~parent(C,M))) ;
%~          poss( nesc(parent(C,M)),poss(~female(M)))),
%~      nesc( parent(C,M)) :-
%~        fwc ,
%~        nesc(female(M));nesc(parent(C,M)) ,
%~        nesc(female(M));poss(~female(M)) ,
%~        nesc(mother(C,M));nesc(mother(C,M)) ,
%~        ( nesc( mother(C,M)) ;
%~          poss( nesc(parent(C,M)),poss(~female(M)))) ,
%~        ( poss( nesc(female(M)),poss(~parent(C,M))) ;
%~          nesc( mother(C,M))) ,
%~        ( poss( nesc(female(M)),poss(~parent(C,M))) ;
%~          poss( nesc(parent(C,M)),poss(~female(M)))),
%~      poss( ~( parent(C,M))) :-
%~        fwc ,
%~        nesc(female(M));poss(~female(M)) ,
%~        poss(~parent(C,M));poss(~female(M)) ,
%~        nesc(mother(C,M));nesc(mother(C,M)) ,
%~        ( nesc( mother(C,M)) ;
%~          poss( nesc(parent(C,M)),poss(~female(M)))) ,
%~        ( poss( nesc(female(M)),poss(~parent(C,M))) ;
%~          nesc( mother(C,M))) ,
%~        ( poss( nesc(female(M)),poss(~parent(C,M))) ;
%~          poss( nesc(parent(C,M)),poss(~female(M)))),
%~      nesc( female(M)) :-
%~        fwc ,
%~        nesc(female(M));nesc(parent(C,M)) ,
%~        poss(~parent(C,M));nesc(parent(C,M)) ,
%~        nesc(mother(C,M));nesc(mother(C,M)) ,
%~        ( nesc( mother(C,M)) ;
%~          poss( nesc(parent(C,M)),poss(~female(M)))) ,
%~        ( poss( nesc(female(M)),poss(~parent(C,M))) ;
%~          nesc( mother(C,M))) ,
%~        ( poss( nesc(female(M)),poss(~parent(C,M))) ;
%~          poss( nesc(parent(C,M)),poss(~female(M)))),
%~      poss( ~( female(M))) :-
%~        fwc ,
%~        poss( ~( parent(C,M))) ,
%~        nesc(female(M));nesc(parent(C,M)) ,
%~        nesc(female(M));poss(~female(M)) ,
%~        poss(~parent(C,M));nesc(parent(C,M)) ,
%~        poss(~parent(C,M));poss(~female(M)) ,
%~        nesc(mother(C,M));nesc(mother(C,M)) ,
%~        ( nesc( mother(C,M)) ;
%~          poss( nesc(parent(C,M)),poss(~female(M)))),
%~      nesc( parent(C,M)) :-
%~        fwc ,
%~        poss( female(M)) ,
%~        nesc(female(M));nesc(parent(C,M)) ,
%~        nesc(female(M));poss(~female(M)) ,
%~        poss(~parent(C,M));nesc(parent(C,M)) ,
%~        poss(~parent(C,M));poss(~female(M)) ,
%~        nesc(mother(C,M));nesc(mother(C,M)) ,
%~        ( nesc( mother(C,M)) ;
%~          poss( nesc(parent(C,M)),poss(~female(M)))),
%~      poss( ~( mother(C,M))) :-
%~        fwc ,
%~        nesc(female(M));nesc(parent(C,M)) ,
%~        nesc(female(M));poss(~female(M)) ,
%~        poss(~parent(C,M));nesc(parent(C,M)) ,
%~        poss(~parent(C,M));poss(~female(M)) ,
%~        ( poss( nesc(female(M)),poss(~parent(C,M))) ;
%~          poss( nesc(parent(C,M)),poss(~female(M)))),
%~      poss( ~( parent(C,M))) :-
%~        fwc ,
%~        poss( ~( female(M))) ,
%~        nesc(female(M));nesc(parent(C,M)) ,
%~        nesc(female(M));poss(~female(M)) ,
%~        poss(~parent(C,M));nesc(parent(C,M)) ,
%~        poss(~parent(C,M));poss(~female(M)) ,
%~        nesc(mother(C,M));nesc(mother(C,M)) ,
%~        ( poss( nesc(female(M)),poss(~parent(C,M))) ;
%~          nesc( mother(C,M))),
%~      nesc( female(M)) :-
%~        fwc ,
%~        poss( parent(C,M)) ,
%~        nesc(female(M));nesc(parent(C,M)) ,
%~        nesc(female(M));poss(~female(M)) ,
%~        poss(~parent(C,M));nesc(parent(C,M)) ,
%~        poss(~parent(C,M));poss(~female(M)) ,
%~        nesc(mother(C,M));nesc(mother(C,M)) ,
%~        ( poss( nesc(female(M)),poss(~parent(C,M))) ;
%~          nesc( mother(C,M))),
%~      poss( ~( female(M))) :-
%~        fwc ,
%~        poss(~parent(C,M));nesc(parent(C,M)) ,
%~        poss(~parent(C,M));poss(~female(M)) ,
%~        poss( ~( mother(C,M))) ,
%~        nesc( parent(C,M)) ,
%~        nesc( female(M)),
%~      nesc( parent(C,M)) :-
%~        fwc ,
%~        nesc(female(M));nesc(parent(C,M)) ,
%~        nesc(female(M));poss(~female(M)) ,
%~        poss( ~( mother(C,M))) ,
%~        nesc( parent(C,M)) ,
%~        nesc( female(M)),
%~      poss( ~( parent(C,M))) :-
%~        fwc ,
%~        nesc(female(M));poss(~female(M)) ,
%~        poss(~parent(C,M));poss(~female(M)) ,
%~        poss( ~( mother(C,M))) ,
%~        nesc( parent(C,M)) ,
%~        nesc( female(M)),
%~      nesc( female(M)) :-
%~        fwc ,
%~        nesc(female(M));nesc(parent(C,M)) ,
%~        poss(~parent(C,M));nesc(parent(C,M)) ,
%~        poss( ~( mother(C,M))) ,
%~        nesc( parent(C,M)) ,
%~        nesc( female(M)),
%~      nesc( mother(C,M)) :-
%~        fwc ,
%~        nesc(female(M));nesc(parent(C,M)) ,
%~        nesc(female(M));poss(~female(M)) ,
%~        poss(~parent(C,M));nesc(parent(C,M)) ,
%~        poss(~parent(C,M));poss(~female(M)) ,
%~        nesc( parent(C,M)) ,
%~        nesc( female(M)),
%~      poss( ~( parent(C,M))) :-
%~        fwc ,
%~        nesc(female(M));nesc(parent(C,M)) ,
%~        nesc(female(M));poss(~female(M)) ,
%~        poss(~parent(C,M));nesc(parent(C,M)) ,
%~        poss(~parent(C,M));poss(~female(M)) ,
%~        poss( ~( mother(C,M))) ,
%~        nesc( female(M)),
%~      poss( ~( female(M))) :-
%~        fwc ,
%~        nesc(female(M));nesc(parent(C,M)) ,
%~        nesc(female(M));poss(~female(M)) ,
%~        poss(~parent(C,M));nesc(parent(C,M)) ,
%~        poss(~parent(C,M));poss(~female(M)) ,
%~        poss( ~( mother(C,M))) ,
%~        nesc( parent(C,M)),
%~      nesc( mother(C,M)) :-
%~        fwc ,
%~        poss( ~( mother(C,M))) ,
%~        nesc( parent(C,M)) ,
%~        nesc( female(M)),
%~      nesc( mother(C,M)) :-
%~        fwc ,
%~        poss( ~( mother(C,M))) ,
%~        nesc( parent(C,M)) ,
%~        nesc( female(M)),
%~      poss( ~( parent(C,M))) :-
%~        fwc ,
%~        poss( ~( mother(C,M))) ,
%~        poss( ~( mother(C,M))) ,
%~        nesc( female(M)),
%~      poss( ~( female(M))) :-
%~        fwc ,
%~        poss( ~( mother(C,M))) ,
%~        poss( ~( mother(C,M))) ,
%~        nesc( parent(C,M)),
%~      nesc( mother(C,M)) :-
%~        fwc ,
%~        nesc(mother(C,M));nesc(mother(C,M)) ,
%~        ( nesc( mother(C,M)) ;
%~          poss( nesc(parent(C,M)),poss(~female(M)))) ,
%~        ( poss( nesc(female(M)),poss(~parent(C,M))) ;
%~          nesc( mother(C,M))) ,
%~        ( poss( nesc(female(M)),poss(~parent(C,M))) ;
%~          poss( nesc(parent(C,M)),poss(~female(M)))),
%~      poss( ~( female(M))) :-
%~        fwc ,
%~        poss( ~( parent(C,M))) ,
%~        poss( ~( mother(C,M))) ,
%~        nesc(mother(C,M));nesc(mother(C,M)) ,
%~        ( nesc( mother(C,M)) ;
%~          poss( nesc(parent(C,M)),poss(~female(M)))),
%~      nesc( parent(C,M)) :-
%~        fwc ,
%~        poss( female(M)) ,
%~        poss( ~( mother(C,M))) ,
%~        nesc(mother(C,M));nesc(mother(C,M)) ,
%~        ( nesc( mother(C,M)) ;
%~          poss( nesc(parent(C,M)),poss(~female(M)))),
%~      poss( ~( mother(C,M))) :-
%~        fwc ,
%~        poss( ~( mother(C,M))) ,
%~        ( poss( nesc(female(M)),poss(~parent(C,M))) ;
%~          poss( nesc(parent(C,M)),poss(~female(M)))),
%~      poss( ~( parent(C,M))) :-
%~        fwc ,
%~        poss( ~( female(M))) ,
%~        poss( ~( mother(C,M))) ,
%~        nesc(mother(C,M));nesc(mother(C,M)) ,
%~        ( poss( nesc(female(M)),poss(~parent(C,M))) ;
%~          nesc( mother(C,M))),
%~      nesc( female(M)) :-
%~        fwc ,
%~        poss( parent(C,M)) ,
%~        poss( ~( mother(C,M))) ,
%~        nesc(mother(C,M));nesc(mother(C,M)) ,
%~        ( poss( nesc(female(M)),poss(~parent(C,M))) ;
%~          nesc( mother(C,M)))]).
%~ warn( not_is_prolog_entailed( ( ( poss(~parent(C,M));nesc(parent(C,M))  ,
%~                                   poss(~parent(C,M));poss(~female(M)) ,
%~                                   nesc(mother(C,M));nesc(mother(C,M)) ,
%~                                   ( nesc( mother(C,M)) ;
%~                                     poss( nesc(parent(C,M)),poss(~female(M)))) ,
%~                                   ( poss( nesc(female(M)),poss(~parent(C,M))) ;
%~                                     nesc( mother(C,M))) ,
%~                                   ( poss( nesc(female(M)),poss(~parent(C,M))) ;
%~                                     poss( nesc(parent(C,M)),poss(~female(M))))) ==>
%~                                 poss( ~( female(M))))))
%~ warn( not_is_prolog_entailed( ( ( poss(~parent(C,M));nesc(parent(C,M))  ,
%~                                   poss(~parent(C,M));poss(~female(M)) ,
%~                                   nesc(mother(C,M));nesc(mother(C,M)) ,
%~                                   ( nesc( mother(C,M)) ;
%~                                     poss( nesc(parent(C,M)),poss(~female(M)))) ,
%~                                   ( poss( nesc(female(M)),poss(~parent(C,M))) ;
%~                                     nesc( mother(C,M))) ,
%~                                   ( poss( nesc(female(M)),poss(~parent(C,M))) ;
%~                                     poss( nesc(parent(C,M)),poss(~female(M))))) ==>
%~                                 poss( ~( female(M))))))
sHOW_MUST_go_on_failed_F__A__I__L_(bugger:call(common_logic_snark:map_each_clause(baseKB:is_prolog_entailed),(((poss(~parent(_16362,_16376));nesc(parent(_16362,_16376))),(poss(~parent(_16362,_16376));poss(~female(_16376)))),((nesc(mother(_16362,_16376));nesc(mother(_16362,_16376))),(nesc(mother(_16362,_16376));poss((nesc(parent(_16362,_16376)),poss(~female(_16376)))))),(poss((nesc(female(_16376)),poss(~parent(_16362,_16376))));nesc(mother(_16362,_16376))),(poss((nesc(female(_16376)),poss(~parent(_16362,_16376))));poss((nesc(parent(_16362,_16376)),poss(~female(_16376)))))==>poss(~female(_16376)))))
%~ FIlE: * https://logicmoo.org:2082/gitlab/logicmoo/logicmoo_workspace/-/edit/master/packs_sys/logicmoo_base/t/examples/fol/family_inheritance_01.pfc.pl#L46  
%~ error( sHOW_MUST_go_on_failed_F__A__I__L_( bugger : call(
%~                                                        common_logic_snark : map_each_clause( baseKB : is_prolog_entailed),
%~                                                        ( ( poss(~parent(C,M));nesc(parent(C,M))  ,
%~                                                            poss(~parent(C,M));poss(~female(M)) ,
%~                                                            nesc(mother(C,M));nesc(mother(C,M)) ,
%~                                                            ( nesc( mother(C,M)) ;
%~                                                              poss( nesc(parent(C,M)),poss(~female(M)))) ,
%~                                                            ( poss( nesc(female(M)),poss(~parent(C,M))) ;
%~                                                              nesc( mother(C,M))) ,
%~                                                            ( poss( nesc(female(M)),poss(~parent(C,M))) ;
%~                                                              poss( nesc(parent(C,M)),poss(~female(M))))) ==>
%~                                                          poss( ~( female(M)))))))
%~ debugm( baseKB,%~   show_failed( baseKB,%~     baseKB : is_pfc_entailed( ( ( poss(~parent(C,M));nesc(parent(C,M))  ,%~                                   poss(~parent(C,M));poss(~female(M)) ,%~                                   nesc(mother(C,M));nesc(mother(C,M)) ,%~                                   ( nesc( mother(C,M)) ;%~                                     poss( nesc(parent(C,M)),poss(~female(M)))) ,%~                                   ( poss( nesc(female(M)),poss(~parent(C,M))) ;%~                                     nesc( mother(C,M))) ,%~                                   ( poss( nesc(female(M)),poss(~parent(C,M))) ;%~                                     poss( nesc(parent(C,M)),poss(~female(M))))) ==>%~                                 poss( ~( female(M)))))))%~ debugm( baseKB,%~   show_failed( baseKB,%~     baseKB : is_pfc_entailed( ( ( poss(~parent(C,M));nesc(parent(C,M))  ,%~                                   poss(~parent(C,M));poss(~female(M)) ,%~                                   nesc(mother(C,M));nesc(mother(C,M)) ,%~                                   ( nesc( mother(C,M)) ;%~                                     poss( nesc(parent(C,M)),poss(~female(M)))) ,%~                                   ( poss( nesc(female(M)),poss(~parent(C,M))) ;%~                                     nesc( mother(C,M))) ,%~                                   ( poss( nesc(female(M)),poss(~parent(C,M))) ;%~                                     poss( nesc(parent(C,M)),poss(~female(M))))) ==>%~                                 poss( ~( female(M)))))))%~ warn( not_is_prolog_entailed( ( ( poss(~parent(C,M));nesc(parent(C,M))  ,%~                                   poss(~parent(C,M));poss(~female(M)) ,%~                                   nesc(mother(C,M));nesc(mother(C,M)) ,%~                                   ( nesc( mother(C,M)) ;%~                                     poss( nesc(parent(C,M)),poss(~female(M)))) ,%~                                   ( poss( nesc(female(M)),poss(~parent(C,M))) ;%~                                     nesc( mother(C,M))) ,%~                                   ( poss( nesc(female(M)),poss(~parent(C,M))) ;%~                                     poss( nesc(parent(C,M)),poss(~female(M))))) ==>%~                                 poss( ~( female(M))))))%~ FILE: * https://logicmoo.org:2082/gitlab/logicmoo/logicmoo_workspace/-/edit/master/packs_sys/logicmoo_base/t/examples/fol/family_inheritance_01.pfc.pl#L46  

totalTime=10.000

FAILED: /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-junit-minor -k family_inheritance_01.pfc.pl (returned 137) Add_LABELS='Errors,Overtime' Rem_LABELS='Skipped,Skipped,Warnings,Skipped'

logicmoo_workspace #3 failed

Build 'logicmoo_workspace' is failing!

Last 50 lines of build output:

[...truncated 97.44 KB...]
<!-- GLOBSTEM=logicmoo-junit-sanity_base-quick_test-vSTARvc01vDOTvpvSTARv -->
<!-- TEST_STEM=Report-logicmoo-junit-sanity_base-quick_test-vSTARvc01vDOTvpvSTARv-Units -->
<!-- TEST_STEM_PATH=/var/lib/jenkins/workspace/logicmoo_workspace/test_results/jenkins/Report-logicmoo-junit-sanity_base-quick_test-vSTARvc01vDOTvpvSTARv-Units -->
<!-- Running release (all) tests
 ( cd /var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/pfc/t/sanity_base/quick_test ; /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-junit *c01.p*) -->
<!-- PACK_DIR=pfc -->
<!-- JUNIT_PACKAGE=logicmoo.pfc.sanity_base.quick_test -->
<!-- GLOBSTEM=logicmoo-pfc-sanity_base-quick_test-vSTARvc01vDOTvpvSTARv -->
<!-- TEST_STEM=Report-logicmoo-junit-sanity_base-quick_test-vSTARvc01vDOTvpvSTARv-Units -->
<!-- TEST_STEM_PATH=/var/lib/jenkins/workspace/logicmoo_workspace/test_results/jenkins/Report-logicmoo-junit-sanity_base-quick_test-vSTARvc01vDOTvpvSTARv-Units -->
<!-- LOGICMOO_WS=/var/lib/jenkins/workspace/logicmoo_workspace -->
<!-- test_completed=true -->
<!-- ROLLUP_STEM=Report-logicmoo-junit-sanity_base-quick_test-vSTARvc01vDOTvpvSTARv-Units-Rollup -->
<!-- ROLLUP_TMP=/var/lib/jenkins/workspace/logicmoo_workspace/test_results/jenkins/Report-logicmoo-junit-sanity_base-quick_test-vSTARvc01vDOTvpvSTARv-Units-Rollup.tmp -->
Running Matching Tests: /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-junit-minor -k *c01.p*

FileTestCase=logicmoo.pfc.sanity_base.quick_test.*C01@Test_9999_Line_9999__Exitcode_7

CMD=timeout --foreground --preserve-status -s SIGKILL -k 10s 10s lmoo-clif *c01.p*

%~ init_phase(after_load)
%~ init_phase(restore)
%~ init_phase(restore_state)
%~ init_why(during_boot,restore)
%~ warning( not_installing(user,ensure_loaded(system:logicmoo_packs)))
%~ warning( not_installing(user,ensure_loaded(system:logicmoo_swilib)))
%~ warning( not_installing(logicmoo_lib,ensure_loaded(logicmoo_lib:library(logicmoo_typesystem))))
%~ warning( not_installing(logicmoo_lib,ensure_loaded(logicmoo_lib:library(logicmoo_plarkc))))
%~ warning( not_installing(logicmoo_lib,ensure_loaded(logicmoo_lib:library(logicmoo_clif))))
%
ERROR: Prolog initialisation failed:
ERROR: file `*c01.p*' does not exist
FAILED: /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-junit-minor -k *c01.p* (returned 1)

<!-- Do you wish to continue? [y]es, [a]lways [Up/r]etry or [N]o: 
ans=y

sed: can't read /var/lib/jenkins/workspace/logicmoo_workspace/test_results/jenkins/Report-logicmoo-junit-sanity_base-quick_test-vSTARvc01vDOTvpvSTARv-Units?*-junit.xml: No such file or directory
<!-- 
junit-viewer --results=/var/lib/jenkins/workspace/logicmoo_workspace/test_results/jenkins/Report-logicmoo-junit-sanity_base-quick_test-vSTARvc01vDOTvpvSTARv-Units-junitCombined-rollup.tmp --save=/var/lib/jenkins/workspace/logicmoo_workspace/test_results/jenkins/Report-logicmoo-junit-sanity_base-quick_test-vSTARvc01vDOTvpvSTARv-Units-junit-viewer-rollup.html &> /var/lib/jenkins/workspace/logicmoo_workspace/test_results/jenkins/Report-logicmoo-junit-sanity_base-quick_test-vSTARvc01vDOTvpvSTARv-Units-junit-viewer.debug.html
junit2html /var/lib/jenkins/workspace/logicmoo_workspace/test_results/jenkins/Report-logicmoo-junit-sanity_base-quick_test-vSTARvc01vDOTvpvSTARv-Units-junitCombined-rollup.tmp /var/lib/jenkins/workspace/logicmoo_workspace/test_results/jenkins/Report-logicmoo-junit-sanity_base-quick_test-vSTARvc01vDOTvpvSTARv-Units-junitCombined-rollup.html
TEST_STEM_PATH=/var/lib/jenkins/workspace/logicmoo_workspace/test_results/jenkins/Report-logicmoo-junit-sanity_base-quick_test-vSTARvc01vDOTvpvSTARv-Units
-->
Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get "http://%2Fvar%2Frun%2Fdocker.sock/v1.24/containers/logicmoo/json": dial unix /var/run/docker.sock: connect: permission denied
[Jira] No Jira site is configured for this project. This must be a project configuration error
Build step 'Jira: Update relevant issues' changed build result to FAILURE
[htmlpublisher] Archiving HTML reports...
[htmlpublisher] Archiving at BUILD level /var/lib/jenkins/workspace/logicmoo_workspace/test_results to /var/lib/jenkins/jobs/logicmoo_workspace/builds/3/htmlreports/HTML_20Report
No credentials specified

Changes since last successful build:
No changes

  • [Douglas Miles] b08991c - so small subset of tests

  • [Douglas Miles] 46f8a27 - even less

  • [Douglas Miles] 855810e - lmoo-run

View full output

logicmoo.pfc.test.sanity_base.SHIFT_01 JUnit

(cd /var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/pfc/t/sanity_base ; timeout --foreground --preserve-status -s SIGKILL -k 10s 10s swipl -x /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-clif -t "['shift_01.pl']")

% EDIT: https://github.com/logicmoo/logicmoo_workspace/edit/master/packs_sys/pfc/t/sanity_base/shift_01.pl
% JENKINS: https://jenkins.logicmoo.org/job/logicmoo_workspace/lastBuild/testReport/logicmoo.pfc.test.sanity_base/SHIFT_01/
% ISSUE_SEARCH: https://github.com/logicmoo/logicmoo_workspace/issues?q=is%3Aissue+label%3ASHIFT_01
% ISSUE: #66

%~ init_phase(after_load)
%~ init_phase(restore_state)
%
%~ init_why(after_boot,program)
%~ after_boot.
%~ Dont forget to ?- logicmoo_i_cyc_xform.
running('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/pfc/t/sanity_base/shift_01.pl'),
%~ /var/lib/jenkins/.local/share/swi-prolog/pack/logicmoo_utils/prolog/logicmoo_test_header.pl:91 
%~ this_test_might_need( :-( expects_dialect(pfc)))
%~ this_test_might_need( :-( use_module( library(logicmoo_plarkc))))



w(W):-writeln(W).

/*~
No source location!?
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/pfc/t/sanity_base/shift_01.pl:6 
%~ message_hook_type(error)
%~ message_hook(
%~    error(
%~       permission_error(redefine,imported_procedure,rsasak_forward_wa_star_h_add:w/1),
%~       context(system:'$record_clause'/3,Context_Kw)),
%~    error,
%~    [ 'No permission to ~w ~w `~p\'' - [ redefine,
%~                                         imported_procedure,
%~                                         rsasak_forward_wa_star_h_add : w/1]])
No permission to redefine imported_procedure `rsasak_forward_wa_star_h_add:(w/1)'
ERROR: No permission to redefine imported_procedure `rsasak_forward_wa_star_h_add:(w/1)'
~*/


p :- reset(q,Cont,Term),
   writeln(Term),
   call_continuation(Cont).

/*~
No source location!?
~*/


q :- catch(r,Ball,writeln(Ball)).

/*~
No source location!?
~*/


r :- shift(rterm), throw(rball).

% ?- p.

/*~
No source location!?
~*/


% ?- p.

c :- 
   reset(d,Cont,Term),
   w(Term),
   call_continuation(Cont).

/*~
No source location!?
~*/


d :- 
(X=1 ; X=2),
 shift(t(X)),
w(aftershift(X)).


/*~
No source location!?
~*/



head(h, a, b).
/*~
No source location!?
~*/

head(g, b, b).
/*~
No source location!?
~*/

head(h, x, y).



/*~
No source location!?
~*/




:- dynamic(scce0/0).

% hide from optimizations (well as anything)
/*~
~*/


% hide from optimizations (well as anything)
call_w_detr(Goal,Det):- call((Goal,deterministic(Det),true)).


/*~
No source location!?
~*/



scce1(Setup,Goal,Undo):-
      once(Setup),
      (call_w_detr(Goal,Det)
        *-> (Det == true -> once(Undo) ; (once(Undo);(once(Setup),fail)))
        ; (once(Undo),fail)).

/*~
No source location!?
~*/


scce2(Setup,Goal,Undo):-
   reset(scce2r(true,Undo),Cont,Term),
   once(Setup),
   call(Term),
   Goal,
   call_continuation(Cont).

% scce2r(Setup,Goal,Undo):- once(Setup), (Goal *-> shift(once(Undo)) ; (!,once(Undo),fail)).
/*~
No source location!?
~*/


% scce2r(Setup,Goal,Undo):- once(Setup), (Goal *-> shift(once(Undo)) ; (!,once(Undo),fail)).
scce2r(Goal,Undo):- Goal ,shift(once(Undo)).


/*~
No source location!?
~*/



scce3(S,G,C):- scce2(
   (writeln(bmid(REF,X)),asserta(scce0,REF),G,writeln(mid(G,REF,X))),
   (between(1,3,X),S,writeln(ssstart(S,REF,X))),
   (((writeln(bend(C,REF,X)),C,writeln(eend(C,REF,X)))))),fail.


/*~
No source location!?
~*/



y11:- scce1(writeln(start),(between(1,3,X),between(1,X,Y),writeln(X-Y)), writeln(end)),fail.  % Works
/*~
No source location!?
~*/
  % Works
y12:- scce1(asserta(scce0,REF),(between(1,3,X),between(1,X,Y),writeln(X-Y)),writeln(REF)),fail.  % Broken
/*~
No source location!?
~*/
  % Broken
y21:- scce2(writeln(start),(between(1,3,X),between(1,X,Y),writeln(X-Y)), writeln(end)),fail.  % Works
/*~
No source location!?
~*/
  % Works
y22:- scce2((asserta(scce0,REF),writeln(start(REF))),(between(1,3,X),between(1,X,Y),writeln(X-Y)),writeln(end(REF))),fail.  % Broken

/*~
No source location!?
~*/
  % Broken

y23:- scce2((asserta(scce0,REF),writeln(start(REF,X))),(between(1,3,X),writeln(mid(REF,X))),writeln(end(REF,X))),fail.  % Broken

/*~
No source location!?
~*/
  % Broken

y24:- scce2((writeln(bmid(REF,X)),asserta(scce0,REF),writeln(mid(REF,X))),(between(1,3,X),writeln(start(REF,X))),writeln(end(REF,X))),fail.  % Broken

/*~
No source location!?
~*/
  % Broken

y32:- scce3((asserta(scce0,REF),writeln(start(REF))),(between(1,3,X),between(1,X,Y),writeln(X-Y)),writeln(end(REF))),fail.  % Broken

/*~
No source location!?
~*/
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/pfc/t/sanity_base/shift_01.pl:117 
%~ unused(no_junit_results)
logicmoo.pfc.test.sanity_base.SHIFT_01 JUnit	error	=	No permission to redefine imported_procedure `rsasak_forward_wa_star_h_add:(w/1)' 

%~ test_completed_exit(32)

totalTime=1.000

FAILED: /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-junit-minor -k shift_01.pl (returned 32) Add_LABELS='Errors' Rem_LABELS='Skipped,Warnings,Overtime,Skipped,Skipped'

logicmoo.base.examples.fol.MAKE_WFF_01 JUnit

(cd /var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol ; timeout --foreground --preserve-status -s SIGKILL -k 10s 10s swipl -x /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-clif -t "['make_wff_01.pfc.pl']")

% EDIT: https://github.com/logicmoo/logicmoo_workspace/edit/master/packs_sys/logicmoo_base/t/examples/fol/make_wff_01.pfc.pl
% JENKINS: https://jenkins.logicmoo.org/job/logicmoo_workspace/lastBuild/testReport/logicmoo.base.examples.fol/MAKE_WFF_01/
% ISSUE_SEARCH: https://github.com/logicmoo/logicmoo_workspace/issues?q=is%3Aissue+label%3AMAKE_WFF_01
% ISSUE: #74

%~ init_phase(after_load)
%~ init_phase(restore_state)
%
%~ init_why(after_boot,program)
%~ after_boot.
%~ Dont forget to ?- logicmoo_i_cyc_xform.
running('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/make_wff_01.pfc.pl'),
%~ this_test_might_need( :-( use_module( library(logicmoo_plarkc))))



% =================================================================================
% Load the system
% =================================================================================

% :- make.

% :- set_prolog_flag(gc,false).

% =================================================================================
% Set our engine up
% =================================================================================

:- expects_dialect(clif).
% deduce instances from usages in args having the effect of deducing human,dwelling,beverage_class are classes
/*~
~*/

% deduce instances from usages in args having the effect of deducing human,dwelling,beverage_class are classes
==> feature_setting(make_wff,true).
/*~
~*/

==> feature_setting(add_admitted_arguments,true).
% set truth maintainance system to remove previous assertions that new assertions disagree with 
/*~
~*/

% set truth maintainance system to remove previous assertions that new assertions disagree with 
==> feature_setting(tms_mode,remove_conflicting).
/*~
~*/

:- set_prolog_flag(runtime_debug,3). % mention it when we remove previous assertions
/*~
~*/
 % mention it when we remove previous assertions
:- set_prolog_flag_until_eof(do_renames,mpred_expansion).
%:- set_prolog_flag_until_eof(runtime_speed,0). % but dont gripe about speed
/*~
~*/

%:- set_prolog_flag_until_eof(runtime_speed,0). % but dont gripe about speed
:- kif_compile.

/*~
~*/


:- nop(module( baseKB)).
/*~
~*/

:- nop('$set_source_module'( baseKB)).

% =================================================================================
% Define a couple predicates
% =================================================================================
/*~
~*/


% =================================================================================
% Define a couple predicates
% =================================================================================
:- set_prolog_flag(access_level,system).
/*~
~*/

:- redefine_system_predicate(arity(_,_)).
/*~
~*/

:- unlock_predicate(arity(_,_)).
/*~
~*/

:- multifile arity/2.

% maximum cardinality of livesAt/2 is 1
%==> isa(livesAt,'FunctionalBinaryPredicate').
/*~
~*/


% maximum cardinality of livesAt/2 is 1
%==> isa(livesAt,'FunctionalBinaryPredicate').
==> singleValuedInArg(livesAt,2).
% thus implies
/*~
~*/

% thus implies
==> arity(livesAt,2).
/*~
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/make_wff_01.pfc.pl:42 
%~ message_hook_type(error)
%~ message_hook(
%~    error(
%~       permission_error(modify,static_procedure,baseKB:arity/2),
%~       context(system:assertz/1,Context_Kw)),
%~    error,
%~    [ '~q/~w: '-[assertz,1],
%~      'No permission to ~w static procedure `~p\'' - [ modify,
%~                                                       baseKB : arity/2]])
assertz/1: No permission to modify static procedure `baseKB:(arity/2)'
ERROR: assertz/1: No permission to modify static procedure `baseKB:(arity/2)'
%~ message_hook_type(warning)
%~ message_hook(
%~    goal_failed( directive,
%~      baseKB : mpred_ain(
%~                  ==>( arity(livesAt,2)),
%~                  ( mfl4(BaseKB,baseKB,'/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/make_wff_01.pfc.pl',42) ,
%~                    ax))),
%~    warning,
%~    [ 'Goal (~w) failed: ~p' - [ directive,
%~                                 baseKB : mpred_ain(
%~                                             ==>( arity(livesAt,2)),
%~                                             ( mfl4(BaseKB,baseKB,'/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/make_wff_01.pfc.pl',42) ,
%~                                               ax))]])
Goal (directive) failed: baseKB:mpred_ain((==>arity(livesAt,2)),(mfl4(_470,baseKB,'/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/make_wff_01.pfc.pl':42,42),ax))
Warning: Goal (directive) failed: baseKB:mpred_ain((==>arity(livesAt,2)),(mfl4(_470,baseKB,'/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/make_wff_01.pfc.pl':42,42),ax))
~*/

==> argIsa(livesAt,1,human).
/*~
%~ message_hook_type(error)
%~ message_hook(
%~    error(
%~       permission_error(modify,static_procedure,baseKB:arity/2),
%~       context(system:assertz/1,Context_Kw)),
%~    error,
%~    [ '~q/~w: '-[assertz,1],
%~      'No permission to ~w static procedure `~p\'' - [ modify,
%~                                                       baseKB : arity/2]])
assertz/1: No permission to modify static procedure `baseKB:(arity/2)'
ERROR: assertz/1: No permission to modify static procedure `baseKB:(arity/2)'
%~ message_hook_type(warning)
%~ message_hook(
%~    goal_failed( directive,
%~      baseKB : mpred_ain(
%~                  ==>( argIsa(livesAt,1,human)),
%~                  ( mfl4(BaseKB,baseKB,'/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/make_wff_01.pfc.pl',43) ,
%~                    ax))),
%~    warning,
%~    [ 'Goal (~w) failed: ~p' - [ directive,
%~                                 baseKB : mpred_ain(
%~                                             ==>( argIsa(livesAt,1,human)),
%~                                             ( mfl4(BaseKB,baseKB,'/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/make_wff_01.pfc.pl',43) ,
%~                                               ax))]])
Goal (directive) failed: baseKB:mpred_ain((==>argIsa(livesAt,1,human)),(mfl4(_474,baseKB,'/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/make_wff_01.pfc.pl':43,43),ax))
Warning: Goal (directive) failed: baseKB:mpred_ain((==>argIsa(livesAt,1,human)),(mfl4(_474,baseKB,'/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/make_wff_01.pfc.pl':43,43),ax))
~*/

==> argIsa(livesAt,2,dwelling).

% define drinks/2
/*~
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/make_wff_01.pfc.pl:44 
%~ message_hook_type(error)
%~ message_hook(
%~    error(
%~       permission_error(modify,static_procedure,baseKB:arity/2),
%~       context(system:assertz/1,Context_Kw)),
%~    error,
%~    [ '~q/~w: '-[assertz,1],
%~      'No permission to ~w static procedure `~p\'' - [ modify,
%~                                                       baseKB : arity/2]])
assertz/1: No permission to modify static procedure `baseKB:(arity/2)'
ERROR: assertz/1: No permission to modify static procedure `baseKB:(arity/2)'
%~ message_hook_type(warning)
%~ message_hook(
%~    goal_failed( directive,
%~      baseKB : mpred_ain(
%~                  ==>( argIsa(livesAt,2,dwelling)),
%~                  ( mfl4(BaseKB,baseKB,'/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/make_wff_01.pfc.pl',44) ,
%~                    ax))),
%~    warning,
%~    [ 'Goal (~w) failed: ~p' - [ directive,
%~                                 baseKB : mpred_ain(
%~                                             ==>( argIsa(livesAt,2,dwelling)),
%~                                             ( mfl4(BaseKB,baseKB,'/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/make_wff_01.pfc.pl',44) ,
%~                                               ax))]])
Goal (directive) failed: baseKB:mpred_ain((==>argIsa(livesAt,2,dwelling)),(mfl4(_474,baseKB,'/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/make_wff_01.pfc.pl':44,44),ax))
Warning: Goal (directive) failed: baseKB:mpred_ain((==>argIsa(livesAt,2,dwelling)),(mfl4(_474,baseKB,'/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/make_wff_01.pfc.pl':44,44),ax))
~*/


% define drinks/2
==> arity(drinks,2).
/*~
%~ message_hook_type(error)
%~ message_hook(
%~    error(
%~       permission_error(modify,static_procedure,baseKB:arity/2),
%~       context(system:assertz/1,Context_Kw)),
%~    error,
%~    [ '~q/~w: '-[assertz,1],
%~      'No permission to ~w static procedure `~p\'' - [ modify,
%~                                                       baseKB : arity/2]])
assertz/1: No permission to modify static procedure `baseKB:(arity/2)'
ERROR: assertz/1: No permission to modify static procedure `baseKB:(arity/2)'
%~ message_hook_type(warning)
%~ message_hook(
%~    goal_failed( directive,
%~      baseKB : mpred_ain(
%~                  ==>( arity(drinks,2)),
%~                  ( mfl4(BaseKB,baseKB,'/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/make_wff_01.pfc.pl',47) ,
%~                    ax))),
%~    warning,
%~    [ 'Goal (~w) failed: ~p' - [ directive,
%~                                 baseKB : mpred_ain(
%~                                             ==>( arity(drinks,2)),
%~                                             ( mfl4(BaseKB,baseKB,'/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/make_wff_01.pfc.pl',47) ,
%~                                               ax))]])
Goal (directive) failed: baseKB:mpred_ain((==>arity(drinks,2)),(mfl4(_470,baseKB,'/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/make_wff_01.pfc.pl':47,47),ax))
Warning: Goal (directive) failed: baseKB:mpred_ain((==>arity(drinks,2)),(mfl4(_470,baseKB,'/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/make_wff_01.pfc.pl':47,47),ax))
~*/

==> argIsa(drinks,1,drinker).
/*~
%~ message_hook_type(error)
%~ message_hook(
%~    error(
%~       permission_error(modify,static_procedure,baseKB:arity/2),
%~       context(system:assertz/1,Context_Kw)),
%~    error,
%~    [ '~q/~w: '-[assertz,1],
%~      'No permission to ~w static procedure `~p\'' - [ modify,
%~                                                       baseKB : arity/2]])
assertz/1: No permission to modify static procedure `baseKB:(arity/2)'
ERROR: assertz/1: No permission to modify static procedure `baseKB:(arity/2)'
%~ message_hook_type(warning)
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/make_wff_01.pfc.pl:48 
%~ message_hook(
%~    goal_failed( directive,
%~      baseKB : mpred_ain(
%~                  ==>( argIsa(drinks,1,drinker)),
%~                  ( mfl4(BaseKB,baseKB,'/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/make_wff_01.pfc.pl',48) ,
%~                    ax))),
%~    warning,
%~    [ 'Goal (~w) failed: ~p' - [ directive,
%~                                 baseKB : mpred_ain(
%~                                             ==>( argIsa(drinks,1,drinker)),
%~                                             ( mfl4(BaseKB,baseKB,'/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/make_wff_01.pfc.pl',48) ,
%~                                               ax))]])
Goal (directive) failed: baseKB:mpred_ain((==>argIsa(drinks,1,drinker)),(mfl4(_474,baseKB,'/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/make_wff_01.pfc.pl':48,48),ax))
Warning: Goal (directive) failed: baseKB:mpred_ain((==>argIsa(drinks,1,drinker)),(mfl4(_474,baseKB,'/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/make_wff_01.pfc.pl':48,48),ax))
~*/

==> argIsa(drinks,2,beverage_class).

% =================================================================================
% Test 1  Possible Fact
% =================================================================================

/*~
%~ message_hook_type(error)
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/make_wff_01.pfc.pl:49 
%~ message_hook(
%~    error(
%~       permission_error(modify,static_procedure,baseKB:arity/2),
%~       context(system:assertz/1,Context_Kw)),
%~    error,
%~    [ '~q/~w: '-[assertz,1],
%~      'No permission to ~w static procedure `~p\'' - [ modify,
%~                                                       baseKB : arity/2]])
assertz/1: No permission to modify static procedure `baseKB:(arity/2)'
ERROR: assertz/1: No permission to modify static procedure `baseKB:(arity/2)'
%~ message_hook_type(warning)
%~ message_hook(
%~    goal_failed( directive,
%~      baseKB : mpred_ain(
%~                  ==>( argIsa(drinks,2,beverage_class)),
%~                  ( mfl4(BaseKB,baseKB,'/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/make_wff_01.pfc.pl',49) ,
%~                    ax))),
%~    warning,
%~    [ 'Goal (~w) failed: ~p' - [ directive,
%~                                 baseKB : mpred_ain(
%~                                             ==>( argIsa(drinks,2,beverage_class)),
%~                                             ( mfl4(BaseKB,baseKB,'/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/make_wff_01.pfc.pl',49) ,
%~                                               ax))]])
Goal (directive) failed: baseKB:mpred_ain((==>argIsa(drinks,2,beverage_class)),(mfl4(_474,baseKB,'/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/make_wff_01.pfc.pl':49,49),ax))
Warning: Goal (directive) failed: baseKB:mpred_ain((==>argIsa(drinks,2,beverage_class)),(mfl4(_474,baseKB,'/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/make_wff_01.pfc.pl':49,49),ax))
~*/


% =================================================================================
% Test 1  Possible Fact
% =================================================================================

==> poss(livesAt(fred,green_house)).

/*~
~*/


:- mpred_test(poss(isa(fred,human))).

/*~
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/make_wff_01.pfc.pl:57 
%~ ?-( mpred_test("Test_0001_Line_0000__Fred",baseKB:poss(human(fred)))).
passed=info(why_was_true(baseKB:poss(human(fred))))
no_proof_for(poss(human(fred))).

no_proof_for(poss(human(fred))).

no_proof_for(poss(human(fred))).

	name	=	'logicmoo.base.examples.fol.MAKE_WFF_01-Test_0001_Line_0000__Fred'. 
	JUNIT_CLASSNAME	=	'logicmoo.base.examples.fol.MAKE_WFF_01'. 
	JUNIT_CMD	=	'timeout --foreground --preserve-status -s SIGKILL -k 10s 10s swipl -x /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-clif -t "[\'make_wff_01.pfc.pl\']"'. 
% saving_junit: /var/lib/jenkins/workspace/logicmoo_workspace@2/test_results/jenkins/Report-logicmoo-base-examples-fol-vSTARv0vSTARvvDOTvvSTARv-2-1--grep-2-i-WARN-ERROR-_file-00-fail-pass--Units-Logicmoo_base_examples_fol_MAKE_WFF_01_Test_0001_Line_0000_Fred-junit.xml
~*/


:- mpred_test(\+ is_user_fact(isa(fred,human))).

/*~
%~ ?-( mpred_test("Test_0002_Line_0000__naf_Fred",baseKB:(\+is_user_fact(human(fred))))).
failure=info((why_was_true(baseKB:is_user_fact(human(fred))),nop(ftrace(baseKB:(\+is_user_fact(human(fred)))))))
no_proof_for(is_user_fact(human(fred))).

no_proof_for(is_user_fact(human(fred))).

no_proof_for(is_user_fact(human(fred))).

	name	=	'logicmoo.base.examples.fol.MAKE_WFF_01-Test_0002_Line_0000__naf_Fred'. 
	JUNIT_CLASSNAME	=	'logicmoo.base.examples.fol.MAKE_WFF_01'. 
	JUNIT_CMD	=	'timeout --foreground --preserve-status -s SIGKILL -k 10s 10s swipl -x /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-clif -t "[\'make_wff_01.pfc.pl\']"'. 
% saving_junit: /var/lib/jenkins/workspace/logicmoo_workspace@2/test_results/jenkins/Report-logicmoo-base-examples-fol-vSTARv0vSTARvvDOTvvSTARv-2-1--grep-2-i-WARN-ERROR-_file-00-fail-pass--Units-Logicmoo_base_examples_fol_MAKE_WFF_01_Test_0002_Line_0000_naf_Fred-junit.xml
~*/


:- mpred_test(isa(fred,human)).

/*~
%~ ?-( mpred_test("Test_0003_Line_0000__Fred",baseKB:human(fred))).
failure=info((why_was_true(baseKB:(\+human(fred))),nop(ftrace(baseKB:human(fred)))))
no_proof_for(\+human(fred)).

no_proof_for(\+human(fred)).

no_proof_for(\+human(fred)).

	name	=	'logicmoo.base.examples.fol.MAKE_WFF_01-Test_0003_Line_0000__Fred'. 
	JUNIT_CLASSNAME	=	'logicmoo.base.examples.fol.MAKE_WFF_01'. 
	JUNIT_CMD	=	'timeout --foreground --preserve-status -s SIGKILL -k 10s 10s swipl -x /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-clif -t "[\'make_wff_01.pfc.pl\']"'. 
% saving_junit: /var/lib/jenkins/workspace/logicmoo_workspace@2/test_results/jenkins/Report-logicmoo-base-examples-fol-vSTARv0vSTARvvDOTvvSTARv-2-1--grep-2-i-WARN-ERROR-_file-00-fail-pass--Units-Logicmoo_base_examples_fol_MAKE_WFF_01_Test_0003_Line_0000_Fred-junit.xml
~*/


:- mpred_test(poss(isa(green_house,dwelling))).

/*~
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/make_wff_01.pfc.pl:63 
%~ ?-( mpred_test("Test_0004_Line_0000__Green_house",baseKB:poss(dwelling(green_house)))).
passed=info(why_was_true(baseKB:poss(dwelling(green_house))))
no_proof_for(poss(dwelling(green_house))).

no_proof_for(poss(dwelling(green_house))).

no_proof_for(poss(dwelling(green_house))).

	name	=	'logicmoo.base.examples.fol.MAKE_WFF_01-Test_0004_Line_0000__Green_house'. 
	JUNIT_CLASSNAME	=	'logicmoo.base.examples.fol.MAKE_WFF_01'. 
	JUNIT_CMD	=	'timeout --foreground --preserve-status -s SIGKILL -k 10s 10s swipl -x /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-clif -t "[\'make_wff_01.pfc.pl\']"'. 
% saving_junit: /var/lib/jenkins/workspace/logicmoo_workspace@2/test_results/jenkins/Report-logicmoo-base-examples-fol-vSTARv0vSTARvvDOTvvSTARv-2-1--grep-2-i-WARN-ERROR-_file-00-fail-pass--Units-Logicmoo_base_examples_fol_MAKE_WFF_01_Test_0004_Line_0000_Green_house-junit.xml
~*/


:- mpred_test(isa(green_house,dwelling)).

/*~
%~ ?-( mpred_test("Test_0005_Line_0000__Green_house",baseKB:dwelling(green_house))).
failure=info((why_was_true(baseKB:(\+dwelling(green_house))),nop(ftrace(baseKB:dwelling(green_house)))))
no_proof_for(\+dwelling(green_house)).

no_proof_for(\+dwelling(green_house)).

no_proof_for(\+dwelling(green_house)).

	name	=	'logicmoo.base.examples.fol.MAKE_WFF_01-Test_0005_Line_0000__Green_house'. 
	JUNIT_CLASSNAME	=	'logicmoo.base.examples.fol.MAKE_WFF_01'. 
	JUNIT_CMD	=	'timeout --foreground --preserve-status -s SIGKILL -k 10s 10s swipl -x /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-clif -t "[\'make_wff_01.pfc.pl\']"'. 
% saving_junit: /var/lib/jenkins/workspace/logicmoo_workspace@2/test_results/jenkins/Report-logicmoo-base-examples-fol-vSTARv0vSTARvvDOTvvSTARv-2-1--grep-2-i-WARN-ERROR-_file-00-fail-pass--Units-Logicmoo_base_examples_fol_MAKE_WFF_01_Test_0005_Line_0000_Green_house-junit.xml
~*/


:- mpred_test(naf(~isa(green_house,dwelling))).

% =================================================================================
% Test 2  Absolute Facts
% =================================================================================

/*~
%~ ?-( mpred_test("Test_0006_Line_0000__Green_house",baseKB:naf(~dwelling(green_house)))).
passed=info(why_was_true(baseKB:naf(~dwelling(green_house))))
no_proof_for(naf(~dwelling(green_house))).

no_proof_for(naf(~dwelling(green_house))).

no_proof_for(naf(~dwelling(green_house))).

	name	=	'logicmoo.base.examples.fol.MAKE_WFF_01-Test_0006_Line_0000__Green_house'. 
	JUNIT_CLASSNAME	=	'logicmoo.base.examples.fol.MAKE_WFF_01'. 
	JUNIT_CMD	=	'timeout --foreground --preserve-status -s SIGKILL -k 10s 10s swipl -x /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-clif -t "[\'make_wff_01.pfc.pl\']"'. 
% saving_junit: /var/lib/jenkins/workspace/logicmoo_workspace@2/test_results/jenkins/Report-logicmoo-base-examples-fol-vSTARv0vSTARvvDOTvvSTARv-2-1--grep-2-i-WARN-ERROR-_file-00-fail-pass--Units-Logicmoo_base_examples_fol_MAKE_WFF_01_Test_0006_Line_0000_Green_house-junit.xml
~*/


% =================================================================================
% Test 2  Absolute Facts
% =================================================================================

:- mpred_trace_exec.


/*~
~*/



==> livesAt(fran,green_house).
/*~
%~ call_mpred_post4 :-
%~   level=86 ,
%~   que=0 ,
%~   assertion_status=unique ,
%~   support_status=none ,
%~   post1 = livesAt(fran,green_house) ,
%~   fix_mp=baseKB ,
%~   mz=baseKB ,
%~   p0 = livesAt(fran,green_house) ,
%~   support_fact = mfl4(_301726,baseKB,'/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/make_wff_01.pfc.pl',76) ,
%~   support_trig=ax.
%~ baseKB : mpred_fwc1( livesAt(fran,green_house)).
~*/

==> livesAt(sue,green_house).

/*~
%~ call_mpred_post4 :-
%~   level=86 ,
%~   que=0 ,
%~   assertion_status=unique ,
%~   support_status=none ,
%~   post1 = livesAt(sue,green_house) ,
%~   fix_mp=baseKB ,
%~   mz=baseKB ,
%~   p0 = livesAt(sue,green_house) ,
%~   support_fact = mfl4(_337956,baseKB,'/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/make_wff_01.pfc.pl',77) ,
%~   support_trig=ax.
%~ baseKB : mpred_fwc1( livesAt(sue,green_house)).
~*/


:- mpred_test(dwelling(green_house)).

/*~
%~ ?-( mpred_test("Test_0007_Line_0000__Green_house",baseKB:dwelling(green_house))).
failure=info((why_was_true(baseKB:(\+dwelling(green_house))),nop(ftrace(baseKB:dwelling(green_house)))))
no_proof_for(\+dwelling(green_house)).

no_proof_for(\+dwelling(green_house)).

no_proof_for(\+dwelling(green_house)).

	name	=	'logicmoo.base.examples.fol.MAKE_WFF_01-Test_0007_Line_0000__Green_house'. 
	JUNIT_CLASSNAME	=	'logicmoo.base.examples.fol.MAKE_WFF_01'. 
	JUNIT_CMD	=	'timeout --foreground --preserve-status -s SIGKILL -k 10s 10s swipl -x /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-clif -t "[\'make_wff_01.pfc.pl\']"'. 
% saving_junit: /var/lib/jenkins/workspace/logicmoo_workspace@2/test_results/jenkins/Report-logicmoo-base-examples-fol-vSTARv0vSTARvvDOTvvSTARv-2-1--grep-2-i-WARN-ERROR-_file-00-fail-pass--Units-Logicmoo_base_examples_fol_MAKE_WFF_01_Test_0007_Line_0000_Green_house-junit.xml
~*/


==> all(X, if(livesAt(X, green_house),drinks(X, coffee))).

/*~
%~ call_mpred_post4 :-
%~   level=86 ,
%~   que=0 ,
%~   assertion_status=unique ,
%~   support_status=none ,
%~   post1 = all(_297958,if(livesAt(_297958,green_house),drinks(_297958,coffee))) ,
%~   fix_mp=baseKB ,
%~   mz=baseKB ,
%~   p0 = all(_297958,if(livesAt(_297958,green_house),drinks(_297958,coffee))) ,
%~   support_fact = mfl4(
%~                     [ 'X'=X],
%~                      baseKB, '/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/make_wff_01.pfc.pl', 81) ,
%~   support_trig=ax.
%~ baseKB : mpred_fwc1( all( If_Coffee_Green_house,
%~                        if(livesAt(If_Coffee_Green_house,green_house),drinks(If_Coffee_Green_house,coffee)))).
~*/


prove_holds_t(F,A,B)==>t(F,A,B).

/*~
%~ call_mpred_post4 :-
%~   level=86 ,
%~   que=0 ,
%~   assertion_status=unique ,
%~   support_status=none ,
%~   post1 = prove_holds_t(_362168,_362190,_362212)==>t(_362168,_362190,_362212) ,
%~   fix_mp=baseKB ,
%~   mz=baseKB ,
%~   p0 = prove_holds_t(_362168,_362190,_362212)==>t(_362168,_362190,_362212) ,
%~   support_fact = mfl4(
%~                     [ 'F'=F, 'A'=A,'B'=B],
%~                      baseKB, '/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/make_wff_01.pfc.pl', 83) ,
%~   support_trig=ax.
%~ baseKB : mpred_fwc1( ( prove_holds_t(Prove_holds_t4,Prove_holds_t,T) ==>
%~                        t(Prove_holds_t4,Prove_holds_t,T))).
%~ call_mpred_post4 :-
%~   level=136 ,
%~   que=0 ,
%~   assertion_status=unique ,
%~   support_status=none ,
%~   post1 = mpred_prop(baseKB,prove_holds_t,3,pfcLHS) ,
%~   fix_mp=baseKB ,
%~   mz=baseKB ,
%~   p0 = mpred_prop(baseKB,prove_holds_t,3,pfcLHS) ,
%~   support_fact = ( prove_holds_t(_403348,_403350,_403352)==>t(_403348,_403350,_403352) ,
%~                    mfl4(
%~                       [ 'F'=F3, 'A'=A4,'B'=B5],
%~                        baseKB, '/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/make_wff_01.pfc.pl', 83)) ,
%~   support_trig=ax.
%~ baseKB : mpred_fwc1( mpred_prop(baseKB,prove_holds_t,3,pfcLHS)).
%~ %~ 	Found positive trigger: mpred_prop(baseKB,prove_holds_t,3,pfcLHS)
%~ %~ 		body: \+ground((prove_holds_t/3))*->rhs([ { trace_or_throw( mpred_prop(baseKB,prove_holds_t,3,pfcLHS)) }])
%~ %~ 	Found positive trigger: mpred_prop(baseKB,prove_holds_t,3,pfcLHS)
%~ %~ 		body: rhs([ arity(prove_holds_t,3),
%~ %~       functorIsMacro(prove_holds_t),
%~ %~       mpred_prop(baseKB,prove_holds_t,3,pfcWatches)])
%~ %~ 	RHS-Post1: arity(prove_holds_t,3)
%~ %~ 	Support: mpred_prop(baseKB,prove_holds_t,3,pfcLHS),$pt(baseKB,mpred_prop(baseKB,prove_holds_t,3,pfcLHS),rhs([ arity(prove_holds_t,3),
%~ %~                                                                                                      functorIsMacro(prove_holds_t),
%~ %~                                                                                                      mpred_prop(baseKB,prove_holds_t,3,pfcWatches)]))
%~ call_mpred_post4 :-
%~   level=174 ,
%~   que=0 ,
%~   assertion_status=unique ,
%~   support_status=none ,
%~   post1 = arity(prove_holds_t,3) ,
%~   fix_mp=baseKB ,
%~   mz=baseKB ,
%~   p0 = arity(prove_holds_t,3) ,
%~   support_fact = mpred_prop(baseKB,prove_holds_t,3,pfcLHS) ,
%~   support_trig = '$pt'( baseKB,
%~                    mpred_prop(baseKB,prove_holds_t,3,pfcLHS),
%~                    rhs( [ arity(prove_holds_t,3),
%~                           functorIsMacro(prove_holds_t),
%~                           mpred_prop(baseKB,prove_holds_t,3,pfcWatches)])).
%~ message_hook_type(error)
%~ message_hook(
%~    error(
%~       permission_error(modify,static_procedure,baseKB:arity/2),
%~       context(system:assertz/1,Context_Kw)),
%~    error,
%~    [ '~q/~w: '-[assertz,1],
%~      'No permission to ~w static procedure `~p\'' - [ modify,
%~                                                       baseKB : arity/2]])
assertz/1: No permission to modify static procedure `baseKB:(arity/2)'
ERROR: assertz/1: No permission to modify static procedure `baseKB:(arity/2)'
%~ message_hook_type(warning)
%~ message_hook(
%~    goal_failed( directive,
%~      baseKB : mpred_ain(
%~                  prove_holds_t(F,A,B)==>t(F,A,B),
%~                  ( mfl4(
%~                       [ 'F'=F, 'A'=A,'B'=B],
%~                        baseKB, '/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/make_wff_01.pfc.pl', 83) ,
%~                    ax))),
%~    warning,
%~    [ 'Goal (~w) failed: ~p' - [ directive,
%~                                 baseKB : mpred_ain(
%~                                             prove_holds_t(F,A,B)==>t(F,A,B),
%~                                             ( mfl4(
%~                                                  [ 'F'=F, 'A'=A,'B'=B],
%~                                                   baseKB, '/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/make_wff_01.pfc.pl', 83) ,
%~                                               ax))]])
Goal (directive) failed: baseKB:mpred_ain((prove_holds_t(_570,_574,_578)==>t(_570,_574,_578)),(mfl4(['F'=_570,'A'=_574,'B'=_578],baseKB,'/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/make_wff_01.pfc.pl':83,83),ax))
Warning: Goal (directive) failed: baseKB:mpred_ain((prove_holds_t(_570,_574,_578)==>t(_570,_574,_578)),(mfl4(['F'=_570,'A'=_574,'B'=_578],baseKB,'/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/make_wff_01.pfc.pl':83,83),ax))
~*/


prove_not_holds_t(F,A,B)==> ~t(F,A,B).


/*~
%~ call_mpred_post4 :-
%~   level=86 ,
%~   que=0 ,
%~   assertion_status=unique ,
%~   support_status=none ,
%~   post1 = prove_not_holds_t(_51694,_51716,_51738)==> ~t(_51694,_51716,_51738) ,
%~   fix_mp=baseKB ,
%~   mz=baseKB ,
%~   p0 = prove_not_holds_t(_51694,_51716,_51738)==> ~t(_51694,_51716,_51738) ,
%~   support_fact = mfl4(
%~                     [ 'F'=F, 'A'=A,'B'=B],
%~                      baseKB, '/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/make_wff_01.pfc.pl', 85) ,
%~   support_trig=ax.
%~ baseKB : mpred_fwc1( ( prove_not_holds_t(Prove_not_holds_t4,Prove_not_holds_t,T) ==>
%~                        ~( t(Prove_not_holds_t4,Prove_not_holds_t,T)))).
%~ call_mpred_post4 :-
%~   level=136 ,
%~   que=0 ,
%~   assertion_status=unique ,
%~   support_status=none ,
%~   post1 = mpred_prop(baseKB,prove_not_holds_t,3,pfcLHS) ,
%~   fix_mp=baseKB ,
%~   mz=baseKB ,
%~   p0 = mpred_prop(baseKB,prove_not_holds_t,3,pfcLHS) ,
%~   support_fact = ( prove_not_holds_t(_95628,_95630,_95632)==> ~t(_95628,_95630,_95632) ,
%~                    mfl4(
%~                       [ 'F'=F3, 'A'=A4,'B'=B5],
%~                        baseKB, '/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/make_wff_01.pfc.pl', 85)) ,
%~   support_trig=ax.
%~ baseKB : mpred_fwc1( mpred_prop(baseKB,prove_not_holds_t,3,pfcLHS)).
%~ %~ 	Found positive trigger: mpred_prop(baseKB,prove_not_holds_t,3,pfcLHS)
%~ %~ 		body: \+ground((prove_not_holds_t/3))*->rhs([ { trace_or_throw( mpred_prop(baseKB,prove_not_holds_t,3,pfcLHS)) }])
%~ %~ 	Found positive trigger: mpred_prop(baseKB,prove_not_holds_t,3,pfcLHS)
%~ %~ 		body: rhs([ arity(prove_not_holds_t,3),
%~ %~       functorIsMacro(prove_not_holds_t),
%~ %~       mpred_prop(baseKB,prove_not_holds_t,3,pfcWatches)])
%~ %~ 	RHS-Post1: arity(prove_not_holds_t,3)
%~ %~ 	Support: mpred_prop(baseKB,prove_not_holds_t,3,pfcLHS),$pt(baseKB,mpred_prop(baseKB,prove_not_holds_t,3,pfcLHS),rhs([ arity(prove_not_holds_t,3),
%~ %~                                                                                                              functorIsMacro(prove_not_holds_t),
%~ %~                                                                                                              mpred_prop(baseKB,prove_not_holds_t,3,pfcWatches)]))
%~ call_mpred_post4 :-
%~   level=174 ,
%~   que=0 ,
%~   assertion_status=unique ,
%~   support_status=none ,
%~   post1 = arity(prove_not_holds_t,3) ,
%~   fix_mp=baseKB ,
%~   mz=baseKB ,
%~   p0 = arity(prove_not_holds_t,3) ,
%~   support_fact = mpred_prop(baseKB,prove_not_holds_t,3,pfcLHS) ,
%~   support_trig = '$pt'( baseKB,
%~                    mpred_prop(baseKB,prove_not_holds_t,3,pfcLHS),
%~                    rhs( [ arity(prove_not_holds_t,3),
%~                           functorIsMacro(prove_not_holds_t),
%~                           mpred_prop(baseKB,prove_not_holds_t,3,pfcWatches)])).
%~ message_hook_type(error)
%~ message_hook(
%~    error(
%~       permission_error(modify,static_procedure,baseKB:arity/2),
%~       context(system:assertz/1,Context_Kw)),
%~    error,
%~    [ '~q/~w: '-[assertz,1],
%~      'No permission to ~w static procedure `~p\'' - [ modify,
%~                                                       baseKB : arity/2]])
assertz/1: No permission to modify static procedure `baseKB:(arity/2)'
ERROR: assertz/1: No permission to modify static procedure `baseKB:(arity/2)'
%~ message_hook_type(warning)
%~ message_hook(
%~    goal_failed( directive,
%~      baseKB : mpred_ain(
%~                  prove_not_holds_t(F,A,B)==> ~t(F,A,B),
%~                  ( mfl4(
%~                       [ 'F'=F, 'A'=A,'B'=B],
%~                        baseKB, '/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/make_wff_01.pfc.pl', 85) ,
%~                    ax))),
%~    warning,
%~    [ 'Goal (~w) failed: ~p' - [ directive,
%~                                 baseKB : mpred_ain(
%~                                             prove_not_holds_t(F,A,B)==> ~t(F,A,B),
%~                                             ( mfl4(
%~                                                  [ 'F'=F, 'A'=A,'B'=B],
%~                                                   baseKB, '/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/make_wff_01.pfc.pl', 85) ,
%~                                               ax))]])
Goal (directive) failed: baseKB:mpred_ain((prove_not_holds_t(_51694,_51716,_51738)==> ~t(_51694,_51716,_51738)),(mfl4(['F'=_51694,'A'=_51716,'B'=_51738],baseKB,'/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/make_wff_01.pfc.pl':85,85),ax))
Warning: Goal (directive) failed: baseKB:mpred_ain((prove_not_holds_t(_51694,_51716,_51738)==> ~t(_51694,_51716,_51738)),(mfl4(['F'=_51694,'A'=_51716,'B'=_51738],baseKB,'/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/make_wff_01.pfc.pl':85,85),ax))
~*/



:- mpred_test(drinker(fran)).

/*~
%~ ?-( mpred_test("Test_0008_Line_0000__Fran",baseKB:drinker(fran))).
failure=info((why_was_true(baseKB:(\+drinker(fran))),nop(ftrace(baseKB:drinker(fran)))))
no_proof_for(\+drinker(fran)).

no_proof_for(\+drinker(fran)).

no_proof_for(\+drinker(fran)).

	name	=	'logicmoo.base.examples.fol.MAKE_WFF_01-Test_0008_Line_0000__Fran'. 
	JUNIT_CLASSNAME	=	'logicmoo.base.examples.fol.MAKE_WFF_01'. 
	JUNIT_CMD	=	'timeout --foreground --preserve-status -s SIGKILL -k 10s 10s swipl -x /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-clif -t "[\'make_wff_01.pfc.pl\']"'. 
% saving_junit: /var/lib/jenkins/workspace/logicmoo_workspace@2/test_results/jenkins/Report-logicmoo-base-examples-fol-vSTARv0vSTARvvDOTvvSTARv-2-1--grep-2-i-WARN-ERROR-_file-00-fail-pass--Units-Logicmoo_base_examples_fol_MAKE_WFF_01_Test_0008_Line_0000_Fran-junit.xml
~*/


:- mpred_test(isa(fran,drinker)).

/*~
%~ ?-( mpred_test("Test_0009_Line_0000__Fran",baseKB:drinker(fran))).
failure=info((why_was_true(baseKB:(\+drinker(fran))),nop(ftrace(baseKB:drinker(fran)))))
no_proof_for(\+drinker(fran)).

no_proof_for(\+drinker(fran)).

no_proof_for(\+drinker(fran)).

	name	=	'logicmoo.base.examples.fol.MAKE_WFF_01-Test_0009_Line_0000__Fran'. 
	JUNIT_CLASSNAME	=	'logicmoo.base.examples.fol.MAKE_WFF_01'. 
	JUNIT_CMD	=	'timeout --foreground --preserve-status -s SIGKILL -k 10s 10s swipl -x /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-clif -t "[\'make_wff_01.pfc.pl\']"'. 
% saving_junit: /var/lib/jenkins/workspace/logicmoo_workspace@2/test_results/jenkins/Report-logicmoo-base-examples-fol-vSTARv0vSTARvvDOTvvSTARv-2-1--grep-2-i-WARN-ERROR-_file-00-fail-pass--Units-Logicmoo_base_examples_fol_MAKE_WFF_01_Test_0009_Line_0000_Fran-junit.xml
~*/


:- kif_add(isa(joe,drinker)).

/*~
%~ call_mpred_post4 :-
%~   level=95 ,
%~   que=0 ,
%~   assertion_status=unique ,
%~   support_status=none ,
%~   post1 = clif( drinker(joe)) ,
%~   fix_mp=baseKB ,
%~   mz=baseKB ,
%~   p0 = clif( drinker(joe)) ,
%~   support_fact = mfl4(_464822,baseKB,'/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/make_wff_01.pfc.pl',92) ,
%~   support_trig=ax.
%~ baseKB : mpred_fwc1( clif( drinker(joe))).
%~ %~ 	Found positive trigger: clif(drinker(joe))
%~ %~ 		body: rhs([ { delistify_last_arg(drinker(joe),clif_to_modal_clif,Arg_Clif_to_modal_clif) },
%~ %~       modal_clif(Arg_Clif_to_modal_clif)])
%~ kifi = drinker(joe).
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/make_wff_01.pfc.pl:92 
%~ kifm = nesc( drinker(joe)).
%~ %~ 	RHS-Post1: modal_clif(nesc(drinker(joe)))
%~ %~ 	Support: clif(drinker(joe)),$pt(baseKB,clif(drinker(joe)),rhs([ { delistify_last_arg(drinker(joe),clif_to_modal_clif,nesc(drinker(joe))) },
%~ %~                                                        modal_clif( nesc( drinker(joe)))]))
%~ call_mpred_post4 :-
%~   level=134 ,
%~   que=0 ,
%~   assertion_status=unique ,
%~   support_status=none ,
%~   post1 = modal_clif( nesc( drinker(joe))) ,
%~   fix_mp=baseKB ,
%~   mz=baseKB ,
%~   p0 = modal_clif( nesc( drinker(joe))) ,
%~   support_fact = clif( drinker(joe)) ,
%~   support_trig = '$pt'( baseKB,
%~                    clif( drinker(joe)),
%~                    rhs( [ { delistify_last_arg(drinker(joe),clif_to_modal_clif,nesc(drinker(joe))) },
%~                           modal_clif( nesc( drinker(joe)))])).
%~ baseKB : mpred_fwc1( modal_clif( nesc( drinker(joe)))).
%~ %~ 	Found positive trigger: modal_clif(nesc(drinker(joe)))
%~ %~ 		body: rhs([ { delistify_last_arg(nesc(drinker(joe)),kif_to_boxlog,Arg_Kif_to_boxlog) },
%~ %~       boxlog(Arg_Kif_to_boxlog)])
%~ call_mpred_post4 :-
%~   level=219 ,
%~   que=0 ,
%~   assertion_status=unique ,
%~   support_status=none ,
%~   post1 = wid(rule1:0,rule,nesc(drinker(joe))) ,
%~   fix_mp=baseKB ,
%~   mz=baseKB ,
%~   p0 = wid(rule1:0,rule,nesc(drinker(joe))) ,
%~   support_fact = ( mfl4(_508,baseKB,'/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/make_wff_01.pfc.pl',92) ,
%~                    ax) ,
%~   support_trig = mfl4(_1078,baseKB,'/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/make_wff_01.pfc.pl',92).
%~ baseKB : mpred_fwc1( wid(rule1:0,rule,nesc(drinker(joe)))).
%~ kifm = nesc( drinker(joe)).
%~ kif_to_boxlog_attvars2 = necessary(drinker(joe))
%~ %~ 	RHS-Post1: boxlog(nesc(drinker(joe)))
%~ %~ 	Support: modal_clif(nesc(drinker(joe))),$pt(baseKB,modal_clif(nesc(drinker(joe))),rhs([ { delistify_last_arg(nesc(drinker(joe)),kif_to_boxlog,nesc(drinker(joe))) },
%~ %~                                                                                boxlog( nesc( drinker(joe)))]))
%~ call_mpred_post4 :-
%~   level=173 ,
%~   que=0 ,
%~   assertion_status=unique ,
%~   support_status=none ,
%~   post1 = boxlog( nesc( drinker(joe))) ,
%~   fix_mp=baseKB ,
%~   mz=baseKB ,
%~   p0 = boxlog( nesc( drinker(joe))) ,
%~   support_fact = modal_clif( nesc( drinker(joe))) ,
%~   support_trig = '$pt'( baseKB,
%~                    modal_clif( nesc( drinker(joe))),
%~                    rhs( [ { delistify_last_arg(nesc(drinker(joe)),kif_to_boxlog,nesc(drinker(joe))) },
%~                           boxlog( nesc( drinker(joe)))])).
%~ baseKB : mpred_fwc1( boxlog( nesc( drinker(joe)))).
%~ %~ 	Found positive trigger: boxlog(nesc(drinker(joe)))
%~ %~ 		body: delistify_last_arg(nesc(drinker(joe)),boxlog_to_pfc,Pfclog_Unqualified_Arg_Boxlog_to_pfc),must_be_unqualified(Pfclog_Unqualified_Arg_Boxlog_to_pfc)*->rhs(
%~ %~                                   [ pfclog(Pfclog_Unqualified_Arg_Boxlog_to_pfc)])
%~ %~ 	RHS-Post1: pfclog(nesc(drinker(joe)))
%~ %~ 	Support: boxlog(nesc(drinker(joe))),$pt(baseKB,boxlog(nesc(drinker(joe))),(delistify_last_arg(nesc(drinker(joe)),boxlog_to_pfc,nesc(drinker(joe))),must_be_unqualified(nesc(drinker(joe)))*->rhs(
%~ %~                                                                 [ pfclog( nesc( drinker(joe)))])))
%~ call_mpred_post4 :-
%~   level=213 ,
%~   que=0 ,
%~   assertion_status=unique ,
%~   support_status=none ,
%~   post1 = pfclog( nesc( drinker(joe))) ,
%~   fix_mp=baseKB ,
%~   mz=baseKB ,
%~   p0 = pfclog( nesc( drinker(joe))) ,
%~   support_fact = boxlog( nesc( drinker(joe))) ,
%~   support_trig = '$pt'( baseKB,
%~                    boxlog( nesc( drinker(joe))),
%~                    ( ( delistify_last_arg(nesc(drinker(joe)),boxlog_to_pfc,nesc(drinker(joe))) ,
%~                        must_be_unqualified( nesc( drinker(joe)))) *->
%~                      rhs([pfclog(nesc(drinker(joe)))]))).
%~ baseKB : mpred_fwc1( pfclog( nesc( drinker(joe)))).
%~ %~ 	Found positive trigger: pfclog(nesc(drinker(joe)))
%~ %~ 		body: rhs([ nesc( drinker(joe))])
%~ %~ 	RHS-Post1: nesc(drinker(joe))
%~ %~ 	Support: pfclog(nesc(drinker(joe))),$pt(baseKB,pfclog(nesc(drinker(joe))),rhs([ nesc( drinker(joe))]))
%~ call_mpred_post4 :-
%~   level=251 ,
%~   que=0 ,
%~   assertion_status=unique ,
%~   support_status=none ,
%~   post1 = nesc( drinker(joe)) ,
%~   fix_mp=baseKB ,
%~   mz=baseKB ,
%~   p0 = nesc( drinker(joe)) ,
%~   support_fact = pfclog( nesc( drinker(joe))) ,
%~   support_trig = '$pt'(baseKB,pfclog(nesc(drinker(joe))),rhs([nesc(drinker(joe))])).
%~ baseKB : mpred_fwc1( nesc( drinker(joe))).
%~ %~ 	Found positive trigger: nesc(drinker(joe))
%~ %~ 		body: chainable_literal(drinker(joe),Poss_Literal_Drinker)*->rhs([ poss(Poss_Literal_Drinker),
%~ %~                                                              Poss_Literal_Drinker])
%~ %~ 	RHS-Post1: poss(drinker(joe))
%~ %~ 	Support: nesc(drinker(joe)),$pt(baseKB,nesc(drinker(joe)),(chainable_literal(drinker(joe),drinker(joe))*->rhs([ poss( drinker(joe)),
%~ %~                                                                                                        drinker(joe)])))
%~ call_mpred_post4 :-
%~   level=291 ,
%~   que=0 ,
%~   assertion_status=unique ,
%~   support_status=none ,
%~   post1 = poss( drinker(joe)) ,
%~   fix_mp=baseKB ,
%~   mz=baseKB ,
%~   p0 = poss( drinker(joe)) ,
%~   support_fact = nesc( drinker(joe)) ,
%~   support_trig = '$pt'( baseKB,
%~                    nesc( drinker(joe)),
%~                    ( chainable_literal(drinker(joe),drinker(joe)) *->
%~                      rhs( [ poss( drinker(joe)),
%~                             drinker(joe)]))).
%~ baseKB : mpred_fwc1( poss( drinker(joe))).
%~ %~ 	Found positive trigger: poss(drinker(joe))
%~ %~ 		body: non_modal_positive(drinker(joe))*->rhs([ { check_non_modal_positive( drinker(joe)) },
%~ %~                                          \+( ~( drinker(joe))),
%~ %~                                          \+( ~( poss( drinker(joe))))])
%~ %~ still_supported(~drinker(joe))
%~ %~ mpred_withdraw/2 Could not find support unKnown_suppoRt to remove (fact): ~drinker(joe)
%~ %~ still_supported(~drinker(joe))
%~ %~ still_supported(~poss(drinker(joe)))
%~ %~ mpred_withdraw/2 Could not find support unKnown_suppoRt to remove (fact): ~poss(drinker(joe))
%~ %~ still_supported(~poss(drinker(joe)))
%~ %~ 	RHS-Post1: drinker(joe)
%~ %~ 	Support: nesc(drinker(joe)),$pt(baseKB,nesc(drinker(joe)),(chainable_literal(drinker(joe),drinker(joe))*->rhs([ poss( drinker(joe)),
%~ %~                                                                                                        drinker(joe)])))
%~ call_mpred_post4 :-
%~   level=292 ,
%~   que=0 ,
%~   assertion_status=unique ,
%~   support_status=none ,
%~   post1 = drinker(joe) ,
%~   fix_mp=baseKB ,
%~   mz=baseKB ,
%~   p0 = drinker(joe) ,
%~   support_fact = nesc( drinker(joe)) ,
%~   support_trig = '$pt'( baseKB,
%~                    nesc( drinker(joe)),
%~                    ( chainable_literal(drinker(joe),drinker(joe)) *->
%~                      rhs( [ poss( drinker(joe)),
%~                             drinker(joe)]))).
%~ baseKB : mpred_fwc1( drinker(joe)).
%~ debugm(baseKB,show_success(baseKB,baseKB:ain(clif(drinker(joe)))))
%   xgrun compiled into parser_chat80 0.00 sec, 0 clauses
%   xgproc compiled into parser_chat80 0.02 sec, 0 clauses


** Grammar from file /var/lib/jenkins/.local/share/swi-prolog/pack/logicmoo_nlu/ext/chat80/original/clone.xg: 179 words .. **



** Grammar from file /var/lib/jenkins/.local/share/swi-prolog/pack/logicmoo_nlu/ext/chat80/original/lex.xg: -236 words .. **

%  chatops compiled into parser_chat80 0.00 sec, 0 clauses
%  chatops compiled into parser_chat80 0.00 sec, 0 clauses
% :- share_mfa_pt2(parser_chat80,test_chat80,1).
% :- share_mfa_pt2(parser_chat80,hi80,0).
% :- share_mfa_pt2(parser_chat80,hi80,1).
% :- share_mfa_pt2(parser_chat80,control80,1).
% :- share_mfa_pt2(parser_chat80,trace_chat80,1).
%  /var/lib/jenkins/.local/share/swi-prolog/pack/logicmoo_nlu/ext/chat80/original/load compiled into parser_chat80 2.25 sec, 3 clauses
% /var/lib/jenkins/.local/share/swi-prolog/pack/logicmoo_utils/prolog/debuggery/dmsg compiled into dmsg 0.12 sec, -16 clauses




=======================================================
drinker(joe)
============================================


?- kif_to_boxlog( drinker(joe) ).



% In English: 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  joe isa drinker
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ call_mpred_post4 :-
%~   level=92 ,
%~   que=0 ,
%~   assertion_status=unique ,
%~   support_status=none ,
%~   post1 = wid(rule2:0,rule,drinker(joe)) ,
%~   fix_mp=baseKB ,
%~   mz=baseKB ,
%~   p0 = wid(rule2:0,rule,drinker(joe)) ,
%~   support_fact = mfl4(_29894,baseKB,'/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/make_wff_01.pfc.pl',92) ,
%~   support_trig=ax.
%~ baseKB : mpred_fwc1( wid(rule2:0,rule,drinker(joe))).
%~ kif_to_boxlog_attvars2 = necessary(drinker(joe))

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s): 
nesc(drinker(joe)).

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  it is necessarily true that joe isa drinker
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

nesc( drinker(joe)).

============================================
~*/


:- mpred_test((isa(fran,X),X==drinker)).

/*~
%~ ?-( mpred_test("Test_0010_Line_0000__Fran",baseKB:(isa(fran,X),X==drinker))).
failure=info((why_was_true(baseKB:(\+ (isa(fran,_183608),_183608==drinker))),nop(ftrace(baseKB:(isa(fran,_183608),_183608==drinker)))))
no_proof_for(\+ (isa(fran,Isa_Drinker_Fran),Isa_Drinker_Fran==drinker)).

no_proof_for(\+ (isa(fran,Isa_Drinker_Fran),Isa_Drinker_Fran==drinker)).

no_proof_for(\+ (isa(fran,Isa_Drinker_Fran),Isa_Drinker_Fran==drinker)).

	name	=	'logicmoo.base.examples.fol.MAKE_WFF_01-Test_0010_Line_0000__Fran'. 
	JUNIT_CLASSNAME	=	'logicmoo.base.examples.fol.MAKE_WFF_01'. 
	JUNIT_CMD	=	'timeout --foreground --preserve-status -s SIGKILL -k 10s 10s swipl -x /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-clif -t "[\'make_wff_01.pfc.pl\']"'. 
% saving_junit: /var/lib/jenkins/workspace/logicmoo_workspace@2/test_results/jenkins/Report-logicmoo-base-examples-fol-vSTARv0vSTARvvDOTvvSTARv-2-1--grep-2-i-WARN-ERROR-_file-00-fail-pass--Units-Logicmoo_base_examples_fol_MAKE_WFF_01_Test_0010_Line_0000_Fran-junit.xml
~*/


:- mpred_test(poss(isa(fred,drinker))).

/*~
%~ ?-( mpred_test("Test_0011_Line_0000__Fred",baseKB:poss(drinker(fred)))).
passed=info(why_was_true(baseKB:poss(drinker(fred))))
no_proof_for(poss(drinker(fred))).

no_proof_for(poss(drinker(fred))).

no_proof_for(poss(drinker(fred))).

	name	=	'logicmoo.base.examples.fol.MAKE_WFF_01-Test_0011_Line_0000__Fred'. 
	JUNIT_CLASSNAME	=	'logicmoo.base.examples.fol.MAKE_WFF_01'. 
	JUNIT_CMD	=	'timeout --foreground --preserve-status -s SIGKILL -k 10s 10s swipl -x /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-clif -t "[\'make_wff_01.pfc.pl\']"'. 
% saving_junit: /var/lib/jenkins/workspace/logicmoo_workspace@2/test_results/jenkins/Report-logicmoo-base-examples-fol-vSTARv0vSTARvvDOTvvSTARv-2-1--grep-2-i-WARN-ERROR-_file-00-fail-pass--Units-Logicmoo_base_examples_fol_MAKE_WFF_01_Test_0011_Line_0000_Fred-junit.xml
~*/


:- mpred_test(isa(coffee,beverage_class)).

% =================================================================================
% Test 3
% =================================================================================

/*~
%~ ?-( mpred_test("Test_0012_Line_0000__Coffee",baseKB:beverage_class(coffee))).
failure=info((why_was_true(baseKB:(\+beverage_class(coffee))),nop(ftrace(baseKB:beverage_class(coffee)))))
no_proof_for(\+beverage_class(coffee)).

no_proof_for(\+beverage_class(coffee)).

no_proof_for(\+beverage_class(coffee)).

	name	=	'logicmoo.base.examples.fol.MAKE_WFF_01-Test_0012_Line_0000__Coffee'. 
	JUNIT_CLASSNAME	=	'logicmoo.base.examples.fol.MAKE_WFF_01'. 
	JUNIT_CMD	=	'timeout --foreground --preserve-status -s SIGKILL -k 10s 10s swipl -x /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-clif -t "[\'make_wff_01.pfc.pl\']"'. 
% saving_junit: /var/lib/jenkins/workspace/logicmoo_workspace@2/test_results/jenkins/Report-logicmoo-base-examples-fol-vSTARv0vSTARvvDOTvvSTARv-2-1--grep-2-i-WARN-ERROR-_file-00-fail-pass--Units-Logicmoo_base_examples_fol_MAKE_WFF_01_Test_0012_Line_0000_Coffee-junit.xml
~*/


% =================================================================================
% Test 3
% =================================================================================

==> livesAt(sue,green_house).
% :- repropagate(all(X, if(livesAt(X, green_house),drinks(X, coffee)))).
/*~
%~ call_mpred_post4 :-
%~   level=86 ,
%~   que=0 ,
%~   assertion_status=identical ,
%~   support_status=exact ,
%~   post1 = livesAt(sue,green_house) ,
%~   fix_mp=baseKB ,
%~   mz=baseKB ,
%~   p0 = livesAt(sue,green_house) ,
%~   support_fact = mfl4(_1783284,baseKB,'/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/make_wff_01.pfc.pl',104) ,
%~   support_trig=ax.
~*/

% :- repropagate(all(X, if(livesAt(X, green_house),drinks(X, coffee)))).
:- mpred_test(isa(sue,drinker)).

/*~
%~ ?-( mpred_test("Test_0013_Line_0000__Sue",baseKB:drinker(sue))).
failure=info((why_was_true(baseKB:(\+drinker(sue))),nop(ftrace(baseKB:drinker(sue)))))
no_proof_for(\+drinker(sue)).

no_proof_for(\+drinker(sue)).

no_proof_for(\+drinker(sue)).

	name	=	'logicmoo.base.examples.fol.MAKE_WFF_01-Test_0013_Line_0000__Sue'. 
	JUNIT_CLASSNAME	=	'logicmoo.base.examples.fol.MAKE_WFF_01'. 
	JUNIT_CMD	=	'timeout --foreground --preserve-status -s SIGKILL -k 10s 10s swipl -x /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-clif -t "[\'make_wff_01.pfc.pl\']"'. 
% saving_junit: /var/lib/jenkins/workspace/logicmoo_workspace@2/test_results/jenkins/Report-logicmoo-base-examples-fol-vSTARv0vSTARvvDOTvvSTARv-2-1--grep-2-i-WARN-ERROR-_file-00-fail-pass--Units-Logicmoo_base_examples_fol_MAKE_WFF_01_Test_0013_Line_0000_Sue-junit.xml
~*/


:- mpred_why(isa(sue,drinker)).

% =================================================================================
% Test 4 
% =================================================================================

/*~
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/make_wff_01.pfc.pl:108 
%~ ?-( mpred_test("Test_0014_Line_0000__Sue",baseKB:drinker(sue))).
failure=info((why_was_true(baseKB:(\+drinker(sue))),nop(ftrace(baseKB:drinker(sue)))))
no_proof_for(\+drinker(sue)).

no_proof_for(\+drinker(sue)).

no_proof_for(\+drinker(sue)).

	name	=	'logicmoo.base.examples.fol.MAKE_WFF_01-Test_0014_Line_0000__Sue'. 
	JUNIT_CLASSNAME	=	'logicmoo.base.examples.fol.MAKE_WFF_01'. 
	JUNIT_CMD	=	'timeout --foreground --preserve-status -s SIGKILL -k 10s 10s swipl -x /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-clif -t "[\'make_wff_01.pfc.pl\']"'. 
% saving_junit: /var/lib/jenkins/workspace/logicmoo_workspace@2/test_results/jenkins/Report-logicmoo-base-examples-fol-vSTARv0vSTARvvDOTvvSTARv-2-1--grep-2-i-WARN-ERROR-_file-00-fail-pass--Units-Logicmoo_base_examples_fol_MAKE_WFF_01_Test_0014_Line_0000_Sue-junit.xml
~*/


% =================================================================================
% Test 4 
% =================================================================================

==> livesAt(sue,red_house).

/*~
%~ call_mpred_post4 :-
%~   level=86 ,
%~   que=0 ,
%~   assertion_status=unique ,
%~   support_status=none ,
%~   post1 = livesAt(sue,red_house) ,
%~   fix_mp=baseKB ,
%~   mz=baseKB ,
%~   p0 = livesAt(sue,red_house) ,
%~   support_fact = mfl4(_1410748,baseKB,'/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/make_wff_01.pfc.pl',114) ,
%~   support_trig=ax.
%~ baseKB : mpred_fwc1( livesAt(sue,red_house)).
~*/


==> livesAt(ralf,red_house).

/*~
%~ call_mpred_post4 :-
%~   level=86 ,
%~   que=0 ,
%~   assertion_status=unique ,
%~   support_status=none ,
%~   post1 = livesAt(ralf,red_house) ,
%~   fix_mp=baseKB ,
%~   mz=baseKB ,
%~   p0 = livesAt(ralf,red_house) ,
%~   support_fact = mfl4(_1446798,baseKB,'/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/make_wff_01.pfc.pl',116) ,
%~   support_trig=ax.
%~ baseKB : mpred_fwc1( livesAt(ralf,red_house)).
~*/


:- mpred_test(\+ isa(ralf,drinker)).

/*~
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/make_wff_01.pfc.pl:118 
%~ ?-( mpred_test("Test_0015_Line_0000__naf_Ralf",baseKB:(\+drinker(ralf)))).
passed=info(why_was_true(baseKB:(\+drinker(ralf))))
no_proof_for(\+drinker(ralf)).

no_proof_for(\+drinker(ralf)).

no_proof_for(\+drinker(ralf)).

	name	=	'logicmoo.base.examples.fol.MAKE_WFF_01-Test_0015_Line_0000__naf_Ralf'. 
	JUNIT_CLASSNAME	=	'logicmoo.base.examples.fol.MAKE_WFF_01'. 
	JUNIT_CMD	=	'timeout --foreground --preserve-status -s SIGKILL -k 10s 10s swipl -x /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-clif -t "[\'make_wff_01.pfc.pl\']"'. 
% saving_junit: /var/lib/jenkins/workspace/logicmoo_workspace@2/test_results/jenkins/Report-logicmoo-base-examples-fol-vSTARv0vSTARvvDOTvvSTARv-2-1--grep-2-i-WARN-ERROR-_file-00-fail-pass--Units-Logicmoo_base_examples_fol_MAKE_WFF_01_Test_0015_Line_0000_naf_Ralf-junit.xml
~*/


:- mpred_why(isa(sue,drinker)).
/*~
%~ ?-( mpred_test("Test_0016_Line_0000__Sue",baseKB:drinker(sue))).
failure=info((why_was_true(baseKB:(\+drinker(sue))),nop(ftrace(baseKB:drinker(sue)))))
no_proof_for(\+drinker(sue)).

no_proof_for(\+drinker(sue)).

no_proof_for(\+drinker(sue)).

	name	=	'logicmoo.base.examples.fol.MAKE_WFF_01-Test_0016_Line_0000__Sue'. 
	JUNIT_CLASSNAME	=	'logicmoo.base.examples.fol.MAKE_WFF_01'. 
	JUNIT_CMD	=	'timeout --foreground --preserve-status -s SIGKILL -k 10s 10s swipl -x /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-clif -t "[\'make_wff_01.pfc.pl\']"'. 
% saving_junit: /var/lib/jenkins/workspace/logicmoo_workspace@2/test_results/jenkins/Report-logicmoo-base-examples-fol-vSTARv0vSTARvvDOTvvSTARv-2-1--grep-2-i-WARN-ERROR-_file-00-fail-pass--Units-Logicmoo_base_examples_fol_MAKE_WFF_01_Test_0016_Line_0000_Sue-junit.xml
~*/

failure:- mpred_test(\+ isa(sue,drinker)).



% ISSUE: https://github.com/logicmoo/logicmoo_workspace/issues/74 
% EDIT: https://github.com/logicmoo/logicmoo_workspace/edit/master/packs_sys/logicmoo_base/t/examples/fol/make_wff_01.pfc.pl 
% JENKINS: https://jenkins.logicmoo.org/job/logicmoo_workspace/lastBuild/testReport/logicmoo.base.examples.fol/MAKE_WFF_01/ 
% ISSUE_SEARCH: https://github.com/logicmoo/logicmoo_workspace/issues?q=is%3Aissue+label%3AMAKE_WFF_01 

/*~
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/make_wff_01.pfc.pl:121 
%~ warn( db_expand_0(clause(unknown,cuz),(failure:-mpred_test(\+isa(sue,drinker))),(failure:-mpred_test(\+drinker(sue)))))
%~ call_mpred_post4 :-
%~   level=104 ,
%~   que=0 ,
%~   assertion_status=unique ,
%~   support_status=none ,
%~   post1 = failure :- mpred_test( \+( drinker(sue))) ,
%~   fix_mp=baseKB ,
%~   mz=baseKB ,
%~   p0 = failure :- mpred_test( \+( drinker(sue))) ,
%~   support_fact = mfl4(_1288008,baseKB,'/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/make_wff_01.pfc.pl',121) ,
%~   support_trig=ax.
%~ baseKB : mpred_fwc1( failure :- mpred_test( \+( drinker(sue)))).
~*/
%~ unused(no_junit_results)
logicmoo.base.examples.fol.MAKE_WFF_01 JUnit	error	=	assertz/1: No permission to modify static procedure `baseKB:(arity/2)' 
logicmoo.base.examples.fol.MAKE_WFF_01 JUnit	warning	=	Goal (directive) failed: baseKB:mpred_ain((==>arity(livesAt,2)),(mfl4(_470,baseKB,'/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/make_wff_01.pfc.pl':42,42),ax)) 
logicmoo.base.examples.fol.MAKE_WFF_01 JUnit	warning	=	Goal (directive) failed: baseKB:mpred_ain((==>argIsa(livesAt,1,human)),(mfl4(_474,baseKB,'/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/make_wff_01.pfc.pl':43,43),ax)) 
logicmoo.base.examples.fol.MAKE_WFF_01 JUnit	warning	=	Goal (directive) failed: baseKB:mpred_ain((==>argIsa(livesAt,2,dwelling)),(mfl4(_474,baseKB,'/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/make_wff_01.pfc.pl':44,44),ax)) 
logicmoo.base.examples.fol.MAKE_WFF_01 JUnit	warning	=	Goal (directive) failed: baseKB:mpred_ain((==>arity(drinks,2)),(mfl4(_470,baseKB,'/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/make_wff_01.pfc.pl':47,47),ax)) 
logicmoo.base.examples.fol.MAKE_WFF_01 JUnit	warning	=	Goal (directive) failed: baseKB:mpred_ain((==>argIsa(drinks,1,drinker)),(mfl4(_474,baseKB,'/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/make_wff_01.pfc.pl':48,48),ax)) 
logicmoo.base.examples.fol.MAKE_WFF_01 JUnit	warning	=	Goal (directive) failed: baseKB:mpred_ain((==>argIsa(drinks,2,beverage_class)),(mfl4(_474,baseKB,'/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/make_wff_01.pfc.pl':49,49),ax)) 
Test_0001_Line_0000__Fred	result	=	passed. 
Test_0002_Line_0000__naf_Fred	result	=	failure. 
Test_0003_Line_0000__Fred	result	=	failure. 
Test_0004_Line_0000__Green_house	result	=	passed. 
Test_0005_Line_0000__Green_house	result	=	failure. 
Test_0006_Line_0000__Green_house	result	=	passed. 
Test_0007_Line_0000__Green_house	result	=	failure. 
logicmoo.base.examples.fol.MAKE_WFF_01 JUnit	warning	=	Goal (directive) failed: baseKB:mpred_ain((prove_holds_t(_570,_574,_578)==>t(_570,_574,_578)),(mfl4(['F'=_570,'A'=_574,'B'=_578],baseKB,'/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/make_wff_01.pfc.pl':83,83),ax)) 
logicmoo.base.examples.fol.MAKE_WFF_01 JUnit	warning	=	Goal (directive) failed: baseKB:mpred_ain((prove_not_holds_t(_51694,_51716,_51738)==> ~t(_51694,_51716,_51738)),(mfl4(['F'=_51694,'A'=_51716,'B'=_51738],baseKB,'/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/make_wff_01.pfc.pl':85,85),ax)) 
Test_0008_Line_0000__Fran	result	=	failure. 
Test_0009_Line_0000__Fran	result	=	failure. 
Test_0010_Line_0000__Fran	result	=	failure. 
Test_0011_Line_0000__Fred	result	=	passed. 
Test_0012_Line_0000__Coffee	result	=	failure. 
Test_0013_Line_0000__Sue	result	=	failure. 
Test_0014_Line_0000__Sue	result	=	failure. 
Test_0015_Line_0000__naf_Ralf	result	=	passed. 
Test_0016_Line_0000__Sue	result	=	failure. 

%~ test_completed_exit(56)

totalTime=5.000

FAILED: /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-junit-minor -k make_wff_01.pfc.pl (returned 56) Add_LABELS='Errors,Warnings' Rem_LABELS='Skipped,Overtime,Skipped'

logicmoo.pfc.test.sanity_base.FILE_01 JUnit

(cd /var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/pfc/t/sanity_base ; timeout --foreground --preserve-status -s SIGKILL -k 10s 10s swipl -x /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-clif -t "['file_01.pfc']")

% EDIT: https://github.com/logicmoo/logicmoo_workspace/edit/master/packs_sys/pfc/t/sanity_base/file_01.pfc
% JENKINS: https://jenkins.logicmoo.org/job/logicmoo_workspace/lastBuild/testReport/logicmoo.pfc.test.sanity_base/FILE_01/
% ISSUE_SEARCH: https://github.com/logicmoo/logicmoo_workspace/issues?q=is%3Aissue+label%3AFILE_01
% ISSUE: #65

%~ init_phase(after_load)
%~ init_phase(restore_state)
%
%~ init_why(after_boot,program)
%~ after_boot.
%~ Dont forget to ?- logicmoo_i_cyc_xform.
running('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/pfc/t/sanity_base/file_01.pfc'),
%~ this_test_might_need( :-( use_module( library(logicmoo_plarkc))))


:- expects_dialect(pfc).

/*~
~*/


header_sane:(must_clause_asserted(G):- cwc, must(clause_asserted_u(G))).
/*~
~*/

:-   ain((must_clause_asserted(G):- cwc, must(clause_asserted_u(G)))).

/*~
~*/


must_clause_asserted(G):- cwc, must(clause_asserted_u(G)).

/*~
~*/


:- listing(must_clause_asserted).

/*~
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/pfc/t/sanity_base/file_01.pfc:22 
%~ skipped( listing(must_clause_asserted))
~*/


:- sanity(predicate_property(must_clause_asserted(_),number_of_clauses(_))).

/*~
%~ ?-( mpred_test( "Test_0001_Line_0000__must_clause_asserted_1",
%~       baseKB : predicate_property(Number_of_clauses,number_of_clauses(Clauses)))).
passed=info(why_was_true(baseKB:predicate_property(must_clause_asserted(_472),number_of_clauses(1))))
no_proof_for(predicate_property(must_clause_asserted(Asserted),number_of_clauses(1))).

no_proof_for(predicate_property(must_clause_asserted(Asserted),number_of_clauses(1))).

no_proof_for(predicate_property(must_clause_asserted(Asserted),number_of_clauses(1))).

	name	=	'logicmoo.pfc.test.sanity_base.FILE_01-Test_0001_Line_0000__must_clause_asserted_1'. 
	JUNIT_CLASSNAME	=	'logicmoo.pfc.test.sanity_base.FILE_01'. 
	JUNIT_CMD	=	'timeout --foreground --preserve-status -s SIGKILL -k 10s 10s swipl -x /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-clif -t "[\'file_01.pfc\']"'. 
% saving_junit: /var/lib/jenkins/workspace/logicmoo_workspace@2/test_results/jenkins/Report-logicmoo-pfc-test-sanity_base-vSTARv0vSTARvvDOTvvSTARv-2-1--grep-2-i-WARN-ERROR-_file-00-fail-pass--Units-Logicmoo_pfc_test_sanity_base_FILE_01_Test_0001_Line_0000_must_clause_asserted_1-junit.xml
~*/


a.

/*~
~*/


:- listing(a).

/*~
%~ skipped( listing(a))
~*/


:- header_sane:listing(a).

% @TODO - fails here bc must_clause_asserted/1 needs love
/*~
%~ skipped( listing(a))
~*/


% @TODO - fails here bc must_clause_asserted/1 needs love
:- must_clause_asserted(a).




% ISSUE: https://github.com/logicmoo/logicmoo_workspace/issues/65 
% EDIT: https://github.com/logicmoo/logicmoo_workspace/edit/master/packs_sys/pfc/t/sanity_base/file_01.pfc 
% JENKINS: https://jenkins.logicmoo.org/job/logicmoo_workspace/lastBuild/testReport/logicmoo.pfc.test.sanity_base/FILE_01/ 
% ISSUE_SEARCH: https://github.com/logicmoo/logicmoo_workspace/issues?q=is%3Aissue+label%3AFILE_01 

/*~
~*/
%~ unused(no_junit_results)
Test_0001_Line_0000__must_clause_asserted_1	result	=	passed. 

%~ test_completed_exit(64)

totalTime=1.000

SUCCESS: /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-junit-minor -k file_01.pfc (returned 64) Add_LABELS='' Rem_LABELS='Skipped,Errors,Warnings,Overtime,Skipped,Skipped'

Which School of Paraconsistent Logic?

Paraconsistent Logic

A paraconsistent logic is a way to reason about inconsistent information without lapsing into absurdity. In a non-paraconsistent logic, inconsistency explodes in the sense that if a contradiction obtains, then everything (everything!) else obtains, too. Someone reasoning with a paraconsistent logic can begin with inconsistent premisesโ€”say, a moral dilemma, a Kantian antinomy, or a semantic paradoxโ€”and still reach sensible conclusions, without completely exploding into incoherence.

Paraconsistency is a thesis about logical consequence: not every contradiction entails arbitrary absurdities. Beyond that minimal claim, views and mechanics of paraconsistent logic come in a broad spectrum, from weak to strong, as follows.

On the very weak end, paraconsistent logics are taken to be safeguards to control for human fallibility. We inevitably revise our theories, have false beliefs, and make mistakes; to prevent falling into incoherence, a paraconsistent logic is required. Such modest and conservative claims say nothing about truth per se. Weak paraconsistency is still compatible with the thought that if a contradiction were true, then everything would be true, tooโ€”because, beliefs and theories notwithstanding, contradictions cannot be true.

On the very strong end of the spectrum, paraconsistent logics underwrite the claim that some contradictions really are true. This thesisโ€”dialetheismโ€”is that sometimes the best theory (of mathematics, or metaphysics, or even the empirical world) is contradictory. Paraconsistency is mandated because the dialetheist still maintains that not everything is true. In fact, strong paraconsistency maintains that all contradictions are falseโ€”even though some contradictions also are true. Thus, at this end of the spectrum, dialetheism is itself one of the true contradictions.

This article offers a brief discussion of some main ideas and approaches to paraconsistency. Modern logics are couched in the language of mathematics and formal symbolism. Nevertheless, this article is not a tutorial on the technical aspects of paraconsistency, but rather a synopsis of the underlying ideas. See the suggested readings for formal expositions, as well as historical material.

Table of Contents

  1. The Problem
  2. Logical Background
    1. Definitions
    2. Two Grades of Paraconsistency
    3. Requirements for a Logic to Be Paraconsistent
  3. Schools of Paraconsistent Logic
    1. Discussive Logic
    2. Preservationism
    3. Adaptive Logic
    4. Relevance
    5. Logics of Formal Inconsistency
    6. Dialetheism
  4. Applications
    1. Moral Dilemmas
    2. Law, Science, and Belief Revision
    3. Closed Theories โ€“ Truth and Sets
      1. Naรฏve Axioms
      2. Further Logical Restrictions
    4. Learning, Beliefs, and AI
  5. Conclusion
  6. References and Further Reading

1. The Problem

Consider an example due to Alan Weir, concerning a political leader who absolutely, fundamentally believes in the sanctity of human life, and so believes that war is always wrong. All the same, a situation arises where her country must enter into war (else people will die, which is wrong). Entering into war will inevitably mean that some people will die. Plausibly, the political leader is now embroiled in a dilemma. This is exactly when paraconsistent inference is appropriate. Imagine our leader thinking, โ€˜War is always wrong, but since we are going to war anyway, we may as well bomb civilians.โ€™ Absurdist reasoning of this sort is not only bad logic, but just plain old bad.

David Hume once wrote (1740, p. 633),

I find myself involvโ€™d in such a labyrinth, that, I must confess, I neither know how to correct my former opinions, nor how to render them consistent.

As Schotch and Jennings rightly point out, โ€˜it is no good telling Hume that if his inconsistent opinions were, all of them, true then every sentence would be true.โ€™ The best we could tell Hume is that at least some of his opinions are wrongโ€”but โ€˜this, so far from being news to Hume, was what occasioned much of the anguish he evidently feltโ€™ (Schotch et al. p. 23). We want a way to keep sensible and reasonable even whenโ€”especially whenโ€”such problems arise. We need a way to keep from falling to irrational pieces when life, logic, mathematics or even philosophy leads us into paradox and conundrum. That is what paraconsistent logics are for.

2. Logical Background

a. Definitions

A logic is a set of well-formed formulae, along with an inference relation โŠข. The inference relation, also called logical consequence, may be specified syntactically or semantically, and tells us which formulae (conclusions) follow from which formulae (premises). When a sentence B follows from a bunch of sentences A0, A1, โ€ฆ, An, we write

A0, A1, โ€ฆ, An โŠข B.

When the relation โŠข holds, we say that the inference is valid. The set of all sentences that can be validly inferred in a logic is called a theory.

A key distinction behind the entire paraconsistent enterprise is that between consistency and coherence. A theory is consistent if no pairs of contradictory sentences A, ยฌA are derivable, or alternatively iff no single sentence of the form A & ยฌA is derivable. Coherence is a broader notion, sometimes called absolute (as opposed to simple) consistency, and more often called non-triviality. A trivial or absurd theory is one in which absolutely every sentence holds. The idea of paraconsistency is that coherence is possible even without consistency. Put another way, a paraconsistent logician can say that a theory is inconsistent without meaning that the theory is incoherent, or absurd. The former is a structural feature of the theory, worth repair or further study; the latter means the theory has gone disastrously wrong. Paraconsistency gives us a principled way to resist equating contradiction with absurdity.

In classical logic, the logic developed by Boole, Frege, Russell et al. in the late 1800s, and the logic almost always taught in university courses, has an inference relation according to which

A, ยฌA โŠข B

is valid. Here the conclusion, B, could be absolutely anything at all. Thus this inference is called ex contradictione quodlibet (from a contradiction, everything follows) or explosion. Paraconsistent logicians have urged that this feature of classical inference is incorrect. While the reasons for denying the validity of explosion will vary according to oneโ€™s view of the role of logic, a basic claim is that the move from a contradiction to an arbitrary formula does not seem like reasoning. As the founders of relevant logic, Anderson and Belnap, urge in their canonical book Entailment, a โ€˜proofโ€™ submitted to a mathematics journal in which the essential steps fail to provide a reason to believe the conclusion, e.g. a proof by explosion, would be rejected out of hand. Mark Colyvan (2008) illustrates the point by noting that no one has laid claim to a startlingly simple proof of the Riemann hypothesis:

Riemannโ€™s Hypothesis: All the zeros of the zeta function have real part equal to 1/2.
Proof: Let R stand for the Russell set, the set of all sets that are not members of themselves. It is straightforward to show that this set is both a member of itself and not a member of itself. Therefore, all the zeros of Riemannโ€™s zeta function have real part equal to 1/2.

Needless to say, the Riemann hypothesis remains an open problem at time of writing.

Minimally, paraconsistent logicians claim that there are or may be situations in which paraconsistency is a viable alternative to classical logic. This is a pluralist view, by which different logics are appropriate to different areas. Just as a matter of practical value, explosion does not seem like good advice for a person who is faced with a contradiction, as the quote from Hume above makes clear. More forcefully, paraconsistent logics make claim to being a better account of logic than the classical apparatus. This is closer to a monistic view, in which there is, essentially, one correct logic, and it is paraconsistent.

b. Two Grades of Paraconsistency

Let us have a formal definition of paraconsistency.

Definition 1. A logic is paraconsistent iff it is not the case for all sentences A, B that A, ยฌA โŠข B.

This definition simply is the denial of ex contradictione quodlibet; a logic is paraconsistent iff it does not validate explosion. The definition is neutral as to whether any inconsistency will ever arise. It only indicates that, were an inconsistency to arise, this would not necessarily lead to inferential explosion. In the next definition, things are a little different:

Definition 2. A logic is paraconsistent iff there are some sentences A, B such that โŠข A and โŠข ยฌA, but not โŠข B.

A logic that is paraconsistent in the sense of definition 2 automatically satisfies definition 1. But the second definition suggests that there are actually inconsistent theories. The idea is that, in order for explosion to fail, one needs to envisage circumstances in which contradictions obtain. The difference between the definitions is subtle, but it will help us distinguish between two main gradations of paraconsistency, weak and strong.

Roughly, weak paraconsistency is the cluster concept that

  • any apparent contradictions are always due to human error;
  • classical logic is preferable, and in a better world where humans did not err, we would use classical logic;
  • no true theory would ever contain an inconsistency.

Weak paraconsistent logicians see their role as akin to doctors or mechanics. Sometimes information systems develop regrettable but inevitable errors, and paraconsistent logics are tools for damage control. Weak paraconsistentists look for ways to restore consistency to the system or to make the system work as consistently as possible. Weak paraconsistentists have the same view, more or less, of contradictions as do classical logicians.

On the other side, strong paraconsistency includes ideas like

  • Some contradictions may not be errors;
  • classical logic is wrong in principle;
  • some true theories may actually be inconsistent.

A strong paraconsistentist considers relaxing the law of non-contradiction in some way, either by dropping it entirely, so that ยฌ(A & ยฌA) is not a theorem, or by holding that the law can itself figure into contradictions, of the form

Always, not (A and not A),
and sometimes, both A and not A.

Strong paraconsistentists may be interested in inconsistent systems for their own sake, rather like a mathematician considering different non-Euclidean systems of geometry, without worry about the โ€˜truthโ€™ of the systems; or a strong paraconsistentist may expect that inconsistent systems are true and accurate descriptions of the world, like a physicist considering a non-Euclidean geometry as the actual geometry of space.

It is important to keep weak paraconsistency distinct from logical pluralism, and strong paraconsistency or dialetheism (see ยง3f.) distinct from logical monism. For example, one can well be a weak paraconsistentist, insofar as one claims that explosion is invalid, even though there are no true contradictions, and at the same time a logical monist, holding that the One True Logic is paraconsistent. This was the position of the fathers of relevance logic, Anderson and Belnap, for instance. Similarly, one could be a dialetheist and a logical pluralist, as is the contemporary philosophical logician Jc Beall (see suggested readings).

c. Requirements for a Logic to be Paraconsistent

All approaches to paraconsistency seek inference relations that do not explode. Sometimes this is accomplished by going back to basics, developing new and powerful ideas about the meaning of logical consequence, and checking that these ideas naturally do not lead to explosion (e.g. relevance logic, ยง3d). More often paraconsistency is accomplished by looking at what causes explosion in classical inference, and simply removing the causes. In either case, there are some key constraints on a paraconsistent logic that we should look at up front.

Of course, the main requirement is to block the rule of explosion. This is not really a limitation, since explosion is prima facie invalid anyway. But we cannot simply remove the inference of explosion from classical logic and automatically get a paraconsistent logic. The reason for this, and the main, serious constraint on a paraconsistent logic, was discovered by C. I. Lewis in the 1950s. Suppose we have both A and ยฌA as premises. If we have A, then we have that either A or B, since a disjunction only requires that one of its disjuncts holds. But then, given ยฌA, it seems that we have B, since if either A or B, but not A, then B. Therefore, from A and ยฌA, we have deduced B. The problem is that B is completely arbitraryโ€”an absurdity. So if it is invalid to infer everything from a contradiction, then this rule, called disjunctive syllogism,

A โˆจ B, ยฌA โŠข B,

must be invalid, too.

There are two things to remark about the failure of disjunctive syllogism (DS).

First, we might say that classical logic runs into trouble when it comes to inconsistent situations. This something like the way Newtonian physics makes bad predictions when it comes to the large-scale structure of space-time. And so similarly, as Newtonian physics is still basically accurate and applicable on medium-sized domains, we can say that classical logic is still accurate and appropriate in consistent domains. For working out sudoku puzzles, paying taxes, or solving murder mysteries, there is nothing wrong with classical reasoning. For exotic objects like contradictions, though, classical logic in unprepared.

Secondly, since DS is a valid classical inference, we can see clearly that a paraconsistent logic will validate fewer inferences than classical logic. (No classically invalid inferences are going to become valid by dint of inconsistent information.) That is the whole ideaโ€”that classical logic allows too much, and especially given the possibility of inconsistency, we must be more discriminating. This is sometimes expressed by saying that paraconsistent logics are โ€˜weakerโ€™ than classical logic; but since paraconsistent logics are more flexible and apply to more situations, we neednโ€™t focus too much on the slang. Classical logic is in many ways more limited than paraconsistent logic (see ยง4c.).

A third point, which we will take up in ยง3d, is that the invalidity of DS shows, essentially, that for the basic inference of modus ponens to be valid in all situations, we need a new logical connective for implication, not defined in terms of disjunction and negation. Now we turn to some weak and strong systems of paraconsistency.

3. Schools of Paraconsistent Logic

a. Discussive Logic

The first paraconsistent logic was developed by Jaล›kowski, a student of Lukasiewicz, in Poland in 1948. He gave some basic criteria for a paraconsistent logic:

To find a system of sentential calculus which:

  1. when applied to contradictory systems would not entail their triviality;
  2. would be rich enough to enable practical inference;
  3. would have intuitive justification.

To meet his own criteria, Jaล›kowskiโ€™s idea is to imagine a group of people having a discussion, some of whom are disagreeing with each other. One person asserts: โ€˜Wealth should be distributed equally amongst all persons.โ€™ Another person says, โ€˜No, it should not; everyone should just have what he earns.โ€™ The group as a whole is now in an inconsistent information state. We face such states all time time: reading news articles, blogs, and opinion pieces, we take in contradictions (even if each article is internally consistent, which is unusual). How to reason about conflicting information like this?

Jaล›kowskiโ€™s idea is to prevent the inconsistent information from co-mingling. He does so, in effect, by blocking the rule of adjunction:

A, B โŠข A & B.

This rule says that, given two premises A and B, we can conjoin them into a single statement, (A & B). If the adjunction rule is removed, then we can have A and ยฌA, without deriving a full-blown contradiction A & ยฌA. The information is kept separate. On this approach, the classical rule of explosion actually can still hold, in the form

A & ยฌA โŠข B.

The aim of this approach is not to prevent explosion at the sentence level, but rather to ensure that no contradictory sentence (as opposed to inconsistent sentences) can ever arise. So while the inconsistency arising from different disagreeing parties can be made coherent sense of, a person who is internally contradictory is still reckoned to be absurd.

In 1974, Rescher and Brandom suggested a very similar approach, in terms of worlds. As Belnap has pointed out, the non-adjunctive idea has obvious applications to computer science, for example when a large amount of polling data is stored by a system.

b. Preservationism

Around 1978, the Candadian logicians Schotch and Jennings developed an approach to modal logic and paraconsistency that has some close affinities with the discussion approach. Their approach is now known as the preservationist school. The fundamental idea is that, given an inconsistent collection of premises, we should not try to reason about the collection of premises as a whole, but rather focus on internally consistent subsets of premises. Like discussion logics, preservationists see an important distinction between an inconsistent data set, like

{A, ยฌA},

which is considered tractable, versus an outright contradiction like

A & ยฌA,

which is considered hopeless. The whole idea is summarized in a paraphrase of Gillman Payette, a major contributor to the preservationist program:

Question: How do you reason from an inconsistent set of premises?
Answer: You don't, since every formula follows in that case. You reason from consistent subsets of premises.

Preservationists begin with an already defined logic X, usually classical logic. They assert that we, as fallible humans, are simply sometimes โ€˜stuck with bad dataโ€™; and this being the case, some kind of repair is needed on the logic X to insure coherence. Preservationists define the level of a set of premises to be the least number of cells into which the set must be divided for every cell to be internally consistent. They then define an inference relation, called forcing, in terms of the logic X, as follows:

A set of sentences ฮ“ forces A iff there is at least one subset ฮ” of ฮ“ such that A is an X-valid inference from ฮ”.

Forcing preserves the level of ฮ“. If there is any consistency to preserve, forcing ensures that things do not get any more inconsistent. In particular, if a data set is inconsistent but contains no single-sentence contradictions, then the forcing relation is paraconsistent.

Aside from paraconsistent applications, and roots in modal logic, preservationists have recently proved some deep theorems about logic more generally. Payette has shown, for example, that two logics are identical iff they assign any set of sentences the same level.

Detour: Chunk and Permeate

Closely related to the preservationist paradigm is a technique called chunk and permeate, developed by Bryson Brown and Graham Priest to explain the early differential calculus of Newton and Leibniz (see inconsistent mathematics). It is known that the early calculus involved contradictions of some kind, in particular, infinitesimal numbers that are sometimes identical to zero, and other times of a non-zero quantity. Brown and Priest show how reasoning about infinitesimals (and their related notions of derivatives) can be done coherently, by breaking up the reasoning into consistent โ€˜chunks,โ€™ and defining carefully controlled โ€˜permeationsโ€™ between the chunks. The permeations show how enough but not too much information can pass from one chunk to another, and thus reconstruct how a correct mathematical solution can obtain from apparently inconsistent data.

c. Adaptive Logic

Taking applied examples from scientific reasoning as its starting point, the adaptive logic program considers systems in which the rules of inference themselves can change as we go along. The logics are dynamic. In dynamic logics, rules of inference change as a function of what has been derived to that point, and so some sentences which were derivable at a point in time are no longer derivable, and vice versa. The program has been developed by Dederik Batens and his school in Ghent.

The idea is that our commitments may entail a belief that we nevertheless reject. This is because, as humans, our knowledge is not closed under logical consequence and so we are not fully aware of all the consequences of our commitments. When we find ourselves confronted with a problem, there may be two kinds of dynamics at work. In external dynamics, a conclusion may be withdrawn given some new information; logics in which this is allowed are called non-monotonic. External dynamics are widely recognized and are also important to the preservationist program. In internal dynamics, the premises themselves may lead to a conclusion being withdrawn. This kind of dynamic is less recognized and is more properly within the ambit of paraconsistency. Sometimes, we do derive a consequence we later reject, without modifying our convictions.

Adaptive systems work by recognizing abnormalities, and deploying formal strategies. Both of these notions are defined specifically to the task at hand; for instance, an abnormality might be an inconsistency, or it might be an inductive inference, and a strategy might be to delete a line of a proof, or to change an inference rule. The base paraconsistent logic studied by the adaptive school is called CLuN, which is all of the positive (negation-free) fragment of classical logic, plus the law of excluded middle A โˆจ ยฌA.

d. Relevance

Relevant logic is not fundamentally about issues of consistency and contradiction. Instead the chief motivation of relevant logic is that, for an argument to be valid, the premises must have a meaningful connection to the conclusion. For example, classical inferences like

B โŠข A โŠƒ B,

or

ยฌ(A โŠƒ B) โŠข A,

seem to relevance logicians to fail as decent logical inferences. The requirement that premises be relevant to the conclusion delivers a paraconsistent inference relation as a byproduct, since in ex contradictione quodlibet, the premises A and ยฌA do not have anything to do with an arbitrary conclusion B. Relevant logic begins with Ackermann, and was properly developed in the work of Anderson and Belnap. Many of the founders of relevant logic, such as Robert Meyer and Richard Routley, have also been directly concerned with paraconsistency.

From our perspective, one of the most important aspects of relevant logic is that it provides an implication connective that obeys modus ponens, even in inconsistent situations. In ยง2b, we saw that the disjunctive syllogism is not paraconsistently valid; and so in any logic in which implication is defined by negation and disjunction, modus ponens is invalid, too. That is,

A โŠƒ B := ยฌA โˆจ B

does not, as we saw in ยง2b above, define a conditional that obeys

A, A โŠƒ B โŠข B.

In the argot, we say that โ€˜hook is not detachableโ€™ or โ€˜ponenableโ€™. In relevant logic, implication A โ†’ B is not defined with truth-functional connectives at all, but rather is defined either axiomatically or semantically (with worlds or algebraic semantics). Going this way, one can have a very robust implication connective, in which not only modus ponens is valid,

A โ†’ B, A; therefore, B.

Other widely used inferences obtain, too. Letโ€™s just mention a few that involve negation in ways that might seem suspect from a paraconsistent point of view. We can have contraposition

A โ†’ B โŠข ยฌB โ†’ ยฌA,

which gives us modus tollens

A โ†’ B, ยฌB โŠข ยฌA.

With the law of non-contradiction ยฌ(A & ยฌA), this gives us reductio ad absurdum, in two forms,

A โ†’ (B & ยฌB) โŠข ยฌA,

A โ†’ ยฌA โŠข ยฌA,

and consequentia mirabilis:

ยฌA โ†’ A โŠข A.

Evidently the relevant arrow restores a lot of power apparently lost in the invalidity of disjunctive syllogism.

There are a great number of relevant logics differing in strength. One can do away with the laws of non-contradiction and excluded middle, giving a very weak consistent paraconsistent logic called B (for basic). Or one can add powerful negation principles as we have just seen above for inconsistent but non-trivial logics. The relevant approach was used in Meyerโ€™s attempt to found a paraconsistent arithmetic in a logic called R# (see inconsistent mathematics). It has also been used by Brady for naรฏve set theory (ยง4c), and, more recently, Beall for truth theory. On the other hand, relevant logics validate fewer entailments than classical logic; in order for A โ†’ B to be valid, we have additional requirements of relevance besides truth preservation in all possible circumstances. Because of this, it is often difficult to recapture within a relevant logic some of classical mathematical reasoning. We return to this problem in ยง4c below.

e. Logics of Formal Inconsistency

One of the first pioneers of paraconsistent logic was Newton C. A. da Costa in Brazil, in the 1950s. Da Costaโ€™s interests have been largely in paraconsistent mathematics (with applications to physics), and his attitude toward paraconsistency is more open minded than some of the others we have seen. Da Costa considers the investigation of inconsistent but not trivial theories as akin to the study of non-Euclidean geometry. He has been an advocate of paraconsistency not only for its pragmatic benefits, for example in reconstructing infinitesimal calculus, but also as an investigation of novel structure for its own sake. He gives the following methodological guidelines:

  • In these calculi, the principle of contradiction should not be generally valid;
  • From two contradictory statements it should not in general be possible to deduce any statement whatever;
  • The extension of these calculi to quantification calculi should be immediate.

Note that da Costaโ€™s first principle is not like any weโ€™ve seen so far, and his third is more ambitious than others. His main system is an infinite hierarchy of logics known as the C systems.

The main idea of the C systems is to track which sentences are consistent and to treat these differently than sentences that may be inconsistent. Following this method, first of all, means that the logic itself is about inconsistency. The logic can model how a person can or should reason about inconsistent information. Secondly, this gives us a principled way to make our paraconsistent logic as much like classical logic as possible: When all the sentences are marked as consistent, they can be safely reasoned about in a classical way, for example, using disjunctive syllogism.

To make this work, we begin with a base logic, called C(0). When a sentence A behaves consistently in C(0), we mark it according to this definition:

A0 := ยฌ(A & ยฌA).

Then, a strong kind of negation can be defined:

โ€“A := ยฌA & A0.

The logic with these two connectives added to it, we call C(1). In C(1) then we can have inferences like

ยฌA โˆจ B, A, A0 โŠข B.

And in the same way that we reached C(1), we could go on and define a logic C(2), with an operator A1 = (A0)0, that means something like โ€˜behaves consistently in C(1)โ€™. The C systems continue up to the first transfinite ordinal, C(ฯ‰).

More recently, a broad generalization of the C-systems has been developed by Carnielli, Marcos, and others, called logics of formal inconsistency. Da Costaโ€™s C-systems are a subclass (albeit an important one) of the much wider family of the LFIs. The C-systems are precisely the LFIs where consistency can be expressed as a unary operator.

These logics have been used to model some actual mathematics. The axioms of Zermeloโ€“Fraenkel set theory and some postulates about identity (=) can be added to C(1), as can axioms asserting the existence of a universal set and a Russell set. This yields an inconsistent, non-trivial set theory. Arruda and Batens obtained some early results in this set theory. Work in arithmetic, infinitesimal calculus, and model theory has also been carried out by da Costa and his students.

A driving idea of da Costaโ€™s paraconsistency is that the law of non-contradiction ยฌ(A & ยฌA) should not hold at the propositional level. This is, philosophically, how his approach works: ยฌ(A & ยฌA) is not true. Aside from some weak relevant logics, this is a unique feature of the C systems (among paraconsistent logics). In other schools like the discussion and preservationist schools, non-contradiction holds not only at the level of sentences, but as a normative rule; and in the next school we consider, non-contradiction is false, but it is true as well.

f. Dialetheism

The best reason to study paraconsistency, and to use it for developing theories, would be if there were actually contradictions in the world (as opposed to in our beliefs or theories). That is, if it turns out that the best and truest description of the world includes some inconsistency, then paraconsistency is not only required, but is in some sense natural and appropriate. โ€˜Dialetheismโ€™ is a neologism meaning two-way truth and is the thesis that some sentences are both true and false, at the same time and in the same way. Dialetheism is particularly motivated as a response to the liar paradox and set theoretic antinomies like Russellโ€™s Paradox, and was pioneered by Richard Routley and Graham Priest in Australia in the 1970s. Priest continues to be the best known proponent.

A dialetheic logic is easiest to understand as a many-valued logic. This is not the only way to understand dialetheism, and the logic we are about to consider is not the only logic a dialetheist could use. Dialetheism is not a logic. But here is a simple way to introduce the concept. In addition to the truth-values true and false, sentences can also be both. This third value is a little unusual, maybe, but uncomplicated: if a sentence A is both, then A is true, and A is false, and vice versa. The most straightforward application of a โ€˜bothโ€™ truth-value is Priestโ€™s logic of paradox, or LP. In LP the standard logical connectives have a natural semantics, which can be deduced following the principle that a sentence is designated iff it is at least trueโ€”i.e. iff it is true only, or both true and false. If

ยฌA is true when A is false,

and

ยฌA is false when A is true,

for example, then

ยฌA is both iff A is both.

So inconsistent negation is something like a fixed point. An argument is valid in LP iff it is not possible for the conclusion to be completely false but all the premises at least true. That is, suppose we have premises that are all either true or both. If the argument is valid, then the conclusion is also at least true.

In LP, any sentence of the form ยฌ(A & ยฌA) is always true, and also some instances are sometimes false. So the law of non-contradiction is itself a dialetheiaโ€”the schema ยฌ(A & ยฌA) is universal but also has counterexamplesโ€”and furthermore, dialetheism says of itself that it is both true and false. (The statement โ€˜there are true contradictionsโ€™ is both trueโ€”there are someโ€”and falseโ€”all contradictions are false.) This may seem odd, but it is appropriate, given dialetheismโ€™s origins in the liar paradox.

LP uses only extensional connectives (and, or, not) and so has no detachable conditional. If one adds to LP a detachable conditional, then, given its semantics, the most natural extension of LP to a logic with an implication connective is the logic called RM3. Unfortunately, this logic is not appropriate for naรฏve set theory or truth theory (see ยง4c.ii). If a fourth neutral truth value is added to LP, the logic is weakened to the system of first degree entailment FDE. In FDE, the inference

B โŠข A โˆจ ยฌA

is not valid any more than explosion is. This makes some sense, since if the former is invalid by dint of not representing actual reasoning, then the latter should be invalid, too, since the premise does not โ€˜lead toโ€™ the conclusion. Because of this, FDE has no theorems, of the form โŠข A, at all.

4. Applications

A paraconsistent logic becomes useful when we are faced with inconsistencies. Motivations for and applications of paraconsistency arise from situations that are plausibly inconsistentโ€”that is, situations in which inconsistency is not merely due to careless mistakes or confusion, but rather inconsistency that is not easily dispelled even upon careful and concentrated reflection. A student making an arithmetic error does not need a paraconsistent logic, but rather more arithmetic tutorials (although see inconsistent mathematics). On the other hand, people in the following situations may turn to a paraconsistent toolkit.

a. Moral Dilemmas

A mother gives birth to identical conjoined twins (in an example due to Helen Bohse). Doctors quickly assess that if the twins are not surgically separated, then neither will survive. However, doctors also know only one of the babies can survive surgery. The babies are completely identical in all respects. It seems morally obligatory to save one of life at the expense of the other. But because there is nothing to help choose which baby, it also seems morally wrong to let one baby die rather than the other. Quite plausibly, this is an intractable moral dilemma with premises of the form we ought to save the baby on the left, and, by symmetrical reasoning about the baby on the right, also we ought not to save the baby on the left. This is not yet technically a contradiction, but unless some logical precautions are taken, it is a tragic situation on the verge of rational disaster.

A moral dilemma takes the form O(A) and O(ยฌA), that it is obligatory to do A and it is obligatory to do ยฌA. In standard deontic logicโ€”a logic of moral obligationsโ€”we can argue from a moral dilemma to moral explosion as follows (see Routley and Plumwood 1989). First, obligations โ€˜aggregateโ€™:

O(A), O(ยฌA) โŠข O(A & ยฌA).

Next, note that A & ยฌA is equivalent to (A & ยฌA) & B. (โ€˜Equivalentโ€™ here can mean classically, or in the sense of C. I. Lewisโ€™ strict implication.) Thus

O(A & ยฌA) โŠข O((A & ยฌA) & B)

But O((A & ยฌA) & B) โŠข O(B). So we have shown from inconsistent obligations O(A), O(ยฌA), that O(B), that anything whatsoever is obligatoryโ€”in standard, non-paraconsistent systems.

A paraconsistent deontic logic can follow any of the schools we have seen already. A standard paraconsistent solution is to follow the non-adjunctive approach of Jaล›kowski and the preservationists. One can block the rule of modal aggregation, so that both O(A), O(ยฌA) may hold without implying O(A & ยฌA).

Alternatively, one could deny that A & ยฌA is strictly equivalent to (A & ยฌA) & B, by adopting a logic (such as a relevant logic) in which such an equivalence fails. Taking this path, we would then run into the principle of deontic consistency,

O(A) โŠข P(A),

that if you ought to do A, then it is permissible to do A. (You are not obliged not to do A.) Accordingly, from O(A & ยฌA), we get P(A & ยฌA). If we had the further axiom that inconsistent actions are not permitted, then we would now have a full blown inconsistency, P(A & ยฌA) and ยฌP(A & ยฌA). If reductio is allowed, then we would also seem to have obligations such that O(A) and ยฌO(A). This move calls attention to which obligations are consistent. One could drop deontic consistency, so that A is obligatory without necessarily being permissible. Or one could reason that, however odd inconsistent actions may sound, there is no obvious reason they should be impermissible. The result would be strange but harmless statements of the form P(A & ยฌA).

A principle even stronger than deontic consistency is the Kantian dictum that โ€˜ought implies can,โ€™ where โ€˜canโ€™ means basic possibility. Kantโ€™s dictum converts moral dilemmas to explicit contradictions. This seems to rule out moral dilemmas, since it is not possible, e.g., both to save and not to save a baby from our conjoined twins example, it is not obligatory to save one of the two babies, appearances to the contrary. So an option for the paraconsistent deontic logician is to deny Kantโ€™s dictum. Perhaps we have unrealizable obligations; indeed, this seems to be the intuition behind moral dilemmas. A consequence of denying Kantโ€™s dictum is that, sometimes, we inevitably do wrong.

Most liberally, one can keep everything and accept that sometimes inconsistent action is possible. For example, if I make a contract with you to break this very contract, then I break the contract if and only if I keep it. By signing, I am eo ipso breaking and not breaking the contract. In general, though, how one could do both A and its negation is a question beyond the scope of logic.

b. Laws, Science, and Revision

Consider a country with the following laws (in an example from Priest 2006, ch. 13):

(1) No non-Caucasian people shall have the right to vote.
(2) All landowners shall have the right to vote.

As it happens, though, Phil is not Caucasian, and owns a small farm. The laws, as they stand, are inconsistent. A judge may see this as a need to impose a further law (e.g. non-Caucasians cannot own land) or revise one of the current laws. In either case, though, the law as it stands needs to be dealt with in a discriminating way. Crucially, the inferential background of the current laws does not seem to permit or entail total anarchy.

Similarly, in science we hold some body of laws as true. It is part of the scientific process that these laws can be revised, updated, or even rejected completely. The process of such progress again requires that contradictions not be met with systemic collapse. At present, it seems extremely likely that different branches of science are inconsistent with one anotherโ€”or even within the same discipline, as is the case in theoretical physics with relativity and quantum mechanics. Does this situation make science absurd?

c. Closed Theories โ€“ Truth and Sets

Conceptual closure means taking a full account of whatever is under study. Suppose, for example, we are studying language. We carry out our study using language. A closed theory would have to account for our study itself; the language of the theory would have to include terms like โ€˜languageโ€™, โ€˜theoryโ€™, โ€˜trueโ€™, and so forth. More expansively, a theory of everything would include the theory itself. Perhaps the simplest way to grasp the nature of a closed theory is through a remark of Wittgenstein, the preface to his Tractatus: โ€˜In order to draw a limit to thought, one would have to find both sides of the limit thinkable.โ€™ Priest has argued that the problematic of closure can be seen in the philosophies of Kant and Hegel, as well as in earlier Greek and Medieval thought, and continues on in postmodernist philosophies. As was discovered in the 20th century, closed formal theories are highly liable to be inconsistent, because they are extremely conducive to self-reference and diagonalization (see logical paradoxes).

For logicians, the most important of the closed theories, susceptible to self-reference, are of truth and sets. Producing closed theories of truth and sets using paraconsistency is, at least to start with, straightforward. We will look at two paradigm cases, followed by some detail on how they can be pursued.

i. Naรฏve Axioms

In modern logic we present formal, mathematical descriptions of how sentences are true and false, e.g. (A & B) is true iff A is true and B is true. This itself is a rational statement, presumably governed by some logic and so itself amenable to formal study. To reason about it logically, we would need to study the truth predicate, โ€˜x is true.โ€™ An analysis of the concept of truth that is almost too-obviously correct is the schema

T(โ€˜Aโ€™) iff A.

It seems so obviousโ€”until (even when?) a sentence like

This sentence of the IEP is false,

a liar paradox which leads to a contradiction, falls out the other side. A paraconsistent logic can be used for a theory of truth in which the truth schema is maintained, but where either the derivation of the paradox is blocked (by dropping the law of excluded middle) or else the contradiction is not explosive.

In modern set theory, similarly, we understand mathematical objects as being built out of sets, where each set is itself built out of pre-given sets. The resulting picture is the iterative hierarchy of sets. The problem is that the iterative hierarchy itself is a mathematically definite object, but cannot itself reside on the hierarchy. A closed theory of sets will include objects like this, beginning from an analysis of the concept of set that is almost too-obviously correct: the naรฏve comprehension schema,

x is a member of {y: A(y)} iff A(x).

A way to understand what naรฏve comprehension means is to take it as the claim: any collection of objects is a set, which is itself an object. Naรฏve set theory can be studied, and has been, with paraconsistent logics; see inconsistent mathematics. Contradictions like the existence of a Russell set {y: y is not a member of y} arise but are simply theorems: natural parts of the theory; they do not explode the theory.

ii. Further Logical Restrictions

For both naรฏve truth theory and naรฏve set theory, there is an additional and extremely important restriction on the logic. A logic for these schemas cannot validate contraction,

If (if A then (if A then B)), then (if A then B).

This restriction is due to Curryโ€™s paradox, which is a stronger form of the liar paradox. A Curry sentence says

If this sentence is true, then everything is true.

If the Curry sentence, call it C, is put into the truth-schema, then everything follows by the principle of contraction:

1) T(โ€˜Cโ€™) iff (if T(โ€˜Cโ€™) then everything). [truth schema]
2) If T(โ€˜Cโ€™) then (if T(โ€˜Cโ€™) then everything). [from 1]
3) If T(โ€˜Cโ€™) then everything. [from 2 by contraction]
4) T(โ€˜Cโ€™) [_modus ponens_ on 1, 3]
5) Everything. [_modus ponens_ on 3, 4]

Since not everything is true, if the T schema is correct then contraction is invalid. For set theory, analogously, the Curry set is

C = {x: If x is a member of x, then everything is true},

and a similar argument establishes triviality.

As was discovered later by Dunn, Meyer and Routley while studying naรฏve set theory in relevant logic, the sentence

(A & (A โ†’ B)) โ†’ B

is a form of contraction too, and so must similarly not be allowed. (Let A be a Curry sentence and B be absurdity.) Calling this sentence (schema) invalid is different than blocking modus ponens, which is an inference, validated by a rule. The above sentence, meanwhile, is just thatโ€”a sentenceโ€”and we are saying whether or not all its instances are true. If naรฏve truth and set theories are coherent, instances of this sentence are not always true, even when modus ponens is valid.

The logic LP does not satisfy contraction and so a dialetheic truth or set theory can be embedded in it. Some basic contradictions, like the liar paradox and Russellโ€™s paradox, do obtain, as do a few core operations. Because LP has no conditional, though, one does not get very far. Most other paraconsistent logics cannot handle naรฏve set theory and naรฏve truth theory as stated here. A hard problem in (strong) paraconsistency, then, is how to formulate the โ€˜iffโ€™ in our naรฏve schemata, and in general how to formulate a suitable conditional. The most promising candidates to date have been relevant logics, though as we have seen there are strict limitations.

d. Learning, Beliefs, and AI

Some work has been done to apply paraconsistency to modeling cognition. The main idea here is that the limitations on machine reasoning as (apparently) dictated by Gรถdelโ€™s incompleteness theorems no longer hold. What this has to do with cognition per se is a matter of some debate, and so most applications of paraconsistency to epistemology are still rather speculative. See Berto 2009 for a recent introduction to the area.

Tanaka has shown how a paraconsistent reasoning machine revises its beliefs differently than suggested by the more orthodox but highly idealized Alchourrรณn-Gรคrdenfors-Makinson theory. That latter prevailing theory of belief revision has it that inconsistent sets of beliefs are impossible. Paraconsistent reasoning machines, meanwhile, are situated reasoners, in sets of beliefs (say, acquired simply via education) that can occasionally be inconsistent. Consistency is just one of the criteria of epistemic adequacy among othersโ€”simplicity, unity, explanatory power, etc. If this is right, the notion of recursive learning might be extended, to shed new light on knowledge acquisition, conflict resolution, and pattern recognition. If the mind is able to reason around contradiction without absurdity, then paraconsistent machines may be better able to model the mind.

Paraconsistent logics have been applied by computer scientists in software architecture (though this goes beyond the expertise of the present author). That paraconsistency could have further applications to the theory of computation was explored by Jack Copeland and Richard Sylvan. Copeland has independently argued that there are effective procedures that go beyond the capacity of Turing machines. Sylvan (formerly Routley) further postulated the possibility of dialethic machines, programs capable of computing their own decision functions. In principle, this is a possibility. The non-computability of decision functions, and the unsolvability of the halting problem, are both proved by reductio ad absurdum: if a universal decision procedure were to exist, it would have some contradictions as outputs. Classically, this has been interpreted to mean that there is no such procedure. But, Sylvan suggests, there is more on heaven and Earth than is dreamt of in classical theories of computation.

5. Conclusion

Paraconsistency may be minimally construed as the doctrine that not everything is true, even if some contradictions are. Most paraconsistent logicians subscribe to views on the milder end of the spectrum; most paraconsistent logicians are actually much more conservative than a slur like Quineโ€™s โ€˜deviant logicianโ€™ might suggest. On the other hand, taking paraconsistency seriously means on some level taking inconsistency seriously, something that a classically minded person will not do. It has therefore been thought that, insofar as true inconsistency is an unwelcome thoughtโ€”mad, bad, and dangerous to knowโ€”paraconsistency might be some kind of gateway to darker doctrines. After all, once one has come to rational grips with the idea that inconsistent data may still make sense, what, really, stands in the way of inconsistent data being true? This has been called the slippery slope from weak to strong paraconsistency. Note that the slippery slope, while proposed as an attractive thought by those more inclined to strong paraconsistency, could seem to go even further, away from paraconsistency completely and toward the insane idea of trivialism: that everything really is true. That is, contradictions obtain, but explosion is also still valid. Why not?

No one, paraconsistentist or otherwise, is a trivialist. Nor is paraconsistency an invitation to trivilalism, even if it is a temptation to dialetheism. By analogy, when Hume pointed out that we cannot be certain that the sun will rise tomorrow, no one became seriously concerned about the possibility. But people did begin to wonder about the necessity of the โ€˜laws of natureโ€™, and no one now can sit as comfortably as before Hume awoke us from our dogmatic slumber. So too with paraconsistent logic. In one sense, paraconsistent logics can do much more than classical logics. But in studying paraconsistency, especially strong paraconsistency closer to the dialetheic end of the spectrum, we see that there are many things logic cannot do. Logic alone cannot tell us what is true or false. Simply writing down the syntactic marking โ€˜Aโ€™ does nothing to show us that A cannot be false, even if A is a theorem. There is no absolute safeguard. Defending consistency, or denying the absurdity of trivialism, is ultimately not the job of logic alone. Affirming coherence and denying absurdity is an act, a job for human beings.

6. References and Further Reading

Itโ€™s a little dated, but the โ€˜bibleโ€™ of paraconsistency is still the first big collection on the topic:

  • Priest, G., Routley, R. & Norman, J. eds. (1989). Paraconsistent Logic: Essays on the Inconsistent. Philosophia Verlag.

This covers most of the known systems, including discussive and adaptive logic, with original papers by the founders. It also has extensive histories of paraconsistent logic and philosophy, and a paper by the Routleys on moral dilemmas. For more recent work, see also

  • Batens, D., Mortensen, C., Priest, G., & van Bendegem, J.-P. eds. (2000). Frontiers of Paraconsistent Logic. Kluwer.
  • Berto, F. and Mares, E., Paoli, F., and Tanaka, K. eds. (2013). The Fourth World Congress on Paraconsistency, Springer.

A roundabout philosophical introduction to non-classical logics, including paraconsistency, is in

  • Beall, JC and Restall, Greg (2006). Logical Pluralism. Oxford University Press.

Philosophical introductions to strong paraconsistency:

  • Priest, Graham (2006). In Contradiction: A Study of the Transconsistent. Oxford University Press. Second edition.
  • Priest, Graham (2006). Doubt Truth to be a Liar. Oxford University Press.
  • Berto, Francesco (2007). How to Sell a Contradiction. Studies in Logic vol. 6. College Publications.

More philosophical debate about strong paraconsistency is in the excellent collection

  • Preist, G., Beall, JC and Armour-Garb, B. eds. (2004). The Law of Non-Contradiction. Oxford University Press.

For the technical how-to of paraconsistent logics:

  • Beall, JC and van Frassen, Bas (2003). Possibilities and Paradox: An Introduction to Modal and Many-Valued Logics. Oxford University Press.
  • Gabbay, Dov M. & Gรผnthner, F. eds. (2002). Handbook of Philosophical Logic. Second edition, vol. 6, Kluwer.
  • Priest, Graham (2008). An Introduction to Non-Classical Logic. Cambridge University Press. Second edition.

For a recent introduction to preservationism, see

  • Schotch, P., Brown, B. and Jennings, R. eds. (2009). On Preserving: Essays on Preservationism and Paraconsistent Logic. University of Toronto Press.
  • Brown, Bryson and Priest, Graham (2004). โ€œChunk and Permeate I: The Infinitesimal Calculus.โ€ Journal of Philosophical Logic 33, pp. 379โ€“88.

Logics of formal inconsistency:

  • W. A. Carnielli and J. Marcos. A taxonomy of C- systems. In Paraconsistency: the Logical Way to the Inconsistent, Lecture Notes in Pure and Applied Mathematics, Vol. 228, pp. 01โ€“94, 2002.
  • W. A. Carnielli, M. E. Coniglio and J. Marcos. Logics of Formal Inconsistency. In Handbook of Philosophical Logic, vol. 14, pp. 15โ€“107. Eds.: D. Gabbay; F. Guenthner. Springer, 2007.
  • da Costa, Newton C. A. (1974). โ€œOn the Theory of Inconsistent Formal Systems.โ€ Notre Dame Journal of Formal Logic 15, pp. 497โ€“510.
  • da Costa, Newton C. A. (2000). Paraconsistent Mathematics. In Batens et al. (2000), pp. 165โ€“180.
  • da Costa, Newton C. A., Krause, Dรฉcio & Bueno, Otรกvio (2007). โ€œParaconsistent Logics and Paraconsistency.โ€ In Jacquette, D. ed. Philosophy of Logic (Handbook of the Philosophy of Science), North-Holland, pp. 791โ€“912.

Relevant logics:

  • Anderson, A. R. and Belnap, N. D., Jr. (1975). Entailment: The Logic of Relevance and Necessity. Princeton University Press, vol. I.
  • Mares, E. D. (2004). Relevant Logic: A Philosophical Interpretation. Cambridge University Press.

The implications of Gรถdelโ€™s theorems:

  • Berto, Francesco (2009). Thereโ€™s Something About Gรถdel. Wiley-Blackwell.

Belief revision:

  • Tanaka, Koji (2005). โ€œThe AGM Theory and Inconsistent Belief Change.โ€ Logique et Analyse 189โ€“92, pp. 113โ€“50.

Artificial Intelligence:

  • Copeland, B. J. and Sylvan, R. (1999). โ€œBeyond the Universal Turing Machine.โ€ Australasian Journal of Philosophy 77, pp. 46โ€“66.
  • Sylvan, Richard (2000). Sociative Logics and their Applications. Priest, G. and Hyde, D. eds. Ashgate.

Moral dilemmas:

  • Bohse, Helen (2005). โ€œA Paraconsistent Solution to the Problem of Moral Dilemmas.โ€ South African Journal of Philosophy 24, pp. 77โ€“86.
  • Routley, R. and Plumwood, V. (1989). โ€œMoral Dilemmas and the Logic of Deontic Notions.โ€ In Priest et al. 1989, 653โ€“690.
  • Weber, Zach (2007). โ€œOn Paraconsistent Ethics.โ€ South African Journal of Philosophy 26, pp. 239โ€“244.

Other works cited:

  • Colyvan, Mark (2008). โ€œWhoโ€™s Afraid of Inconsistent Mathematics?โ€ Protosociology 25, pp. 24โ€“35. Reprinted in G. Preyer and G. Peter eds. Philosophy of Mathematics: Set Theory, Measuring Theories and Nominalism, Frankfurt: Verlag, 2008, pp. 28โ€“39.
  • Hume, David (1740). A Treatise of Human Nature, ed. L. A. Selby-Bigge. Second edition 1978. Oxford: Clarendon Press.

Author Information

Zach Weber
Email: [email protected]
University of Melbourne
Australia

Email: [email protected]
University of Sydney
Australia

logicmoo.base.examples.fol.KIF_SANITY_01 JUnit

(cd /var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol ; timeout --foreground --preserve-status -s SIGKILL -k 10s 10s swipl -x /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-clif -t "['kif_sanity_01.pfc.pl']")

% EDIT: https://github.com/logicmoo/logicmoo_workspace/edit/master/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl
% JENKINS: https://jenkins.logicmoo.org/job/logicmoo_workspace/lastBuild/testReport/logicmoo.base.examples.fol/KIF_SANITY_01/
% ISSUE_SEARCH: https://github.com/logicmoo/logicmoo_workspace/issues?q=is%3Aissue+label%3AKIF_SANITY_01
% ISSUE: #68

%~ init_phase(after_load)
%~ init_phase(restore_state)
%
%~ init_why(after_boot,program)
%~ after_boot.
%~ Dont forget to ?- logicmoo_i_cyc_xform.
running('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl'),
%~ this_test_might_need( :-( use_module( library(logicmoo_plarkc))))



:- discontiguous kif_sanity_test_0/0.


/*~
~*/



kif_sanity_test_0:- kif_test(
"
% )
tell.

all(R,room(R) => exists(D, (door(D) & has(R,D)))).
room(room1).

ask.

room(What).

door(What).

:- kif_add(a(XX) & b(XX) => c(XX)).
:- kif_add(all(R,room(R) => exists(D, (door(D) & has(R,D))))).
:- kif_add(loves(Child,fatherFn(Child))).
:- kif_add((p => q)).
:- kif_add(~p <gt;=> ~q).
:- kif_add(p <gt;=> q).
:- kif_add(all(P, person(P) => -exists(D, dollar(D) & has(P,D)))).

:- kif_add(go(sam) & (go(bill) v go(sally) ) & go(nancy)).

:- kif_add(rains_tuesday => wear_rain_gear xor carry_umbrella).
:- kif_add(exists(P, (person(P) & all(C, car(C) => ~has(P,C))))).

/*
:- kif_add(room(R) => exists(D, (door(D) & has(R,D)))).
:- kif_add((goes(jane) xor goes(sandra) => goes(bill))).
:- kif_add(exists(P, exists(C, (person(P) & car(C) & has(P,C))))).
:- kif_add(~all(P,person(P) => exists(C, car(C) & has(P,C)))).
:- kif_add((go(sam) & go(bill)) v (go(sally) & go(nancy))).
:- kif_add(go(sam) & (go(bill) v go(sally) ) & go(nancy)).
:- kif_add(exists(C, course(C) & exists(MT1, midterm(C,MT1) & exists(MT2, midterm(C,MT2) & different(MT1,MT2))))).
:- kif_add(exists(C, course(C) & ~exists(MT3, midterm(C,MT3)))).
*/

"
).


/*~
%~ message_hook_type(error)
%~ message_hook(
%~    error(
%~       permission_error(modify,static_procedure,baseKB:kif_sanity_test_0/0),
%~       context(system:assertz/1,Context_Kw)),
%~    error,
%~    [ '~q/~w: '-[assertz,1],
%~      'No permission to ~w static procedure `~p\'' - [ modify,
%~                                                       baseKB : kif_sanity_test_0/0]])
assertz/1: No permission to modify static procedure `baseKB:(kif_sanity_test_0/0)'
ERROR: assertz/1: No permission to modify static procedure `baseKB:(kif_sanity_test_0/0)'
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl:46 
%~ message_hook_type(warning)
%~ message_hook(
%~    goal_failed( directive,
%~      baseKB : kif_sanity_test_0 :- kif_test("\n% )\ntell.\n\nall(R,room(R) => exists(D, (door(D) & has(R,D)))).\nroom(room1).\n\nask.\n\nroom(What).\n\ndoor(What).\n\n:- kif_add(a(XX) & b(XX) => c(XX)).\n:- kif_add(all(R,room(R) => exists(D, (door(D) & has(R,D))))).\n:- kif_add(loves(Child,fatherFn(Child))).\n:- kif_add((p => q)).\n:- kif_add(~p <gt;=> ~q).\n:- kif_add(p <gt;=> q).\n:- kif_add(all(P, person(P) => -exists(D, dollar(D) & has(P,D)))).\n\n:- kif_add(go(sam) & (go(bill) v go(sally) ) & go(nancy)).\n\n:- kif_add(rains_tuesday => wear_rain_gear xor carry_umbrella).\n:- kif_add(exists(P, (person(P) & all(C, car(C) => ~has(P,C))))).\n\n/*\n:- kif_add(room(R) => exists(D, (door(D) & has(R,D)))).\n:- kif_add((goes(jane) xor goes(sandra) => goes(bill))).\n:- kif_add(exists(P, exists(C, (person(P) & car(C) & has(P,C))))).\n:- kif_add(~all(P,person(P) => exists(C, car(C) & has(P,C)))).\n:- kif_add((go(sam) & go(bill)) v (go(sally) & go(nancy))).\n:- kif_add(go(sam) & (go(bill) v go(sally) ) & go(nancy)).\n:- kif_add(exists(C, course(C) & exists(MT1, midterm(C,MT1) & exists(MT2, midterm(C,MT2) & different(MT1,MT2))))).\n:- kif_add(exists(C, course(C) & ~exists(MT3, midterm(C,MT3)))).\n*/\n\n")),
%~    warning,
%~    [ 'Goal (~w) failed: ~p' - [ directive,
%~                                 baseKB : kif_sanity_test_0 :- kif_test("\n% )\ntell.\n\nall(R,room(R) => exists(D, (door(D) & has(R,D)))).\nroom(room1).\n\nask.\n\nroom(What).\n\ndoor(What).\n\n:- kif_add(a(XX) & b(XX) => c(XX)).\n:- kif_add(all(R,room(R) => exists(D, (door(D) & has(R,D))))).\n:- kif_add(loves(Child,fatherFn(Child))).\n:- kif_add((p => q)).\n:- kif_add(~p <gt;=> ~q).\n:- kif_add(p <gt;=> q).\n:- kif_add(all(P, person(P) => -exists(D, dollar(D) & has(P,D)))).\n\n:- kif_add(go(sam) & (go(bill) v go(sally) ) & go(nancy)).\n\n:- kif_add(rains_tuesday => wear_rain_gear xor carry_umbrella).\n:- kif_add(exists(P, (person(P) & all(C, car(C) => ~has(P,C))))).\n\n/*\n:- kif_add(room(R) => exists(D, (door(D) & has(R,D)))).\n:- kif_add((goes(jane) xor goes(sandra) => goes(bill))).\n:- kif_add(exists(P, exists(C, (person(P) & car(C) & has(P,C))))).\n:- kif_add(~all(P,person(P) => exists(C, car(C) & has(P,C)))).\n:- kif_add((go(sam) & go(bill)) v (go(sally) & go(nancy))).\n:- kif_add(go(sam) & (go(bill) v go(sally) ) & go(nancy)).\n:- kif_add(exists(C, course(C) & exists(MT1, midterm(C,MT1) & exists(MT2, midterm(C,MT2) & different(MT1,MT2))))).\n:- kif_add(exists(C, course(C) & ~exists(MT3, midterm(C,MT3)))).\n*/\n\n")]])
Goal (directive) failed: baseKB:must_kif_process((kif_sanity_test_0:-kif_test(
% )
tell.

all(R,room(R) => exists(D, (door(D) & has(R,D)))).
room(room1).

ask.

room(What).

door(What).

:- kif_add(a(XX) & b(XX) => c(XX)).
:- kif_add(all(R,room(R) => exists(D, (door(D) & has(R,D))))).
:- kif_add(loves(Child,fatherFn(Child))).
:- kif_add((p => q)).
:- kif_add(~p <gt;=> ~q).
:- kif_add(p <gt;=> q).
:- kif_add(all(P, person(P) => -exists(D, dollar(D) & has(P,D)))).

:- kif_add(go(sam) & (go(bill) v go(sally) ) & go(nancy)).

:- kif_add(rains_tuesday => wear_rain_gear xor carry_umbrella).
:- kif_add(exists(P, (person(P) & all(C, car(C) => ~has(P,C))))).

/*
:- kif_add(room(R) => exists(D, (door(D) & has(R,D)))).
:- kif_add((goes(jane) xor goes(sandra) => goes(bill))).
:- kif_add(exists(P, exists(C, (person(P) & car(C) & has(P,C))))).
:- kif_add(~all(P,person(P) => exists(C, car(C) & has(P,C)))).
:- kif_add((go(sam) & go(bill)) v (go(sally) & go(nancy))).
:- kif_add(go(sam) & (go(bill) v go(sally) ) & go(nancy)).
:- kif_add(exists(C, course(C) & exists(MT1, midterm(C,MT1) & exists(MT2, midterm(C,MT2) & different(MT1,MT2))))).
:- kif_add(exists(C, course(C) & ~exists(MT3, midterm(C,MT3)))).
*/

)))
Warning: Goal (directive) failed: baseKB:must_kif_process((kif_sanity_test_0:-kif_test(
% )
tell.

all(R,room(R) => exists(D, (door(D) & has(R,D)))).
room(room1).

ask.

room(What).

door(What).

:- kif_add(a(XX) & b(XX) => c(XX)).
:- kif_add(all(R,room(R) => exists(D, (door(D) & has(R,D))))).
:- kif_add(loves(Child,fatherFn(Child))).
:- kif_add((p => q)).
:- kif_add(~p <gt;=> ~q).
:- kif_add(p <gt;=> q).
:- kif_add(all(P, person(P) => -exists(D, dollar(D) & has(P,D)))).

:- kif_add(go(sam) & (go(bill) v go(sally) ) & go(nancy)).

:- kif_add(rains_tuesday => wear_rain_gear xor carry_umbrella).
:- kif_add(exists(P, (person(P) & all(C, car(C) => ~has(P,C))))).

/*
:- kif_add(room(R) => exists(D, (door(D) & has(R,D)))).
:- kif_add((goes(jane) xor goes(sandra) => goes(bill))).
:- kif_add(exists(P, exists(C, (person(P) & car(C) & has(P,C))))).
:- kif_add(~all(P,person(P) => exists(C, car(C) & has(P,C)))).
:- kif_add((go(sam) & go(bill)) v (go(sally) & go(nancy))).
:- kif_add(go(sam) & (go(bill) v go(sally) ) & go(nancy)).
:- kif_add(exists(C, course(C) & exists(MT1, midterm(C,MT1) & exists(MT2, midterm(C,MT2) & different(MT1,MT2))))).
:- kif_add(exists(C, course(C) & ~exists(MT3, midterm(C,MT3)))).
*/

)))
~*/



/*
:- told.
:- dmsg_show(_).
:- dmsg("i see this").
:- kif_add(exists(C, course(C) & ~exists(MT3, midterm(C,MT3)))).
:- set_no_debug.
:- notrace.
:- nodebug.

:- wdmsg("we see this").

:- kif_add((p => q)).
:- kif_add(~p <gt;=> ~q).
:- kif_add(tRoom(R) => exists(D, (tDoor(D) & has(R,D)))).
:- kif_add(all(P, person(P) => ~(exists(D, dollar(D) & has(P,D))))).
:- kif_add(p <gt;=> q).
:- kif_add(all(P, person(P) => exists(D, dollar(D) & has(P,D)))).
*/

kif_sanity_test_0:-kif_test(all(R, exists(D, room(R) => (door(D) & has(R,D))))).

/*~
%~ message_hook_type(error)
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl:68 
%~ message_hook(
%~    error(
%~       permission_error(modify,static_procedure,baseKB:kif_sanity_test_0/0),
%~       context(system:assertz/1,Context_Kw)),
%~    error,
%~    [ '~q/~w: '-[assertz,1],
%~      'No permission to ~w static procedure `~p\'' - [ modify,
%~                                                       baseKB : kif_sanity_test_0/0]])
assertz/1: No permission to modify static procedure `baseKB:(kif_sanity_test_0/0)'
ERROR: assertz/1: No permission to modify static procedure `baseKB:(kif_sanity_test_0/0)'
%~ message_hook_type(warning)
%~ message_hook(
%~    goal_failed( directive,
%~      baseKB : kif_sanity_test_0 :- kif_test( all(R,exists(D,room(R)=>(door(D)&has(R,D)))))),
%~    warning,
%~    [ 'Goal (~w) failed: ~p' - [ directive,
%~                                 baseKB : kif_sanity_test_0 :- kif_test( all(R,exists(D,room(R)=>(door(D)&has(R,D)))))]])
Goal (directive) failed: baseKB:must_kif_process((kif_sanity_test_0:-kif_test(all(_536,exists(_540,room(_536)=>(door(_540)&has(_536,_540)))))))
Warning: Goal (directive) failed: baseKB:must_kif_process((kif_sanity_test_0:-kif_test(all(_536,exists(_540,room(_536)=>(door(_540)&has(_536,_540)))))))
~*/


kif_sanity_test_0:-kif_test(p(A,R) & q(A,R)).


/*~
%~ message_hook_type(error)
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl:70 
%~ message_hook(
%~    error(
%~       permission_error(modify,static_procedure,baseKB:kif_sanity_test_0/0),
%~       context(system:assertz/1,Context_Kw)),
%~    error,
%~    [ '~q/~w: '-[assertz,1],
%~      'No permission to ~w static procedure `~p\'' - [ modify,
%~                                                       baseKB : kif_sanity_test_0/0]])
assertz/1: No permission to modify static procedure `baseKB:(kif_sanity_test_0/0)'
ERROR: assertz/1: No permission to modify static procedure `baseKB:(kif_sanity_test_0/0)'
%~ message_hook_type(warning)
%~ message_hook(
%~    goal_failed( directive,
%~      baseKB : kif_sanity_test_0 :- kif_test( p(A,R)&q(A,R))),
%~    warning,
%~    [ 'Goal (~w) failed: ~p' - [ directive,
%~                                 baseKB : kif_sanity_test_0 :- kif_test( p(A,R)&q(A,R))]])
Goal (directive) failed: baseKB:must_kif_process((kif_sanity_test_0:-kif_test(p(_496,_500)&q(_496,_500))))
Warning: Goal (directive) failed: baseKB:must_kif_process((kif_sanity_test_0:-kif_test(p(_496,_500)&q(_496,_500))))
~*/



kif_sanity_test_0:- 
  kif_result((==>(mdefault((room(R) => {D = skIsDoorInRoomArg2ofHasFn(R)},has(R,D) & door(D)))))).



% kif_sanity_test_0:- kif_test(loves(fatherFn(Child),Child)).


% :- prolog.
%:- must(((kif_test(isa(F,tPred) => exists(A, (isa(A,ftInt) & arity(F,A))))))).

/*~
%~ warn( db_expand_0( clause(unknown,cuz),
%~         kif_sanity_test_0 :- kif_result( ==>( mdefault( ( room(R) =>
%~                                                           {D=skIsDoorInRoomArg2ofHasFn(R)},has(R,D)&door(D))))),
%~         kif_sanity_test_0 :- kif_result( mdefault( ( room(R) =>
%~                                                      {D=skIsDoorInRoomArg2ofHasFn(R)},has(R,D)&door(D))))))
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl:74 
%~ message_hook_type(error)
%~ message_hook(
%~    error(
%~       permission_error(modify,static_procedure,baseKB:kif_sanity_test_0/0),
%~       context(system:assertz/1,Context_Kw)),
%~    error,
%~    [ '~q/~w: '-[assertz,1],
%~      'No permission to ~w static procedure `~p\'' - [ modify,
%~                                                       baseKB : kif_sanity_test_0/0]])
assertz/1: No permission to modify static procedure `baseKB:(kif_sanity_test_0/0)'
ERROR: assertz/1: No permission to modify static procedure `baseKB:(kif_sanity_test_0/0)'
%~ message_hook_type(warning)
%~ message_hook(
%~    goal_failed( directive,
%~      baseKB : kif_sanity_test_0 :- kif_result( mdefault( ( room(R) =>
%~                                                            {D=skIsDoorInRoomArg2ofHasFn(R)},has(R,D)&door(D))))),
%~    warning,
%~    [ 'Goal (~w) failed: ~p' - [ directive,
%~                                 baseKB : kif_sanity_test_0 :- kif_result( mdefault( ( room(R) =>
%~                                                                                       {D=skIsDoorInRoomArg2ofHasFn(R)},has(R,D)&door(D))))]])
Goal (directive) failed: baseKB:must_kif_process((kif_sanity_test_0:-kif_result(mdefault(room(_626)=>({_630=skIsDoorInRoomArg2ofHasFn(_626)},has(_626,_630)&door(_630))))))
Warning: Goal (directive) failed: baseKB:must_kif_process((kif_sanity_test_0:-kif_result(mdefault(room(_626)=>({_630=skIsDoorInRoomArg2ofHasFn(_626)},has(_626,_630)&door(_630))))))
~*/




% kif_sanity_test_0:- kif_test(loves(fatherFn(Child),Child)).


% :- prolog.
%:- must(((kif_test(isa(F,tPred) => exists(A, (isa(A,ftInt) & arity(F,A))))))).

kif_sanity_test_0 :- nop(( kif_result(
(==> mdefault((
   tPred(F) ==> 
      {A = skIsIntInPredArg2ofArityFn(F)},arity(F,A) & ftInt(A))
 ))))).      


/*~
%~ warn( db_expand_0( clause(unknown,cuz),
%~         kif_sanity_test_0 :- nop( kif_result( ==>( mdefault( ( tPred(F) ==>
%~                                                                {A=skIsIntInPredArg2ofArityFn(F)},arity(F,A)&ftInt(A)))))),
%~         kif_sanity_test_0 :- nop( kif_result( mdefault( ( tPred(F) ==>
%~                                                           {A=skIsIntInPredArg2ofArityFn(F)},arity(F,A)&ftInt(A)))))))
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl:88 
%~ message_hook_type(error)
%~ message_hook(
%~    error(
%~       permission_error(modify,static_procedure,baseKB:kif_sanity_test_0/0),
%~       context(system:assertz/1,Context_Kw)),
%~    error,
%~    [ '~q/~w: '-[assertz,1],
%~      'No permission to ~w static procedure `~p\'' - [ modify,
%~                                                       baseKB : kif_sanity_test_0/0]])
assertz/1: No permission to modify static procedure `baseKB:(kif_sanity_test_0/0)'
ERROR: assertz/1: No permission to modify static procedure `baseKB:(kif_sanity_test_0/0)'
%~ message_hook_type(warning)
%~ message_hook(
%~    goal_failed( directive,
%~      baseKB : kif_sanity_test_0 :- nop( kif_result( mdefault( ( tPred(F) ==>
%~                                                                 {A=skIsIntInPredArg2ofArityFn(F)},arity(F,A)&ftInt(A)))))),
%~    warning,
%~    [ 'Goal (~w) failed: ~p' - [ directive,
%~                                 baseKB : kif_sanity_test_0 :- nop( kif_result( mdefault( ( tPred(F) ==>
%~                                                                                            {A=skIsIntInPredArg2ofArityFn(F)},arity(F,A)&ftInt(A)))))]])
Goal (directive) failed: baseKB:must_kif_process((kif_sanity_test_0:-nop(kif_result(mdefault((tPred(_638)==>{_642=skIsIntInPredArg2ofArityFn(_638)},arity(_638,_642)&ftInt(_642)))))))
Warning: Goal (directive) failed: baseKB:must_kif_process((kif_sanity_test_0:-nop(kif_result(mdefault((tPred(_638)==>{_642=skIsIntInPredArg2ofArityFn(_638)},arity(_638,_642)&ftInt(_642)))))))
%~ message_hook_type(error)
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl:91 
%~ message_hook(
%~    error( syntax_error(operator_expected),
%~      file('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl',91,27,2267)),
%~    error,
%~    [ '~w:~d:~d: '-['/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl',91,27], 'Syntax error: ','Operator expected'])
%~ source_location('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl',91)
/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl:91:27: Syntax error: Operator expected
ERROR: /var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl:91:27: Syntax error: Operator expected
%~ message_hook_type(error)
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl:93 
%~ message_hook(
%~    error( syntax_error(operator_expected),
%~      file('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl',93,28,2363)),
%~    error,
%~    [ '~w:~d:~d: '-['/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl',93,28], 'Syntax error: ','Operator expected'])
%~ source_location('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl',93)
/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl:93:28: Syntax error: Operator expected
ERROR: /var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl:93:28: Syntax error: Operator expected
%~ message_hook_type(error)
%~ message_hook(
%~    error( syntax_error(operator_expected),
%~      file('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl',96,28,2470)),
%~    error,
%~    [ '~w:~d:~d: '-['/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl',96,28], 'Syntax error: ','Operator expected'])
%~ source_location('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl',96)
/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl:96:28: Syntax error: Operator expected
ERROR: /var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl:96:28: Syntax error: Operator expected
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl:97 
%~ message_hook_type(error)
%~ message_hook(
%~    error( syntax_error(operator_expected),
%~      file('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl',97,28,2638)),
%~    error,
%~    [ '~w:~d:~d: '-['/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl',97,28], 'Syntax error: ','Operator expected'])
%~ source_location('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl',97)
/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl:97:28: Syntax error: Operator expected
ERROR: /var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl:97:28: Syntax error: Operator expected
%~ message_hook_type(error)
%~ message_hook(
%~    error( syntax_error(operator_expected),
%~      file('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl',100,28,2822)),
%~    error,
%~    [ '~w:~d:~d: '-['/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl',100,28], 'Syntax error: ','Operator expected'])
%~ source_location('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl',100)
/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl:100:28: Syntax error: Operator expected
ERROR: /var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl:100:28: Syntax error: Operator expected
%~ message_hook_type(error)
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl:103 
%~ message_hook(
%~    error( syntax_error(operator_expected),
%~      file('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl',103,28,3007)),
%~    error,
%~    [ '~w:~d:~d: '-['/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl',103,28], 'Syntax error: ','Operator expected'])
%~ source_location('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl',103)
/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl:103:28: Syntax error: Operator expected
ERROR: /var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl:103:28: Syntax error: Operator expected
%~ message_hook_type(error)
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl:107 
%~ message_hook(
%~    error( syntax_error(operator_expected),
%~      file('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl',107,28,3185)),
%~    error,
%~    [ '~w:~d:~d: '-['/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl',107,28], 'Syntax error: ','Operator expected'])
%~ source_location('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl',107)
/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl:107:28: Syntax error: Operator expected
ERROR: /var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl:107:28: Syntax error: Operator expected
%~ message_hook_type(error)
%~ message_hook(
%~    error( syntax_error(operator_expected),
%~      file('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl',111,28,3268)),
%~    error,
%~    [ '~w:~d:~d: '-['/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl',111,28], 'Syntax error: ','Operator expected'])
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl:111 
%~ source_location('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl',111)
/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl:111:28: Syntax error: Operator expected
ERROR: /var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl:111:28: Syntax error: Operator expected
%~ message_hook_type(error)
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl:115 
%~ message_hook(
%~    error( syntax_error(operator_expected),
%~      file('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl',115,28,3353)),
%~    error,
%~    [ '~w:~d:~d: '-['/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl',115,28], 'Syntax error: ','Operator expected'])
%~ source_location('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl',115)
/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl:115:28: Syntax error: Operator expected
ERROR: /var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl:115:28: Syntax error: Operator expected
%~ message_hook_type(error)
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl:119 
%~ message_hook(
%~    error( syntax_error(operator_expected),
%~      file('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl',119,28,3439)),
%~    error,
%~    [ '~w:~d:~d: '-['/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl',119,28], 'Syntax error: ','Operator expected'])
%~ source_location('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl',119)
/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl:119:28: Syntax error: Operator expected
ERROR: /var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl:119:28: Syntax error: Operator expected
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl:123 
%~ message_hook_type(error)
%~ message_hook(
%~    error( syntax_error(operator_expected),
%~      file('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl',123,28,3527)),
%~    error,
%~    [ '~w:~d:~d: '-['/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl',123,28], 'Syntax error: ','Operator expected'])
%~ source_location('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl',123)
/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl:123:28: Syntax error: Operator expected
ERROR: /var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl:123:28: Syntax error: Operator expected
%~ message_hook_type(error)
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl:151 
%~ message_hook(
%~    error( syntax_error(operator_expected),
%~      file('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl',151,28,4694)),
%~    error,
%~    [ '~w:~d:~d: '-['/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl',151,28], 'Syntax error: ','Operator expected'])
%~ source_location('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl',151)
/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl:151:28: Syntax error: Operator expected
ERROR: /var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl:151:28: Syntax error: Operator expected
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl:163 
%~ message_hook_type(error)
%~ message_hook(
%~    error( syntax_error(operator_expected),
%~      file('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl',163,28,5051)),
%~    error,
%~    [ '~w:~d:~d: '-['/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl',163,28], 'Syntax error: ','Operator expected'])
%~ source_location('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl',163)
/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl:163:28: Syntax error: Operator expected
ERROR: /var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl:163:28: Syntax error: Operator expected
%~ message_hook_type(error)
%~ message_hook(
%~    error( syntax_error(operator_expected),
%~      file('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl',177,28,5512)),
%~    error,
%~    [ '~w:~d:~d: '-['/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl',177,28], 'Syntax error: ','Operator expected'])
%~ source_location('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl',177)
/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl:177:28: Syntax error: Operator expected
ERROR: /var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl:177:28: Syntax error: Operator expected
%~ message_hook_type(error)
%~ message_hook(
%~    error( syntax_error(operator_expected),
%~      file('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl',186,28,5721)),
%~    error,
%~    [ '~w:~d:~d: '-['/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl',186,28], 'Syntax error: ','Operator expected'])
%~ source_location('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl',186)
/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl:186:28: Syntax error: Operator expected
ERROR: /var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl:186:28: Syntax error: Operator expected
%~ message_hook_type(error)
%~ message_hook(
%~    error( syntax_error(operator_expected),
%~      file('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl',196,28,6022)),
%~    error,
%~    [ '~w:~d:~d: '-['/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl',196,28], 'Syntax error: ','Operator expected'])
%~ source_location('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl',196)
/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl:196:28: Syntax error: Operator expected
ERROR: /var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl:196:28: Syntax error: Operator expected
%~ message_hook_type(error)
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl:200 
%~ message_hook(
%~    error( syntax_error(operator_expected),
%~      file('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl',200,28,6228)),
%~    error,
%~    [ '~w:~d:~d: '-['/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl',200,28], 'Syntax error: ','Operator expected'])
%~ source_location('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl',200)
/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl:200:28: Syntax error: Operator expected
ERROR: /var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl:200:28: Syntax error: Operator expected
%~ message_hook_type(error)
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl:206 
%~ message_hook(
%~    error( syntax_error(operator_expected),
%~      file('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl',206,28,6491)),
%~    error,
%~    [ '~w:~d:~d: '-['/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl',206,28], 'Syntax error: ','Operator expected'])
%~ source_location('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl',206)
/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl:206:28: Syntax error: Operator expected
ERROR: /var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl:206:28: Syntax error: Operator expected
%~ message_hook_type(error)
%~ message_hook(
%~    error( syntax_error(operator_expected),
%~      file('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl',214,28,6690)),
%~    error,
%~    [ '~w:~d:~d: '-['/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl',214,28], 'Syntax error: ','Operator expected'])
%~ source_location('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl',214)
/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl:214:28: Syntax error: Operator expected
ERROR: /var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl:214:28: Syntax error: Operator expected
%~ message_hook_type(error)
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl:223 
%~ message_hook(
%~    error( syntax_error(operator_expected),
%~      file('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl',223,28,6912)),
%~    error,
%~    [ '~w:~d:~d: '-['/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl',223,28], 'Syntax error: ','Operator expected'])
%~ source_location('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl',223)
/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl:223:28: Syntax error: Operator expected
ERROR: /var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl:223:28: Syntax error: Operator expected
%~ message_hook_type(error)
%~ message_hook(
%~    error( syntax_error(operator_expected),
%~      file('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl',234,28,7257)),
%~    error,
%~    [ '~w:~d:~d: '-['/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl',234,28], 'Syntax error: ','Operator expected'])
%~ source_location('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl',234)
/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl:234:28: Syntax error: Operator expected
ERROR: /var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl:234:28: Syntax error: Operator expected
%~ message_hook_type(error)
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl:242 
%~ message_hook(
%~    error( syntax_error(operator_expected),
%~      file('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl',242,28,7467)),
%~    error,
%~    [ '~w:~d:~d: '-['/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl',242,28], 'Syntax error: ','Operator expected'])
%~ source_location('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl',242)
/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl:242:28: Syntax error: Operator expected
ERROR: /var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl:242:28: Syntax error: Operator expected
%~ message_hook_type(error)
%~ message_hook(
%~    error( syntax_error(operator_expected),
%~      file('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl',253,28,7809)),
%~    error,
%~    [ '~w:~d:~d: '-['/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl',253,28], 'Syntax error: ','Operator expected'])
%~ source_location('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl',253)
/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl:253:28: Syntax error: Operator expected
ERROR: /var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl:253:28: Syntax error: Operator expected
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl:270 
%~ message_hook_type(error)
%~ message_hook(
%~    error( syntax_error(operator_expected),
%~      file('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl',270,28,8399)),
%~    error,
%~    [ '~w:~d:~d: '-['/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl',270,28], 'Syntax error: ','Operator expected'])
%~ source_location('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl',270)
/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl:270:28: Syntax error: Operator expected
ERROR: /var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl:270:28: Syntax error: Operator expected
%~ message_hook_type(error)
%~ message_hook(
%~    error( syntax_error(operator_expected),
%~      file('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl',296,28,9554)),
%~    error,
%~    [ '~w:~d:~d: '-['/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl',296,28], 'Syntax error: ','Operator expected'])
%~ source_location('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl',296)
/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl:296:28: Syntax error: Operator expected
ERROR: /var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl:296:28: Syntax error: Operator expected
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl:308 
%~ message_hook_type(error)
%~ message_hook(
%~    error( syntax_error(operator_expected),
%~      file('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl',308,28,9767)),
%~    error,
%~    [ '~w:~d:~d: '-['/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl',308,28], 'Syntax error: ','Operator expected'])
%~ source_location('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl',308)
/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl:308:28: Syntax error: Operator expected
ERROR: /var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl:308:28: Syntax error: Operator expected
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl:333 
%~ message_hook_type(error)
%~ message_hook(
%~    error( syntax_error(operator_expected),
%~      file('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl',333,28,10772)),
%~    error,
%~    [ '~w:~d:~d: '-['/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl',333,28], 'Syntax error: ','Operator expected'])
%~ source_location('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl',333)
/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl:333:28: Syntax error: Operator expected
ERROR: /var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl:333:28: Syntax error: Operator expected
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl:351 
%~ warn_undefined( baseKB : show_argtype_tests)
~*/
      


kif_sanity_test_0:-kif_test'(relationAllExists causes-EventEvent Exhibitionism VisualEvent)'.

kif_sanity_test_0:-kif_test '(relationAllExists properSubEvents Exhibitionism (DisplayingFn SexOrgan))'.


kif_sanity_test_0:-kif_test '(knows UnitedStatesOfAmerica (thereExists ?THING  (and  (assets ChevronCorporation ?THING)  (objectFoundInLocation ?THING Kazakhstan))))'.
kif_sanity_test_0:-kif_test '
(not (beliefs UnitedStatesOfAmerica (not (thereExists ?THING  (and  (assets ChevronCorporation ?THING)  (objectFoundInLocation ?THING Kazakhstan))))))
'.
kif_sanity_test_0:-kif_test '
(not (beliefs UnitedStatesOfAmerica (not (forAll ?THING  (not (and  (assets ChevronCorporation ?THING)  (objectFoundInLocation ?THING Kazakhstan)))))))
'.
kif_sanity_test_0:-kif_test '
(knows UnitedStatesOfAmerica (not (forAll ?THING  (not (and  (assets ChevronCorporation ?THING)  (objectFoundInLocation ?THING Kazakhstan))))))
'.

kif_sanity_test_0:-kif_test '
(knows UnitedStatesOfAmerica (and  KA KB KC KD))
'.

kif_sanity_test_0:-kif_test '
(beliefs UnitedStatesOfAmerica (and  BA BB BC BD))
'.

kif_sanity_test_0:-kif_test '
(knows UnitedStatesOfAmerica (or  KOA KOB KOC KOD))
'.

kif_sanity_test_0:-kif_test '
(beliefs UnitedStatesOfAmerica (or  BOA BOB BOC BOD))
'.

kif_sanity_test_0:-kif_test '
(implies 
       (and 
           (different ?THEMAN ?WOMAN) 
           (intendedMaleficiary ?CRIME ?THEMAN) 
           (deliberateActors ?CRIME ?WOMAN) 
           (behaviorCapable ?THEMAN 
               (CollectionSubsetFn Punishing 
                   (TheSetOf ?RESPONSE 
                       (maleficiary ?RESPONSE ?WOMAN))) deliberateActors)) 

       (optionAvailableToAgent-SitType ?THEMAN 
           (CollectionSubsetFn 
               (AttemptingFn Punishing) 
               (TheSetOf ?RETALIATION 
                   (and 
                       (intendedMaleficiary ?RETALIATION ?WOMAN) 
                       (purposeInEvent ?THEMAN ?RETALIATION 
                           (not 
                               (thereExists ?ANOTRACT 
                                   (and 
                                       (isa ?ANOTRACT PurposefulAction) 
                                       (startsAfterEndingOf ?ANOTRACT ?CRIME) 
                                       (maleficiary ?ANOTRACT ?THEMAN) 
                                       (deliberateActors ?ANOTRACT ?WOMAN)))))))) deliberateActors))'.

%:-prolog.

kif_sanity_test_0:-kif_test '
(implies
       (and 
           (isa ?AGREEMENT Agreement) 
           (intangibleParts ?AGREEMENT ?OBLIGATION) 
           (isa ?OBLIGATION Obligation) 
           (agreeingAgents ?AGREEMENT ?WOMAN) 
           (agentViolatesObligation ?WOMAN ?OBLIGATION)) 
       (agentViolatesAgreement ?WOMAN ?AGREEMENT))'.

% :-prolog.

kif_sanity_test_0:-kif_test '
(implies 
       (and 
           (isa ?SEEING VisualEvent) 
           (objectActedOn ?SEEING ?WOMAN) 
           (isa ?WOMAN ExhibitionistOffender) 
           (actorPartsInvolved ?SEEING ?PART-TYPE) 
           (physicalPartTypes Eyes ?PART-TYPE) 
           (performedBy ?SEEING ?THEMAN)) 
       (increases-Generic ?SIT 
           (relationExistsInstance bodilyDoer 
               Shaming ?THEMAN) probability-Generic))'.


kif_sanity_test_0:-kif_test '
(implies 
       (and 
           (isa ?ACT CriminalAct) 
           (isa ?ACT Exhibitionism) 
           (perpetrator ?ACT ?PERP)) 
       (isa ?PERP ExhibitionistOffender))'.


kif_sanity_test_0:-kif_test '
(implies 
       (and 
           (isa ?PUNISH Punishing) 
           (performedBy ?PUNISH ?THEMAN) 
           (maleficiary ?PUNISH ?WOMAN)) 
       (beliefs ?THEMAN 
           (thereExists ?OBLIGATION 
               (agentViolatesObligation ?WOMAN ?OBLIGATION))))'.

kif_sanity_test_0:-kif_test '
(implies (and (isa ?MORAL-SHAMING Shaming)  (performedBy ?MORAL-SHAMING ?THEMAN)  (obligatedAgents TheGoldenRule ?THEMAN)) (agentViolatesObligation ?THEMAN TheGoldenRule))
'.

kif_sanity_test_0:-kif_test '
(thereExists ?THEMAN (implies 
   (thereExists ?MORAL-SHAMING (and (isa ?MORAL-SHAMING Shaming) (performedBy ?MORAL-SHAMING ?THEMAN)  (obligatedAgents TheGoldenRule ?THEMAN)))
   (agentViolatesObligation ?THEMAN TheGoldenRule)))'.


kif_sanity_test_0:-kif_test '
(implies 
       (and 
           (isa ?INST1 Exhibitionism) 
           ((PresentTenseVersionFn doneBy) ?INST1 ?INST2)) 
       (isa ?INST2 ExhibitionistOffender))'.


kif_sanity_test_0:-kif_test '
(implies 
       (and 
           (isa ?MS VisualEvent) 
           (actorPartsInvolved ?MS ?MP) 
           (isa ?MP Eyes)) 
       (holdsIn ?MS 
           (portalState ?MP OpenPortal)))'.

kif_sanity_test_0:-kif_test '
(implies 
       (and 
           (performedBy ?ACT ?WOMAN)
           (isa ?ACT (DisplayingFn SexOrgan))           
           (lawProscribesActType ?LAW Exhibitionism) 
           (subjectToCOC ?WOMAN ?LAW)) 
       (and 
           (isa ?ACT Exhibitionism) 
           (agentViolatesObligation ?WOMAN ?LAW)))'.

kif_sanity_test_0:-kif_test '
(not 
       (and 
           (subjectToCOC ?SUNBATHER KeepAreolaCoveredInPublic) 
           (objectFoundInLocation ?SUNBATHER ?BEACH) 
           (isa ?BEACH ToplessBeach)))'.


kif_sanity_test_0:-kif_test '
(implies 
       (and 
           (isa ?COC LegalCode-ModernWestern) 
           (isa ?ACT Exhibitionism) 
           (subjectToCOC ?WOMAN ?COC)
           (agentViolatesObligation ?WOMAN KeepAreolaCoveredInPublic) 
           (performedBy ?ACT ?WOMAN)) 
       (ist ?COC 
           (isa ?ACT CriminalAct)))'.

kif_sanity_test_0:-kif_test '
(implies 
       (and 
           (isa ?AREOLA 
               (BodyPartCollectionFn ?WOMAN Areola)) 
           (subjectToCOC ?WOMAN KeepAreolaCoveredInPublic) 
           (locationState ?WOMAN InPublic)) 
       (thereExists ?CLOTH 
           (and 
               (or 
                   (agentViolatesObligation ?WOMAN KeepAreolaCoveredInPublic) 
                   (covers-Generic ?CLOTH ?AREOLA)) 
               (or 
                   (agentViolatesObligation ?WOMAN KeepAreolaCoveredInPublic) 
                   (wearsClothing ?WOMAN ?CLOTH)))))'.


kif_sanity_test_0:-kif_test '
(implies 
       (and 
           (different ?THEMAN ?WOMAN) 
           (intendedMaleficiary ?CRIME ?THEMAN) 
           (deliberateActors ?CRIME ?WOMAN) 
           (behaviorCapable ?THEMAN 
               (CollectionSubsetFn Punishing 
                   (TheSetOf ?RESPONSE 
                       (maleficiary ?RESPONSE ?WOMAN))) deliberateActors)) 

       (optionAvailableToAgent-SitType ?THEMAN 
           (CollectionSubsetFn 
               (AttemptingFn Punishing) 
               (TheSetOf ?RETALIATION 
                   (and 
                       (intendedMaleficiary ?RETALIATION ?WOMAN) 
                       (purposeInEvent ?THEMAN ?RETALIATION 
                           (not 
                               (thereExists ?ANOTRACT 
                                   (and 
                                       (isa ?ANOTRACT PurposefulAction) 
                                       (startsAfterEndingOf ?ANOTRACT ?CRIME) 
                                       (maleficiary ?ANOTRACT ?THEMAN) 
                                       (deliberateActors ?ANOTRACT ?WOMAN)))))))) deliberateActors))'.

kif_sanity_test_0:-kif_test '
(beliefs InternationalCommunity 
       (thereExists ?WEAP 
           (and 
               (isa ?WEAP ChemicalWeapon) 
               (possesses Israel ?WEAP))))'.




:- if(true).

kif_sanity_test_0:-kif_test '
(implies 
       (hasBeliefSystems ?WOMAN Karma) 
       (beliefs ?WOMAN 
           (implies 
               (and 
                   (isa ?MORAL-SHAMING Shaming)
                   (isa ?ANY Punishing)
                   (sinner ?MORAL-SHAMING ?THEMAN) 
                   (isa ?THEMAN 
                       (IncarnationPhysicalFn ?SOUL Organism-Whole)) 
                   (not 
                       (punishmentFor ?THEMAN ?ANY 
                           (sinner ?MORAL-SHAMING ?THEMAN)))) 
               (thereExists ?NEXTLIFE 
                   (thereExists ?PUN 
                       (and 
                           (isa ?PUN Punishing) 
                           (startsAfterEndingOf ?NEXTLIFE ?THEMAN) 
                           (isa ?NEXTLIFE 
                               (IncarnationPhysicalFn ?SOUL Organism-Whole)) 
                           (punishmentFor ?NEXTLIFE ?PUN 
                               (sinner ?MORAL-SHAMING ?THEMAN))))))))'.


kif_sanity_test_0:-kif_test '
(implies 
       (and 
           (isa ?ACTION PurposefulAction) 
           (eventOccursAt ?ACTION ?LOCATION) 
           (geographicalSubRegions ?LAND ?LOCATION) 
           (territoryOf ?COUNTRY ?LAND) 
           (isa ?COUNTRY IndependentCountry) 
           (beliefs ?COUNTRY 
               (directingAgent ?ACTION ?AGENT))) 
       (causes-SitProp ?ACTION 
           (beliefs ?COUNTRY 
               (behaviorCapable ?AGENT 
                   (CollectionSubsetFn PurposefulAction 
                       (TheSetOf ?OBJ 
                           (eventOccursAt ?OBJ ?LAND))) directingAgent))))'.

:- endif.
:- if(if_defined(show_argtype_tests)).

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% this rule ...

kif_sanity_test_0:-kif_test((   wearing(A,B)  => has(A,B)  )).

% has to qualify argument types before canicalization

kif_sanity_test_0:-  kif_test((argInst(has,1,A) & argInst(has,2,B) => (wearing(A,B) => has(A,B)))).

% Which produced this code:
%
%       has(A, B):-wearing(A, B), argInst(has, 1, A), argInst(has, 2, B).
%
%       not_wearing(A, B):- not_has(A, B), argInst(has, 1, A), argInst(has, 2, B).  % why are the last two litterals so important? 
%
%       not_argInst(has, 1, A):- not_has(A, B), wearing(A, B), argInst(has, 2, B).   % notice we can disprove types
%
%       not_argInst(has, 2, A):- not_has(B, A), wearing(B, A), argInst(has, 1, B).


%


kif_sanity_test_0:-kif_test(has(A,B) => (argInst(has, 1, A) & argInst(has, 2, B))).

%         not_has(A, _):- not_argInst(has, 1, A).
%
%         argInst(has, 1, A):-has(A, _).
%
%         not_has(_, B)):- not_argInst(has, 2, B).
%
%         argInst(has, 2, A):-has(_, A).



kif_sanity_test_0:-kif_test(has(A,B) =>  (kb_argInst(KB, has, 1, A) & kb_argInst(KB, has, 2, B))).

% BAD!
%         (( not_has(A, _)):- not_kb_argInst( _BAD, has, 1, A)).
%
%          (kb_argInst( _BAD, has, 1, A):-has(A, _)).
%
%           (( not_has(_, A)):- not_kb_argInst( _BAD ,  has, 2, A)).
%
%            (kb_argInst( _BAD, has, 2, A):-has(_, A)).



% :- prolog.
% GOOD! (the software does this for us but wanted to show the singlton in the consequent on the conjuction)

kif_sanity_test_0:-kif_test(   argInst(kb_argInst, 1 ,KB) =>  (        has(A,B) =>  (kb_argInst(KB, has, 1, A) & kb_argInst(KB, has, 2, B)))).

%     (( not_argInst(kb_argInst, 1,KB)):-has(A, _),  not_kb_argInst(KB, has, 1, A)).
%
%     (( not_has(A, _)):-argInst(kb_argInst, 1,KB),  not_kb_argInst(KB, has, 1, A)).
%
%     (kb_argInst(KB, has, 1, A):- argInst(kb_argInst, 1,KB), has(A, _)).
%
%    (( not_argInst(kb_argInst, 1,KB)):-has(_, B),  not_kb_argInst(KB, has, 2, B)).
%
%     (( not_has(_, B)):-argInst(kb_argInst, 1,KB),  not_kb_argInst(KB, has, 2, B)).
%
%    (kb_argInst(KB, has, 2, B):-argInst(kb_argInst, 1,KB), has(_, B)).

% EVEN BETTER?
kif_sanity_test_0:-kif_test(   argInst(kb_argInst, 1 ,KB) & argInst(has, 1 , A) & argInst(has, 2 , B) =>  (  has(A,B) =>  (kb_argInst(KB, has, 1, A) & kb_argInst(KB, has, 2, B)))).


%   ain= (not_has(A, B)):- not_kb_argInst(C, has, 1, A), argInst(has, 2, B), argInst(kb_argInst, 1, C), argInst(has, 1, A)).
%
%   ain= (kb_argInst(C, has, 1, A):-has(A, B), argInst(has, 2, B), argInst(kb_argInst, 1, C), argInst(has, 1, A)).
%
%   ain= (not_argInst(has, 2, A)):-has(B, A), not_kb_argInst(C, has, 1, B), argInst(kb_argInst, 1, C), argInst(has, 1, B)).
%
%   ain= (not_argInst(kb_argInst, 1, A)):-has(B, C), not_kb_argInst(A, has, 1, B), argInst(has, 2, C), argInst(has, 1, B)).
%
%   ain= (not_argInst(has, 1, A)):-has(A, B), not_kb_argInst(C, has, 1, A), argInst(has, 2, B), argInst(kb_argInst, 1, C)).
%
%   (not_has(C, A)):- not_kb_argInst(B, has, 2, A), argInst(has, 2, A), argInst(kb_argInst, 1, B), argInst(has, 1, C)).
%
%   (kb_argInst(B, has, 2, A):-has(C, A), argInst(has, 2, A), argInst(kb_argInst, 1, B), argInst(has, 1, C)).
%
%   (not_argInst(has, 2, A)):-has(C, A), not_kb_argInst(B, has, 2, A), argInst(kb_argInst, 1, B), argInst(has, 1, C)).
%
%   (not_argInst(kb_argInst, 1, A)):-has(C, B), not_kb_argInst(A, has, 2, B), argInst(has, 2, B), argInst(has, 1, C)).
%
%   (not_argInst(has, 1, A)):-has(A, B), not_kb_argInst(C, has, 2, B), argInst(has, 2, B), argInst(kb_argInst, 1, C)).


:- endif. %if_defined(show_argtype_tests)


kif_sanity_test_0:-kif_test(all(R,isa(R,tAgent) => exists(D, (isa(D,tNose) & mudContains(R,D))))).


/*~
%~ message_hook_type(error)
%~ message_hook(
%~    error(
%~       permission_error(modify,static_procedure,baseKB:kif_sanity_test_0/0),
%~       context(system:assertz/1,Context_Kw)),
%~    error,
%~    [ '~q/~w: '-[assertz,1],
%~      'No permission to ~w static procedure `~p\'' - [ modify,
%~                                                       baseKB : kif_sanity_test_0/0]])
assertz/1: No permission to modify static procedure `baseKB:(kif_sanity_test_0/0)'
ERROR: assertz/1: No permission to modify static procedure `baseKB:(kif_sanity_test_0/0)'
%~ message_hook_type(warning)
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl:446 
%~ message_hook(
%~    goal_failed( directive,
%~      baseKB : kif_sanity_test_0 :- kif_test( all( R,
%~                                                isa(R,tAgent)=>exists(D,isa(D,tNose)&mudContains(R,D))))),
%~    warning,
%~    [ 'Goal (~w) failed: ~p' - [ directive,
%~                                 baseKB : kif_sanity_test_0 :- kif_test( all( R,
%~                                                                           isa(R,tAgent)=>exists(D,isa(D,tNose)&mudContains(R,D))))]])
Goal (directive) failed: baseKB:must_kif_process((kif_sanity_test_0:-kif_test(all(_542,isa(_542,tAgent)=>exists(_546,isa(_546,tNose)&mudContains(_542,_546))))))
Warning: Goal (directive) failed: baseKB:must_kif_process((kif_sanity_test_0:-kif_test(all(_542,isa(_542,tAgent)=>exists(_546,isa(_546,tNose)&mudContains(_542,_546))))))
~*/



kif_sanity_test_0:- kif_test(all(X, (~tNotFly(X) => ~tPengin(X)))).
/*~
%~ message_hook_type(error)
%~ message_hook(
%~    error(
%~       permission_error(modify,static_procedure,baseKB:kif_sanity_test_0/0),
%~       context(system:assertz/1,Context_Kw)),
%~    error,
%~    [ '~q/~w: '-[assertz,1],
%~      'No permission to ~w static procedure `~p\'' - [ modify,
%~                                                       baseKB : kif_sanity_test_0/0]])
assertz/1: No permission to modify static procedure `baseKB:(kif_sanity_test_0/0)'
ERROR: assertz/1: No permission to modify static procedure `baseKB:(kif_sanity_test_0/0)'
%~ message_hook_type(warning)
%~ message_hook(
%~    goal_failed( directive,
%~      baseKB : kif_sanity_test_0 :- kif_test( all(X,(~tNotFly(X))=>(~tPengin(X))))),
%~    warning,
%~    [ 'Goal (~w) failed: ~p' - [ directive,
%~                                 baseKB : kif_sanity_test_0 :- kif_test( all(X,(~tNotFly(X))=>(~tPengin(X))))]])
Goal (directive) failed: baseKB:must_kif_process((kif_sanity_test_0:-kif_test(all(_502,(~tNotFly(_502))=>(~tPengin(_502))))))
Warning: Goal (directive) failed: baseKB:must_kif_process((kif_sanity_test_0:-kif_test(all(_502,(~tNotFly(_502))=>(~tPengin(_502))))))
~*/

kif_sanity_test_0:- kif_test(not(and(omitArgIsa(RELN, N), argIsa(RELN, N, _THING)))).


/*~
%~ message_hook_type(error)
%~ message_hook(
%~    error(
%~       permission_error(modify,static_procedure,baseKB:kif_sanity_test_0/0),
%~       context(system:assertz/1,Context_Kw)),
%~    error,
%~    [ '~q/~w: '-[assertz,1],
%~      'No permission to ~w static procedure `~p\'' - [ modify,
%~                                                       baseKB : kif_sanity_test_0/0]])
assertz/1: No permission to modify static procedure `baseKB:(kif_sanity_test_0/0)'
ERROR: assertz/1: No permission to modify static procedure `baseKB:(kif_sanity_test_0/0)'
%~ message_hook_type(warning)
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl:450 
%~ message_hook(
%~    goal_failed( directive,
%~      baseKB : kif_sanity_test_0 :- kif_test( not( and(omitArgIsa(RELN,N),argIsa(RELN,N,_THING))))),
%~    warning,
%~    [ 'Goal (~w) failed: ~p' - [ directive,
%~                                 baseKB : kif_sanity_test_0 :- kif_test( not( and(omitArgIsa(RELN,N),argIsa(RELN,N,_THING))))]])
Goal (directive) failed: baseKB:must_kif_process((kif_sanity_test_0:-kif_test(not(and(omitArgIsa(_518,_522),argIsa(_518,_522,_526))))))
Warning: Goal (directive) failed: baseKB:must_kif_process((kif_sanity_test_0:-kif_test(not(and(omitArgIsa(_518,_522),argIsa(_518,_522,_526))))))
~*/



kif_sanity_test_0:- kif_result((tNotFly(X):-tPengin(X))).
   % we prove we dont yet know if something not a pengiun when we call notFly and it fails
/*~
%~ message_hook_type(error)
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl:453 
%~ message_hook(
%~    error(
%~       permission_error(modify,static_procedure,baseKB:kif_sanity_test_0/0),
%~       context(system:assertz/1,Context_Kw)),
%~    error,
%~    [ '~q/~w: '-[assertz,1],
%~      'No permission to ~w static procedure `~p\'' - [ modify,
%~                                                       baseKB : kif_sanity_test_0/0]])
assertz/1: No permission to modify static procedure `baseKB:(kif_sanity_test_0/0)'
ERROR: assertz/1: No permission to modify static procedure `baseKB:(kif_sanity_test_0/0)'
%~ message_hook_type(warning)
%~ message_hook(
%~    goal_failed(directive,baseKB:(kif_sanity_test_0:-kif_result((tNotFly(X):-tPengin(X))))),
%~    warning,
%~    [ 'Goal (~w) failed: ~p' - [ directive,
%~                                 baseKB : kif_sanity_test_0 :- kif_result( tNotFly(X) :-
%~ 
%~                                                                             tPengin(X))]])
Goal (directive) failed: baseKB:must_kif_process((kif_sanity_test_0:-kif_result((tNotFly(_474):-tPengin(_474)))))
Warning: Goal (directive) failed: baseKB:must_kif_process((kif_sanity_test_0:-kif_result((tNotFly(_474):-tPengin(_474)))))
~*/

   % we prove we dont yet know if something not a pengiun when we call notFly and it fails
kif_sanity_test_0:- kif_result((  ~(tPengin(A)) :-  ~tNotFly(A)  )).



% ISSUE: https://github.com/logicmoo/logicmoo_workspace/issues/68 
% EDIT: https://github.com/logicmoo/logicmoo_workspace/edit/master/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl 
% JENKINS: https://jenkins.logicmoo.org/job/logicmoo_workspace/lastBuild/testReport/logicmoo.base.examples.fol/KIF_SANITY_01/ 
% ISSUE_SEARCH: https://github.com/logicmoo/logicmoo_workspace/issues?q=is%3Aissue+label%3AKIF_SANITY_01 

/*~
%~ message_hook_type(error)
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl:455 
%~ message_hook(
%~    error(
%~       permission_error(modify,static_procedure,baseKB:kif_sanity_test_0/0),
%~       context(system:assertz/1,Context_Kw)),
%~    error,
%~    [ '~q/~w: '-[assertz,1],
%~      'No permission to ~w static procedure `~p\'' - [ modify,
%~                                                       baseKB : kif_sanity_test_0/0]])
assertz/1: No permission to modify static procedure `baseKB:(kif_sanity_test_0/0)'
ERROR: assertz/1: No permission to modify static procedure `baseKB:(kif_sanity_test_0/0)'
%~ message_hook_type(warning)
%~ message_hook(
%~    goal_failed(directive,baseKB:(kif_sanity_test_0:-kif_result((~tPengin(A):- ~tNotFly(A))))),
%~    warning,
%~    [ 'Goal (~w) failed: ~p' - [ directive,
%~                                 baseKB : kif_sanity_test_0 :- kif_result( ~( tPengin(A)) :-
%~ 
%~                                                                             ~( tNotFly(A)))]])
Goal (directive) failed: baseKB:must_kif_process((kif_sanity_test_0:-kif_result((~tPengin(_3170):- ~tNotFly(_3170)))))
Warning: Goal (directive) failed: baseKB:must_kif_process((kif_sanity_test_0:-kif_result((~tPengin(_3170):- ~tNotFly(_3170)))))
~*/
%~ unused(no_junit_results)
logicmoo.base.examples.fol.KIF_SANITY_01 JUnit	error	=	assertz/1: No permission to modify static procedure `baseKB:(kif_sanity_test_0/0)' 
logicmoo.base.examples.fol.KIF_SANITY_01 JUnit	warning	=	Goal (directive) failed: baseKB:must_kif_process((kif_sanity_test_0:-kif_test(
% )
tell.

all(R,room(R) => exists(D, (door(D) & has(R,D)))).
room(room1).

ask.

room(What).

door(What).

:- kif_add(a(XX) & b(XX) => c(XX)).
:- kif_add(all(R,room(R) => exists(D, (door(D) & has(R,D))))).
:- kif_add(loves(Child,fatherFn(Child))).
:- kif_add((p => q)).
:- kif_add(~p <gt;=> ~q).
:- kif_add(p <gt;=> q).
:- kif_add(all(P, person(P) => -exists(D, dollar(D) & has(P,D)))).

:- kif_add(go(sam) & (go(bill) v go(sally) ) & go(nancy)).

:- kif_add(rains_tuesday => wear_rain_gear xor carry_umbrella).
:- kif_add(exists(P, (person(P) & all(C, car(C) => ~has(P,C))))).

/*
:- kif_add(room(R) => exists(D, (door(D) & has(R,D)))).
:- kif_add((goes(jane) xor goes(sandra) => goes(bill))).
:- kif_add(exists(P, exists(C, (person(P) & car(C) & has(P,C))))).
:- kif_add(~all(P,person(P) => exists(C, car(C) & has(P,C)))).
:- kif_add((go(sam) & go(bill)) v (go(sally) & go(nancy))).
:- kif_add(go(sam) & (go(bill) v go(sally) ) & go(nancy)).
:- kif_add(exists(C, course(C) & exists(MT1, midterm(C,MT1) & exists(MT2, midterm(C,MT2) & different(MT1,MT2))))).
:- kif_add(exists(C, course(C) & ~exists(MT3, midterm(C,MT3)))).
*/

))) 
logicmoo.base.examples.fol.KIF_SANITY_01 JUnit	warning	=	Goal (directive) failed: baseKB:must_kif_process((kif_sanity_test_0:-kif_test(all(_536,exists(_540,room(_536)=>(door(_540)&has(_536,_540))))))) 
logicmoo.base.examples.fol.KIF_SANITY_01 JUnit	warning	=	Goal (directive) failed: baseKB:must_kif_process((kif_sanity_test_0:-kif_test(p(_496,_500)&q(_496,_500)))) 
logicmoo.base.examples.fol.KIF_SANITY_01 JUnit	warning	=	Goal (directive) failed: baseKB:must_kif_process((kif_sanity_test_0:-kif_result(mdefault(room(_626)=>({_630=skIsDoorInRoomArg2ofHasFn(_626)},has(_626,_630)&door(_630)))))) 
logicmoo.base.examples.fol.KIF_SANITY_01 JUnit	warning	=	Goal (directive) failed: baseKB:must_kif_process((kif_sanity_test_0:-nop(kif_result(mdefault((tPred(_638)==>{_642=skIsIntInPredArg2ofArityFn(_638)},arity(_638,_642)&ftInt(_642))))))) 
logicmoo.base.examples.fol.KIF_SANITY_01 JUnit	error	=	/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl:91:27: Syntax error: Operator expected 
logicmoo.base.examples.fol.KIF_SANITY_01 JUnit	error	=	/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl:93:28: Syntax error: Operator expected 
logicmoo.base.examples.fol.KIF_SANITY_01 JUnit	error	=	/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl:96:28: Syntax error: Operator expected 
logicmoo.base.examples.fol.KIF_SANITY_01 JUnit	error	=	/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl:97:28: Syntax error: Operator expected 
logicmoo.base.examples.fol.KIF_SANITY_01 JUnit	error	=	/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl:100:28: Syntax error: Operator expected 
logicmoo.base.examples.fol.KIF_SANITY_01 JUnit	error	=	/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl:103:28: Syntax error: Operator expected 
logicmoo.base.examples.fol.KIF_SANITY_01 JUnit	error	=	/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl:107:28: Syntax error: Operator expected 
logicmoo.base.examples.fol.KIF_SANITY_01 JUnit	error	=	/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl:111:28: Syntax error: Operator expected 
logicmoo.base.examples.fol.KIF_SANITY_01 JUnit	error	=	/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl:115:28: Syntax error: Operator expected 
logicmoo.base.examples.fol.KIF_SANITY_01 JUnit	error	=	/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl:119:28: Syntax error: Operator expected 
logicmoo.base.examples.fol.KIF_SANITY_01 JUnit	error	=	/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl:123:28: Syntax error: Operator expected 
logicmoo.base.examples.fol.KIF_SANITY_01 JUnit	error	=	/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl:151:28: Syntax error: Operator expected 
logicmoo.base.examples.fol.KIF_SANITY_01 JUnit	error	=	/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl:163:28: Syntax error: Operator expected 
logicmoo.base.examples.fol.KIF_SANITY_01 JUnit	error	=	/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl:177:28: Syntax error: Operator expected 
logicmoo.base.examples.fol.KIF_SANITY_01 JUnit	error	=	/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl:186:28: Syntax error: Operator expected 
logicmoo.base.examples.fol.KIF_SANITY_01 JUnit	error	=	/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl:196:28: Syntax error: Operator expected 
logicmoo.base.examples.fol.KIF_SANITY_01 JUnit	error	=	/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl:200:28: Syntax error: Operator expected 
logicmoo.base.examples.fol.KIF_SANITY_01 JUnit	error	=	/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl:206:28: Syntax error: Operator expected 
logicmoo.base.examples.fol.KIF_SANITY_01 JUnit	error	=	/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl:214:28: Syntax error: Operator expected 
logicmoo.base.examples.fol.KIF_SANITY_01 JUnit	error	=	/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl:223:28: Syntax error: Operator expected 
logicmoo.base.examples.fol.KIF_SANITY_01 JUnit	error	=	/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl:234:28: Syntax error: Operator expected 
logicmoo.base.examples.fol.KIF_SANITY_01 JUnit	error	=	/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl:242:28: Syntax error: Operator expected 
logicmoo.base.examples.fol.KIF_SANITY_01 JUnit	error	=	/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl:253:28: Syntax error: Operator expected 
logicmoo.base.examples.fol.KIF_SANITY_01 JUnit	error	=	/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl:270:28: Syntax error: Operator expected 
logicmoo.base.examples.fol.KIF_SANITY_01 JUnit	error	=	/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl:296:28: Syntax error: Operator expected 
logicmoo.base.examples.fol.KIF_SANITY_01 JUnit	error	=	/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl:308:28: Syntax error: Operator expected 
logicmoo.base.examples.fol.KIF_SANITY_01 JUnit	error	=	/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/kif_sanity_01.pfc.pl:333:28: Syntax error: Operator expected 
logicmoo.base.examples.fol.KIF_SANITY_01 JUnit	warning	=	Goal (directive) failed: baseKB:must_kif_process((kif_sanity_test_0:-kif_test(all(_542,isa(_542,tAgent)=>exists(_546,isa(_546,tNose)&mudContains(_542,_546)))))) 
logicmoo.base.examples.fol.KIF_SANITY_01 JUnit	warning	=	Goal (directive) failed: baseKB:must_kif_process((kif_sanity_test_0:-kif_test(all(_502,(~tNotFly(_502))=>(~tPengin(_502)))))) 
logicmoo.base.examples.fol.KIF_SANITY_01 JUnit	warning	=	Goal (directive) failed: baseKB:must_kif_process((kif_sanity_test_0:-kif_test(not(and(omitArgIsa(_518,_522),argIsa(_518,_522,_526)))))) 
logicmoo.base.examples.fol.KIF_SANITY_01 JUnit	warning	=	Goal (directive) failed: baseKB:must_kif_process((kif_sanity_test_0:-kif_result((tNotFly(_474):-tPengin(_474))))) 
logicmoo.base.examples.fol.KIF_SANITY_01 JUnit	warning	=	Goal (directive) failed: baseKB:must_kif_process((kif_sanity_test_0:-kif_result((~tPengin(_3170):- ~tNotFly(_3170))))) 

%~ test_completed_exit(48)

totalTime=1.000

FAILED: /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-junit-minor -k kif_sanity_01.pfc.pl (returned 48) Add_LABELS='Errors,Warnings' Rem_LABELS='Skipped,Overtime,Skipped,Skipped'

logicmoo.base.examples.fol.MAKE_WFF_01 JUnit

(cd /var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/logicmoo_base/t/examples/fol ; timeout --foreground --preserve-status -s SIGKILL -k 10s 10s lmoo-clif make_wff_01.pfc.pl)

GH_MASTER_ISSUE_FINFO=

GH_MASTER_ISSUE_ID=#

Latest: https://jenkins.logicmoo.org/job/logicmoo_workspace/lastBuild/testReport/logicmoo.base.examples.fol/MAKE_WFF_01/logicmoo_base_examples_fol_MAKE_WFF_01 JUnit/

This: https://jenkins.logicmoo.org/job/logicmoo_workspace/42/testReport/logicmoo.base.examples.fol/MAKE_WFF_01/logicmoo_base_examples_fol_MAKE_WFF_01 JUnit/

GIT: cafe456

%
running('/var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/logicmoo_base/t/examples/fol/make_wff_01.pfc.pl'),
%~ this_test_might_need( :-( use_module( library(logicmoo_plarkc))))



% =================================================================================
% Load the system
% =================================================================================

% :- make.

% :- set_prolog_flag(gc,false).

% =================================================================================
% Set our engine up
% =================================================================================

:- expects_dialect(clif).
% deduce instances from usages in args having the effect of deducing human,dwelling,beverage_class are classes

% deduce instances from usages in args having the effect of deducing human,dwelling,beverage_class are classes
==> feature_setting(make_wff,true).

==> feature_setting(add_admitted_arguments,true).
% set truth maintainance system to remove previous assertions that new assertions disagree with 

% set truth maintainance system to remove previous assertions that new assertions disagree with 
==> feature_setting(tms_mode,remove_conflicting).

:- set_prolog_flag(runtime_debug,3). % mention it when we remove previous assertions
 % mention it when we remove previous assertions
:- set_prolog_flag_until_eof(do_renames,mpred_expansion).
%:- set_prolog_flag_until_eof(runtime_speed,0). % but dont gripe about speed

%:- set_prolog_flag_until_eof(runtime_speed,0). % but dont gripe about speed
:- kif_compile.



:- module(baseKB).

:- '$set_source_module'(baseKB).

% =================================================================================
% Define a couple predicates
% =================================================================================


% =================================================================================
% Define a couple predicates
% =================================================================================
:- set_prolog_flag(access_level,system).

:- redefine_system_predicate(arity(_,_)).

:- unlock_predicate(arity(_,_)).

:- multifile arity/2.

% maximum cardinality of livesAt/2 is 1
%==> isa(livesAt,'FunctionalBinaryPredicate').


% maximum cardinality of livesAt/2 is 1
%==> isa(livesAt,'FunctionalBinaryPredicate').
==> singleValuedInArg(livesAt,2).
% thus implies

% thus implies
==> arity(livesAt,2).
%~ message_hook_type(error)
%~ message_hook(
%~    initialization_exception( must_sanity : e( must_sanity : e( error(
%~                                                                   permission_error(modify,static_procedure,baseKB:arity/2),
%~                                                                   context(system:assertz/1,Context_Kw)),
%~                                                                baseKB : assert_to_mu( arity(livesAt,2))),
%~                                               baseKB : ain_fast(
%~                                                           baseKB : arity(livesAt,2),
%~                                                           ( mfl4(BaseKB,baseKB,'/var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/logicmoo_base/t/examples/fol/make_wff_01.pfc.pl',42) ,
%~                                                             ax)))),
%~    error,
%~    [ 'Prolog initialisation failed:',
%~      nl,
%~      'Unknown message: ~p' - [ must_sanity : e( must_sanity : e( error(
%~                                                                     permission_error(modify,static_procedure,baseKB:arity/2),
%~                                                                     context(system:assertz/1,Context_Kw)),
%~                                                                  baseKB : assert_to_mu( arity(livesAt,2))),
%~                                                 baseKB : ain_fast(
%~                                                             baseKB : arity(livesAt,2),
%~                                                             ( mfl4(BaseKB,baseKB,'/var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/logicmoo_base/t/examples/fol/make_wff_01.pfc.pl',42) ,
%~                                                               ax)))]])
%~ unused(save_junit_results)

totalTime=2

FAILED: /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-junit-minor -k make_wff_01.pfc.pl (returned 1)

logicmoo.base.examples.fol.FOL_BIRDT_01 JUnit

(cd /var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol ; timeout --foreground --preserve-status -s SIGKILL -k 10s 10s swipl -x /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-clif -t "['fol_birdt_01.pfc.pl']")

% EDIT: https://github.com/logicmoo/logicmoo_workspace/edit/master/packs_sys/logicmoo_base/t/examples/fol/fol_birdt_01.pfc.pl
% JENKINS: https://jenkins.logicmoo.org/job/logicmoo_workspace/lastBuild/testReport/logicmoo.base.examples.fol/FOL_BIRDT_01/
% ISSUE_SEARCH: https://github.com/logicmoo/logicmoo_workspace/issues?q=is%3Aissue+label%3AFOL_BIRDT_01
% ISSUE: #76

%~ init_phase(after_load)
%~ init_phase(restore_state)
%
%~ init_why(after_boot,program)
%~ after_boot.
%~ Dont forget to ?- logicmoo_i_cyc_xform.
running('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/fol_birdt_01.pfc.pl'),
%~ this_test_might_need( :-( use_module( library(logicmoo_plarkc))))


%
%  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

:- expects_dialect(pfc).


/*~
~*/



tCol(tFly).
/*~
~*/

tCol(tCanary).
/*~
~*/

tCol(tPenguin).


/*~
~*/



tCol(tBird).


/*~
~*/



:- mpred_test(predicate_property(tBird(_),dynamic)).

/*~
%~ ?-( mpred_test("Test_0001_Line_0000__tBird_1",baseKB:predicate_property(tBird(Bird),dynamic))).
passed=info(why_was_true(baseKB:predicate_property(tBird(_19366),dynamic)))
no_proof_for(predicate_property(tBird(Bird1),dynamic)).

no_proof_for(predicate_property(tBird(Bird1),dynamic)).

no_proof_for(predicate_property(tBird(Bird1),dynamic)).

	name	=	'logicmoo.base.examples.fol.FOL_BIRDT_01-Test_0001_Line_0000__tBird_1'. 
	JUNIT_CLASSNAME	=	'logicmoo.base.examples.fol.FOL_BIRDT_01'. 
	JUNIT_CMD	=	'timeout --foreground --preserve-status -s SIGKILL -k 10s 10s swipl -x /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-clif -t "[\'fol_birdt_01.pfc.pl\']"'. 
% saving_junit: /var/lib/jenkins/workspace/logicmoo_workspace@2/test_results/jenkins/Report-logicmoo-base-examples-fol-vSTARv0vSTARvvDOTvvSTARv-2-1--grep-2-i-WARN-ERROR-_file-00-fail-pass--Units-Logicmoo_base_examples_fol_FOL_BIRDT_01_Test_0001_Line_0000_tBird_1-junit.xml
~*/


genls(tCanary,tBird).
/*~
~*/

genls(tPenguin,tBird).



/*~
~*/




:- dmsg("chilly is a penguin.").
/*~
%~ chilly is a penguin.
~*/

tPenguin(iChilly).

/*~
~*/


:- mpred_test((tBird(iChilly))).



/*~
%~ ?-( mpred_test("Test_0002_Line_0000__IChilly",baseKB:tBird(iChilly))).
%~ FIlE: * https://logicmoo.org:2082/gitlab/logicmoo/logicmoo_workspace/-/edit/master@2/packs_sys/logicmoo_base/t/examples/fol/fol_birdt_01.pfc.pl#L45  
passed=info(why_was_true(baseKB:tBird(iChilly)))

Justifications for tBird(iChilly):
    1.1 tPenguin(iChilly)  % [* https://logicmoo.org:2082/gitlab/logicmoo/logicmoo_workspace/-/edit/master@2/packs_sys/logicmoo_base/t/examples/fol/fol_birdt_01.pfc.pl#L43 ] 
    1.2 tPenguin(W4)==>tBird(W4)  % [mfl4(_2142,_2144,_2146,_2148)] 
    1.3 mfl4(_,baseKB,'* https://logicmoo.org:2082/gitlab/logicmoo/logicmoo_workspace/-/edit/master@2/packs_sys/logicmoo_base/t/examples/fol/fol_birdt_01.pfc.pl#L43 ',43) 
    1.4 genls(tPenguin,tBird)  % [* https://logicmoo.org:2082/gitlab/logicmoo/logicmoo_workspace/-/edit/master@2/packs_sys/logicmoo_base/t/examples/fol/fol_birdt_01.pfc.pl#L38 ] 
    1.5 (genls(W4,X4)/W4\=X4)==>(isa(Y4,W4)==>isa(Y4,X4))  % [mfl4(_4198,_4200,_4202,_4204)] 
    1.6 mfl4(_,baseKB,'* https://logicmoo.org:2082/gitlab/logicmoo/logicmoo_workspace/-/edit/master@2/packs_sys/logicmoo_base/t/examples/fol/fol_birdt_01.pfc.pl#L38 ',38) 
    1.7 \+tooSlow  % [/boot/init.pl:512] 
    1.8 \+tooSlow==>((genls(W4,X4)/W4\=X4)==>(isa(Y4,W4)==>isa(Y4,X4)))  % [logicmoo_base/prolog/logicmoo/pfc/system_basic.pfc.pl:354] 
    1.9 mfl4(['C'=_,'P'=_,'I'=_],baseKB,'* https://logicmoo.org:2082/gitlab/logicmoo/logicmoo_workspace/-/edit/master/packs_sys/logicmoo_base/prolog/logicmoo/pfc/system_basic.pfc.pl#L354 ',354) 
	name	=	'logicmoo.base.examples.fol.FOL_BIRDT_01-Test_0002_Line_0000__IChilly'. 
	JUNIT_CLASSNAME	=	'logicmoo.base.examples.fol.FOL_BIRDT_01'. 
	JUNIT_CMD	=	'timeout --foreground --preserve-status -s SIGKILL -k 10s 10s swipl -x /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-clif -t "[\'fol_birdt_01.pfc.pl\']"'. 
% saving_junit: /var/lib/jenkins/workspace/logicmoo_workspace@2/test_results/jenkins/Report-logicmoo-base-examples-fol-vSTARv0vSTARvvDOTvvSTARv-2-1--grep-2-i-WARN-ERROR-_file-00-fail-pass--Units-Logicmoo_base_examples_fol_FOL_BIRDT_01_Test_0002_Line_0000_IChilly-junit.xml
~*/




:- dmsg("tweety is a canary.").
/*~
%~ tweety is a canary.
~*/

tCanary(iTweety).

/*~
~*/


:- mpred_test((tBird(iTweety))).


/*~
%~ ?-( mpred_test("Test_0003_Line_0000__ITweety",baseKB:tBird(iTweety))).
%~ FIlE: * https://logicmoo.org:2082/gitlab/logicmoo/logicmoo_workspace/-/edit/master@2/packs_sys/logicmoo_base/t/examples/fol/fol_birdt_01.pfc.pl#L52  
passed=info(why_was_true(baseKB:tBird(iTweety)))

Justifications for tBird(iTweety):
    1.1 tCanary(iTweety)  % [* https://logicmoo.org:2082/gitlab/logicmoo/logicmoo_workspace/-/edit/master@2/packs_sys/logicmoo_base/t/examples/fol/fol_birdt_01.pfc.pl#L50 ] 
    1.2 tCanary(W4)==>tBird(W4)  % [mfl4(_113922,_113924,_113926,_113928)] 
    1.3 mfl4(_,baseKB,'* https://logicmoo.org:2082/gitlab/logicmoo/logicmoo_workspace/-/edit/master@2/packs_sys/logicmoo_base/t/examples/fol/fol_birdt_01.pfc.pl#L50 ',50) 
    1.4 genls(tCanary,tBird)  % [* https://logicmoo.org:2082/gitlab/logicmoo/logicmoo_workspace/-/edit/master@2/packs_sys/logicmoo_base/t/examples/fol/fol_birdt_01.pfc.pl#L37 ] 
    1.5 (genls(W4,X4)/W4\=X4)==>(isa(Y4,W4)==>isa(Y4,X4))  % [mfl4(_115978,_115980,_115982,_115984)] 
    1.6 mfl4(_,baseKB,'* https://logicmoo.org:2082/gitlab/logicmoo/logicmoo_workspace/-/edit/master@2/packs_sys/logicmoo_base/t/examples/fol/fol_birdt_01.pfc.pl#L37 ',37) 
    1.7 \+tooSlow  % [/boot/init.pl:512] 
    1.8 \+tooSlow==>((genls(W4,X4)/W4\=X4)==>(isa(Y4,W4)==>isa(Y4,X4)))  % [logicmoo_base/prolog/logicmoo/pfc/system_basic.pfc.pl:354] 
    1.9 mfl4(['C'=_,'P'=_,'I'=_],baseKB,'* https://logicmoo.org:2082/gitlab/logicmoo/logicmoo_workspace/-/edit/master/packs_sys/logicmoo_base/prolog/logicmoo/pfc/system_basic.pfc.pl#L354 ',354) 
	name	=	'logicmoo.base.examples.fol.FOL_BIRDT_01-Test_0003_Line_0000__ITweety'. 
	JUNIT_CLASSNAME	=	'logicmoo.base.examples.fol.FOL_BIRDT_01'. 
	JUNIT_CMD	=	'timeout --foreground --preserve-status -s SIGKILL -k 10s 10s swipl -x /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-clif -t "[\'fol_birdt_01.pfc.pl\']"'. 
% saving_junit: /var/lib/jenkins/workspace/logicmoo_workspace@2/test_results/jenkins/Report-logicmoo-base-examples-fol-vSTARv0vSTARvvDOTvvSTARv-2-1--grep-2-i-WARN-ERROR-_file-00-fail-pass--Units-Logicmoo_base_examples_fol_FOL_BIRDT_01_Test_0003_Line_0000_ITweety-junit.xml
~*/



:- dmsg("birds fly by default.").
/*~
%~ birds fly by default.
~*/

mdefault(( tBird(X) => tFly(X))).

/*~
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/fol_birdt_01.pfc.pl:56 
%~ message_hook_type(error)
%~ message_hook(
%~    error(permission_error(assert,procedure,baseKB:tBird/1),context(system:assertz/1,Context_Kw)),
%~    error,
%~    [ '~q/~w: '-[assertz,1],
%~      'No permission to ~w ~w `~p\'' - [ assert,
%~                                         procedure,
%~                                         baseKB : tBird/1]])
assertz/1: No permission to assert procedure `baseKB:(tBird/1)'
ERROR: assertz/1: No permission to assert procedure `baseKB:(tBird/1)'
%~ message_hook_type(warning)
%~ message_hook(
%~    goal_failed( directive,
%~      baseKB : mpred_ain(
%~                  mdefault( tBird(X)=>tFly(X)),
%~                  ( mfl4(
%~                       [ 'X'=X],
%~                        baseKB, '/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/fol_birdt_01.pfc.pl', 56) ,
%~                    ax))),
%~    warning,
%~    [ 'Goal (~w) failed: ~p' - [ directive,
%~                                 baseKB : mpred_ain(
%~                                             mdefault( tBird(X)=>tFly(X)),
%~                                             ( mfl4(
%~                                                  [ 'X'=X],
%~                                                   baseKB, '/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/fol_birdt_01.pfc.pl', 56) ,
%~                                               ax))]])
Goal (directive) failed: baseKB:mpred_ain(mdefault(tBird(_514)=>tFly(_514)),(mfl4(['X'=_514],baseKB,'/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/fol_birdt_01.pfc.pl':56,56),ax))
Warning: Goal (directive) failed: baseKB:mpred_ain(mdefault(tBird(_514)=>tFly(_514)),(mfl4(['X'=_514],baseKB,'/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/fol_birdt_01.pfc.pl':56,56),ax))
~*/


:- dmsg("make sure chilly can fly").
/*~
%~ make sure chilly can fly
~*/

:- mpred_test((isa(I,tFly),I=iChilly)).

/*~
%~ ?-( mpred_test("Test_0004_Line_0000__TFly",baseKB:(isa(I,tFly),I=iChilly))).
failure=info((why_was_true(baseKB:(\+ (isa(_110628,tFly),_110628=iChilly))),nop(ftrace(baseKB:(isa(_110628,tFly),_110628=iChilly)))))
no_proof_for(\+ (isa(Chilly_Fly_Fly_Fly,tFly),Chilly_Fly_Fly_Fly=iChilly)).

no_proof_for(\+ (isa(Chilly_Fly_Fly_Fly,tFly),Chilly_Fly_Fly_Fly=iChilly)).

no_proof_for(\+ (isa(Chilly_Fly_Fly_Fly,tFly),Chilly_Fly_Fly_Fly=iChilly)).

	name	=	'logicmoo.base.examples.fol.FOL_BIRDT_01-Test_0004_Line_0000__TFly'. 
	JUNIT_CLASSNAME	=	'logicmoo.base.examples.fol.FOL_BIRDT_01'. 
	JUNIT_CMD	=	'timeout --foreground --preserve-status -s SIGKILL -k 10s 10s swipl -x /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-clif -t "[\'fol_birdt_01.pfc.pl\']"'. 
% saving_junit: /var/lib/jenkins/workspace/logicmoo_workspace@2/test_results/jenkins/Report-logicmoo-base-examples-fol-vSTARv0vSTARvvDOTvvSTARv-2-1--grep-2-i-WARN-ERROR-_file-00-fail-pass--Units-Logicmoo_base_examples_fol_FOL_BIRDT_01_Test_0004_Line_0000_TFly-junit.xml
~*/


:- dmsg("make sure tweety can fly (and again chilly)").
/*~
%~ make sure tweety can fly (and again chilly)
~*/

:- mpred_test((tFly(iTweety))).
/*~
%~ ?-( mpred_test("Test_0005_Line_0000__ITweety",baseKB:tFly(iTweety))).
failure=info((why_was_true(baseKB:(\+tFly(iTweety))),nop(ftrace(baseKB:tFly(iTweety)))))
no_proof_for(\+tFly(iTweety)).

no_proof_for(\+tFly(iTweety)).

no_proof_for(\+tFly(iTweety)).

	name	=	'logicmoo.base.examples.fol.FOL_BIRDT_01-Test_0005_Line_0000__ITweety'. 
	JUNIT_CLASSNAME	=	'logicmoo.base.examples.fol.FOL_BIRDT_01'. 
	JUNIT_CMD	=	'timeout --foreground --preserve-status -s SIGKILL -k 10s 10s swipl -x /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-clif -t "[\'fol_birdt_01.pfc.pl\']"'. 
% saving_junit: /var/lib/jenkins/workspace/logicmoo_workspace@2/test_results/jenkins/Report-logicmoo-base-examples-fol-vSTARv0vSTARvvDOTvvSTARv-2-1--grep-2-i-WARN-ERROR-_file-00-fail-pass--Units-Logicmoo_base_examples_fol_FOL_BIRDT_01_Test_0005_Line_0000_ITweety-junit.xml
~*/

:- mpred_test((tFly(iChilly))).


/*~
%~ ?-( mpred_test("Test_0006_Line_0000__IChilly",baseKB:tFly(iChilly))).
failure=info((why_was_true(baseKB:(\+tFly(iChilly))),nop(ftrace(baseKB:tFly(iChilly)))))
no_proof_for(\+tFly(iChilly)).

no_proof_for(\+tFly(iChilly)).

no_proof_for(\+tFly(iChilly)).

	name	=	'logicmoo.base.examples.fol.FOL_BIRDT_01-Test_0006_Line_0000__IChilly'. 
	JUNIT_CLASSNAME	=	'logicmoo.base.examples.fol.FOL_BIRDT_01'. 
	JUNIT_CMD	=	'timeout --foreground --preserve-status -s SIGKILL -k 10s 10s swipl -x /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-clif -t "[\'fol_birdt_01.pfc.pl\']"'. 
% saving_junit: /var/lib/jenkins/workspace/logicmoo_workspace@2/test_results/jenkins/Report-logicmoo-base-examples-fol-vSTARv0vSTARvvDOTvvSTARv-2-1--grep-2-i-WARN-ERROR-_file-00-fail-pass--Units-Logicmoo_base_examples_fol_FOL_BIRDT_01_Test_0006_Line_0000_IChilly-junit.xml
~*/



:- dmsg("penguins do not tFly.").
/*~
%~ penguins do not tFly.
~*/

tPenguin(X) =>  ~tFly(X). 

/*~
%~ message_hook_type(error)
%~ message_hook(
%~    error(permission_error(assert,procedure,baseKB:tPenguin/1),context(system:assertz/1,Context_Kw)),
%~    error,
%~    [ '~q/~w: '-[assertz,1],
%~      'No permission to ~w ~w `~p\'' - [ assert,
%~                                         procedure,
%~                                         baseKB : tPenguin/1]])
assertz/1: No permission to assert procedure `baseKB:(tPenguin/1)'
ERROR: assertz/1: No permission to assert procedure `baseKB:(tPenguin/1)'
%~ message_hook_type(warning)
%~ message_hook(
%~    goal_failed( directive,
%~      baseKB : mpred_ain(
%~                  tPenguin(X)=>(~tFly(X)),
%~                  ( mfl4(
%~                       [ 'X'=X],
%~                        baseKB, '/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/fol_birdt_01.pfc.pl', 67) ,
%~                    ax))),
%~    warning,
%~    [ 'Goal (~w) failed: ~p' - [ directive,
%~                                 baseKB : mpred_ain(
%~                                             tPenguin(X)=>(~tFly(X)),
%~                                             ( mfl4(
%~                                                  [ 'X'=X],
%~                                                   baseKB, '/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/fol_birdt_01.pfc.pl', 67) ,
%~                                               ax))]])
Goal (directive) failed: baseKB:mpred_ain(tPenguin(_145034)=>(~tFly(_145034)),(mfl4(['X'=_145034],baseKB,'/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/fol_birdt_01.pfc.pl':67,67),ax))
Warning: Goal (directive) failed: baseKB:mpred_ain(tPenguin(_145034)=>(~tFly(_145034)),(mfl4(['X'=_145034],baseKB,'/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/fol_birdt_01.pfc.pl':67,67),ax))
~*/
 

:- dmsg("confirm chilly now cant fly").
/*~
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/fol_birdt_01.pfc.pl:69 
%~ confirm chilly now cant fly
~*/

:- mpred_test((\+ tFly(iChilly))).
/*~
%~ ?-( mpred_test("Test_0007_Line_0000__naf_IChilly",baseKB:(\+tFly(iChilly)))).
passed=info(why_was_true(baseKB:(\+tFly(iChilly))))
no_proof_for(\+tFly(iChilly)).

no_proof_for(\+tFly(iChilly)).

no_proof_for(\+tFly(iChilly)).

	name	=	'logicmoo.base.examples.fol.FOL_BIRDT_01-Test_0007_Line_0000__naf_IChilly'. 
	JUNIT_CLASSNAME	=	'logicmoo.base.examples.fol.FOL_BIRDT_01'. 
	JUNIT_CMD	=	'timeout --foreground --preserve-status -s SIGKILL -k 10s 10s swipl -x /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-clif -t "[\'fol_birdt_01.pfc.pl\']"'. 
% saving_junit: /var/lib/jenkins/workspace/logicmoo_workspace@2/test_results/jenkins/Report-logicmoo-base-examples-fol-vSTARv0vSTARvvDOTvvSTARv-2-1--grep-2-i-WARN-ERROR-_file-00-fail-pass--Units-Logicmoo_base_examples_fol_FOL_BIRDT_01_Test_0007_Line_0000_naf_IChilly-junit.xml
~*/

:- mpred_test(( ~tFly(iChilly))).

%= repropigate that chilly was a bird again
/*~
%~ ?-( mpred_test("Test_0008_Line_0000__IChilly",baseKB: ~tFly(iChilly))).
failure=info((why_was_true(baseKB:(\+ ~tFly(iChilly))),nop(ftrace(baseKB: ~tFly(iChilly)))))
no_proof_for(\+ ~tFly(iChilly)).

no_proof_for(\+ ~tFly(iChilly)).

no_proof_for(\+ ~tFly(iChilly)).

	name	=	'logicmoo.base.examples.fol.FOL_BIRDT_01-Test_0008_Line_0000__IChilly'. 
	JUNIT_CLASSNAME	=	'logicmoo.base.examples.fol.FOL_BIRDT_01'. 
	JUNIT_CMD	=	'timeout --foreground --preserve-status -s SIGKILL -k 10s 10s swipl -x /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-clif -t "[\'fol_birdt_01.pfc.pl\']"'. 
% saving_junit: /var/lib/jenkins/workspace/logicmoo_workspace@2/test_results/jenkins/Report-logicmoo-base-examples-fol-vSTARv0vSTARvvDOTvvSTARv-2-1--grep-2-i-WARN-ERROR-_file-00-fail-pass--Units-Logicmoo_base_examples_fol_FOL_BIRDT_01_Test_0008_Line_0000_IChilly-junit.xml
~*/


%= repropigate that chilly was a bird again
tBird(iChilly).

%= this helps show the real differnce in ~and \+ 
/*~
~*/


%= this helps show the real differnce in ~and \+ 
:- dmsg("confirm chilly still does not fly").
/*~
%~ confirm chilly still does not fly
~*/

:- mpred_test((\+ tFly(iChilly))).
/*~
%~ ?-( mpred_test("Test_0009_Line_0000__naf_IChilly",baseKB:(\+tFly(iChilly)))).
passed=info(why_was_true(baseKB:(\+tFly(iChilly))))
no_proof_for(\+tFly(iChilly)).

no_proof_for(\+tFly(iChilly)).

no_proof_for(\+tFly(iChilly)).

	name	=	'logicmoo.base.examples.fol.FOL_BIRDT_01-Test_0009_Line_0000__naf_IChilly'. 
	JUNIT_CLASSNAME	=	'logicmoo.base.examples.fol.FOL_BIRDT_01'. 
	JUNIT_CMD	=	'timeout --foreground --preserve-status -s SIGKILL -k 10s 10s swipl -x /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-clif -t "[\'fol_birdt_01.pfc.pl\']"'. 
% saving_junit: /var/lib/jenkins/workspace/logicmoo_workspace@2/test_results/jenkins/Report-logicmoo-base-examples-fol-vSTARv0vSTARvvDOTvvSTARv-2-1--grep-2-i-WARN-ERROR-_file-00-fail-pass--Units-Logicmoo_base_examples_fol_FOL_BIRDT_01_Test_0009_Line_0000_naf_IChilly-junit.xml
~*/

:- dmsg("confirm chilly still cant fly").
/*~
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/fol_birdt_01.pfc.pl:79 
%~ confirm chilly still cant fly
~*/

:- mpred_test(( ~tFly(iChilly))).

/*~
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/fol_birdt_01.pfc.pl:80 
%~ ?-( mpred_test("Test_0010_Line_0000__IChilly",baseKB: ~tFly(iChilly))).
failure=info((why_was_true(baseKB:(\+ ~tFly(iChilly))),nop(ftrace(baseKB: ~tFly(iChilly)))))
no_proof_for(\+ ~tFly(iChilly)).

no_proof_for(\+ ~tFly(iChilly)).

no_proof_for(\+ ~tFly(iChilly)).

	name	=	'logicmoo.base.examples.fol.FOL_BIRDT_01-Test_0010_Line_0000__IChilly'. 
	JUNIT_CLASSNAME	=	'logicmoo.base.examples.fol.FOL_BIRDT_01'. 
	JUNIT_CMD	=	'timeout --foreground --preserve-status -s SIGKILL -k 10s 10s swipl -x /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-clif -t "[\'fol_birdt_01.pfc.pl\']"'. 
% saving_junit: /var/lib/jenkins/workspace/logicmoo_workspace@2/test_results/jenkins/Report-logicmoo-base-examples-fol-vSTARv0vSTARvvDOTvvSTARv-2-1--grep-2-i-WARN-ERROR-_file-00-fail-pass--Units-Logicmoo_base_examples_fol_FOL_BIRDT_01_Test_0010_Line_0000_IChilly-junit.xml
~*/


/*

This wounld be a good TMS test it should throw.. but right now it passes wrongly
tFly(iChilly).

:- dmsg("confirm chilly is flying penguin").
:- mpred_test(( tFly(iChilly))).
:- mpred_test(( tPenguin(iChilly))).
:- mpred_test((\+ ~tFly(iChilly))).

\+ tFly(iChilly).

:- dmsg("confirm chilly is a normal penguin who cant fly").
:- mpred_test((\+ tFly(iChilly))).

% fails rightly
:- mpred_test(( tPenguin(iChilly))).

*/

:- dmsg("chilly is no longer a penguin").
/*~
%~ chilly is no longer a penguin
~*/

:- debug_logicmoo(logicmoo(_)).

/*~
~*/


:- mpred_trace_exec.

/*~
~*/


\+ tPenguin(iChilly).

/*~
%~ %~ still_supported(tBird(iChilly))
%~ debugm( baseKB,
%~   show_success( baseKB,
%~     baseKB : mpred_withdraw( tPenguin(iChilly),
%~                ( mfl4(BaseKB,baseKB,'* https://logicmoo.org:2082/gitlab/logicmoo/logicmoo_workspace/-/edit/master@2/packs_sys/logicmoo_base/t/examples/fol/fol_birdt_01.pfc.pl ',107) ,
%~                  ax))))
~*/


:- mpred_test(( \+ tPenguin(iChilly))).

/*~
%~ ?-( mpred_test("Test_0011_Line_0000__naf_IChilly",baseKB:(\+tPenguin(iChilly)))).
passed=info(why_was_true(baseKB:(\+tPenguin(iChilly))))
no_proof_for(\+tPenguin(iChilly)).

no_proof_for(\+tPenguin(iChilly)).

no_proof_for(\+tPenguin(iChilly)).

	name	=	'logicmoo.base.examples.fol.FOL_BIRDT_01-Test_0011_Line_0000__naf_IChilly'. 
	JUNIT_CLASSNAME	=	'logicmoo.base.examples.fol.FOL_BIRDT_01'. 
	JUNIT_CMD	=	'timeout --foreground --preserve-status -s SIGKILL -k 10s 10s swipl -x /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-clif -t "[\'fol_birdt_01.pfc.pl\']"'. 
% saving_junit: /var/lib/jenkins/workspace/logicmoo_workspace@2/test_results/jenkins/Report-logicmoo-base-examples-fol-vSTARv0vSTARvvDOTvvSTARv-2-1--grep-2-i-WARN-ERROR-_file-00-fail-pass--Units-Logicmoo_base_examples_fol_FOL_BIRDT_01_Test_0011_Line_0000_naf_IChilly-junit.xml
~*/


:- dmsg("chilly is still a bird").
/*~
%~ chilly is still a bird
~*/

:- mpred_test((tBird(iChilly))).

/*~
%~ ?-( mpred_test("Test_0012_Line_0000__IChilly",baseKB:tBird(iChilly))).
%~ FIlE: * https://logicmoo.org:2082/gitlab/logicmoo/logicmoo_workspace/-/edit/master@2/packs_sys/logicmoo_base/t/examples/fol/fol_birdt_01.pfc.pl#L112  
passed=info(why_was_true(baseKB:tBird(iChilly)))

Justifications for tBird(iChilly):
    1.1 mfl4(_,baseKB,'* https://logicmoo.org:2082/gitlab/logicmoo/logicmoo_workspace/-/edit/master@2/packs_sys/logicmoo_base/t/examples/fol/fol_birdt_01.pfc.pl#L74 ',74) 
	name	=	'logicmoo.base.examples.fol.FOL_BIRDT_01-Test_0012_Line_0000__IChilly'. 
	JUNIT_CLASSNAME	=	'logicmoo.base.examples.fol.FOL_BIRDT_01'. 
	JUNIT_CMD	=	'timeout --foreground --preserve-status -s SIGKILL -k 10s 10s swipl -x /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-clif -t "[\'fol_birdt_01.pfc.pl\']"'. 
% saving_junit: /var/lib/jenkins/workspace/logicmoo_workspace@2/test_results/jenkins/Report-logicmoo-base-examples-fol-vSTARv0vSTARvvDOTvvSTARv-2-1--grep-2-i-WARN-ERROR-_file-00-fail-pass--Units-Logicmoo_base_examples_fol_FOL_BIRDT_01_Test_0012_Line_0000_IChilly-junit.xml
~*/


:- repropagate(tBird(iChilly)).

/*~
%~ baseKB : mpred_fwc1( tBird(iChilly)).
%~ debugm(baseKB,show_success(baseKB,baseKB:mpred_fwc(tBird(iChilly))))
~*/


:- dmsg("confirm chilly is flying bird").
/*~
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/fol_birdt_01.pfc.pl:116 
%~ confirm chilly is flying bird
~*/

:- mpred_test(( tFly(iChilly))).
/*~
%~ ?-( mpred_test("Test_0013_Line_0000__IChilly",baseKB:tFly(iChilly))).
failure=info((why_was_true(baseKB:(\+tFly(iChilly))),nop(ftrace(baseKB:tFly(iChilly)))))
no_proof_for(\+tFly(iChilly)).

no_proof_for(\+tFly(iChilly)).

no_proof_for(\+tFly(iChilly)).

	name	=	'logicmoo.base.examples.fol.FOL_BIRDT_01-Test_0013_Line_0000__IChilly'. 
	JUNIT_CLASSNAME	=	'logicmoo.base.examples.fol.FOL_BIRDT_01'. 
	JUNIT_CMD	=	'timeout --foreground --preserve-status -s SIGKILL -k 10s 10s swipl -x /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-clif -t "[\'fol_birdt_01.pfc.pl\']"'. 
% saving_junit: /var/lib/jenkins/workspace/logicmoo_workspace@2/test_results/jenkins/Report-logicmoo-base-examples-fol-vSTARv0vSTARvvDOTvvSTARv-2-1--grep-2-i-WARN-ERROR-_file-00-fail-pass--Units-Logicmoo_base_examples_fol_FOL_BIRDT_01_Test_0013_Line_0000_IChilly-junit.xml
~*/

:- mpred_test(( \+ tPenguin(iChilly))).
/*~
%~ ?-( mpred_test("Test_0014_Line_0000__naf_IChilly",baseKB:(\+tPenguin(iChilly)))).
passed=info(why_was_true(baseKB:(\+tPenguin(iChilly))))
no_proof_for(\+tPenguin(iChilly)).

no_proof_for(\+tPenguin(iChilly)).

no_proof_for(\+tPenguin(iChilly)).

	name	=	'logicmoo.base.examples.fol.FOL_BIRDT_01-Test_0014_Line_0000__naf_IChilly'. 
	JUNIT_CLASSNAME	=	'logicmoo.base.examples.fol.FOL_BIRDT_01'. 
	JUNIT_CMD	=	'timeout --foreground --preserve-status -s SIGKILL -k 10s 10s swipl -x /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-clif -t "[\'fol_birdt_01.pfc.pl\']"'. 
% saving_junit: /var/lib/jenkins/workspace/logicmoo_workspace@2/test_results/jenkins/Report-logicmoo-base-examples-fol-vSTARv0vSTARvvDOTvvSTARv-2-1--grep-2-i-WARN-ERROR-_file-00-fail-pass--Units-Logicmoo_base_examples_fol_FOL_BIRDT_01_Test_0014_Line_0000_naf_IChilly-junit.xml
~*/

:- mpred_test(( \+ ~tFly(iChilly))).



% ISSUE: https://github.com/logicmoo/logicmoo_workspace/issues/76 
% EDIT: https://github.com/logicmoo/logicmoo_workspace/edit/master/packs_sys/logicmoo_base/t/examples/fol/fol_birdt_01.pfc.pl 
% JENKINS: https://jenkins.logicmoo.org/job/logicmoo_workspace/lastBuild/testReport/logicmoo.base.examples.fol/FOL_BIRDT_01/ 
% ISSUE_SEARCH: https://github.com/logicmoo/logicmoo_workspace/issues?q=is%3Aissue+label%3AFOL_BIRDT_01 

/*~
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/fol_birdt_01.pfc.pl:119 
%~ ?-( mpred_test("Test_0015_Line_0000__naf_IChilly",baseKB:(\+ ~tFly(iChilly)))).
passed=info(why_was_true(baseKB:(\+ ~tFly(iChilly))))
no_proof_for(\+ ~tFly(iChilly)).

no_proof_for(\+ ~tFly(iChilly)).

no_proof_for(\+ ~tFly(iChilly)).

	name	=	'logicmoo.base.examples.fol.FOL_BIRDT_01-Test_0015_Line_0000__naf_IChilly'. 
	JUNIT_CLASSNAME	=	'logicmoo.base.examples.fol.FOL_BIRDT_01'. 
	JUNIT_CMD	=	'timeout --foreground --preserve-status -s SIGKILL -k 10s 10s swipl -x /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-clif -t "[\'fol_birdt_01.pfc.pl\']"'. 
% saving_junit: /var/lib/jenkins/workspace/logicmoo_workspace@2/test_results/jenkins/Report-logicmoo-base-examples-fol-vSTARv0vSTARvvDOTvvSTARv-2-1--grep-2-i-WARN-ERROR-_file-00-fail-pass--Units-Logicmoo_base_examples_fol_FOL_BIRDT_01_Test_0015_Line_0000_naf_IChilly-junit.xml
~*/
%~ unused(no_junit_results)
Test_0001_Line_0000__tBird_1	result	=	passed. 
Test_0002_Line_0000__IChilly	result	=	passed. 
Test_0003_Line_0000__ITweety	result	=	passed. 
logicmoo.base.examples.fol.FOL_BIRDT_01 JUnit	error	=	assertz/1: No permission to assert procedure `baseKB:(tBird/1)' 
logicmoo.base.examples.fol.FOL_BIRDT_01 JUnit	warning	=	Goal (directive) failed: baseKB:mpred_ain(mdefault(tBird(_514)=>tFly(_514)),(mfl4(['X'=_514],baseKB,'/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/fol_birdt_01.pfc.pl':56,56),ax)) 
Test_0004_Line_0000__TFly	result	=	failure. 
Test_0005_Line_0000__ITweety	result	=	failure. 
Test_0006_Line_0000__IChilly	result	=	failure. 
logicmoo.base.examples.fol.FOL_BIRDT_01 JUnit	error	=	assertz/1: No permission to assert procedure `baseKB:(tPenguin/1)' 
logicmoo.base.examples.fol.FOL_BIRDT_01 JUnit	warning	=	Goal (directive) failed: baseKB:mpred_ain(tPenguin(_145034)=>(~tFly(_145034)),(mfl4(['X'=_145034],baseKB,'/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/fol_birdt_01.pfc.pl':67,67),ax)) 
Test_0007_Line_0000__naf_IChilly	result	=	passed. 
Test_0008_Line_0000__IChilly	result	=	failure. 
Test_0009_Line_0000__naf_IChilly	result	=	passed. 
Test_0010_Line_0000__IChilly	result	=	failure. 
Test_0011_Line_0000__naf_IChilly	result	=	passed. 
Test_0012_Line_0000__IChilly	result	=	passed. 
Test_0013_Line_0000__IChilly	result	=	failure. 
Test_0014_Line_0000__naf_IChilly	result	=	passed. 
Test_0015_Line_0000__naf_IChilly	result	=	passed. 

%~ test_completed_exit(56)

totalTime=1.000

FAILED: /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-junit-minor -k fol_birdt_01.pfc.pl (returned 56) Add_LABELS='Errors,Warnings' Rem_LABELS='Skipped,Overtime,Skipped'

logicmoo.base.examples.fol.LEFTY_01 JUnit

(cd /var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol ; timeout --foreground --preserve-status -s SIGKILL -k 10s 10s swipl -x /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-clif -t "['lefty_01.pfc.pl']")

% EDIT: https://github.com/logicmoo/logicmoo_workspace/edit/master/packs_sys/logicmoo_base/t/examples/fol/lefty_01.pfc.pl
% JENKINS: https://jenkins.logicmoo.org/job/logicmoo_workspace/lastBuild/testReport/logicmoo.base.examples.fol/LEFTY_01/
% ISSUE_SEARCH: https://github.com/logicmoo/logicmoo_workspace/issues?q=is%3Aissue+label%3ALEFTY_01
% ISSUE: #75

%~ init_phase(after_load)
%~ init_phase(restore_state)
%
%~ init_why(after_boot,program)
%~ after_boot.
%~ Dont forget to ?- logicmoo_i_cyc_xform.
running('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/lefty_01.pfc.pl'),
%~ this_test_might_need( :-( use_module( library(logicmoo_plarkc))))




:- include('test_header.pfc').
% :- process_this_script.

%=  setup pfc
/*~
% Term-position in <gt;clause>(0x5602255cbb00) at PC=20:
% clause_info(<gt;clause>(0x5602255cbb00)) (3-th clause of '$source_term'/8)... 
% from /var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl:1759 ... 
% Trying with syntax prolog
% read ...
% unified ...
% got names

% 	[2,1]

% Term-position in <gt;clause>(0x560225813000) at PC=116:
% clause_info(<gt;clause>(0x560225813000)) (2-nd clause of '$term_in_file'/8)... 
% from /var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl:1840 ... 
% Trying with syntax prolog
% read ...
% unified ...
% got names

% 	[2,2,2,2,2,2,2,2]

% Term-position in <gt;clause>(0x56022583bf00) at PC=5:
% clause_info(<gt;clause>(0x56022583bf00)) (1-st clause of setup_call_catcher_cleanup/4)... 
% from /var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl:646 ... 
% Trying with syntax prolog
% read ...
% unified ...
% got names

% 	[2,2,1]

% Term-position in <gt;clause>(0x560225843e00) at PC=15:
% clause_info(<gt;clause>(0x560225843e00)) (1-st clause of '$source_term'/7)... 
% from /var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl:1739 ... 
% Trying with syntax prolog
% read ...
% unified ...
% got names

% 	[2,1]

% Term-position in <gt;clause>(0x5602255e7400) at PC=32:
% clause_info(<gt;clause>(0x5602255e7400)) (1-st clause of '$load_file'/4)... 
% from /var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl:3007 ... 
% Trying with syntax prolog
% read ...
% unified ...
% got names

% 	[2,2,1,1,1]

% Term-position in <gt;clause>(0x56022583bf00) at PC=5:
% clause_info(<gt;clause>(0x56022583bf00)) (1-st clause of setup_call_catcher_cleanup/4)... 
% from /var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl:646 ... 
% Trying with syntax prolog
% read ...
% unified ...
% got names

% 	[2,2,1]

% Term-position in <gt;clause>(0x560225a42000) at PC=221:
% clause_info(<gt;clause>(0x560225a42000)) (1-st clause of '$do_load_file_2'/5)... 
% from /var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl:2592 ... 
% Trying with syntax prolog
% read ...
% unified ...
% got names

% 	[2,2,2,2,2,2,2,2,1,2,1,1,2,2,2]

% Term-position in <gt;clause>(0x5602258109a0) at PC=10:
% clause_info(<gt;clause>(0x5602258109a0)) (1-st clause of '$qdo_load_file'/4)... 
% from /var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl:2546 ... 
% Trying with syntax prolog
% read ...
% unified ...
% got names

% 	[2,1]

% Term-position in <gt;clause>(0x56022583bf00) at PC=5:
% clause_info(<gt;clause>(0x56022583bf00)) (1-st clause of setup_call_catcher_cleanup/4)... 
% from /var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl:646 ... 
% Trying with syntax prolog
% read ...
% unified ...
% got names

% 	[2,2,1]

% Term-position in <gt;clause>(0x56022581ac80) at PC=12:
% clause_info(<gt;clause>(0x56022581ac80)) (1-st clause of '$load_file'/3)... 
% from /var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl:2353 ... 
% Trying with syntax prolog
% read ...
% unified ...
% got names

% 	[2,2,1]

%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/lefty_01.pfc.pl:5 
%~ message_hook_type(error)%~ message_hook(%~    error( existence_error(source_sink,'test_header.pfc'),%~      context(%~         prolog_stack( [ frame( 37,%~                           call( system : throw/1),%~                           throw( error(existence_error(source_sink,'test_header.pfc'),Existence_error))),%~                         frame( 33,%~                           clause(<gt;clause>(0x5602255cbb00),20),%~                           '$source_term'( 'test_header.pfc',%~                             Test_header_c46_pfc, Source_term4,Source_term3,%~                             Source_term,Source_term37,%~                             ['/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/lefty_01.pfc.pl'],%~                             [ encoding(utf8), expand(false),expand(true)])),%~                         frame( 31,%~                           clause(<gt;clause>(0x560225813000),116),%~                           '$term_in_file'( <gt;stream>(0x560227ebf600),%~                             Stream_c62_c40_0x560227ebf600, Term_in_file8,Term_in_file7,%~                             Term_in_file,Term_in_file38,%~                             ['/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/lefty_01.pfc.pl'],%~                             [ expand(false),%~                               expand(true)])),%~                         frame( 30,%~                           clause(<gt;clause>(0x56022583bf00),5),%~                           setup_call_catcher_cleanup(%~                              system : '$open_source'( '/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/lefty_01.pfc.pl',%~                                         <gt;stream>(0x560227ebf600),%~                                         close(<gt;stream>(0x560227ebf600),'/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/lefty_01.pfc.pl',<gt;clause>(0x560229b95f80)), [],[expand(false),expand(true)]),%~                              system : '$term_in_file'( <gt;stream>(0x560227ebf600),%~                                         Stream_c62_c40_0x560227ebf6009,%~                                         Term_in_file12,%~                                         Term_in_file11,%~                                         Term_in_file10,%~                                         Term_in_file1039,%~                                         ['/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/lefty_01.pfc.pl'],%~                                         [ expand(false),%~                                           expand(true)]),%~                              Kw,%~                              system : '$close_source'( close(<gt;stream>(0x560227ebf600),'/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/lefty_01.pfc.pl',<gt;clause>(0x560229b95f80)),%~                                         true))),%~                         frame( 27,%~                           clause(<gt;clause>(0x560225843e00),15),%~                           '$source_term'( '/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/lefty_01.pfc.pl',%~                             '<gt;garbage_collected>', '<gt;garbage_collected>',Garbage_collected,%~                             '<gt;garbage_collected>','<gt;garbage_collected>',%~                             '<gt;garbage_collected>')),%~                         frame( 26,%~                           clause(<gt;clause>(0x5602255e7400),32),%~                           '$load_file'( '/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/lefty_01.pfc.pl',%~                             '/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/lefty_01.pfc.pl',%~                             Var_c47_lib_c47_jenkins_c47_workspace_c47_logicmoo_workspace_c64_2_c47_packs_sys_c47_logicmoo_base_c47_t_c47_examples_c47_fol_c47_lefty_01_c46_pfc_c46_pl,%~                             [ expand(false),%~                               expand(true)])),%~                         frame( 25,%~                           clause(<gt;clause>(0x56022583bf00),5),%~                           setup_call_catcher_cleanup(%~                              system : '$start_consult'('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/lefty_01.pfc.pl',1632225666.71754),%~                              system : '$load_file'( '/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/lefty_01.pfc.pl',%~                                         '/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/lefty_01.pfc.pl',%~                                         Var_c47_lib_c47_jenkins_c47_workspace_c47_logicmoo_workspace_c64_2_c47_packs_sys_c47_logicmoo_base_c47_t_c47_examples_c47_fol_c47_lefty_01_c46_pfc_c46_pl16,%~                                         [ expand(false),%~                                           expand(true)]),%~                              Kw17,%~                              system : '$end_consult'( '/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/lefty_01.pfc.pl',%~                                         lexstate(202,swi),%~                                         user))),%~                         frame( 21,%~                           clause(<gt;clause>(0x560225a42000),221),%~                           '$do_load_file_2'( 'lefty_01.pfc.pl',%~                             '/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/lefty_01.pfc.pl', user,compiled,%~                             [ expand(false),%~                               expand(true)])),%~                         frame( 18,%~                           clause(<gt;clause>(0x5602258109a0),10),%~                           '$qdo_load_file'( 'lefty_01.pfc.pl',%~                             '/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/lefty_01.pfc.pl', user,[expand(false),expand(true)])),%~                         frame( 16,%~                           clause(<gt;clause>(0x56022583bf00),5),%~                           setup_call_catcher_cleanup(%~                              system : with_mutex( '$load_file',%~                                         '$mt_start_load'( '/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/lefty_01.pfc.pl',%~                                           <gt;clause>(0x560239bbd100),%~                                           [ expand(false),%~                                             expand(true)])),%~                              system : '$mt_do_load'( <gt;clause>(0x560239bbd100),%~                                         'lefty_01.pfc.pl',%~                                         '/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/lefty_01.pfc.pl',%~                                         user,%~                                         [ expand(false),%~                                           expand(true)]),%~                              Kw18,%~                              system : '$mt_end_load'(<gt;clause>(0x560239bbd100)))),%~                         frame(14,meta_call,0),%~                         frame( 13,%~                           foreign( system : '$sig_atomic'/1),%~                           $sig_atomic( setup_call_cleanup(%~                                           with_mutex( '$load_file',%~                                             '$mt_start_load'( '/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/lefty_01.pfc.pl',%~                                               <gt;clause>(0x560239bbd100),%~                                               [ expand(false),%~                                                 expand(true)])),%~                                           '$mt_do_load'( <gt;clause>(0x560239bbd100),%~                                             'lefty_01.pfc.pl',%~                                             '/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/lefty_01.pfc.pl', user,[expand(false),expand(true)]),%~                                           '$mt_end_load'(<gt;clause>(0x560239bbd100))))),%~                         frame(10,clause(<gt;clause>(0x56022581ac80),12),'$load_file'('lefty_01.pfc.pl',user,'<gt;garbage_collected>'))]),%~         Context_Prolog_stack)),%~    error,%~    [ '~w `~p\' does not exist'-[source_sink,'test_header.pfc'], nl,'In:',nl,'~|~t[~D]~6+ '-[37],%~      '~p' - [ throw( error(existence_error(source_sink,'test_header.pfc'),Existence_error))], nl,'~|~t[~D]~6+ '-[33],%~      '~p' - [ '$source_term'( 'test_header.pfc',%~                 Test_header_c46_pfc, Source_term4,Source_term3,%~                 Source_term,Source_term37,%~                 ['/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/lefty_01.pfc.pl'],%~                 [ encoding(utf8), expand(false),expand(true)])],%~      ' at ~w:~d'-['/var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl',1761], nl,'~|~t[~D]~6+ '-[31],%~      '~p' - [ '$term_in_file'( <gt;stream>(0x560227ebf600),%~                 Stream_c62_c40_0x560227ebf600, Term_in_file8,Term_in_file7,%~                 Term_in_file,Term_in_file37,%~                 ['/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/lefty_01.pfc.pl'],%~                 [ expand(false),%~                   expand(true)])],%~      ' at ~w:~d'-['/var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl',1840], nl,'~|~t[~D]~6+ '-[30],%~      '~p' - [ setup_call_catcher_cleanup(%~                  system : '$open_source'( '/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/lefty_01.pfc.pl',%~                             <gt;stream>(0x560227ebf600),%~                             close(<gt;stream>(0x560227ebf600),'/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/lefty_01.pfc.pl',<gt;clause>(0x560229b95f80)), [],[expand(false),expand(true)]),%~                  system : '$term_in_file'( <gt;stream>(0x560227ebf600),%~                             Stream_c62_c40_0x560227ebf6009,%~                             Term_in_file12,%~                             Term_in_file11,%~                             Term_in_file10,%~                             Term_in_file1037,%~                             ['/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/lefty_01.pfc.pl'],%~                             [ expand(false),%~                               expand(true)]),%~                  Kw,%~                  system : '$close_source'( close(<gt;stream>(0x560227ebf600),'/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/lefty_01.pfc.pl',<gt;clause>(0x560229b95f80)),%~                             true))],%~      ' at ~w:~d'-['/var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl',646], nl,'~|~t[~D]~6+ '-[27],%~      '~p' - [ '$source_term'( '/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/lefty_01.pfc.pl',%~                 '<gt;garbage_collected>', '<gt;garbage_collected>',Garbage_collected,%~                 '<gt;garbage_collected>','<gt;garbage_collected>',%~                 '<gt;garbage_collected>')],%~      ' at ~w:~d'-['/var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl',1740], nl,'~|~t[~D]~6+ '-[26],%~      '~p' - [ '$load_file'( '/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/lefty_01.pfc.pl',%~                 '/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/lefty_01.pfc.pl',%~                 Var_c47_lib_c47_jenkins_c47_workspace_c47_logicmoo_workspace_c64_2_c47_packs_sys_c47_logicmoo_base_c47_t_c47_examples_c47_fol_c47_lefty_01_c46_pfc_c46_pl,%~                 [ expand(false),%~                   expand(true)])],%~      ' at ~w:~d'-['/var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl',3007], nl,'~|~t[~D]~6+ '-[25],%~      '~p' - [ setup_call_catcher_cleanup(%~                  system : '$start_consult'('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/lefty_01.pfc.pl',1632225666.71754),%~                  system : '$load_file'( '/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/lefty_01.pfc.pl',%~                             '/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/lefty_01.pfc.pl',%~                             Var_c47_lib_c47_jenkins_c47_workspace_c47_logicmoo_workspace_c64_2_c47_packs_sys_c47_logicmoo_base_c47_t_c47_examples_c47_fol_c47_lefty_01_c46_pfc_c46_pl16,%~                             [ expand(false),%~                               expand(true)]),%~                  Kw17,%~                  system : '$end_consult'( '/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/lefty_01.pfc.pl',%~                             lexstate(202,swi),%~                             user))],%~      ' at ~w:~d'-['/var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl',646], nl,'~|~t[~D]~6+ '-[21],%~      '~p' - [ '$do_load_file_2'( 'lefty_01.pfc.pl',%~                 '/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/lefty_01.pfc.pl', user,compiled,%~                 [ expand(false),%~                   expand(true)])],%~      ' at ~w:~d'-['/var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl',2592], nl,'~|~t[~D]~6+ '-[18],%~      '~p' - [ '$qdo_load_file'( 'lefty_01.pfc.pl',%~                 '/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/lefty_01.pfc.pl', user,[expand(false),expand(true)])],%~      ' at ~w:~d'-['/var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl',2547], nl,'~|~t[~D]~6+ '-[16],%~      '~p' - [ setup_call_catcher_cleanup(%~                  system : with_mutex( '$load_file',%~                             '$mt_start_load'( '/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/lefty_01.pfc.pl',%~                               <gt;clause>(0x560239bbd100),%~                               [ expand(false),%~                                 expand(true)])),%~                  system : '$mt_do_load'( <gt;clause>(0x560239bbd100),%~                             'lefty_01.pfc.pl',%~                             '/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/lefty_01.pfc.pl', user,[expand(false),expand(true)]),%~                  Kw18,%~                  system : '$mt_end_load'(<gt;clause>(0x560239bbd100)))],%~      ' at ~w:~d'-['/var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl',646], nl,'~|~t[~D]~6+ '-[14],'<gt;meta call>',%~      nl,'~|~t[~D]~6+ '-[13],%~      '~p' - [ $sig_atomic( setup_call_cleanup(%~                               with_mutex( '$load_file',%~                                 '$mt_start_load'( '/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/lefty_01.pfc.pl',%~                                   <gt;clause>(0x560239bbd100),%~                                   [ expand(false),%~                                     expand(true)])),%~                               '$mt_do_load'( <gt;clause>(0x560239bbd100),%~                                 'lefty_01.pfc.pl',%~                                 '/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/lefty_01.pfc.pl', user,[expand(false),expand(true)]),%~                               '$mt_end_load'(<gt;clause>(0x560239bbd100))))], ' <gt;foreign>'-[],nl,%~      '~|~t[~D]~6+ '-[10],%~      '~p' - [ '$load_file'('lefty_01.pfc.pl',user,'<gt;garbage_collected>')],%~      ' at ~w:~d'-['/var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl',2355], nl,nl,%~      'Note: some frames are missing due to last-call optimization.'-[],%~      nl,%~      'Re-run your program in debug mode (:- debug.) to get more detail.'-[]])source_sink `test_header.pfc' does not exist
In:
  [37] throw(error(existence_error(source_sink,test_header.pfc),_15322))
  [33] $source_term(test_header.pfc,_15354,_15356,_15358,_15360,_15362,['/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/lefty_01.pfc.pl'],[encoding(utf8),expand(false),expand(true)]) at /var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl:1761
  [31] $term_in_file(<gt;stream>(0x560227ebf600),_15428,_15430,_15432,_15434,_15436,['/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/lefty_01.pfc.pl'],[expand(false),expand(true)]) at /var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl:1840
  [30] setup_call_catcher_cleanup(system: $open_source('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/lefty_01.pfc.pl',<gt;stream>(0x560227ebf600),close(<gt;stream>(0x560227ebf600),'/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/lefty_01.pfc.pl',<gt;clause>(0x560229b95f80)),[],[expand(false),expand(true)]),system: $term_in_file(<gt;stream>(0x560227ebf600),_15554,_15556,_15558,_15560,_15562,['/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/lefty_01.pfc.pl'],[expand(false),expand(true)]),_15494,system: $close_source(close(<gt;stream>(0x560227ebf600),'/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/lefty_01.pfc.pl',<gt;clause>(0x560229b95f80)),true)) at /var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl:646
  [27] $source_term('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/lefty_01.pfc.pl',<gt;garbage_collected>,<gt;garbage_collected>,_15642,<gt;garbage_collected>,<gt;garbage_collected>,<gt;garbage_collected>) at /var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl:1740
  [26] $load_file('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/lefty_01.pfc.pl','/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/lefty_01.pfc.pl',_15676,[expand(false),expand(true)]) at /var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl:3007
  [25] setup_call_catcher_cleanup(system: $start_consult('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/lefty_01.pfc.pl',1632225666.71754),system: $load_file('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/lefty_01.pfc.pl','/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/lefty_01.pfc.pl',_15754,[expand(false),expand(true)]),_15726,system: $end_consult('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/lefty_01.pfc.pl',lexstate(202,swi),user)) at /var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl:646
  [21] $do_load_file_2('lefty_01.pfc.pl','/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/lefty_01.pfc.pl',user,compiled,[expand(false),expand(true)]) at /var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl:2592
  [18] $qdo_load_file('lefty_01.pfc.pl','/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/lefty_01.pfc.pl',user,[expand(false),expand(true)]) at /var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl:2547
  [16] setup_call_catcher_cleanup(system:with_mutex($load_file,$mt_start_load('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/lefty_01.pfc.pl',<gt;clause>(0x560239bbd100),[expand(false),expand(true)])),system: $mt_do_load(<gt;clause>(0x560239bbd100),'lefty_01.pfc.pl','/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/lefty_01.pfc.pl',user,[expand(false),expand(true)]),_15926,system: $mt_end_load(<gt;clause>(0x560239bbd100))) at /var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl:646
  [14] <gt;meta call>
  [13] $sig_atomic(setup_call_cleanup(with_mutex($load_file,$mt_start_load('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/lefty_01.pfc.pl',<gt;clause>(0x560239bbd100),[expand(false),expand(true)])),$mt_do_load(<gt;clause>(0x560239bbd100),'lefty_01.pfc.pl','/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/lefty_01.pfc.pl',user,[expand(false),expand(true)]),$mt_end_load(<gt;clause>(0x560239bbd100)))) <gt;foreign>
  [10] $load_file('lefty_01.pfc.pl',user,<gt;garbage_collected>) at /var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl:2355

Note: some frames are missing due to last-call optimization.
Re-run your program in debug mode (:- debug.) to get more detail.
ERROR: source_sink `test_header.pfc' does not exist
ERROR: In:
ERROR:   [37] throw(error(existence_error(source_sink,test_header.pfc),_15322))
ERROR:   [33] $source_term(test_header.pfc,_15354,_15356,_15358,_15360,_15362,['/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/lefty_01.pfc.pl'],[encoding(utf8),expand(false),expand(true)]) at /var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl:1761
ERROR:   [31] $term_in_file(<gt;stream>(0x560227ebf600),_15428,_15430,_15432,_15434,_15436,['/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/lefty_01.pfc.pl'],[expand(false),expand(true)]) at /var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl:1840
ERROR:   [30] setup_call_catcher_cleanup(system: $open_source('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/lefty_01.pfc.pl',<gt;stream>(0x560227ebf600),close(<gt;stream>(0x560227ebf600),'/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/lefty_01.pfc.pl',<gt;clause>(0x560229b95f80)),[],[expand(false),expand(true)]),system: $term_in_file(<gt;stream>(0x560227ebf600),_15554,_15556,_15558,_15560,_15562,['/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/lefty_01.pfc.pl'],[expand(false),expand(true)]),_15494,system: $close_source(close(<gt;stream>(0x560227ebf600),'/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/lefty_01.pfc.pl',<gt;clause>(0x560229b95f80)),true)) at /var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl:646
ERROR:   [27] $source_term('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/lefty_01.pfc.pl',<gt;garbage_collected>,<gt;garbage_collected>,_15642,<gt;garbage_collected>,<gt;garbage_collected>,<gt;garbage_collected>) at /var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl:1740
ERROR:   [26] $load_file('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/lefty_01.pfc.pl','/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/lefty_01.pfc.pl',_15676,[expand(false),expand(true)]) at /var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl:3007
ERROR:   [25] setup_call_catcher_cleanup(system: $start_consult('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/lefty_01.pfc.pl',1632225666.71754),system: $load_file('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/lefty_01.pfc.pl','/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/lefty_01.pfc.pl',_15754,[expand(false),expand(true)]),_15726,system: $end_consult('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/lefty_01.pfc.pl',lexstate(202,swi),user)) at /var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl:646
ERROR:   [21] $do_load_file_2('lefty_01.pfc.pl','/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/lefty_01.pfc.pl',user,compiled,[expand(false),expand(true)]) at /var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl:2592
ERROR:   [18] $qdo_load_file('lefty_01.pfc.pl','/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/lefty_01.pfc.pl',user,[expand(false),expand(true)]) at /var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl:2547
ERROR:   [16] setup_call_catcher_cleanup(system:with_mutex($load_file,$mt_start_load('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/lefty_01.pfc.pl',<gt;clause>(0x560239bbd100),[expand(false),expand(true)])),system: $mt_do_load(<gt;clause>(0x560239bbd100),'lefty_01.pfc.pl','/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/lefty_01.pfc.pl',user,[expand(false),expand(true)]),_15926,system: $mt_end_load(<gt;clause>(0x560239bbd100))) at /var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl:646
ERROR:   [14] <gt;meta call>
ERROR:   [13] $sig_atomic(setup_call_cleanup(with_mutex($load_file,$mt_start_load('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/lefty_01.pfc.pl',<gt;clause>(0x560239bbd100),[expand(false),expand(true)])),$mt_do_load(<gt;clause>(0x560239bbd100),'lefty_01.pfc.pl','/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/lefty_01.pfc.pl',user,[expand(false),expand(true)]),$mt_end_load(<gt;clause>(0x560239bbd100)))) <gt;foreign>
ERROR:   [10] $load_file('lefty_01.pfc.pl',user,<gt;garbage_collected>) at /var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl:2355
ERROR: 
ERROR: Note: some frames are missing due to last-call optimization.
ERROR: Re-run your program in debug mode (:- debug.) to get more detail.
^  Exception: (30) [system] setup_call_catcher_cleanup(system:'$open_source'('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/lefty_01.pfc.pl', <gt;stream>(0x560227ebf600), close(<gt;stream>(0x560227ebf600), '/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/lefty_01.pfc.pl', <gt;clause>(0x560229b95f80)), [], [expand(false), expand(true)]), system:'$term_in_file'(<gt;stream>(0x560227ebf600), _298, _300, _294, _296, _302, ['/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/lefty_01.pfc.pl'], [expand(false), expand(true)]), _2086786, system:'$close_source'(close(<gt;stream>(0x560227ebf600), '/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/lefty_01.pfc.pl', <gt;clause>(0x560229b95f80)), true)) ? EOF: exit (status 4)
%~ unused(no_junit_results)
logicmoo.base.examples.fol.LEFTY_01 JUnit	error	=	source_sink `test_header.pfc' does not exist
In:
  [37] throw(error(existence_error(source_sink,test_header.pfc),_15322))
  [33] $source_term(test_header.pfc,_15354,_15356,_15358,_15360,_15362,['/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/lefty_01.pfc.pl'],[encoding(utf8),expand(false),expand(true)]) at /var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl:1761
  [31] $term_in_file(<gt;stream>(0x560227ebf600),_15428,_15430,_15432,_15434,_15436,['/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/lefty_01.pfc.pl'],[expand(false),expand(true)]) at /var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl:1840
  [30] setup_call_catcher_cleanup(system: $open_source('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/lefty_01.pfc.pl',<gt;stream>(0x560227ebf600),close(<gt;stream>(0x560227ebf600),'/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/lefty_01.pfc.pl',<gt;clause>(0x560229b95f80)),[],[expand(false),expand(true)]),system: $term_in_file(<gt;stream>(0x560227ebf600),_15554,_15556,_15558,_15560,_15562,['/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/lefty_01.pfc.pl'],[expand(false),expand(true)]),_15494,system: $close_source(close(<gt;stream>(0x560227ebf600),'/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/lefty_01.pfc.pl',<gt;clause>(0x560229b95f80)),true)) at /var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl:646
  [27] $source_term('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/lefty_01.pfc.pl',<gt;garbage_collected>,<gt;garbage_collected>,_15642,<gt;garbage_collected>,<gt;garbage_collected>,<gt;garbage_collected>) at /var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl:1740
  [26] $load_file('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/lefty_01.pfc.pl','/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/lefty_01.pfc.pl',_15676,[expand(false),expand(true)]) at /var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl:3007
  [25] setup_call_catcher_cleanup(system: $start_consult('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/lefty_01.pfc.pl',1632225666.71754),system: $load_file('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/lefty_01.pfc.pl','/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/lefty_01.pfc.pl',_15754,[expand(false),expand(true)]),_15726,system: $end_consult('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/lefty_01.pfc.pl',lexstate(202,swi),user)) at /var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl:646
  [21] $do_load_file_2('lefty_01.pfc.pl','/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/lefty_01.pfc.pl',user,compiled,[expand(false),expand(true)]) at /var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl:2592
  [18] $qdo_load_file('lefty_01.pfc.pl','/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/lefty_01.pfc.pl',user,[expand(false),expand(true)]) at /var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl:2547
  [16] setup_call_catcher_cleanup(system:with_mutex($load_file,$mt_start_load('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/lefty_01.pfc.pl',<gt;clause>(0x560239bbd100),[expand(false),expand(true)])),system: $mt_do_load(<gt;clause>(0x560239bbd100),'lefty_01.pfc.pl','/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/lefty_01.pfc.pl',user,[expand(false),expand(true)]),_15926,system: $mt_end_load(<gt;clause>(0x560239bbd100))) at /var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl:646
  [14] <gt;meta call>
  [13] $sig_atomic(setup_call_cleanup(with_mutex($load_file,$mt_start_load('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/lefty_01.pfc.pl',<gt;clause>(0x560239bbd100),[expand(false),expand(true)])),$mt_do_load(<gt;clause>(0x560239bbd100),'lefty_01.pfc.pl','/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/lefty_01.pfc.pl',user,[expand(false),expand(true)]),$mt_end_load(<gt;clause>(0x560239bbd100)))) <gt;foreign>
  [10] $load_file('lefty_01.pfc.pl',user,<gt;garbage_collected>) at /var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl:2355

Note: some frames are missing due to last-call optimization.
Re-run your program in debug mode (:- debug.) to get more detail. 

%~ test_completed_exit(32)
%~ message_hook_type(warning)
%~ message_hook(
%~    goal_failed(at_halt,system:test_completed),
%~    warning,
%~    [ 'Goal (~w) failed: ~p' - [ at_halt,
%~                                 system : test_completed]])
Goal (at_halt) failed: system:test_completed
Warning: Goal (at_halt) failed: system:test_completed

totalTime=1.000

FAILED: /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-junit-minor -k lefty_01.pfc.pl (returned 4) Add_LABELS='' Rem_LABELS='Skipped,Skipped,Errors,Warnings,Overtime,Skipped'

logicmoo.base.examples.fol.POSS_FORALL_EXISTS_01 JUnit

(cd /var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol ; timeout --foreground --preserve-status -s SIGKILL -k 10s 10s swipl -x /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-clif -t "['poss_forall_exists_01.pfc.pl']")

% EDIT: https://github.com/logicmoo/logicmoo_workspace/edit/master/packs_sys/logicmoo_base/t/examples/fol/poss_forall_exists_01.pfc.pl
% JENKINS: https://jenkins.logicmoo.org/job/logicmoo_workspace/lastBuild/testReport/logicmoo.base.examples.fol/POSS_FORALL_EXISTS_01/
% ISSUE_SEARCH: https://github.com/logicmoo/logicmoo_workspace/issues?q=is%3Aissue+label%3APOSS_FORALL_EXISTS_01
% ISSUE: #73

%~ init_phase(after_load)
%~ init_phase(restore_state)
%
%~ init_why(after_boot,program)
%~ after_boot.
%~ Dont forget to ?- logicmoo_i_cyc_xform.
running('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/poss_forall_exists_01.pfc.pl'),
%~ this_test_might_need( :-( use_module( library(logicmoo_plarkc))))


% =================================================================================
% Set our engine up
% =================================================================================

:- expects_dialect(clif).
% deduce instances from usages in args having the effect of deducing human,dwelling,beverage_class are classes
/*~
~*/

% deduce instances from usages in args having the effect of deducing human,dwelling,beverage_class are classes
==> feature_setting(make_wff,true).
/*~
~*/

==> feature_setting(add_admitted_arguments,true).
% set truth maintainance system to remove previous assertions that new assertions disagree with 
/*~
~*/

% set truth maintainance system to remove previous assertions that new assertions disagree with 
==> feature_setting(tms_mode,remove_conflicting).
/*~
~*/

:- set_prolog_flag(runtime_debug,3). % mention it when we remove previous assertions
/*~
~*/
 % mention it when we remove previous assertions
:- set_prolog_flag_until_eof(do_renames,mpred_expansion).
%:- set_prolog_flag_until_eof(runtime_speed,0). % but dont gripe about speed
/*~
~*/

%:- set_prolog_flag_until_eof(runtime_speed,0). % but dont gripe about speed
:- kif_compile.

/*~
~*/


:- nop(module( baseKB)).
/*~
~*/

:- nop('$set_source_module'( baseKB)).



% =================================================================================
% Define a couple predicates
% =================================================================================

/*~
~*/




% =================================================================================
% Define a couple predicates
% =================================================================================

:-kb_shared(livesAt/2).
% maximum cardinality of livesAt/2 is 1
/*~
~*/

% maximum cardinality of livesAt/2 is 1
==> isa(livesAt,'FunctionalBinaryPredicate').
/*~
%~ azzert_rename('FunctionalBinaryPredicate',rtFunctionalBinaryPredicate)
~*/

==> argIsa(livesAt,1,human).
/*~
~*/

==> argIsa(livesAt,2,dwelling).

% define drinks/2
/*~
~*/


% define drinks/2
:-kb_shared(drinks/2).
/*~
~*/

==> argIsa(drinks,1,human).
/*~
~*/

==> argIsa(drinks,2,beverage_class).

% =================================================================================
% But given the above: 
%
%   Only things that possibly can drink coffee live in the green house?
%
% =================================================================================

/*~
~*/


% =================================================================================
% But given the above: 
%
%   Only things that possibly can drink coffee live in the green house?
%
% =================================================================================

:- show_kif_to_boxlog(all(X, livesAt(X, green_house) & drinks(X, coffee))).

% this should have meant: 

/*~
%~ test_boxlog( all(X,livesAt(X,green_house)&drinks(X,coffee)))
~*/


% this should have meant: 

:- show_kif_to_boxlog(all(X, (poss(livesAt(X, green_house) & drinks(X, coffee))) => livesAt(X, green_house) & drinks(X, coffee))).

/*~
%~ test_boxlog( all( X,
%~                ( poss( livesAt(X,green_house)&drinks(X,coffee)) =>
%~                  livesAt(X,green_house)&drinks(X,coffee))))
~*/


:- show_kif_to_boxlog(all(X, (poss(livesAt(X, green_house)) & poss(drinks(X, coffee))) => livesAt(X, green_house) & drinks(X, coffee))).

/*~
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/poss_forall_exists_01.pfc.pl:51 
%~ test_boxlog( all( X,
%~                ( poss(livesAt(X,green_house))&poss(drinks(X,coffee)) =>
%~                  livesAt(X,green_house)&drinks(X,coffee))))
~*/


~poss(livesAt(fred,green_house)).

% Does fred drink coffee? (should be unknown)
/*~
~*/


% Does fred drink coffee? (should be unknown)
:- \+ drinks(fred,coffee).

/*~
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/poss_forall_exists_01.pfc.pl:56 
%~ ?-( mpred_test("Test_0001_Line_0000__naf_Fred",baseKB:(\+drinks(fred,coffee)))).
passed=info(why_was_true(baseKB:(\+drinks(fred,coffee))))
no_proof_for(\+drinks(fred,coffee)).

no_proof_for(\+drinks(fred,coffee)).

no_proof_for(\+drinks(fred,coffee)).

	name	=	'logicmoo.base.examples.fol.POSS_FORALL_EXISTS_01-Test_0001_Line_0000__naf_Fred'. 
	JUNIT_CLASSNAME	=	'logicmoo.base.examples.fol.POSS_FORALL_EXISTS_01'. 
	JUNIT_CMD	=	'timeout --foreground --preserve-status -s SIGKILL -k 10s 10s swipl -x /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-clif -t "[\'poss_forall_exists_01.pfc.pl\']"'. 
% saving_junit: /var/lib/jenkins/workspace/logicmoo_workspace@2/test_results/jenkins/Report-logicmoo-base-examples-fol-vSTARv0vSTARvvDOTvvSTARv-2-1--grep-2-i-WARN-ERROR-_file-00-fail-pass--Units-Logicmoo_base_examples_fol_POSS_FORALL_EXISTS_01_Test_0001_Line_0000_naf_Fred-junit.xml
~*/


poss(livesAt(joe,green_house)).
/*~
~*/

:- drinks(joe,coffee).


% =================================================================================
% These two assertions are a bit weird but are for fun
% =================================================================================

% all objects in the universe that may drink coffee do drink coffee
%all(X, if(poss(drinks(X, coffee)),drinks(X, coffee))).

% all objects in the universe that may live in the green house do live in the green house
%all(X, if(poss(livesAt(X, green_house)),lives(X, green_house) )).





% ISSUE: https://github.com/logicmoo/logicmoo_workspace/issues/73 
% EDIT: https://github.com/logicmoo/logicmoo_workspace/edit/master/packs_sys/logicmoo_base/t/examples/fol/poss_forall_exists_01.pfc.pl 
% JENKINS: https://jenkins.logicmoo.org/job/logicmoo_workspace/lastBuild/testReport/logicmoo.base.examples.fol/POSS_FORALL_EXISTS_01/ 
% ISSUE_SEARCH: https://github.com/logicmoo/logicmoo_workspace/issues?q=is%3Aissue+label%3APOSS_FORALL_EXISTS_01 

/*~
%~ message_hook_type(warning)
%~ message_hook(
%~    goal_failed(directive,baseKB:drinks(joe,coffee)),
%~    warning,
%~    [ 'Goal (~w) failed: ~p' - [ directive,
%~                                 baseKB : drinks(joe,coffee)]])
Goal (directive) failed: baseKB:drinks(joe,coffee)
Warning: Goal (directive) failed: baseKB:drinks(joe,coffee)
~*/
%~ unused(no_junit_results)
Test_0001_Line_0000__naf_Fred	result	=	passed. 
logicmoo.base.examples.fol.POSS_FORALL_EXISTS_01 JUnit	warning	=	Goal (directive) failed: baseKB:drinks(joe,coffee) 

%~ test_completed_exit(80)

totalTime=2.000

SUCCESS: /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-junit-minor -k poss_forall_exists_01.pfc.pl (returned 80) Add_LABELS='Warnings' Rem_LABELS='Skipped,Skipped,Errors,Overtime,Skipped,Skipped'

logicmoo_workspace #17 failed

Build 'logicmoo_workspace' is failing!

Last 50 lines of build output:

Started by user Douglas Miles
Rebuilds build #16
Running as SYSTEM
[EnvInject] - Loading node environment variables.
Building in workspace /var/lib/jenkins/workspace/logicmoo_workspace
The recommended git tool is: NONE
using credential 7a3dc8f8-8666-4c78-8526-d25d0c136b01
using credential dmiles-gitlab
 > git rev-parse --resolve-git-dir /var/lib/jenkins/workspace/logicmoo_workspace/.git # timeout=10
Fetching changes from 2 remote Git repositories
 > git config remote.origin.url https://github.com/logicmoo/logicmoo_workspace.git # timeout=10
Fetching upstream changes from https://github.com/logicmoo/logicmoo_workspace.git
 > git --version # timeout=10
 > git --version # 'git version 2.33.0'
using GIT_ASKPASS to set credentials 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
 > git fetch --tags --force --progress -- https://github.com/logicmoo/logicmoo_workspace.git +refs/heads/*:refs/remotes/origin/* # timeout=10
 > git config remote.origin1.url https://logicmoo.org:2082/gitlab/logicmoo/logicmoo_workspace # timeout=10
Fetching upstream changes from https://logicmoo.org:2082/gitlab/logicmoo/logicmoo_workspace
using GIT_ASKPASS to set credentials dmiles-gitlab
 > git fetch --tags --force --progress -- https://logicmoo.org:2082/gitlab/logicmoo/logicmoo_workspace +refs/heads/*:refs/remotes/origin1/* # timeout=10
Seen branch in repository origin/gh-pages
Seen branch in repository origin/master
Seen branch in repository origin1/master
Seen 3 remote branches
 > git show-ref --tags -d # timeout=10
Checking out Revision dbff4d258e0e3a7f119eae3bffbc0a093dbf7a23 (origin/master, origin1/master)
 > git config core.sparsecheckout # timeout=10
 > git checkout -f dbff4d258e0e3a7f119eae3bffbc0a093dbf7a23 # timeout=10
Commit message: "saner test output"
First time build. Skipping changelog.
ERROR: load error: openssl -- java.lang.VerifyError: (class: org/jruby/ext/openssl/X509Cert, method: sign signature: (Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runtime/builtin/IRubyObject;) Incompatible argument to function (LoadError)
/var/lib/jenkins/plugins/gitlab-hook/WEB-INF/classes/lib/gitlab/client.rb:116:in `do_request'
/var/lib/jenkins/plugins/gitlab-hook/WEB-INF/classes/lib/gitlab/client.rb:87:in `repo_id'
/var/lib/jenkins/plugins/gitlab-hook/WEB-INF/classes/lib/gitlab/client.rb:19:in `name='
/var/lib/jenkins/plugins/gitlab-hook/WEB-INF/classes/models/gitlab_notifier.rb:27:in `prebuild'
/var/lib/jenkins/plugins/gitlab-hook/WEB-INF/classes/vendor/gems/gems/jenkins-plugin-runtime-0.2.3/lib/jenkins/tasks/build_step_proxy.rb:8:in `prebuild'
/var/lib/jenkins/plugins/gitlab-hook/WEB-INF/classes/vendor/gems/gems/jenkins-plugin-runtime-0.2.3/lib/jenkins/tasks/build_step_proxy.rb:22:in `boolean_result'
/var/lib/jenkins/plugins/gitlab-hook/WEB-INF/classes/vendor/gems/gems/jenkins-plugin-runtime-0.2.3/lib/jenkins/tasks/build_step_proxy.rb:7:in `prebuild'

[htmlpublisher] Archiving HTML reports...
[htmlpublisher] Archiving at BUILD level /var/lib/jenkins/workspace/logicmoo_workspace/test_results to /var/lib/jenkins/jobs/logicmoo_workspace/builds/17/htmlreports/HTML_20Report
Creating parser with percentiles:'0,50,90,100,' filterRegex:
Cannot detect file type because of error: Failed to copy /var/lib/jenkins/workspace/logicmoo_workspace/**/*-junit.xml to /var/lib/jenkins/jobs/logicmoo_workspace/builds/17/temp/**/*-junit.xml
The recommended git tool is: NONE
using credential 7a3dc8f8-8666-4c78-8526-d25d0c136b01
using credential dmiles-gitlab

Changes since last successful build:
No changes
No changes
No changes

View full output

logicmoo.pfc.test.sanity_base.MPRED_PFC_TEST_01 JUnit

(cd /var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/pfc/t/sanity_base ; timeout --foreground --preserve-status -s SIGKILL -k 10s 10s lmoo-clif mpred_pfc_test_01.plt)

GH_MASTER_ISSUE_FINFO=

GH_MASTER_ISSUE_ID=# ''

Latest: https://jenkins.logicmoo.org/job/logicmoo_workspace/lastBuild/testReport/logicmoo.pfc.test.sanity_base/MPRED_PFC_TEST_01/logicmoo_pfc_test_sanity_base_MPRED_PFC_TEST_01_JUnit/

This: https://jenkins.logicmoo.org/job/logicmoo_workspace//testReport/logicmoo.pfc.test.sanity_base/MPRED_PFC_TEST_01/logicmoo_pfc_test_sanity_base_MPRED_PFC_TEST_01_JUnit/

GITHUB: 36dca95

GITLAB: https://logicmoo.org:2082/gitlab/logicmoo/logicmoo_workspace/-/commit/36dca95fcead5652c997920944e137281fec63f9

ISSUE_SEARCH: https://github.com/logicmoo/logicmoo_workspace/issues?q=is%3Aissue+label%3AMPRED_PFC_TEST_01

%
running('/var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/pfc/t/sanity_base/mpred_pfc_test_01.plt'),
%~ /var/lib/jenkins/.local/share/swi-prolog/pack/logicmoo_utils/prolog/logicmoo_test_header.pl:92 
%~ this_test_might_need( :-( use_module( library(logicmoo_plarkc))))
%~ /var/lib/jenkins/.local/share/swi-prolog/pack/logicmoo_utils/prolog/logicmoo_test_header.pl:96 
%~ this_test_might_need( :-( expects_dialect(pfc)))


:- begin_tests(mpred_pfc_test_02_plt).

%~ message_hook_type(warning)
%~ message_hook(
%~    goal_failed(directive,baseKB:begin_tests(mpred_pfc_test_02_plt)),
%~    warning,
%~    [ 'Goal (~w) failed: ~p' - [ directive,
%~                                 baseKB : begin_tests(mpred_pfc_test_02_plt)]])
/*~
Goal (directive) failed: baseKB:begin_tests(mpred_pfc_test_02_plt)
Warning: Goal (directive) failed: baseKB:begin_tests(mpred_pfc_test_02_plt)
~*/


:- include('mpred_pfc_test_03').

%~ /var/lib/jenkins/.local/share/swi-prolog/pack/logicmoo_utils/prolog/logicmoo_test_header.pl:44 
%~ reload_of_test_header.
%~ this_test_might_need( :-( use_module( library(logicmoo_plarkc))))
%~ /var/lib/jenkins/.local/share/swi-prolog/pack/logicmoo_utils/prolog/logicmoo_test_header.pl:96 
%~ this_test_might_need( :-( expects_dialect(pfc)))
%~ mpred_test("Test_0001_Line_0036__BooQ2",baseKB:default_ooQ2(booQ2))
%~ FIlE: * https://logicmoo.org:2082/gitlab/logicmoo/logicmoo_workspace/-/blob/master/packs_sys/pfc/t/sanity_base/mpred_pfc_test_03.pl#L36  
%~ debugm( baseKB,
%~   show_success( baseKB,
%~     baseKB : mpred_withdraw( default_ooQ2(booQ2),
%~                ( mfl4(BaseKB,baseKB,'* https://logicmoo.org:2082/gitlab/logicmoo/logicmoo_workspace/-/blob/master/packs_sys/pfc/t/sanity_base/mpred_pfc_test_03.pl ',38) ,
%~                  ax))))
%~ mpred_test("Test_0002_Line_0048__BooQ2",baseKB:current_ooQ2(booQ2))
%~ mpred_test("Test_0003_Line_0054__naf_BooQ2",baseKB:(\+current_ooQ2(booQ2)))
%~ debugm( baseKB,
%~   show_success( baseKB,
%~     baseKB : mpred_withdraw( current_ooQ2(fooQ2),
%~                ( mfl4(BaseKB,baseKB,'* https://logicmoo.org:2082/gitlab/logicmoo/logicmoo_workspace/-/blob/master/packs_sys/pfc/t/sanity_base/mpred_pfc_test_03.pl ',56) ,
%~                  ax))))
%~ mpred_test("Test_0004_Line_0058__BooQ2",baseKB:current_ooQ2(booQ2))
%~ mpred_undo1( '$nt'( current_ooQ2(OoQ2),
%~                call_u_no_bc(current_ooQ2(OoQ21)),current_ooQ2(OoQ21)\=@=current_ooQ2(booQ2),
%~                rhs([current_ooQ2(booQ2)])))

totalTime=10

FAILED: /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-junit-minor -k mpred_pfc_test_01.plt (returned 137)

logicmoo.base.examples.fol.MAKE_TYPES_WFF_01 JUnit

(cd /var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol ; timeout --foreground --preserve-status -s SIGKILL -k 10s 10s swipl -x /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-clif -t "['make_types_wff_01.pfc.pl']")

% EDIT: https://github.com/logicmoo/logicmoo_workspace/edit/master/packs_sys/logicmoo_base/t/examples/fol/make_types_wff_01.pfc.pl
% JENKINS: https://jenkins.logicmoo.org/job/logicmoo_workspace/lastBuild/testReport/logicmoo.base.examples.fol/MAKE_TYPES_WFF_01/
% ISSUE_SEARCH: https://github.com/logicmoo/logicmoo_workspace/issues?q=is%3Aissue+label%3AMAKE_TYPES_WFF_01
% ISSUE: #67

%~ init_phase(after_load)
%~ init_phase(restore_state)
%
%~ init_why(after_boot,program)
%~ after_boot.
%~ Dont forget to ?- logicmoo_i_cyc_xform.
running('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/make_types_wff_01.pfc.pl'),
%~ this_test_might_need( :-( use_module( library(logicmoo_plarkc))))


% =================================================================================
% Set our engine up
% =================================================================================

:- expects_dialect(clif).
% deduce instances from usages in args having the effect of deducing human,dwelling,beverage_class are classes
/*~
~*/

% deduce instances from usages in args having the effect of deducing human,dwelling,beverage_class are classes
==> feature_setting(make_wff,true).
/*~
~*/

==> feature_setting(add_admitted_arguments,true).
% set truth maintainance system to remove previous assertions that new assertions disagree with 
/*~
~*/

% set truth maintainance system to remove previous assertions that new assertions disagree with 
==> feature_setting(tms_mode,remove_conflicting).
/*~
~*/

:- set_prolog_flag(runtime_debug,3). % mention it when we remove previous assertions
/*~
~*/
 % mention it when we remove previous assertions
:- set_prolog_flag_until_eof(do_renames,mpred_expansion).
%:- set_prolog_flag_until_eof(runtime_speed,0). % but dont gripe about speed
/*~
~*/

%:- set_prolog_flag_until_eof(runtime_speed,0). % but dont gripe about speed
:- kif_compile.

% =================================================================================
% Define a couple classes
% =================================================================================

% this creates the servant datatype
/*~
~*/


% =================================================================================
% Define a couple classes
% =================================================================================

% this creates the servant datatype
==> all(X, if(isa(X,servant),livesAt(X, green_house))).

% this creates the human datatype as well as functions that in the future that are create to accept humans must also accept servants 
/*~
~*/


% this creates the human datatype as well as functions that in the future that are create to accept humans must also accept servants 
==> all(X, if(livesAt(X, green_house),isa(X,human))).

% =================================================================================
% Test 1
% =================================================================================

/*~
~*/


% =================================================================================
% Test 1
% =================================================================================

:- mpred_trace_exec.


% ?- mpred_test(all(X,if(isa(X,servant),isa(X,human)))).

/*~
~*/



% ?- mpred_test(all(X,if(isa(X,servant),isa(X,human)))).

==> isa(fred,servant).  

/*~
%~ call_mpred_post4 :-
%~   level=86 ,
%~   que=0 ,
%~   assertion_status=unique ,
%~   support_status=none ,
%~   post1 = servant(fred) ,
%~   fix_mp=baseKB ,
%~   mz=baseKB ,
%~   p0 = servant(fred) ,
%~   support_fact = mfl4(_8844,baseKB,'/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/make_types_wff_01.pfc.pl',37) ,
%~   support_trig=ax.
%~ baseKB : mpred_fwc1( servant(fred)).
~*/
  

:- mpred_test(isa(fred,human)).

%?- all(X,t(OP,isa(X,human),~isa(X,servant))).
%OP = {A,B}/( if(~A,B) ).

/*~
%~ ?-( mpred_test("Test_0001_Line_0000__Fred",baseKB:human(fred))).
%~ make_dynamic_here(baseKB,human(fred))
failure=info((why_was_true(baseKB:(\+human(fred))),nop(ftrace(baseKB:human(fred)))))
no_proof_for(\+human(fred)).

no_proof_for(\+human(fred)).

no_proof_for(\+human(fred)).

	name	=	'logicmoo.base.examples.fol.MAKE_TYPES_WFF_01-Test_0001_Line_0000__Fred'. 
	JUNIT_CLASSNAME	=	'logicmoo.base.examples.fol.MAKE_TYPES_WFF_01'. 
	JUNIT_CMD	=	'timeout --foreground --preserve-status -s SIGKILL -k 10s 10s swipl -x /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-clif -t "[\'make_types_wff_01.pfc.pl\']"'. 
% saving_junit: /var/lib/jenkins/workspace/logicmoo_workspace@2/test_results/jenkins/Report-logicmoo-base-examples-fol-vSTARv0vSTARvvDOTvvSTARv-2-1--grep-2-i-WARN-ERROR-_file-00-fail-pass--Units-Logicmoo_base_examples_fol_MAKE_TYPES_WFF_01_Test_0001_Line_0000_Fred-junit.xml
~*/


%?- all(X,t(OP,isa(X,human),~isa(X,servant))).
%OP = {A,B}/( if(~A,B) ).

:- mpred_test(all(X,if(isa(X,servant),isa(X,human)))). 
/*~
%~ ?-( mpred_test("Test_0002_Line_0000__servant_1",baseKB:all(X,if(servant(X),human(X))))).
failure=info((why_was_true(baseKB:(\+all(_9100,if(servant(_9100),human(_9100))))),nop(ftrace(baseKB:all(_9100,if(servant(_9100),human(_9100)))))))
no_proof_for(\+all(X,if(servant(X),human(X)))).

no_proof_for(\+all(X,if(servant(X),human(X)))).

no_proof_for(\+all(X,if(servant(X),human(X)))).

	name	=	'logicmoo.base.examples.fol.MAKE_TYPES_WFF_01-Test_0002_Line_0000__servant_1'. 
	JUNIT_CLASSNAME	=	'logicmoo.base.examples.fol.MAKE_TYPES_WFF_01'. 
	JUNIT_CMD	=	'timeout --foreground --preserve-status -s SIGKILL -k 10s 10s swipl -x /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-clif -t "[\'make_types_wff_01.pfc.pl\']"'. 
% saving_junit: /var/lib/jenkins/workspace/logicmoo_workspace@2/test_results/jenkins/Report-logicmoo-base-examples-fol-vSTARv0vSTARvvDOTvvSTARv-2-1--grep-2-i-WARN-ERROR-_file-00-fail-pass--Units-Logicmoo_base_examples_fol_MAKE_TYPES_WFF_01_Test_0002_Line_0000_servant_1-junit.xml
~*/
 
:- mpred_test(all(X,if(~isa(X,human),~isa(X,servant)))). 
% ISSUE: https://github.com/logicmoo/logicmoo_workspace/issues/67 
% EDIT: https://github.com/logicmoo/logicmoo_workspace/edit/master/packs_sys/logicmoo_base/t/examples/fol/make_types_wff_01.pfc.pl 
% JENKINS: https://jenkins.logicmoo.org/job/logicmoo_workspace/lastBuild/testReport/logicmoo.base.examples.fol/MAKE_TYPES_WFF_01/ 
% ISSUE_SEARCH: https://github.com/logicmoo/logicmoo_workspace/issues?q=is%3Aissue+label%3AMAKE_TYPES_WFF_01 

/*~
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/make_types_wff_01.pfc.pl:45 
%~ ?-( mpred_test("Test_0003_Line_0000__human_1",baseKB:all(X,if(~human(X),~servant(X))))).
failure=info((why_was_true(baseKB:(\+all(_103116,if(~human(_103116),~servant(_103116))))),nop(ftrace(baseKB:all(_103116,if(~human(_103116),~servant(_103116)))))))
no_proof_for(\+all(X,if(~human(X),~servant(X)))).

no_proof_for(\+all(X,if(~human(X),~servant(X)))).

no_proof_for(\+all(X,if(~human(X),~servant(X)))).

	name	=	'logicmoo.base.examples.fol.MAKE_TYPES_WFF_01-Test_0003_Line_0000__human_1'. 
	JUNIT_CLASSNAME	=	'logicmoo.base.examples.fol.MAKE_TYPES_WFF_01'. 
	JUNIT_CMD	=	'timeout --foreground --preserve-status -s SIGKILL -k 10s 10s swipl -x /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-clif -t "[\'make_types_wff_01.pfc.pl\']"'. 
% saving_junit: /var/lib/jenkins/workspace/logicmoo_workspace@2/test_results/jenkins/Report-logicmoo-base-examples-fol-vSTARv0vSTARvvDOTvvSTARv-2-1--grep-2-i-WARN-ERROR-_file-00-fail-pass--Units-Logicmoo_base_examples_fol_MAKE_TYPES_WFF_01_Test_0003_Line_0000_human_1-junit.xml
~*/
%~ unused(no_junit_results)
Test_0001_Line_0000__Fred	result	=	failure. 
Test_0002_Line_0000__servant_1	result	=	failure. 
Test_0003_Line_0000__human_1	result	=	failure. 

%~ test_completed_exit(8)

totalTime=2.000

FAILED: /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-junit-minor -k make_types_wff_01.pfc.pl (returned 8) Add_LABELS='' Rem_LABELS='Skipped,Skipped,Errors,Warnings,Overtime,Skipped'

inRegion/2 sticking around

inRegion/2 sticking around

NPC9Wesley716> look
actNotice(you,begin(you,actLook))

[] [] [] [] [] [] []
[] -- -- -- -- -- []
-- -- -- -- -- []
NP -- -- -- -- []
-- -- -- -- -- []
[] -- -- -- -- -- []
[] [] [] [] [] [] []
text(mudAtLoc_first_of('NPC9Wesley716',xyzFn(iArea1014,1,3,1))).
text(mudAtLoc_first_of('NPC9Wesley716',iArea1014)).
text(mudAtLoc_first_of('NPC9Wesley716',iArea1016)).
nameStringsList=(t)notFound(f4,nameStringsList,_G164185381).
ftText=(t)mudDescription("Riker's Quarters").
ftText=(t)mudDescription("You've arrived in Riker's quarters").
ftText=(t)mudDescription("The room is very neat and tidy, with a couch and several chairs aranged around a coffee table by the eastern wall").
ftText=(t)mudDescription("A small partition at the northern part of the room seperates his sleeping area with the ftRest of the room").
events=(t)mudDeliverableLocationEvents('NPC9Wesley716',xyzFn(iArea1014,1,3,1),actTick('NPC9Wesley716',xyzFn(iArea1014,1,3,1))).
path(vWest)=(t)pathBetween(iArea1014,vWest,iArea1013).
pathName(vWest)=(t)pathName(iArea1014,vWest,"A corridor is West").
text(localityOfObject('NPC9Wesley716',iArea1014)).
text(mudFacing('NPC9Wesley716',vNorth)).
mudNearFeet=(t)notFound(f4,mudNearFeet,_G164560842).
mudNearReach=(t)notFound(f4,mudNearReach,_G164573460).
mudGetPrecepts=(t)notFound(f4,mudGetPrecepts,_G164586058).
mudMoveDist=(t)notFound(f4,mudMoveDist,_G164598669).
mudHeightOnObj=(t)notFound(f4,mudHeightOnObj,_G164604153).
ftText=(t)mudStowing('NPC9Wesley716',iFood1).
ftText=(t)[wearsClothing('NPC9Wesley716','Item2RedUniform719'),wearsClothing('NPC9Wesley716',iBoots717),wearsClothing('NPC9Wesley716',iComBadge718)].
actNotice(you,done(you,actLook))
NPC9Wesley716> s
actNotice(you,begin(you,actMove(vSouth)))
actNotice(you,done(you,actMove(vSouth)))

[] [] [] [] [] [] []
[] -- -- -- -- -- []
-- -- -- -- -- []
-- -- -- -- -- []
NP -- -- -- -- []
[] -- -- -- -- -- []
[] [] [] [] [] [] []
text(mudAtLoc_first_of('NPC9Wesley716',xyzFn(iArea1014,1,4,1))).
text(mudAtLoc_first_of('NPC9Wesley716',iArea1014)).
text(mudAtLoc_first_of('NPC9Wesley716',iArea1016)).
nameStringsList=(t)notFound(f4,nameStringsList,_G176915651).
ftText=(t)mudDescription("Riker's Quarters").
ftText=(t)mudDescription("You've arrived in Riker's quarters").
ftText=(t)mudDescription("The room is very neat and tidy, with a couch and several chairs aranged around a coffee table by the eastern wall").
ftText=(t)mudDescription("A small partition at the northern part of the room seperates his sleeping area with the ftRest of the room").
events=(t)mudDeliverableLocationEvents('NPC9Wesley716',xyzFn(iArea1014,1,4,1),actTick('NPC9Wesley716',xyzFn(iArea1014,1,4,1))).
path(vWest)=(t)pathBetween(iArea1014,vWest,iArea1013).
pathName(vWest)=(t)pathName(iArea1014,vWest,"A corridor is West").
text(localityOfObject('NPC9Wesley716',iArea1014)).
text(mudFacing('NPC9Wesley716',vSouth)).
mudNearFeet=(t)notFound(f4,mudNearFeet,_G177291112).
mudNearReach=(t)notFound(f4,mudNearReach,_G177303730).
mudGetPrecepts=(t)notFound(f4,mudGetPrecepts,_G177316328).
mudMoveDist=(t)notFound(f4,mudMoveDist,_G177328939).
mudHeightOnObj=(t)notFound(f4,mudHeightOnObj,_G177334423).
ftText=(t)mudStowing('NPC9Wesley716',iFood1).
ftText=(t)[wearsClothing('NPC9Wesley716','Item2RedUniform719'),wearsClothing('NPC9Wesley716',iBoots717),wearsClothing('NPC9Wesley716',iComBadge718)].
NPC9Wesley716>

logicmoo.pfc.test.sanity_base.DIA_PFC_MOD_01 JUnit

(cd /var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/pfc/t/sanity_base ; timeout --foreground --preserve-status -s SIGKILL -k 10s 10s swipl -x /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-clif -t "['dia_pfc_mod_01.pl']")

% EDIT: https://github.com/logicmoo/logicmoo_workspace/edit/master/packs_sys/pfc/t/sanity_base/dia_pfc_mod_01.pl
% JENKINS: https://jenkins.logicmoo.org/job/logicmoo_workspace/lastBuild/testReport/logicmoo.pfc.test.sanity_base/DIA_PFC_MOD_01/
% ISSUE_SEARCH: https://github.com/logicmoo/logicmoo_workspace/issues?q=is%3Aissue+label%3ADIA_PFC_MOD_01
% ISSUE: #64

%~ init_phase(after_load)
%~ init_phase(restore_state)
%
%~ init_why(after_boot,program)
%~ after_boot.
%~ Dont forget to ?- logicmoo_i_cyc_xform.
:- dynamic a/1.
:- multifile a/1.
:- public a/1.
:- module_transparent a/1.


foo:a(1).
foo:a(2).


(NOT INTERACTIVE (bugger:true))
%~ trace_or_throw( warn(pfcPosTrigger,a(A),static))

(NOT INTERACTIVE (baseKB:true))
%~ baseKB : dtrace,throw(warn(pfcPosTrigger,a(A),static)).
%~ message_hook_type(error)
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/pfc/t/sanity_base/dia_pfc_mod_01.pl:15 
%~ message_hook(
%~    error(existence_error(procedure,foo:b/1),context(toplevel,'DWIM could not correct goal')),
%~    error,
%~    [ '~p: '-[toplevel],
%~      'Unknown procedure: ~q' - [ foo : b/1],
%~      ' (~w)'-['DWIM could not correct goal']])
%~ source_location('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/pfc/t/sanity_base/dia_pfc_mod_01.pl',15)
toplevel: Unknown procedure: foo:b/1 (DWIM could not correct goal)
ERROR: /var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/pfc/t/sanity_base/dia_pfc_mod_01.pl:15:
ERROR:    toplevel: Unknown procedure: foo:b/1 (DWIM could not correct goal)
%~ message_hook_type(warning)
%~ message_hook(
%~    goal_failed(directive,foo:listing(b/1)),
%~    warning,
%~    [ 'Goal (~w) failed: ~p' - [ directive,
%~                                 foo : listing( b/1)]])
%~ source_location('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/pfc/t/sanity_base/dia_pfc_mod_01.pl',15)
Goal (directive) failed: foo:listing((b/1))
Warning: /var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/pfc/t/sanity_base/dia_pfc_mod_01.pl:15:
Warning:    Goal (directive) failed: foo:listing((b/1))
ERROR: Exported procedure foo:b/1 is not defined
% halt

totalTime=1.000

FAILED: /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-junit-minor -k dia_pfc_mod_01.pl (returned 0) Add_LABELS='' Rem_LABELS='Skipped,Skipped,Errors,Warnings,Overtime,Skipped,Skipped'

logicmoo.base.examples.fol.FAMILY_REGRESS_01 JUnit

(cd /var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol ; timeout --foreground --preserve-status -s SIGKILL -k 10s 10s swipl -x /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-clif -t "['family_regress_01.pfc.pl']")

% EDIT: https://github.com/logicmoo/logicmoo_workspace/edit/master/packs_sys/logicmoo_base/t/examples/fol/family_regress_01.pfc.pl
% JENKINS: https://jenkins.logicmoo.org/job/logicmoo_workspace/lastBuild/testReport/logicmoo.base.examples.fol/FAMILY_REGRESS_01/
% ISSUE_SEARCH: https://github.com/logicmoo/logicmoo_workspace/issues?q=is%3Aissue+label%3AFAMILY_REGRESS_01
% ISSUE: #70

%~ init_phase(after_load)
%~ init_phase(restore_state)
%
%~ init_why(after_boot,program)
%~ after_boot.
%~ Dont forget to ?- logicmoo_i_cyc_xform.
running('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/family_regress_01.pfc.pl'),
%~ this_test_might_need( :-( use_module( library(logicmoo_plarkc))))


:- expects_dialect(pfc).

% :- process_this_script.

%= save compiled clauses using forward chaining storage (by default)
%= we are using forward chaining just so any logical errors, performance and program bugs manefest
%= immediately
/*~
~*/


% :- process_this_script.

%= save compiled clauses using forward chaining storage (by default)
%= we are using forward chaining just so any logical errors, performance and program bugs manefest
%= immediately
:- set_clause_compile(fwc).

/*~
~*/


must_is_entailed(G):- must(is_entailed_u(G)).


/*~
~*/



show_test(G):- defaultAssertMt(KB),printAll(must(KB:G)).


%= ````
%= logic tests...
%= ````
%:- debug_logicmoo(logicmoo(_)).

/*~
No source location!?
%~ message_hook_type(error)
%~ message_hook(
%~    error(
%~       permission_error(redefine,imported_procedure,common_logic_sanity:show_test/1),
%~       context(system:'$record_clause'/3,Context_Kw)),
%~    error,
%~    [ 'No permission to ~w ~w `~p\'' - [ redefine,
%~                                         imported_procedure,
%~                                         common_logic_sanity : show_test/1]])
No permission to redefine imported_procedure `common_logic_sanity:(show_test/1)'
ERROR: No permission to redefine imported_procedure `common_logic_sanity:(show_test/1)'
~*/



%= ````
%= logic tests...
%= ````
%:- debug_logicmoo(logicmoo(_)).

mpred_prop(otherGender,2,prologBuiltin).
/*~
~*/

otherGender(male,female).
/*~
~*/

otherGender(female,male).

/*~
~*/


tCol(male).
/*~
~*/

:- dynamic((bore_offspring/2, gender/2)).

/*~
~*/


bore_offspring(P2,P1) <gt;=> bore_offspring(P1,P2).

/*~
~*/


(bore_offspring(C,P),gender(P,G1), otherGender(G1,G2))
     => gender(C,G2).

/*~
%~ message_hook_type(error)
%~ message_hook(
%~    error(permission_error(modify,static_procedure,(',')/2),context(system:assertz/1,Context_Kw)),
%~    error,
%~    [ '~q/~w: '-[assertz,1],
%~      'No permission to ~w static procedure `~p\'' - [ modify,
%~                                                       (',')/2],
%~      nl,
%~      '~w at ~w:~d'-['Defined','/var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl',382]])
assertz/1: No permission to modify static procedure `(,/2)'
Defined at /var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl:382
ERROR: assertz/1: No permission to modify static procedure `(,/2)'
ERROR: Defined at /var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl:382
%~ message_hook_type(warning)
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/family_regress_01.pfc.pl:33 
%~ message_hook(
%~    goal_failed( directive,
%~      baseKB : mpred_ain(
%~                  ( ( bore_offspring(C,P)  ,
%~                      gender(P,G1) ,
%~                      otherGender(G1,G2)) =>
%~                    gender(C,G2)),
%~                  ( mfl4(
%~                       [ 'C'=C, 'P'=P,'G1'=G1,
%~                         'G2'=G2],
%~                        baseKB, '/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/family_regress_01.pfc.pl', 33) ,
%~                    ax))),
%~    warning,
%~    [ 'Goal (~w) failed: ~p' - [ directive,
%~                                 baseKB : mpred_ain(
%~                                             ( ( bore_offspring(C,P)  ,
%~                                                 gender(P,G1) ,
%~                                                 otherGender(G1,G2)) =>
%~                                               gender(C,G2)),
%~                                             ( mfl4(
%~                                                  [ 'C'=C, 'P'=P,'G1'=G1,
%~                                                    'G2'=G2],
%~                                                   baseKB, '/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/family_regress_01.pfc.pl', 33) ,
%~                                               ax))]])
Goal (directive) failed: baseKB:mpred_ain((bore_offspring(_628,_630),gender(_630,_632),otherGender(_632,_634))=>gender(_628,_634),(mfl4(['C'=_628,'P'=_630,'G1'=_632,'G2'=_634],baseKB,'/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/family_regress_01.pfc.pl':33,33),ax))
Warning: Goal (directive) failed: baseKB:mpred_ain((bore_offspring(_628,_630),gender(_630,_632),otherGender(_632,_634))=>gender(_628,_634),(mfl4(['C'=_628,'P'=_630,'G1'=_632,'G2'=_634],baseKB,'/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/family_regress_01.pfc.pl':33,33),ax))
~*/


gender(P,male) <gt;=> male(P).
/*~
~*/

gender(P,female) <gt;=> female(P).

/*~
~*/


male(P) <gt;=> ~female(P).


% seven rules
/*~
~*/



% seven rules
(((parent(C,M) & female(M)) <gt;=> mother(C,M))).


/*~
~*/



parent(PARENT,GRAND),parent(CHILD,PARENT) => grandparent(CHILD,GRAND).

/*~
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/family_regress_01.pfc.pl:45 
%~ message_hook_type(error)
%~ message_hook(
%~    error(permission_error(modify,static_procedure,(',')/2),context(system:assertz/1,Context_Kw)),
%~    error,
%~    [ '~q/~w: '-[assertz,1],
%~      'No permission to ~w static procedure `~p\'' - [ modify,
%~                                                       (',')/2],
%~      nl,
%~      '~w at ~w:~d'-['Defined','/var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl',382]])
assertz/1: No permission to modify static procedure `(,/2)'
Defined at /var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl:382
ERROR: assertz/1: No permission to modify static procedure `(,/2)'
ERROR: Defined at /var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl:382
%~ message_hook_type(warning)
%~ message_hook(
%~    goal_failed( directive,
%~      baseKB : mpred_ain(
%~                  ( parent(PARENT,GRAND),parent(CHILD,PARENT) =>
%~                    grandparent(CHILD,GRAND)),
%~                  ( mfl4(
%~                       [ 'PARENT'=PARENT, 'GRAND'=GRAND,'CHILD'=CHILD],
%~                        baseKB, '/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/family_regress_01.pfc.pl', 45) ,
%~                    ax))),
%~    warning,
%~    [ 'Goal (~w) failed: ~p' - [ directive,
%~                                 baseKB : mpred_ain(
%~                                             ( parent(PARENT,GRAND),parent(CHILD,PARENT) =>
%~                                               grandparent(CHILD,GRAND)),
%~                                             ( mfl4(
%~                                                  [ 'PARENT'=PARENT, 'GRAND'=GRAND,'CHILD'=CHILD],
%~                                                   baseKB, '/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/family_regress_01.pfc.pl', 45) ,
%~                                               ax))]])
Goal (directive) failed: baseKB:mpred_ain((parent(_580,_582),parent(_584,_580))=>grandparent(_584,_582),(mfl4(['PARENT'=_580,'GRAND'=_582,'CHILD'=_584],baseKB,'/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/family_regress_01.pfc.pl':45,45),ax))
Warning: Goal (directive) failed: baseKB:mpred_ain((parent(_580,_582),parent(_584,_580))=>grandparent(_584,_582),(mfl4(['PARENT'=_580,'GRAND'=_582,'CHILD'=_584],baseKB,'/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/family_regress_01.pfc.pl':45,45),ax))
~*/


grandparent(C,G),male(G) <gt;=> grandfather(C,G).
/*~
~*/

grandparent(C,G),female(G) <gt;=> grandmother(C,G).
/*~
~*/

mother(P,G),parent(GrandKid,P)=>grandmother(GrandKid,G).
/*~
%~ message_hook_type(error)
%~ message_hook(
%~    error(permission_error(modify,static_procedure,(',')/2),context(system:assertz/1,Context_Kw)),
%~    error,
%~    [ '~q/~w: '-[assertz,1],
%~      'No permission to ~w static procedure `~p\'' - [ modify,
%~                                                       (',')/2],
%~      nl,
%~      '~w at ~w:~d'-['Defined','/var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl',382]])
assertz/1: No permission to modify static procedure `(,/2)'
Defined at /var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl:382
ERROR: assertz/1: No permission to modify static procedure `(,/2)'
ERROR: Defined at /var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl:382
%~ message_hook_type(warning)
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/family_regress_01.pfc.pl:49 
%~ message_hook(
%~    goal_failed( directive,
%~      baseKB : mpred_ain(
%~                  ( mother(P,G),parent(GrandKid,P) =>
%~                    grandmother(GrandKid,G)),
%~                  ( mfl4(
%~                       [ 'P'=P, 'G'=G,'GrandKid'=GrandKid],
%~                        baseKB, '/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/family_regress_01.pfc.pl', 49) ,
%~                    ax))),
%~    warning,
%~    [ 'Goal (~w) failed: ~p' - [ directive,
%~                                 baseKB : mpred_ain(
%~                                             ( mother(P,G),parent(GrandKid,P) =>
%~                                               grandmother(GrandKid,G)),
%~                                             ( mfl4(
%~                                                  [ 'P'=P, 'G'=G,'GrandKid'=GrandKid],
%~                                                   baseKB, '/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/family_regress_01.pfc.pl', 49) ,
%~                                               ax))]])
Goal (directive) failed: baseKB:mpred_ain((mother(_590,_594),parent(_598,_590))=>grandmother(_598,_594),(mfl4(['P'=_590,'G'=_594,'GrandKid'=_598],baseKB,'/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/family_regress_01.pfc.pl':49,49),ax))
Warning: Goal (directive) failed: baseKB:mpred_ain((mother(_590,_594),parent(_598,_590))=>grandmother(_598,_594),(mfl4(['P'=_590,'G'=_594,'GrandKid'=_598],baseKB,'/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/family_regress_01.pfc.pl':49,49),ax))
~*/

father(P,G),parent(GrandKid,P)=>grandfather(GrandKid,G).


/*~
%~ message_hook_type(error)
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/family_regress_01.pfc.pl:50 
%~ message_hook(
%~    error(permission_error(modify,static_procedure,(',')/2),context(system:assertz/1,Context_Kw)),
%~    error,
%~    [ '~q/~w: '-[assertz,1],
%~      'No permission to ~w static procedure `~p\'' - [ modify,
%~                                                       (',')/2],
%~      nl,
%~      '~w at ~w:~d'-['Defined','/var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl',382]])
assertz/1: No permission to modify static procedure `(,/2)'
Defined at /var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl:382
ERROR: assertz/1: No permission to modify static procedure `(,/2)'
ERROR: Defined at /var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl:382
%~ message_hook_type(warning)
%~ message_hook(
%~    goal_failed( directive,
%~      baseKB : mpred_ain(
%~                  ( father(P,G),parent(GrandKid,P) =>
%~                    grandfather(GrandKid,G)),
%~                  ( mfl4(
%~                       [ 'P'=P, 'G'=G,'GrandKid'=GrandKid],
%~                        baseKB, '/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/family_regress_01.pfc.pl', 50) ,
%~                    ax))),
%~    warning,
%~    [ 'Goal (~w) failed: ~p' - [ directive,
%~                                 baseKB : mpred_ain(
%~                                             ( father(P,G),parent(GrandKid,P) =>
%~                                               grandfather(GrandKid,G)),
%~                                             ( mfl4(
%~                                                  [ 'P'=P, 'G'=G,'GrandKid'=GrandKid],
%~                                                   baseKB, '/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/family_regress_01.pfc.pl', 50) ,
%~                                               ax))]])
Goal (directive) failed: baseKB:mpred_ain((father(_584,_588),parent(_592,_584))=>grandfather(_592,_588),(mfl4(['P'=_584,'G'=_588,'GrandKid'=_592],baseKB,'/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/family_regress_01.pfc.pl':50,50),ax))
Warning: Goal (directive) failed: baseKB:mpred_ain((father(_584,_588),parent(_592,_584))=>grandfather(_592,_588),(mfl4(['P'=_584,'G'=_588,'GrandKid'=_592],baseKB,'/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/family_regress_01.pfc.pl':50,50),ax))
~*/



parent(C,P),male(P) <gt;=> father(C,P).
/*~
~*/

parent(C,P),female(P) <gt;=> mother(C,P).
/*~
~*/

parent(X,P),parent(Y,P),different(X,Y) =>siblings(X,Y).
/*~
%~ message_hook_type(error)
%~ message_hook(
%~    error(permission_error(modify,static_procedure,(',')/2),context(system:assertz/1,Context_Kw)),
%~    error,
%~    [ '~q/~w: '-[assertz,1],
%~      'No permission to ~w static procedure `~p\'' - [ modify,
%~                                                       (',')/2],
%~      nl,
%~      '~w at ~w:~d'-['Defined','/var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl',382]])
assertz/1: No permission to modify static procedure `(,/2)'
Defined at /var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl:382
ERROR: assertz/1: No permission to modify static procedure `(,/2)'
ERROR: Defined at /var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl:382
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/family_regress_01.pfc.pl:55 
%~ message_hook_type(warning)
%~ message_hook(
%~    goal_failed( directive,
%~      baseKB : mpred_ain(
%~                  ( ( parent(X,P)  ,
%~                      parent(Y,P) ,
%~                      different(X,Y)) =>
%~                    siblings(X,Y)),
%~                  ( mfl4(
%~                       [ 'X'=X, 'P'=P,'Y'=Y],
%~                        baseKB, '/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/family_regress_01.pfc.pl', 55) ,
%~                    ax))),
%~    warning,
%~    [ 'Goal (~w) failed: ~p' - [ directive,
%~                                 baseKB : mpred_ain(
%~                                             ( ( parent(X,P)  ,
%~                                                 parent(Y,P) ,
%~                                                 different(X,Y)) =>
%~                                               siblings(X,Y)),
%~                                             ( mfl4(
%~                                                  [ 'X'=X, 'P'=P,'Y'=Y],
%~                                                   baseKB, '/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/family_regress_01.pfc.pl', 55) ,
%~                                               ax))]])
Goal (directive) failed: baseKB:mpred_ain((parent(_610,_614),parent(_618,_614),different(_610,_618))=>siblings(_610,_618),(mfl4(['X'=_610,'P'=_614,'Y'=_618],baseKB,'/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/family_regress_01.pfc.pl':55,55),ax))
Warning: Goal (directive) failed: baseKB:mpred_ain((parent(_610,_614),parent(_618,_614),different(_610,_618))=>siblings(_610,_618),(mfl4(['X'=_610,'P'=_614,'Y'=_618],baseKB,'/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/family_regress_01.pfc.pl':55,55),ax))
~*/

parent(C,P) => ancestor(C,P).
/*~
~*/

ancestor(C,P), ancestor(P,G) => ancestor(C,G).

/*~
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/family_regress_01.pfc.pl:57 
%~ message_hook_type(error)
%~ message_hook(
%~    error(permission_error(modify,static_procedure,(',')/2),context(system:assertz/1,Context_Kw)),
%~    error,
%~    [ '~q/~w: '-[assertz,1],
%~      'No permission to ~w static procedure `~p\'' - [ modify,
%~                                                       (',')/2],
%~      nl,
%~      '~w at ~w:~d'-['Defined','/var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl',382]])
assertz/1: No permission to modify static procedure `(,/2)'
Defined at /var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl:382
ERROR: assertz/1: No permission to modify static procedure `(,/2)'
ERROR: Defined at /var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl:382
%~ message_hook_type(warning)
%~ message_hook(
%~    goal_failed( directive,
%~      baseKB : mpred_ain(
%~                  (ancestor(C,P),ancestor(P,G))=>ancestor(C,G),
%~                  ( mfl4(
%~                       [ 'C'=C, 'P'=P,'G'=G],
%~                        baseKB, '/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/family_regress_01.pfc.pl', 57) ,
%~                    ax))),
%~    warning,
%~    [ 'Goal (~w) failed: ~p' - [ directive,
%~                                 baseKB : mpred_ain(
%~                                             (ancestor(C,P),ancestor(P,G))=>ancestor(C,G),
%~                                             ( mfl4(
%~                                                  [ 'C'=C, 'P'=P,'G'=G],
%~                                                   baseKB, '/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/family_regress_01.pfc.pl', 57) ,
%~                                               ax))]])
Goal (directive) failed: baseKB:mpred_ain((ancestor(_580,_582),ancestor(_582,_584))=>ancestor(_580,_584),(mfl4(['C'=_580,'P'=_582,'G'=_584],baseKB,'/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/family_regress_01.pfc.pl':57,57),ax))
Warning: Goal (directive) failed: baseKB:mpred_ain((ancestor(_580,_582),ancestor(_582,_584))=>ancestor(_580,_584),(mfl4(['C'=_580,'P'=_582,'G'=_584],baseKB,'/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/family_regress_01.pfc.pl':57,57),ax))
~*/


mother(douglas,eileen).

%= trudy is human
/*~
~*/


%= trudy is human
human(trudy).

%= catch a regression bug that may couse trudy to lose human assertion
/*~
~*/


%= catch a regression bug that may couse trudy to lose human assertion
never_retract_u(human(trudy)).
/*~
~*/

never_retract_u(human(eileen)).

/*~
~*/


:- mpred_run.

/*~
~*/


:- debug_logicmoo(_).
/*~
~*/

:- mpred_trace_exec.

%  
/*~
~*/


%  
forall(c,exists([m,f], if(human(c), (mother(c,m) & father(c,f))))).

/*~
No source location!?
~*/


:- mpred_run.

/*~
~*/


:- printAll(must(father(trudy,_))).

/*~
%~ ?-( mpred_test("Test_0001_Line_0000__Trudy",baseKB:father(trudy,Father_Trudy))).
%~ make_dynamic_here(baseKB,father(trudy,_32826))
failure=info((why_was_true(baseKB:(\+father(trudy,_32826))),nop(ftrace(baseKB:father(trudy,_32826)))))
no_proof_for(\+father(trudy,Father_Trudy2)).

no_proof_for(\+father(trudy,Father_Trudy2)).

no_proof_for(\+father(trudy,Father_Trudy2)).

	name	=	'logicmoo.base.examples.fol.FAMILY_REGRESS_01-Test_0001_Line_0000__Trudy'. 
	JUNIT_CLASSNAME	=	'logicmoo.base.examples.fol.FAMILY_REGRESS_01'. 
	JUNIT_CMD	=	'timeout --foreground --preserve-status -s SIGKILL -k 10s 10s swipl -x /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-clif -t "[\'family_regress_01.pfc.pl\']"'. 
% saving_junit: /var/lib/jenkins/workspace/logicmoo_workspace@2/test_results/jenkins/Report-logicmoo-base-examples-fol-vSTARv0vSTARvvDOTvvSTARv-2-1--grep-2-i-WARN-ERROR-_file-00-fail-pass--Units-Logicmoo_base_examples_fol_FAMILY_REGRESS_01_Test_0001_Line_0000_Trudy-junit.xml
baseKB:mpred_test(father(trudy, _233880)).

 /* found 1 for baseKB:mpred_test(father(trudy,_426)). 
 */ 
~*/


:- mpred_run.

% ((human(P1),ancestor(P1,P2))=>human(P2)).

/*~
~*/


% ((human(P1),ancestor(P1,P2))=>human(P2)).

clif(((human(P1),ancestor(P2,P1))=>human(P2))).

/*~
%~ call_mpred_post4 :-
%~   level=86 ,
%~   que=0 ,
%~   assertion_status=unique ,
%~   support_status=none ,
%~   post1 = clif( (human(P1),ancestor(P2,P1))=>human(P2)) ,
%~   fix_mp=baseKB ,
%~   mz=baseKB ,
%~   p0 = clif( (human(P1),ancestor(P2,P1))=>human(P2)) ,
%~   support_fact = mfl4(
%~                     [ 'P1'=P1,
%~                       'P2'=P2],
%~                      baseKB, '/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/family_regress_01.pfc.pl', 84) ,
%~   support_trig=ax.
%~ baseKB : mpred_fwc1( clif( ( human(Ancestor_Human),ancestor(Human_Ancestor,Ancestor_Human) =>
%~                              human(Human_Ancestor)))).
~*/


:- ain(mother(eileen,trudy)).
/*~
%~ call_mpred_post4 :-
%~   level=89 ,
%~   que=0 ,
%~   assertion_status=unique ,
%~   support_status=none ,
%~   post1 = mother(eileen,trudy) ,
%~   fix_mp=baseKB ,
%~   mz=baseKB ,
%~   p0 = mother(eileen,trudy) ,
%~   support_fact = mfl4(_29004,baseKB,'/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/family_regress_01.pfc.pl',86) ,
%~   support_trig=ax.
%~ baseKB : mpred_fwc1( mother(eileen,trudy)).
~*/

:- printAll(must(mother(eileen,_))).
/*~
%~ ?-( mpred_test("Test_0002_Line_0000__Eileen",baseKB:mother(eileen,Mother_Eileen))).
%~ FIlE: * https://logicmoo.org:2082/gitlab/logicmoo/logicmoo_workspace/-/edit/master@2/packs_sys/logicmoo_base/t/examples/fol/family_regress_01.pfc.pl#L87  
passed=info(why_was_true(baseKB:mother(eileen,trudy)))

Justifications for mother(eileen,trudy):
    1.1 mfl4(_,baseKB,'* https://logicmoo.org:2082/gitlab/logicmoo/logicmoo_workspace/-/edit/master@2/packs_sys/logicmoo_base/t/examples/fol/family_regress_01.pfc.pl#L86 ',86) 
	name	=	'logicmoo.base.examples.fol.FAMILY_REGRESS_01-Test_0002_Line_0000__Eileen'. 
	JUNIT_CLASSNAME	=	'logicmoo.base.examples.fol.FAMILY_REGRESS_01'. 
	JUNIT_CMD	=	'timeout --foreground --preserve-status -s SIGKILL -k 10s 10s swipl -x /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-clif -t "[\'family_regress_01.pfc.pl\']"'. 
% saving_junit: /var/lib/jenkins/workspace/logicmoo_workspace@2/test_results/jenkins/Report-logicmoo-base-examples-fol-vSTARv0vSTARvvDOTvvSTARv-2-1--grep-2-i-WARN-ERROR-_file-00-fail-pass--Units-Logicmoo_base_examples_fol_FAMILY_REGRESS_01_Test_0002_Line_0000_Eileen-junit.xml
baseKB:mpred_test(mother(eileen, trudy)).

 /* found 1 for baseKB:mpred_test(mother(eileen,_440)). 
 */ 
~*/

:- printAll(must(ancestor(eileen,_))).

% lol.. i have a frame problm in my solver.. whenever     forall(c,exists([m,f], if(human(c), (mother(c,m) & father(c,f))))).  ((human(P1),ancestor(P2,P1))=>human(P2)). human(douglas). I now have a skolemation of a mother who is human .. i my mothers children are human (thus i am) .. but while i am adding a named mother.. the skolem mother loses her assertion and is deduced nonhuman 

% ISSUE: https://github.com/logicmoo/logicmoo_workspace/issues/70 
% EDIT: https://github.com/logicmoo/logicmoo_workspace/edit/master/packs_sys/logicmoo_base/t/examples/fol/family_regress_01.pfc.pl 
% JENKINS: https://jenkins.logicmoo.org/job/logicmoo_workspace/lastBuild/testReport/logicmoo.base.examples.fol/FAMILY_REGRESS_01/ 
% ISSUE_SEARCH: https://github.com/logicmoo/logicmoo_workspace/issues?q=is%3Aissue+label%3AFAMILY_REGRESS_01 

/*~
%~ ?-( mpred_test("Test_0003_Line_0000__Eileen",baseKB:ancestor(eileen,Ancestor_Eileen))).
%~ make_dynamic_here(baseKB,ancestor(eileen,_275214))
failure=info((why_was_true(baseKB:(\+ancestor(eileen,_275214))),nop(ftrace(baseKB:ancestor(eileen,_275214)))))
no_proof_for(\+ancestor(eileen,Ancestor_Eileen2)).

no_proof_for(\+ancestor(eileen,Ancestor_Eileen2)).

no_proof_for(\+ancestor(eileen,Ancestor_Eileen2)).

	name	=	'logicmoo.base.examples.fol.FAMILY_REGRESS_01-Test_0003_Line_0000__Eileen'. 
	JUNIT_CLASSNAME	=	'logicmoo.base.examples.fol.FAMILY_REGRESS_01'. 
	JUNIT_CMD	=	'timeout --foreground --preserve-status -s SIGKILL -k 10s 10s swipl -x /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-clif -t "[\'family_regress_01.pfc.pl\']"'. 
% saving_junit: /var/lib/jenkins/workspace/logicmoo_workspace@2/test_results/jenkins/Report-logicmoo-base-examples-fol-vSTARv0vSTARvvDOTvvSTARv-2-1--grep-2-i-WARN-ERROR-_file-00-fail-pass--Units-Logicmoo_base_examples_fol_FAMILY_REGRESS_01_Test_0003_Line_0000_Eileen-junit.xml
baseKB:mpred_test(ancestor(eileen, _242134)).

 /* found 1 for baseKB:mpred_test(ancestor(eileen,_440)). 
 */ 
~*/
%~ unused(no_junit_results)
logicmoo.base.examples.fol.FAMILY_REGRESS_01 JUnit	error	=	No permission to redefine imported_procedure `common_logic_sanity:(show_test/1)' 
logicmoo.base.examples.fol.FAMILY_REGRESS_01 JUnit	error	=	assertz/1: No permission to modify static procedure `(,/2)'
Defined at /var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl:382 
logicmoo.base.examples.fol.FAMILY_REGRESS_01 JUnit	warning	=	Goal (directive) failed: baseKB:mpred_ain((bore_offspring(_628,_630),gender(_630,_632),otherGender(_632,_634))=>gender(_628,_634),(mfl4(['C'=_628,'P'=_630,'G1'=_632,'G2'=_634],baseKB,'/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/family_regress_01.pfc.pl':33,33),ax)) 
logicmoo.base.examples.fol.FAMILY_REGRESS_01 JUnit	warning	=	Goal (directive) failed: baseKB:mpred_ain((parent(_580,_582),parent(_584,_580))=>grandparent(_584,_582),(mfl4(['PARENT'=_580,'GRAND'=_582,'CHILD'=_584],baseKB,'/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/family_regress_01.pfc.pl':45,45),ax)) 
logicmoo.base.examples.fol.FAMILY_REGRESS_01 JUnit	warning	=	Goal (directive) failed: baseKB:mpred_ain((mother(_590,_594),parent(_598,_590))=>grandmother(_598,_594),(mfl4(['P'=_590,'G'=_594,'GrandKid'=_598],baseKB,'/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/family_regress_01.pfc.pl':49,49),ax)) 
logicmoo.base.examples.fol.FAMILY_REGRESS_01 JUnit	warning	=	Goal (directive) failed: baseKB:mpred_ain((father(_584,_588),parent(_592,_584))=>grandfather(_592,_588),(mfl4(['P'=_584,'G'=_588,'GrandKid'=_592],baseKB,'/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/family_regress_01.pfc.pl':50,50),ax)) 
logicmoo.base.examples.fol.FAMILY_REGRESS_01 JUnit	warning	=	Goal (directive) failed: baseKB:mpred_ain((parent(_610,_614),parent(_618,_614),different(_610,_618))=>siblings(_610,_618),(mfl4(['X'=_610,'P'=_614,'Y'=_618],baseKB,'/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/family_regress_01.pfc.pl':55,55),ax)) 
logicmoo.base.examples.fol.FAMILY_REGRESS_01 JUnit	warning	=	Goal (directive) failed: baseKB:mpred_ain((ancestor(_580,_582),ancestor(_582,_584))=>ancestor(_580,_584),(mfl4(['C'=_580,'P'=_582,'G'=_584],baseKB,'/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/family_regress_01.pfc.pl':57,57),ax)) 
Test_0001_Line_0000__Trudy	result	=	failure. 
Test_0002_Line_0000__Eileen	result	=	passed. 
Test_0003_Line_0000__Eileen	result	=	failure. 

%~ test_completed_exit(56)

totalTime=1.000

FAILED: /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-junit-minor -k family_regress_01.pfc.pl (returned 56) Add_LABELS='Errors,Warnings' Rem_LABELS='Skipped,Overtime,Skipped'

logicmoo.base.fol.fiveof.FIVE_LEFTOF_TYPE_01@Test_0001_Line_0000__Nesc: baseKB:listing(nesc)

<?xml version="1.0" encoding="utf-8"?>
  <testsuites>
  <testsuite name="logicmoo.base.fol.fiveof.FIVE_LEFTOF_TYPE_01"  package="logicmoo.base.fol.fiveof" tests="1" errors="0" skipped="0" failures="0">

     <testcase name="logicmoo.base.fol.fiveof.FIVE_LEFTOF_TYPE_01@Test_0001_Line_0000__Nesc: baseKB:listing(nesc)" classname="logicmoo.base.fol.fiveof.FIVE_LEFTOF_TYPE_01" time="0.006">
    <system-err><![CDATA[name=Test_0001_Line_0000__Nesc
JUNIT_CLASSNAME='logicmoo.base.fol.fiveof.FIVE_LEFTOF_TYPE_01'.
JUNIT_CMD='timeout --foreground --preserve-status -s SIGKILL -k 10s 10s lmoo-clif five_leftof_type_01.pl'.
 (cd /var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/fiveof ; timeout --foreground --preserve-status -s SIGKILL -k 10s 10s lmoo-clif five_leftof_type_01.pl)

%
running('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_type_01.pl'),
%~ this_test_might_need( :-( use_module( library(logicmoo_plarkc))))
%~ /var/lib/jenkins/.local/share/swi-prolog/pack/logicmoo_utils/prolog/logicmoo_test_header.pl:96
%~ this_test_might_need( :-( expects_dialect(pfc)))

:- expects_dialect(clif).



:- kif_compile.

% makes the KB monotonic

% makes the KB monotonic
:- set_kif_option(qualify_modality,simple_nesc).

% There are five houses in a row.

% There are five houses in a row.
nesc(leftof(h1, h2)).

leftof(h2, h3).
%~ kifi = leftof(h2,h3).
%~ kifm = nesc( leftof(h2,h3)).
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_type_01.pl:26
%~ kifm = nesc( leftof(h2,h3)).
%~ debugm(common_logic_loader,show_success(common_logic_loader,common_logic_loader:ain(clif(leftof(h2,h3)))))
%~ kifi = leftof(h2,h3).
%~ kifm = nesc( leftof(h2,h3)).

/*~
%~ kifi=leftof(h2,h3)
%~ kifm=nesc(leftof(h2,h3))
%~ kifm=nesc(leftof(h2,h3))
%~ kif_to_boxlog_attvars2 = necessary(leftof(h2,h3))



=======================================================
leftof(h2,h3)
============================================

?- kif_to_boxlog( leftof(h2,h3) ).


% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h2 leftof h3
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kifi=leftof(h2,h3)
%~ kifm=nesc(leftof(h2,h3))
%~ kif_to_boxlog_attvars2 = necessary(leftof(h2,h3))

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s):
nesc(leftof(h2,h3)).

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  it is necessarily true that h2 leftof h3
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

nesc( leftof(h2,h3)).

============================================
~*/

leftof(h3, h4).
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_type_01.pl:27
%~ kifi = leftof(h3,h4).
%~ kifm = nesc( leftof(h3,h4)).
%~ kifm = nesc( leftof(h3,h4)).
%~ debugm(common_logic_loader,show_success(common_logic_loader,common_logic_loader:ain(clif(leftof(h3,h4)))))
%~ kifi = leftof(h3,h4).
%~ kifm = nesc( leftof(h3,h4)).

/*~
%~ kifi=leftof(h3,h4)
%~ kifm=nesc(leftof(h3,h4))
%~ kifm=nesc(leftof(h3,h4))
%~ kif_to_boxlog_attvars2 = necessary(leftof(h3,h4))



=======================================================
leftof(h3,h4)
============================================

?- kif_to_boxlog( leftof(h3,h4) ).


% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h3 leftof h4
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kifi=leftof(h3,h4)
%~ kifm=nesc(leftof(h3,h4))
%~ kif_to_boxlog_attvars2 = necessary(leftof(h3,h4))

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s):
nesc(leftof(h3,h4)).

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  it is necessarily true that h3 leftof h4
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

nesc( leftof(h3,h4)).

============================================
~*/

leftof(h4, h5).

% makes the KB non-monotonic
%~ kifi = leftof(h4,h5).
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_type_01.pl:28
%~ kifm = nesc( leftof(h4,h5)).
%~ kifm = nesc( leftof(h4,h5)).
%~ debugm(common_logic_loader,show_success(common_logic_loader,common_logic_loader:ain(clif(leftof(h4,h5)))))
%~ kifi = leftof(h4,h5).
%~ kifm = nesc( leftof(h4,h5)).

/*~
%~ kifi=leftof(h4,h5)
%~ kifm=nesc(leftof(h4,h5))
%~ kifm=nesc(leftof(h4,h5))
%~ kif_to_boxlog_attvars2 = necessary(leftof(h4,h5))



=======================================================
leftof(h4,h5)
============================================

?- kif_to_boxlog( leftof(h4,h5) ).


% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h4 leftof h5
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kifi=leftof(h4,h5)
%~ kifm=nesc(leftof(h4,h5))
%~ kif_to_boxlog_attvars2 = necessary(leftof(h4,h5))

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s):
nesc(leftof(h4,h5)).

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  it is necessarily true that h4 leftof h5
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

nesc( leftof(h4,h5)).

============================================
~*/

% makes the KB non-monotonic
:- set_kif_option(qualify_modality,false).
% this should cause h1-h5 to become houses


% this should cause h1-h5 to become houses

leftof(H1, H2) => house(H1) & house(H2).

% intractive_test/1 means only run if interactive
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_type_01.pl:35
%~ kifm = ( leftof(House_Leftof,House_Leftof3) =>
%~          house(House_Leftof)&house(House_Leftof3)).
%~ kifm = ( leftof(House_Leftof8,House_Leftof9) =>
%~          house(House_Leftof8)&house(House_Leftof9)).
%~ debugm( common_logic_loader,
%~   show_success( common_logic_loader,
%~     common_logic_loader : ain( clif( leftof(H1,H2)=>(house(H1)&house(H2))))))
%~ kifm = ( leftof(House_Leftof,House_Leftof3) =>
%~          house(House_Leftof)&house(House_Leftof3)).

%~ kifm = leftof(H1,H2)=>(house(H1)&house(H2)).
/*~
%~ kifm=leftof(House_Leftof,House_Leftof3)=>(house(House_Leftof)&house(House_Leftof3))
%~ kifm=leftof(House_Leftof8,House_Leftof9)=>(house(House_Leftof8)&house(House_Leftof9))
%~ kif_to_boxlog_attvars2 = =>(leftof('$VAR'('House_Leftof8'),'$VAR'('House_Leftof9')),and(house('$VAR'('House_Leftof8')),house('$VAR'('House_Leftof9'))))



=======================================================
=>(leftof('$VAR'('House_Leftof'),'$VAR'('House_Leftof3')),&(house('$VAR'('House_Leftof')),house('$VAR'('House_Leftof3'))))
============================================

?- kif_to_boxlog( leftof(House_Leftof,House_Leftof3)=>(house(House_Leftof)&house(House_Leftof3)) ).


% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  If:
%~    ?House_Leftof leftof ?House_Leftof3 then it is
%~  Implied that:
%~    " ?House_Leftof isa house "  and
%~    " ?House_Leftof3 isa house "
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kifm=leftof(House_Leftof,House_Leftof3)=>(house(House_Leftof)&house(House_Leftof3))
%~ kif_to_boxlog_attvars2 = =>(leftof('$VAR'('House_Leftof'),'$VAR'('House_Leftof3')),and(house('$VAR'('House_Leftof')),house('$VAR'('House_Leftof3'))))

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 6 entailment(s):
nesc(leftof(House_Leftof,House_Leftof3))&nesc(~house(House_Leftof))==>nesc(~house(House_Leftof3)).
nesc(leftof(House_Leftof,House_Leftof3))&nesc(~house(House_Leftof3))==>nesc(~house(House_Leftof)).
nesc(leftof(House_Leftof,House_Leftof3))&poss(house(House_Leftof))==>nesc(house(House_Leftof3)).
nesc(leftof(House_Leftof,House_Leftof3))&poss(house(House_Leftof3))==>nesc(house(House_Leftof)).
poss(house(House_Leftof))&nesc(~house(House_Leftof3))==>nesc(~leftof(House_Leftof,House_Leftof3)).
poss(house(House_Leftof3))&nesc(~house(House_Leftof))==>nesc(~leftof(House_Leftof,House_Leftof3)).

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    " ?House_Leftof leftof ?House_Leftof3 " is necessarily true  and
%~    " ?House_Leftof isa house " is necessarily false
%~  It's Proof that:
%~    " ?House_Leftof3 isa house " is necessarily false
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( nesc(leftof(House_Leftof,House_Leftof3))&nesc(~house(House_Leftof)) ==>
  nesc( ~( house(House_Leftof3)))).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    " ?House_Leftof leftof ?House_Leftof3 " is necessarily true  and
%~    " ?House_Leftof3 isa house " is necessarily false
%~  It's Proof that:
%~    " ?House_Leftof isa house " is necessarily false
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( nesc(leftof(House_Leftof,House_Leftof3))&nesc(~house(House_Leftof3)) ==>
  nesc( ~( house(House_Leftof)))).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    " ?House_Leftof leftof ?House_Leftof3 " is necessarily true  and
%~    " ?House_Leftof isa house " is possible
%~  It's Proof that:
%~    " ?House_Leftof3 isa house " is necessarily true
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( nesc(leftof(House_Leftof,House_Leftof3))&poss(house(House_Leftof)) ==>
  nesc( house(House_Leftof3))).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    " ?House_Leftof leftof ?House_Leftof3 " is necessarily true  and
%~    " ?House_Leftof3 isa house " is possible
%~  It's Proof that:
%~    " ?House_Leftof isa house " is necessarily true
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( nesc(leftof(House_Leftof,House_Leftof3))&poss(house(House_Leftof3)) ==>
  nesc( house(House_Leftof))).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    " ?House_Leftof isa house " is possible  and
%~    " ?House_Leftof3 isa house " is necessarily false
%~  It's Proof that:
%~    " ?House_Leftof leftof ?House_Leftof3 " is necessarily false
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( poss(house(House_Leftof))&nesc(~house(House_Leftof3)) ==>
  nesc( ~( leftof(House_Leftof,House_Leftof3)))).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    " ?House_Leftof3 isa house " is possible  and
%~    " ?House_Leftof isa house " is necessarily false
%~  It's Proof that:
%~    " ?House_Leftof leftof ?House_Leftof3 " is necessarily false
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( poss(house(House_Leftof3))&nesc(~house(House_Leftof)) ==>
  nesc( ~( leftof(House_Leftof,House_Leftof3)))).

============================================%~ kifm=leftof(H1,H2)=>(house(H1)&house(H2))
%~ kif_to_boxlog_attvars2 = =>(leftof('$VAR'('H1'),'$VAR'('H2')),and(house('$VAR'('H1')),house('$VAR'('H2'))))
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    " ?H2 isa house " is possible  and
%~    " ?H1 isa house " is necessarily false
%~  It's Proof that:
%~    " ?H1 leftof ?H2 " is necessarily false
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

poss(house(H2))&nesc(~house(H1))==>nesc(~leftof(H1,H2)).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    " ?H1 leftof ?H2 " is necessarily true  and
%~    " ?H1 isa house " is necessarily false
%~  It's Proof that:
%~    " ?H2 isa house " is necessarily false
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

nesc(leftof(H1,H2))&nesc(~house(H1))==>nesc(~house(H2)).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    " ?H1 leftof ?H2 " is necessarily true  and
%~    " ?H2 isa house " is possible
%~  It's Proof that:
%~    " ?H1 isa house " is necessarily true
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

nesc(leftof(H1,H2))&poss(house(H2))==>nesc(house(H1)).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    " ?H1 isa house " is possible  and
%~    " ?H2 isa house " is necessarily false
%~  It's Proof that:
%~    " ?H1 leftof ?H2 " is necessarily false
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

poss(house(H1))&nesc(~house(H2))==>nesc(~leftof(H1,H2)).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    " ?H1 leftof ?H2 " is necessarily true  and
%~    " ?H2 isa house " is necessarily false
%~  It's Proof that:
%~    " ?H1 isa house " is necessarily false
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

nesc(leftof(H1,H2))&nesc(~house(H2))==>nesc(~house(H1)).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    " ?H1 leftof ?H2 " is necessarily true  and
%~    " ?H1 isa house " is possible
%~  It's Proof that:
%~    " ?H2 isa house " is necessarily true
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

nesc(leftof(H1,H2))&poss(house(H1))==>nesc(house(H2)).

~*/

% intractive_test/1 means only run if interactive
:- interactive_test(listing(kif_show)).

% mpred_test/1 each become a Junit test that must succeed

/*~
0m1m97m40m?- listing(kif_show).49m0m21m0m
~*/

% mpred_test/1 each become a Junit test that must succeed
:- mpred_test(listing(nesc)).

% ensure our rule worked
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_type_01.pl:41
%~ mpred_test("Test_0001_Line_0000__Nesc",baseKB:listing(nesc))
goal=baseKB:listing(nesc).
time=0.00638270378112793.
passed=passed=info(why_was_true(baseKB:listing(nesc)))
no_proof_for(listing(nesc)).

:- dynamic nesc/1.
:- multifile nesc/1.
:- public nesc/1.
:- module_transparent nesc/1.

nesc(A) :-
    zwc,
    nesc_lc(baseKB, A).
nesc(leftof(h1, h2)).
nesc(leftof(h2, h3)).
nesc(leftof(h3, h4)).
nesc(leftof(h4, h5)).
nesc(house(h1)).
nesc(house(h2)).
nesc(house(h3)).
nesc(house(h4)).
nesc(house(h5)).

:- public nesc/2.
:- module_transparent nesc/2.

nesc(_M, isNamed(X, Y)) :-
    !,
    isNamed_impl(X, Y),
    !.
nesc(A, B) :-
    swc,
    first_of([ (loop_check_term(A:proven_tru(B), info(A:proven_tru(B), 'common_logic_exists.pl':318), fail), nop(nrlc0(call(call, \+A:proven_neg(B))))),
               (A:proven_helper(B), \+A:proven_helper(~B)),
               A:skolem_tru(B)
             ]).

no_proof_for(listing(nesc)).

no_proof_for(listing(nesc)).

result=passed.
]]></system-err>
    </testcase>
  </testsuite>
 </testsuites>

logicmoo.base.examples.fol.POSS_FORALL_EXISTS_01 JUnit

(cd /var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/logicmoo_base/t/examples/fol ; timeout --foreground --preserve-status -s SIGKILL -k 10s 10s lmoo-clif poss_forall_exists_01.pfc.pl)

GH_MASTER_ISSUE_FINFO=

GH_MASTER_ISSUE_ID=#

Latest: https://jenkins.logicmoo.org/job/logicmoo_workspace/lastBuild/testReport/logicmoo.base.examples.fol/POSS_FORALL_EXISTS_01/logicmoo_base_examples_fol_POSS_FORALL_EXISTS_01 JUnit/

This: https://jenkins.logicmoo.org/job/logicmoo_workspace/42/testReport/logicmoo.base.examples.fol/POSS_FORALL_EXISTS_01/logicmoo_base_examples_fol_POSS_FORALL_EXISTS_01 JUnit/

GIT: cafe456

%
running('/var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/logicmoo_base/t/examples/fol/poss_forall_exists_01.pfc.pl'),
%~ this_test_might_need( :-( use_module( library(logicmoo_plarkc))))


% =================================================================================
% Set our engine up
% =================================================================================

:- expects_dialect(clif).
% deduce instances from usages in args having the effect of deducing human,dwelling,beverage_class are classes

% deduce instances from usages in args having the effect of deducing human,dwelling,beverage_class are classes
==> feature_setting(make_wff,true).

==> feature_setting(add_admitted_arguments,true).
% set truth maintainance system to remove previous assertions that new assertions disagree with 

% set truth maintainance system to remove previous assertions that new assertions disagree with 
==> feature_setting(tms_mode,remove_conflicting).

:- set_prolog_flag(runtime_debug,3). % mention it when we remove previous assertions
 % mention it when we remove previous assertions
:- set_prolog_flag_until_eof(do_renames,mpred_expansion).
%:- set_prolog_flag_until_eof(runtime_speed,0). % but dont gripe about speed

%:- set_prolog_flag_until_eof(runtime_speed,0). % but dont gripe about speed
:- kif_compile.



:- module(baseKB).

:- '$set_source_module'(baseKB).



% =================================================================================
% Define a couple predicates
% =================================================================================





% =================================================================================
% Define a couple predicates
% =================================================================================

:-kb_shared(livesAt/2).
% maximum cardinality of livesAt/2 is 1

% maximum cardinality of livesAt/2 is 1
==> isa(livesAt,'FunctionalBinaryPredicate').
%~ azzert_rename('FunctionalBinaryPredicate',rtFunctionalBinaryPredicate)

==> argIsa(livesAt,1,human).

==> argIsa(livesAt,2,dwelling).

% define drinks/2


% define drinks/2
:-kb_shared(drinks/2).

==> argIsa(drinks,1,human).

==> argIsa(drinks,2,beverage_class).

% =================================================================================
% But given the above: 
%
%   Only things that possibly can drink coffee live in the green house?
%
% =================================================================================



% =================================================================================
% But given the above: 
%
%   Only things that possibly can drink coffee live in the green house?
%
% =================================================================================

:- show_kif_to_boxlog(all(X, livesAt(X, green_house) & drinks(X, coffee))).

% this should have meant: 

%~ test_boxlog( all(X,livesAt(X,green_house)&drinks(X,coffee)))


% this should have meant: 

:- show_kif_to_boxlog(all(X, (poss(livesAt(X, green_house) & drinks(X, coffee))) => livesAt(X, green_house) & drinks(X, coffee))).

%~ test_boxlog( all( X,
%~                ( poss( livesAt(X,green_house)&drinks(X,coffee)) =>
%~                  livesAt(X,green_house)&drinks(X,coffee))))


:- show_kif_to_boxlog(all(X, (poss(livesAt(X, green_house)) & poss(drinks(X, coffee))) => livesAt(X, green_house) & drinks(X, coffee))).

%~ /var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/logicmoo_base/t/examples/fol/poss_forall_exists_01.pfc.pl:51 
%~ test_boxlog( all( X,
%~                ( poss(livesAt(X,green_house))&poss(drinks(X,coffee)) =>
%~                  livesAt(X,green_house)&drinks(X,coffee))))


~poss(livesAt(fred,green_house)).

% Does fred drink coffee? (should be unknown)


% Does fred drink coffee? (should be unknown)
:- \+ drinks(fred,coffee).

%~ mpred_test("Test_0001_Line_0000__naf_Fred",baseKB:(\+drinks(fred,coffee)))
/*~
%~ mpred_test("Test_0001_Line_0000__naf_Fred",baseKB:(\+drinks(fred,coffee)))
passed=info(why_was_true(baseKB:(\+drinks(fred,coffee))))
no_proof_for(\+drinks(fred,coffee)).

no_proof_for(\+drinks(fred,coffee)).

no_proof_for(\+drinks(fred,coffee)).

	name	='logicmoo.base.examples.fol.POSS_FORALL_EXISTS_01-Test_0001_Line_0000__naf_Fred'.
	JUNIT_CLASSNAME	='logicmoo.base.examples.fol.POSS_FORALL_EXISTS_01'.
	JUNIT_CMD	='timeout --foreground --preserve-status -s SIGKILL -k 10s 10s lmoo-clif poss_forall_exists_01.pfc.pl'.
% saving_junit: /var/lib/jenkins/workspace/logicmoo_workspace/test_results/jenkins/Report-logicmoo-junit-examples-fol-vSTARvfvSTARv_01vDOTvpvSTARv-Units-logicmoo.base.examples.fol.POSS_FORALL_EXISTS_01-Test_0001_Line_0000__naf_Fred-junit.xml
~*/


poss(livesAt(joe,green_house)).

:- drinks(joe,coffee).


% =================================================================================
% These two assertions are a bit weird but are for fun
% =================================================================================

% all objects in the universe that may drink coffee do drink coffee
%all(X, if(poss(drinks(X, coffee)),drinks(X, coffee))).

% all objects in the universe that may live in the green house do live in the green house
%all(X, if(poss(livesAt(X, green_house)),lives(X, green_house) )).




%~ message_hook_type(warning)
%~ message_hook(
%~    goal_failed(directive,baseKB:drinks(joe,coffee)),
%~    warning,
%~    [ 'Goal (~w) failed: ~p' - [ directive,
%~                                 baseKB : drinks(joe,coffee)]])
/*~
Goal (directive) failed: baseKB:drinks(joe,coffee)
Warning: Goal (directive) failed: baseKB:drinks(joe,coffee)
~*/
%~ unused(save_junit_results)
%~ test_completed_exit(3)
:- dynamic junit_prop/3.


:- dynamic junit_prop/3.

junit_prop('logicmoo.base.examples.fol.POSS_FORALL_EXISTS_01 JUnit', warning, "Goal (directive) failed: baseKB:drinks(joe,coffee)").

:- dynamic junit_prop/3.


totalTime=2

FAILED: /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-junit-minor -k poss_forall_exists_01.pfc.pl (returned 3)

logicmoo.base.examples.fol.FOL_CALC_01 JUnit

(cd /var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol ; timeout --foreground --preserve-status -s SIGKILL -k 10s 10s swipl -x /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-clif -t "['fol_calc_01.pfc.pl']")

% EDIT: https://github.com/logicmoo/logicmoo_workspace/edit/master/packs_sys/logicmoo_base/t/examples/fol/fol_calc_01.pfc.pl
% JENKINS: https://jenkins.logicmoo.org/job/logicmoo_workspace/lastBuild/testReport/logicmoo.base.examples.fol/FOL_CALC_01/
% ISSUE_SEARCH: https://github.com/logicmoo/logicmoo_workspace/issues?q=is%3Aissue+label%3AFOL_CALC_01
% ISSUE: #69

%~ init_phase(after_load)
%~ init_phase(restore_state)
%
%~ init_why(after_boot,program)
%~ after_boot.
%~ Dont forget to ?- logicmoo_i_cyc_xform.
running('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/fol_calc_01.pfc.pl'),
%~ /var/lib/jenkins/.local/share/swi-prolog/pack/logicmoo_utils/prolog/logicmoo_test_header.pl:93 
%~ this_test_might_need( :-( use_module( library(logicmoo_plarkc))))


:- set_prolog_flag(gc,false).


% =================================================================================
% Set our engine up
% =================================================================================

/*~
~*/



% =================================================================================
% Set our engine up
% =================================================================================

:- expects_dialect(clif).
% deduce instances from usages in args having the effect of deducing human,dwelling,beverage_class are classes
/*~
~*/

% deduce instances from usages in args having the effect of deducing human,dwelling,beverage_class are classes
==> feature_setting(make_wff,true).
/*~
~*/

==> feature_setting(add_admitted_arguments,true).
% set truth maintainance system to remove previous assertions that new assertions disagree with 
/*~
~*/

% set truth maintainance system to remove previous assertions that new assertions disagree with 
==> feature_setting(tms_mode,remove_conflicting).
/*~
~*/

:- set_prolog_flag(runtime_debug,3). % mention it when we remove previous assertions
/*~
~*/
 % mention it when we remove previous assertions
:- set_prolog_flag_until_eof(do_renames,mpred_expansion).
/*~
~*/

:- kif_compile.

% =================================================================================
% Begin program
% =================================================================================

% Create out 14 keys
/*~
~*/


% =================================================================================
% Begin program
% =================================================================================

% Create out 14 keys
exists(Key,glythed(Key,"1")). 
/*~
%~ kifi = exists(_3133382,glythed(_3133382,"1")).
%~ kifm = exists(Glythed,nesc(glythed(Glythed,"1"))).
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/fol_calc_01.pfc.pl:41 
%~ kifm = exists(Nesc_Glythed3,nesc(glythed(Nesc_Glythed3,"1"))).
%~ kif_to_boxlog_attvars2 = exists('$VAR'('Nesc_Glythed3'),necessary(glythed('$VAR'('Nesc_Glythed3'),"1")))
%~ debugm(baseKB,show_success(baseKB,baseKB:ain(clif(exists(_3015790,glythed(_3015790,"1"))))))
%   xgrun compiled into parser_chat80 0.00 sec, 0 clauses
%   xgproc compiled into parser_chat80 0.02 sec, 0 clauses


** Grammar from file /var/lib/jenkins/.local/share/swi-prolog/pack/logicmoo_nlu/ext/chat80/original/clone.xg: 1469 words .. **



** Grammar from file /var/lib/jenkins/.local/share/swi-prolog/pack/logicmoo_nlu/ext/chat80/original/lex.xg: 488 words .. **

%  chatops compiled into parser_chat80 0.00 sec, 0 clauses
%  chatops compiled into parser_chat80 0.00 sec, 0 clauses
% :- share_mfa_pt2(parser_chat80,test_chat80,1).
% :- share_mfa_pt2(parser_chat80,hi80,0).
% :- share_mfa_pt2(parser_chat80,hi80,1).
% :- share_mfa_pt2(parser_chat80,control80,1).
% :- share_mfa_pt2(parser_chat80,trace_chat80,1).
%  /var/lib/jenkins/.local/share/swi-prolog/pack/logicmoo_nlu/ext/chat80/original/load compiled into parser_chat80 2.67 sec, 3 clauses
% /var/lib/jenkins/.local/share/swi-prolog/pack/logicmoo_utils/prolog/debuggery/dmsg compiled into dmsg 0.15 sec, -16 clauses




=======================================================
exists('$VAR'('Glythed'),glythed('$VAR'('Glythed'),"1"))
============================================


?- kif_to_boxlog( exists(Glythed,glythed(Glythed,"1")) ).



% In English: 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ 
%~  There exists ?Glythed
%~    " ?Glythed glythed "1" "
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = exists('$VAR'('Glythed'),necessary(glythed('$VAR'('Glythed'),"1")))

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s): 
'$existential'(Glythed,1,nesc(glythed(Glythed,"1")))==>nesc(glythed(Glythed,"1")).

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~     by default ?Glythed nesc(glythed(Glythed,"1"))
%~  It's Proof that:
%~    " ?Glythed glythed "1" " is necessarily true
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

'$existential'(Glythed,1,nesc(glythed(Glythed,"1")))==>nesc(glythed(Glythed,"1")).

============================================
%~ kif_to_boxlog_attvars2 = exists('$VAR'('Key'),necessary(glythed('$VAR'('Key'),"1")))
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~     by default ?Key nesc(glythed(Key,"1"))
%~  It's Proof that:
%~    " ?Key glythed "1" " is necessarily true
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

'$existential'(Key,1,nesc(glythed(Key,"1")))==>nesc(glythed(Key,"1")).

~*/
 exists(Key,glythed(Key,"2")).
/*~
%~ kif_to_boxlog_attvars2 = exists('$VAR'('Nesc_Glythed3'),necessary(glythed('$VAR'('Nesc_Glythed3'),"2")))
%~ debugm(baseKB,show_success(baseKB,baseKB:ain(clif(exists(_12292784,glythed(_12292784,"2"))))))




=======================================================
exists('$VAR'('Glythed'),glythed('$VAR'('Glythed'),"2"))
============================================


?- kif_to_boxlog( exists(Glythed,glythed(Glythed,"2")) ).



% In English: 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ 
%~  There exists ?Glythed
%~    " ?Glythed glythed "2" "
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = exists('$VAR'('Glythed'),necessary(glythed('$VAR'('Glythed'),"2")))

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s): 
'$existential'(Glythed,1,nesc(glythed(Glythed,"2")))==>nesc(glythed(Glythed,"2")).

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~     by default ?Glythed nesc(glythed(Glythed,"2"))
%~  It's Proof that:
%~    " ?Glythed glythed "2" " is necessarily true
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

'$existential'(Glythed,1,nesc(glythed(Glythed,"2")))==>nesc(glythed(Glythed,"2")).

============================================
%~ kif_to_boxlog_attvars2 = exists('$VAR'('Key'),necessary(glythed('$VAR'('Key'),"2")))
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~     by default ?Key nesc(glythed(Key,"2"))
%~  It's Proof that:
%~    " ?Key glythed "2" " is necessarily true
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

'$existential'(Key,1,nesc(glythed(Key,"2")))==>nesc(glythed(Key,"2")).

~*/

exists(Key,glythed(Key,"3")). 
/*~
%~ kif_to_boxlog_attvars2 = exists('$VAR'('Nesc_Glythed3'),necessary(glythed('$VAR'('Nesc_Glythed3'),"3")))
%~ debugm(baseKB,show_success(baseKB,baseKB:ain(clif(exists(_13141350,glythed(_13141350,"3"))))))




=======================================================
exists('$VAR'('Glythed'),glythed('$VAR'('Glythed'),"3"))
============================================


?- kif_to_boxlog( exists(Glythed,glythed(Glythed,"3")) ).



% In English: 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ 
%~  There exists ?Glythed
%~    " ?Glythed glythed "3" "
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = exists('$VAR'('Glythed'),necessary(glythed('$VAR'('Glythed'),"3")))

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s): 
'$existential'(Glythed,1,nesc(glythed(Glythed,"3")))==>nesc(glythed(Glythed,"3")).

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~     by default ?Glythed nesc(glythed(Glythed,"3"))
%~  It's Proof that:
%~    " ?Glythed glythed "3" " is necessarily true
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

'$existential'(Glythed,1,nesc(glythed(Glythed,"3")))==>nesc(glythed(Glythed,"3")).

============================================
%~ kif_to_boxlog_attvars2 = exists('$VAR'('Key'),necessary(glythed('$VAR'('Key'),"3")))
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~     by default ?Key nesc(glythed(Key,"3"))
%~  It's Proof that:
%~    " ?Key glythed "3" " is necessarily true
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

'$existential'(Key,1,nesc(glythed(Key,"3")))==>nesc(glythed(Key,"3")).

~*/
 exists(Key,glythed(Key,"4")).
/*~
%~ kif_to_boxlog_attvars2 = exists('$VAR'('Nesc_Glythed3'),necessary(glythed('$VAR'('Nesc_Glythed3'),"4")))
%~ debugm(baseKB,show_success(baseKB,baseKB:ain(clif(exists(_13989924,glythed(_13989924,"4"))))))




=======================================================
exists('$VAR'('Glythed'),glythed('$VAR'('Glythed'),"4"))
============================================


?- kif_to_boxlog( exists(Glythed,glythed(Glythed,"4")) ).



% In English: 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ 
%~  There exists ?Glythed
%~    " ?Glythed glythed "4" "
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = exists('$VAR'('Glythed'),necessary(glythed('$VAR'('Glythed'),"4")))

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s): 
'$existential'(Glythed,1,nesc(glythed(Glythed,"4")))==>nesc(glythed(Glythed,"4")).

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~     by default ?Glythed nesc(glythed(Glythed,"4"))
%~  It's Proof that:
%~    " ?Glythed glythed "4" " is necessarily true
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

'$existential'(Glythed,1,nesc(glythed(Glythed,"4")))==>nesc(glythed(Glythed,"4")).

============================================
%~ kif_to_boxlog_attvars2 = exists('$VAR'('Key'),necessary(glythed('$VAR'('Key'),"4")))
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~     by default ?Key nesc(glythed(Key,"4"))
%~  It's Proof that:
%~    " ?Key glythed "4" " is necessarily true
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

'$existential'(Key,1,nesc(glythed(Key,"4")))==>nesc(glythed(Key,"4")).

~*/

exists(Key,glythed(Key,"5")). 
/*~
%~ kif_to_boxlog_attvars2 = exists('$VAR'('Nesc_Glythed3'),necessary(glythed('$VAR'('Nesc_Glythed3'),"5")))
%~ debugm(baseKB,show_success(baseKB,baseKB:ain(clif(exists(_14838506,glythed(_14838506,"5"))))))




=======================================================
exists('$VAR'('Glythed'),glythed('$VAR'('Glythed'),"5"))
============================================


?- kif_to_boxlog( exists(Glythed,glythed(Glythed,"5")) ).



% In English: 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ 
%~  There exists ?Glythed
%~    " ?Glythed glythed "5" "
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = exists('$VAR'('Glythed'),necessary(glythed('$VAR'('Glythed'),"5")))

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s): 
'$existential'(Glythed,1,nesc(glythed(Glythed,"5")))==>nesc(glythed(Glythed,"5")).

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~     by default ?Glythed nesc(glythed(Glythed,"5"))
%~  It's Proof that:
%~    " ?Glythed glythed "5" " is necessarily true
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

'$existential'(Glythed,1,nesc(glythed(Glythed,"5")))==>nesc(glythed(Glythed,"5")).

============================================
%~ kif_to_boxlog_attvars2 = exists('$VAR'('Key'),necessary(glythed('$VAR'('Key'),"5")))
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~     by default ?Key nesc(glythed(Key,"5"))
%~  It's Proof that:
%~    " ?Key glythed "5" " is necessarily true
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

'$existential'(Key,1,nesc(glythed(Key,"5")))==>nesc(glythed(Key,"5")).

~*/
 exists(Key,glythed(Key,"6")).
/*~
%~ kif_to_boxlog_attvars2 = exists('$VAR'('Nesc_Glythed3'),necessary(glythed('$VAR'('Nesc_Glythed3'),"6")))
%~ debugm(baseKB,show_success(baseKB,baseKB:ain(clif(exists(_15687096,glythed(_15687096,"6"))))))




=======================================================
exists('$VAR'('Glythed'),glythed('$VAR'('Glythed'),"6"))
============================================


?- kif_to_boxlog( exists(Glythed,glythed(Glythed,"6")) ).



% In English: 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ 
%~  There exists ?Glythed
%~    " ?Glythed glythed "6" "
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = exists('$VAR'('Glythed'),necessary(glythed('$VAR'('Glythed'),"6")))

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s): 
'$existential'(Glythed,1,nesc(glythed(Glythed,"6")))==>nesc(glythed(Glythed,"6")).

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~     by default ?Glythed nesc(glythed(Glythed,"6"))
%~  It's Proof that:
%~    " ?Glythed glythed "6" " is necessarily true
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

'$existential'(Glythed,1,nesc(glythed(Glythed,"6")))==>nesc(glythed(Glythed,"6")).

============================================
%~ kif_to_boxlog_attvars2 = exists('$VAR'('Key'),necessary(glythed('$VAR'('Key'),"6")))
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~     by default ?Key nesc(glythed(Key,"6"))
%~  It's Proof that:
%~    " ?Key glythed "6" " is necessarily true
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

'$existential'(Key,1,nesc(glythed(Key,"6")))==>nesc(glythed(Key,"6")).

~*/

exists(Key,glythed(Key,"7")). 
/*~
%~ kif_to_boxlog_attvars2 = exists('$VAR'('Nesc_Glythed3'),necessary(glythed('$VAR'('Nesc_Glythed3'),"7")))
%~ debugm(baseKB,show_success(baseKB,baseKB:ain(clif(exists(_16535694,glythed(_16535694,"7"))))))




=======================================================
exists('$VAR'('Glythed'),glythed('$VAR'('Glythed'),"7"))
============================================


?- kif_to_boxlog( exists(Glythed,glythed(Glythed,"7")) ).



% In English: 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ 
%~  There exists ?Glythed
%~    " ?Glythed glythed "7" "
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = exists('$VAR'('Glythed'),necessary(glythed('$VAR'('Glythed'),"7")))

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s): 
'$existential'(Glythed,1,nesc(glythed(Glythed,"7")))==>nesc(glythed(Glythed,"7")).

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~     by default ?Glythed nesc(glythed(Glythed,"7"))
%~  It's Proof that:
%~    " ?Glythed glythed "7" " is necessarily true
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

'$existential'(Glythed,1,nesc(glythed(Glythed,"7")))==>nesc(glythed(Glythed,"7")).

============================================
%~ kif_to_boxlog_attvars2 = exists('$VAR'('Key'),necessary(glythed('$VAR'('Key'),"7")))
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~     by default ?Key nesc(glythed(Key,"7"))
%~  It's Proof that:
%~    " ?Key glythed "7" " is necessarily true
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

'$existential'(Key,1,nesc(glythed(Key,"7")))==>nesc(glythed(Key,"7")).

~*/
 exists(Key,glythed(Key,"8")).
/*~
%~ kif_to_boxlog_attvars2 = exists('$VAR'('Nesc_Glythed3'),necessary(glythed('$VAR'('Nesc_Glythed3'),"8")))
%~ debugm(baseKB,show_success(baseKB,baseKB:ain(clif(exists(_17384300,glythed(_17384300,"8"))))))




=======================================================
exists('$VAR'('Glythed'),glythed('$VAR'('Glythed'),"8"))
============================================


?- kif_to_boxlog( exists(Glythed,glythed(Glythed,"8")) ).



% In English: 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ 
%~  There exists ?Glythed
%~    " ?Glythed glythed "8" "
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = exists('$VAR'('Glythed'),necessary(glythed('$VAR'('Glythed'),"8")))

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s): 
'$existential'(Glythed,1,nesc(glythed(Glythed,"8")))==>nesc(glythed(Glythed,"8")).

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~     by default ?Glythed nesc(glythed(Glythed,"8"))
%~  It's Proof that:
%~    " ?Glythed glythed "8" " is necessarily true
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

'$existential'(Glythed,1,nesc(glythed(Glythed,"8")))==>nesc(glythed(Glythed,"8")).

============================================
%~ kif_to_boxlog_attvars2 = exists('$VAR'('Key'),necessary(glythed('$VAR'('Key'),"8")))
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~     by default ?Key nesc(glythed(Key,"8"))
%~  It's Proof that:
%~    " ?Key glythed "8" " is necessarily true
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

'$existential'(Key,1,nesc(glythed(Key,"8")))==>nesc(glythed(Key,"8")).

~*/

exists(Key,glythed(Key,"9")). 
/*~
%~ kif_to_boxlog_attvars2 = exists('$VAR'('Nesc_Glythed3'),necessary(glythed('$VAR'('Nesc_Glythed3'),"9")))
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/fol_calc_01.pfc.pl:45 
%~ debugm(baseKB,show_success(baseKB,baseKB:ain(clif(exists(_18232914,glythed(_18232914,"9"))))))




=======================================================
exists('$VAR'('Glythed'),glythed('$VAR'('Glythed'),"9"))
============================================


?- kif_to_boxlog( exists(Glythed,glythed(Glythed,"9")) ).



% In English: 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ 
%~  There exists ?Glythed
%~    " ?Glythed glythed "9" "
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = exists('$VAR'('Glythed'),necessary(glythed('$VAR'('Glythed'),"9")))

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s): 
'$existential'(Glythed,1,nesc(glythed(Glythed,"9")))==>nesc(glythed(Glythed,"9")).

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~     by default ?Glythed nesc(glythed(Glythed,"9"))
%~  It's Proof that:
%~    " ?Glythed glythed "9" " is necessarily true
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

'$existential'(Glythed,1,nesc(glythed(Glythed,"9")))==>nesc(glythed(Glythed,"9")).

============================================
%~ kif_to_boxlog_attvars2 = exists('$VAR'('Key'),necessary(glythed('$VAR'('Key'),"9")))
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~     by default ?Key nesc(glythed(Key,"9"))
%~  It's Proof that:
%~    " ?Key glythed "9" " is necessarily true
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

'$existential'(Key,1,nesc(glythed(Key,"9")))==>nesc(glythed(Key,"9")).

~*/
 exists(Key,glythed(Key,"0")).
/*~
%~ kif_to_boxlog_attvars2 = exists('$VAR'('Nesc_Glythed3'),necessary(glythed('$VAR'('Nesc_Glythed3'),"0")))
%~ debugm(baseKB,show_success(baseKB,baseKB:ain(clif(exists(_19081898,glythed(_19081898,"0"))))))




=======================================================
exists('$VAR'('Glythed'),glythed('$VAR'('Glythed'),"0"))
============================================


?- kif_to_boxlog( exists(Glythed,glythed(Glythed,"0")) ).



% In English: 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ 
%~  There exists ?Glythed
%~    " ?Glythed glythed "0" "
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = exists('$VAR'('Glythed'),necessary(glythed('$VAR'('Glythed'),"0")))

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s): 
'$existential'(Glythed,1,nesc(glythed(Glythed,"0")))==>nesc(glythed(Glythed,"0")).

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~     by default ?Glythed nesc(glythed(Glythed,"0"))
%~  It's Proof that:
%~    " ?Glythed glythed "0" " is necessarily true
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

'$existential'(Glythed,1,nesc(glythed(Glythed,"0")))==>nesc(glythed(Glythed,"0")).

============================================
%~ kif_to_boxlog_attvars2 = exists('$VAR'('Key'),necessary(glythed('$VAR'('Key'),"0")))
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~     by default ?Key nesc(glythed(Key,"0"))
%~  It's Proof that:
%~    " ?Key glythed "0" " is necessarily true
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

'$existential'(Key,1,nesc(glythed(Key,"0")))==>nesc(glythed(Key,"0")).

~*/

exists(Key,glythed(Key,"+")). 
/*~
%~ kif_to_boxlog_attvars2 = exists('$VAR'('Nesc'),necessary(glythed('$VAR'('Nesc'),"+")))
%~ debugm(baseKB,show_success(baseKB,baseKB:ain(clif(exists(_19930856,glythed(_19930856,"+"))))))




=======================================================
exists('$VAR'('Glythed'),glythed('$VAR'('Glythed'),"+"))
============================================


?- kif_to_boxlog( exists(Glythed,glythed(Glythed,"+")) ).



% In English: 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ 
%~  There exists ?Glythed
%~    " ?Glythed glythed "+" "
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = exists('$VAR'('Glythed'),necessary(glythed('$VAR'('Glythed'),"+")))

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s): 
'$existential'(Glythed,1,nesc(glythed(Glythed,"+")))==>nesc(glythed(Glythed,"+")).

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~     by default ?Glythed nesc(glythed(Glythed,"+"))
%~  It's Proof that:
%~    " ?Glythed glythed "+" " is necessarily true
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

'$existential'(Glythed,1,nesc(glythed(Glythed,"+")))==>nesc(glythed(Glythed,"+")).

============================================
%~ kif_to_boxlog_attvars2 = exists('$VAR'('Key'),necessary(glythed('$VAR'('Key'),"+")))
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~     by default ?Key nesc(glythed(Key,"+"))
%~  It's Proof that:
%~    " ?Key glythed "+" " is necessarily true
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

'$existential'(Key,1,nesc(glythed(Key,"+")))==>nesc(glythed(Key,"+")).

~*/
 exists(Key,glythed(Key,"-")).
/*~
%~ kif_to_boxlog_attvars2 = exists('$VAR'('Nesc'),necessary(glythed('$VAR'('Nesc'),"-")))
%~ debugm(baseKB,show_success(baseKB,baseKB:ain(clif(exists(_20780556,glythed(_20780556,"-"))))))




=======================================================
exists('$VAR'('Glythed'),glythed('$VAR'('Glythed'),"-"))
============================================


?- kif_to_boxlog( exists(Glythed,glythed(Glythed,"-")) ).



% In English: 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ 
%~  There exists ?Glythed
%~    " ?Glythed glythed "-" "
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = exists('$VAR'('Glythed'),necessary(glythed('$VAR'('Glythed'),"-")))

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s): 
'$existential'(Glythed,1,nesc(glythed(Glythed,"-")))==>nesc(glythed(Glythed,"-")).

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~     by default ?Glythed nesc(glythed(Glythed,"-"))
%~  It's Proof that:
%~    " ?Glythed glythed "-" " is necessarily true
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

'$existential'(Glythed,1,nesc(glythed(Glythed,"-")))==>nesc(glythed(Glythed,"-")).

============================================
%~ kif_to_boxlog_attvars2 = exists('$VAR'('Key'),necessary(glythed('$VAR'('Key'),"-")))
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~     by default ?Key nesc(glythed(Key,"-"))
%~  It's Proof that:
%~    " ?Key glythed "-" " is necessarily true
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

'$existential'(Key,1,nesc(glythed(Key,"-")))==>nesc(glythed(Key,"-")).

~*/

exists(Key,glythed(Key,"=")). 
/*~
%~ kif_to_boxlog_attvars2 = exists('$VAR'('Nesc'),necessary(glythed('$VAR'('Nesc'),"=")))
%~ debugm(baseKB,show_success(baseKB,baseKB:ain(clif(exists(_21629904,glythed(_21629904,"="))))))




=======================================================
exists('$VAR'('Glythed'),glythed('$VAR'('Glythed'),"="))
============================================


?- kif_to_boxlog( exists(Glythed,glythed(Glythed,"=")) ).



% In English: 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ 
%~  There exists ?Glythed
%~    " ?Glythed glythed "=" "
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = exists('$VAR'('Glythed'),necessary(glythed('$VAR'('Glythed'),"=")))

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s): 
'$existential'(Glythed,1,nesc(glythed(Glythed,"=")))==>nesc(glythed(Glythed,"=")).

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~     by default ?Glythed nesc(glythed(Glythed,"="))
%~  It's Proof that:
%~    " ?Glythed glythed "=" " is necessarily true
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

'$existential'(Glythed,1,nesc(glythed(Glythed,"=")))==>nesc(glythed(Glythed,"=")).

============================================
%~ kif_to_boxlog_attvars2 = exists('$VAR'('Key'),necessary(glythed('$VAR'('Key'),"=")))
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~     by default ?Key nesc(glythed(Key,"="))
%~  It's Proof that:
%~    " ?Key glythed "=" " is necessarily true
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

'$existential'(Key,1,nesc(glythed(Key,"=")))==>nesc(glythed(Key,"=")).

~*/
 exists(Key,glythed(Key,"CLR")). 

/*~
%~ kif_to_boxlog_attvars2 = exists('$VAR'('Nesc_CLR4'),necessary(glythed('$VAR'('Nesc_CLR4'),"CLR")))
%~ debugm(baseKB,show_success(baseKB,baseKB:ain(clif(exists(_22479620,glythed(_22479620,"CLR"))))))




=======================================================
exists('$VAR'('Glythed_CLR'),glythed('$VAR'('Glythed_CLR'),"CLR"))
============================================


?- kif_to_boxlog( exists(Glythed_CLR,glythed(Glythed_CLR,"CLR")) ).



% In English: 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ 
%~  There exists ?Glythed_CLR
%~    " ?Glythed_CLR glythed "CLR" "
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = exists('$VAR'('Glythed_CLR'),necessary(glythed('$VAR'('Glythed_CLR'),"CLR")))

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s): 
'$existential'(Glythed_CLR,1,nesc(glythed(Glythed_CLR,"CLR")))==>nesc(glythed(Glythed_CLR,"CLR")).

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~     by default ?Glythed_CLR nesc(glythed(Glythed_CLR,"CLR"))
%~  It's Proof that:
%~    " ?Glythed_CLR glythed "CLR" " is necessarily true
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( '$existential'(Glythed_CLR,1,nesc(glythed(Glythed_CLR,"CLR"))) ==> 
  nesc( glythed(Glythed_CLR,"CLR"))).

============================================
%~ kif_to_boxlog_attvars2 = exists('$VAR'('Key'),necessary(glythed('$VAR'('Key'),"CLR")))
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~     by default ?Key nesc(glythed(Key,"CLR"))
%~  It's Proof that:
%~    " ?Key glythed "CLR" " is necessarily true
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

'$existential'(Key,1,nesc(glythed(Key,"CLR")))==>nesc(glythed(Key,"CLR")).

~*/
 

:- kif_compile.

/*~
~*/


:- listing(glythed).

% Let same/2 be our unification identify 
/*~
%~ skipped( listing(glythed))
~*/


% Let same/2 be our unification identify 
all(X,same(X,X)).

/*~
%~ kif_to_boxlog_attvars2 = forall('$VAR'('Nesc_Same3'),necessary(same('$VAR'('Nesc_Same3'),'$VAR'('Nesc_Same3'))))
%~ debugm(baseKB,show_success(baseKB,baseKB:ain(clif(all(_23358818,same(_23358818,_23358818))))))




=======================================================
all('$VAR'('Same'),same('$VAR'('Same'),'$VAR'('Same')))
============================================


?- kif_to_boxlog( all(Same,same(Same,Same)) ).



% In English: 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ 
%~  For all ?Same
%~    " ?Same same ?Same "
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = forall('$VAR'('Same'),necessary(same('$VAR'('Same'),'$VAR'('Same'))))

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s): 
nesc(same(Same,Same)).

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  it is necessarily true that ?Same same ?Same
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

nesc( same(Same,Same)).

============================================
%~ kif_to_boxlog_attvars2 = forall('$VAR'('X'),necessary(same('$VAR'('X'),'$VAR'('X'))))
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  it is necessarily true that ?X same ?X
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

nesc( same(X,X)).

~*/


:- listing(same/2).

% Make each key unique depending on its label
/*~
%~ skipped( listing( same/2))
~*/


% Make each key unique depending on its label
all([Key1,Key2,Label1,Label2],
  glythed(Key1,Label1) & glythed(Key2,Label2) & different(Label1,Label2) => different(Key1,Key2)).

% same/2 implies not differnt
/*~
%~ kif_to_boxlog_attvars2 = forall('$VAR'('All_Glythed15'),forall('$VAR'('Different_All_Glythed16'),forall('$VAR'('Glythed_All_Different17'),forall('$VAR'('Different_Glythed_Nesc'),necessary(=>(and(and(glythed('$VAR'('All_Glythed15'),'$VAR'('Glythed_All_Different17')),glythed('$VAR'('Different_All_Glythed16'),'$VAR'('Different_Glythed_Nesc'))),different('$VAR'('Glythed_All_Different17'),'$VAR'('Different_Glythed_Nesc'))),different('$VAR'('All_Glythed15'),'$VAR'('Different_All_Glythed16'))))))))
%~ debugm( baseKB,
%~   show_success( baseKB,
%~     baseKB : ain( clif( all( [Key1,Key2,Label1,Label2],
%~                           ( ( glythed(Key1,Label1)  &
%~                               glythed(Key2,Label2) &
%~                               different(Label1,Label2)) =>
%~                             different(Key1,Key2)))))))




=======================================================
all('[|]'('$VAR'('Glythed'),'[|]'('$VAR'('Different_Glythed5'),'[|]'('$VAR'('Glythed_Different'),'[|]'('$VAR'('Different_Glythed8'),[])))),=>(&(&(glythed('$VAR'('Glythed'),'$VAR'('Glythed_Different')),glythed('$VAR'('Different_Glythed5'),'$VAR'('Different_Glythed8'))),different('$VAR'('Glythed_Different'),'$VAR'('Different_Glythed8'))),different('$VAR'('Glythed'),'$VAR'('Different_Glythed5'))))
============================================


?- kif_to_boxlog( all([Glythed,Different_Glythed5,Glythed_Different,Different_Glythed8],((glythed(Glythed,Glythed_Different)&glythed(Different_Glythed5,Different_Glythed8))&different(Glythed_Different,Different_Glythed8))=>different(Glythed,Different_Glythed5)) ).



% In English: 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ 
%~  For all ?Glythed ?Different_Glythed5 ?Glythed_Different ?Different_Glythed8
%~    (If:
%~    (" ?Glythed glythed ?Glythed_Different "  and
%~    " ?Different_Glythed5 glythed ?Different_Glythed8 " ) and
%~    " ?Glythed_Different different ?Different_Glythed8 " then it is
%~  Implied that:
%~    ?Glythed different ?Different_Glythed5 )
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = forall('$VAR'('Glythed'),forall('$VAR'('Different_Glythed5'),forall('$VAR'('Glythed_Different'),forall('$VAR'('Different_Glythed8'),necessary(=>(and(and(glythed('$VAR'('Glythed'),'$VAR'('Glythed_Different')),glythed('$VAR'('Different_Glythed5'),'$VAR'('Different_Glythed8'))),different('$VAR'('Glythed_Different'),'$VAR'('Different_Glythed8'))),different('$VAR'('Glythed'),'$VAR'('Different_Glythed5'))))))))

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 4 entailment(s): 
(nesc(glythed(Different_Glythed5,Different_Glythed8))&nesc(different(Glythed_Different,Different_Glythed8)))&poss(~different(Glythed,Different_Glythed5))==>poss(~glythed(Glythed,Glythed_Different)).
(nesc(glythed(Glythed,Glythed_Different))&nesc(different(Glythed_Different,Different_Glythed8)))&poss(~different(Glythed,Different_Glythed5))==>poss(~glythed(Different_Glythed5,Different_Glythed8)).
(nesc(glythed(Glythed,Glythed_Different))&nesc(glythed(Different_Glythed5,Different_Glythed8)))&nesc(different(Glythed_Different,Different_Glythed8))==>nesc(different(Glythed,Different_Glythed5)).
(nesc(glythed(Glythed,Glythed_Different))&nesc(glythed(Different_Glythed5,Different_Glythed8)))&poss(~different(Glythed,Different_Glythed5))==>poss(~different(Glythed_Different,Different_Glythed8)).

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    (" ?Different_Glythed5 glythed ?Different_Glythed8 " is necessarily true  and
%~    " ?Glythed_Different different ?Different_Glythed8 " is necessarily true ) and
%~    " ?Glythed different ?Different_Glythed5 " is possibly false
%~  It's Proof that:
%~    " ?Glythed glythed ?Glythed_Different " is possibly false
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( ( nesc( glythed(Different_Glythed5,Different_Glythed8))  &
    nesc( different(Glythed_Different,Different_Glythed8)) & 
    poss( ~( different(Glythed,Different_Glythed5)))) ==> 
  poss( ~( glythed(Glythed,Glythed_Different)))).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    (" ?Glythed glythed ?Glythed_Different " is necessarily true  and
%~    " ?Glythed_Different different ?Different_Glythed8 " is necessarily true ) and
%~    " ?Glythed different ?Different_Glythed5 " is possibly false
%~  It's Proof that:
%~    " ?Different_Glythed5 glythed ?Different_Glythed8 " is possibly false
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( ( nesc( glythed(Glythed,Glythed_Different))  &
    nesc( different(Glythed_Different,Different_Glythed8)) & 
    poss( ~( different(Glythed,Different_Glythed5)))) ==> 
  poss( ~( glythed(Different_Glythed5,Different_Glythed8)))).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    (" ?Glythed glythed ?Glythed_Different " is necessarily true  and
%~    " ?Different_Glythed5 glythed ?Different_Glythed8 " is necessarily true ) and
%~    " ?Glythed_Different different ?Different_Glythed8 " is necessarily true
%~  It's Proof that:
%~    " ?Glythed different ?Different_Glythed5 " is necessarily true
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( ( nesc( glythed(Glythed,Glythed_Different))  &
    nesc( glythed(Different_Glythed5,Different_Glythed8)) & 
    nesc( different(Glythed_Different,Different_Glythed8))) ==> 
  nesc( different(Glythed,Different_Glythed5))).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    (" ?Glythed glythed ?Glythed_Different " is necessarily true  and
%~    " ?Different_Glythed5 glythed ?Different_Glythed8 " is necessarily true ) and
%~    " ?Glythed different ?Different_Glythed5 " is possibly false
%~  It's Proof that:
%~    " ?Glythed_Different different ?Different_Glythed8 " is possibly false
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( ( nesc( glythed(Glythed,Glythed_Different))  &
    nesc( glythed(Different_Glythed5,Different_Glythed8)) & 
    poss( ~( different(Glythed,Different_Glythed5)))) ==> 
  poss( ~( different(Glythed_Different,Different_Glythed8)))).

============================================
%~ kif_to_boxlog_attvars2 = forall('$VAR'('Key1'),forall('$VAR'('Key2'),forall('$VAR'('Label1'),forall('$VAR'('Label2'),necessary(=>(and(and(glythed('$VAR'('Key1'),'$VAR'('Label1')),glythed('$VAR'('Key2'),'$VAR'('Label2'))),different('$VAR'('Label1'),'$VAR'('Label2'))),different('$VAR'('Key1'),'$VAR'('Key2'))))))))
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    (" ?Key1 glythed ?Label1 " is necessarily true  and
%~    " ?Key2 glythed ?Label2 " is necessarily true ) and
%~    " ?Label1 different ?Label2 " is necessarily true
%~  It's Proof that:
%~    " ?Key1 different ?Key2 " is necessarily true
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( ( nesc( glythed(Key1,Label1))  &
    nesc( glythed(Key2,Label2)) & 
    nesc( different(Label1,Label2))) ==> 
  nesc( different(Key1,Key2))).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    (" ?Key1 glythed ?Label1 " is necessarily true  and
%~    " ?Key2 glythed ?Label2 " is necessarily true ) and
%~    " ?Key1 different ?Key2 " is possibly false
%~  It's Proof that:
%~    " ?Label1 different ?Label2 " is possibly false
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( ( nesc( glythed(Key1,Label1))  &
    nesc( glythed(Key2,Label2)) & 
    poss( ~( different(Key1,Key2)))) ==> 
  poss( ~( different(Label1,Label2)))).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    (" ?Key2 glythed ?Label2 " is necessarily true  and
%~    " ?Label1 different ?Label2 " is necessarily true ) and
%~    " ?Key1 different ?Key2 " is possibly false
%~  It's Proof that:
%~    " ?Key1 glythed ?Label1 " is possibly false
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( ( nesc( glythed(Key2,Label2))  &
    nesc( different(Label1,Label2)) & 
    poss( ~( different(Key1,Key2)))) ==> 
  poss( ~( glythed(Key1,Label1)))).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    (" ?Key1 glythed ?Label1 " is necessarily true  and
%~    " ?Label1 different ?Label2 " is necessarily true ) and
%~    " ?Key1 different ?Key2 " is possibly false
%~  It's Proof that:
%~    " ?Key2 glythed ?Label2 " is possibly false
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( ( nesc( glythed(Key1,Label1))  &
    nesc( different(Label1,Label2)) & 
    poss( ~( different(Key1,Key2)))) ==> 
  poss( ~( glythed(Key2,Label2)))).

~*/


% same/2 implies not differnt
all([X,Y], same(X,Y) => ~ different(X,Y)).

% Note all unquantified vars will be universal from here on out
/*~
%~ kif_to_boxlog_attvars2 = forall('$VAR'('All_Same7'),forall('$VAR'('Different_Same_Nesc'),necessary(=>(same('$VAR'('All_Same7'),'$VAR'('Different_Same_Nesc')),not(different('$VAR'('All_Same7'),'$VAR'('Different_Same_Nesc')))))))
%~ debugm( baseKB,
%~   show_success( baseKB,
%~     baseKB : ain( clif( all([X,Y],same(X,Y)=>(~different(X,Y)))))))




=======================================================
all('[|]'('$VAR'('Same'),'[|]'('$VAR'('Different_Same3'),[])),=>(same('$VAR'('Same'),'$VAR'('Different_Same3')),~(different('$VAR'('Same'),'$VAR'('Different_Same3')))))
============================================


?- kif_to_boxlog( all([Same,Different_Same3],same(Same,Different_Same3)=>(~different(Same,Different_Same3))) ).



% In English: 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ 
%~  For all ?Same ?Different_Same3
%~    (If:
%~    ?Same same ?Different_Same3 then it is
%~  Implied that:
%~    " ?Same different ?Different_Same3 "  is false)
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = forall('$VAR'('Same'),forall('$VAR'('Different_Same3'),necessary(=>(same('$VAR'('Same'),'$VAR'('Different_Same3')),not(different('$VAR'('Same'),'$VAR'('Different_Same3')))))))

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 2 entailment(s): 
nesc(same(Same,Different_Same3))==>nesc(~different(Same,Different_Same3)).
poss(different(Same,Different_Same3))==>poss(~same(Same,Different_Same3)).

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    " ?Same same ?Different_Same3 " is necessarily true
%~  It's Proof that:
%~    " ?Same different ?Different_Same3 " is necessarily false
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

nesc(same(Same,Different_Same3))==>nesc(~different(Same,Different_Same3)).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    " ?Same different ?Different_Same3 " is possible
%~  It's Proof that:
%~    " ?Same same ?Different_Same3 " is possibly false
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

poss(different(Same,Different_Same3))==>poss(~same(Same,Different_Same3)).

============================================
%~ kif_to_boxlog_attvars2 = forall('$VAR'('X'),forall('$VAR'('Y'),necessary(=>(same('$VAR'('X'),'$VAR'('Y')),not(different('$VAR'('X'),'$VAR'('Y')))))))
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    " ?X different ?Y " is possible
%~  It's Proof that:
%~    " ?X same ?Y " is possibly false
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

poss(different(X,Y))==>poss(~same(X,Y)).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    " ?X same ?Y " is necessarily true
%~  It's Proof that:
%~    " ?X different ?Y " is necessarily false
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

nesc(same(X,Y))==>nesc(~different(X,Y)).

~*/


% Note all unquantified vars will be universal from here on out
subclass(S,C) & inst(I,S) => inst(I,C).

% an accumulator is a numeric buffer
/*~
%~ kif_to_boxlog_attvars2 = necessary(=>(and(genls('$VAR'('Inst_Genls'),'$VAR'('Inst_Genls13')),inst('$VAR'('Inst12'),'$VAR'('Inst_Genls'))),inst('$VAR'('Inst12'),'$VAR'('Inst_Genls13'))))
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/fol_calc_01.pfc.pl:66 
%~ debugm( baseKB,
%~   show_success( baseKB,
%~     baseKB : ain( clif( (subclass(S,C)&inst(I,S))=>inst(I,C)))))




=======================================================
=>(&(subclass('$VAR'('Inst_Subclass'),'$VAR'('Inst_Subclass5')),inst('$VAR'('Inst'),'$VAR'('Inst_Subclass'))),inst('$VAR'('Inst'),'$VAR'('Inst_Subclass5')))
============================================


?- kif_to_boxlog( (subclass(Inst_Subclass,Inst_Subclass5)&inst(Inst,Inst_Subclass))=>inst(Inst,Inst_Subclass5) ).



% In English: 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  If:
%~    " ?Inst_Subclass subclass ?Inst_Subclass5 "  and
%~    " ?Inst inst ?Inst_Subclass " then it is
%~  Implied that:
%~    ?Inst inst ?Inst_Subclass5
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(=>(and(genls('$VAR'('Inst_Subclass'),'$VAR'('Inst_Subclass5')),inst('$VAR'('Inst'),'$VAR'('Inst_Subclass'))),inst('$VAR'('Inst'),'$VAR'('Inst_Subclass5'))))

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 3 entailment(s): 
nesc(genls(Inst_Subclass,Inst_Subclass5))&nesc(inst(Inst,Inst_Subclass))==>nesc(inst(Inst,Inst_Subclass5)).
poss(~inst(Inst,Inst_Subclass5))&nesc(genls(Inst_Subclass,Inst_Subclass5))==>poss(~inst(Inst,Inst_Subclass)).
poss(~inst(Inst,Inst_Subclass5))&nesc(inst(Inst,Inst_Subclass))==>poss(~genls(Inst_Subclass,Inst_Subclass5)).

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    " ?Inst_Subclass genls ?Inst_Subclass5 " is necessarily true  and
%~    " ?Inst inst ?Inst_Subclass " is necessarily true
%~  It's Proof that:
%~    " ?Inst inst ?Inst_Subclass5 " is necessarily true
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( nesc(genls(Inst_Subclass,Inst_Subclass5))&nesc(inst(Inst,Inst_Subclass)) ==> 
  nesc( inst(Inst,Inst_Subclass5))).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    " ?Inst inst ?Inst_Subclass5 " is possibly false  and
%~    " ?Inst_Subclass genls ?Inst_Subclass5 " is necessarily true
%~  It's Proof that:
%~    " ?Inst inst ?Inst_Subclass " is possibly false
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( ( poss( ~( inst(Inst,Inst_Subclass5))) & 
    nesc( genls(Inst_Subclass,Inst_Subclass5))) ==> 
  poss( ~( inst(Inst,Inst_Subclass)))).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    " ?Inst inst ?Inst_Subclass5 " is possibly false  and
%~    " ?Inst inst ?Inst_Subclass " is necessarily true
%~  It's Proof that:
%~    " ?Inst_Subclass genls ?Inst_Subclass5 " is possibly false
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( poss(~inst(Inst,Inst_Subclass5))&nesc(inst(Inst,Inst_Subclass)) ==> 
  poss( ~( genls(Inst_Subclass,Inst_Subclass5)))).

============================================
%~ kif_to_boxlog_attvars2 = necessary(=>(and(genls('$VAR'('S'),'$VAR'('C')),inst('$VAR'('I'),'$VAR'('S'))),inst('$VAR'('I'),'$VAR'('C'))))
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    " ?S genls ?C " is necessarily true  and
%~    " ?I inst ?S " is necessarily true
%~  It's Proof that:
%~    " ?I inst ?C " is necessarily true
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

nesc(genls(S,C))&nesc(inst(I,S))==>nesc(inst(I,C)).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    " ?I inst ?C " is possibly false  and
%~    " ?I inst ?S " is necessarily true
%~  It's Proof that:
%~    " ?S genls ?C " is possibly false
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( poss(~inst(I,C))&nesc(inst(I,S)) ==> 
  poss( ~( genls(S,C)))).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    " ?I inst ?C " is possibly false  and
%~    " ?S genls ?C " is necessarily true
%~  It's Proof that:
%~    " ?I inst ?S " is possibly false
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( poss(~inst(I,C))&nesc(genls(S,C)) ==> 
  poss( ~( inst(I,S)))).

~*/


% an accumulator is a numeric buffer
subclass(accumulator,numbuffer).

% a display is a numeric buffer
/*~
%~ kif_to_boxlog_attvars2 = necessary(genls(accumulator,numbuffer))
%~ debugm(baseKB,show_success(baseKB,baseKB:ain(clif(subclass(accumulator,numbuffer)))))




=======================================================
subclass(accumulator,numbuffer)
============================================


?- kif_to_boxlog( subclass(accumulator,numbuffer) ).



% In English: 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  accumulator subclass numbuffer
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(genls(accumulator,numbuffer))

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s): 
nesc(genls(accumulator,numbuffer)).

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  it is necessarily true that accumulator genls numbuffer
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

nesc( genls(accumulator,numbuffer)).

============================================
~*/


% a display is a numeric buffer
subclass(display,numbuffer).

% numeric buffer and operation buffer are buffers
/*~
%~ kif_to_boxlog_attvars2 = necessary(genls(display,numbuffer))
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/fol_calc_01.pfc.pl:72 
%~ warn( really_remake_as_dynamic(
%~          edinburgh : display(Display),
%~          for(baseKB,decl_kb_type(kb_shared,baseKB:display/1))))
%~ warn( really_remake_as_dynamic2(edinburgh:display(Display),bc(decl_kb_type(kb_shared,baseKB:display/1))))
_42251488
%~ debugm(baseKB,show_success(baseKB,baseKB:ain(clif(subclass(display,numbuffer)))))




=======================================================
subclass(display,numbuffer)
============================================


?- kif_to_boxlog( subclass(display,numbuffer) ).



% In English: 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  display subclass numbuffer
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(genls(display,numbuffer))

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s): 
nesc(genls(display,numbuffer)).

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  it is necessarily true that display genls numbuffer
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

nesc( genls(display,numbuffer)).

============================================
~*/


% numeric buffer and operation buffer are buffers
subclass(numbuffer,buffer). 
/*~
%~ kif_to_boxlog_attvars2 = necessary(genls(numbuffer,buffer))
%~ debugm(baseKB,show_success(baseKB,baseKB:ain(clif(subclass(numbuffer,buffer)))))




=======================================================
subclass(numbuffer,buffer)
============================================


?- kif_to_boxlog( subclass(numbuffer,buffer) ).



% In English: 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  numbuffer subclass buffer
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(genls(numbuffer,buffer))

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s): 
nesc(genls(numbuffer,buffer)).

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  it is necessarily true that numbuffer genls buffer
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

nesc( genls(numbuffer,buffer)).

============================================
~*/
 subclass(opbuffer,buffer).

% Create some buffers
/*~
%~ kif_to_boxlog_attvars2 = necessary(genls(opbuffer,buffer))
%~ debugm(baseKB,show_success(baseKB,baseKB:ain(clif(subclass(opbuffer,buffer)))))




=======================================================
subclass(opbuffer,buffer)
============================================


?- kif_to_boxlog( subclass(opbuffer,buffer) ).



% In English: 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  opbuffer subclass buffer
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(genls(opbuffer,buffer))

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s): 
nesc(genls(opbuffer,buffer)).

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  it is necessarily true that opbuffer genls buffer
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

nesc( genls(opbuffer,buffer)).

============================================
~*/


% Create some buffers
exists(X,inst(X,accumulator)).
/*~
%~ kif_to_boxlog_attvars2 = exists('$VAR'('Nesc_Accumulator4'),necessary(inst('$VAR'('Nesc_Accumulator4'),accumulator)))
%~ debugm(baseKB,show_success(baseKB,baseKB:ain(clif(exists(_43258076,inst(_43258076,accumulator))))))




=======================================================
exists('$VAR'('Inst_Accumulator'),inst('$VAR'('Inst_Accumulator'),accumulator))
============================================


?- kif_to_boxlog( exists(Inst_Accumulator,inst(Inst_Accumulator,accumulator)) ).



% In English: 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ 
%~  There exists ?Inst_Accumulator
%~    " ?Inst_Accumulator inst accumulator "
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = exists('$VAR'('Inst_Accumulator'),necessary(inst('$VAR'('Inst_Accumulator'),accumulator)))

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s): 
'$existential'(Inst_Accumulator,1,nesc(inst(Inst_Accumulator,accumulator)))==>nesc(inst(Inst_Accumulator,accumulator)).

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~     by default ?Inst_Accumulator nesc(inst(Inst_Accumulator,accumulator))
%~  It's Proof that:
%~    " ?Inst_Accumulator inst accumulator " is necessarily true
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( '$existential'(Inst_Accumulator,1,nesc(inst(Inst_Accumulator,accumulator))) ==> 
  nesc( inst(Inst_Accumulator,accumulator))).

============================================
%~ kif_to_boxlog_attvars2 = exists('$VAR'('X'),necessary(inst('$VAR'('X'),accumulator)))
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~     by default ?X nesc(inst(X,accumulator))
%~  It's Proof that:
%~    " ?X inst accumulator " is necessarily true
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

'$existential'(X,1,nesc(inst(X,accumulator)))==>nesc(inst(X,accumulator)).

~*/

exists(X,inst(X,display)).
/*~
%~ kif_to_boxlog_attvars2 = exists('$VAR'('Nesc_Display4'),necessary(inst('$VAR'('Nesc_Display4'),display)))
%~ debugm(baseKB,show_success(baseKB,baseKB:ain(clif(exists(_44113978,inst(_44113978,display))))))




=======================================================
exists('$VAR'('Inst_Display'),inst('$VAR'('Inst_Display'),display))
============================================


?- kif_to_boxlog( exists(Inst_Display,inst(Inst_Display,display)) ).



% In English: 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ 
%~  There exists ?Inst_Display
%~    " ?Inst_Display inst display "
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = exists('$VAR'('Inst_Display'),necessary(inst('$VAR'('Inst_Display'),display)))

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s): 
'$existential'(Inst_Display,1,nesc(inst(Inst_Display,display)))==>nesc(inst(Inst_Display,display)).

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~     by default ?Inst_Display nesc(inst(Inst_Display,display))
%~  It's Proof that:
%~    " ?Inst_Display inst display " is necessarily true
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( '$existential'(Inst_Display,1,nesc(inst(Inst_Display,display))) ==> 
  nesc( inst(Inst_Display,display))).

============================================
%~ kif_to_boxlog_attvars2 = exists('$VAR'('X'),necessary(inst('$VAR'('X'),display)))
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~     by default ?X nesc(inst(X,display))
%~  It's Proof that:
%~    " ?X inst display " is necessarily true
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

'$existential'(X,1,nesc(inst(X,display)))==>nesc(inst(X,display)).

~*/

exists(X,inst(X,opbuffer)).

/*~
%~ kif_to_boxlog_attvars2 = exists('$VAR'('Nesc_Opbuffer4'),necessary(inst('$VAR'('Nesc_Opbuffer4'),opbuffer)))
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/fol_calc_01.pfc.pl:80 
%~ debugm(baseKB,show_success(baseKB,baseKB:ain(clif(exists(_44965772,inst(_44965772,opbuffer))))))




=======================================================
exists('$VAR'('Inst_Opbuffer'),inst('$VAR'('Inst_Opbuffer'),opbuffer))
============================================


?- kif_to_boxlog( exists(Inst_Opbuffer,inst(Inst_Opbuffer,opbuffer)) ).



% In English: 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ 
%~  There exists ?Inst_Opbuffer
%~    " ?Inst_Opbuffer inst opbuffer "
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = exists('$VAR'('Inst_Opbuffer'),necessary(inst('$VAR'('Inst_Opbuffer'),opbuffer)))

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s): 
'$existential'(Inst_Opbuffer,1,nesc(inst(Inst_Opbuffer,opbuffer)))==>nesc(inst(Inst_Opbuffer,opbuffer)).

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~     by default ?Inst_Opbuffer nesc(inst(Inst_Opbuffer,opbuffer))
%~  It's Proof that:
%~    " ?Inst_Opbuffer inst opbuffer " is necessarily true
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( '$existential'(Inst_Opbuffer,1,nesc(inst(Inst_Opbuffer,opbuffer))) ==> 
  nesc( inst(Inst_Opbuffer,opbuffer))).

============================================
%~ kif_to_boxlog_attvars2 = exists('$VAR'('X'),necessary(inst('$VAR'('X'),opbuffer)))
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~     by default ?X nesc(inst(X,opbuffer))
%~  It's Proof that:
%~    " ?X inst opbuffer " is necessarily true
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

'$existential'(X,1,nesc(inst(X,opbuffer)))==>nesc(inst(X,opbuffer)).

~*/


/*
Extra TODO ?

define how a buffer is shown in screen locations
exactly(10,X, inst(X,screenLocation)).

*/

% All number buffers have a, inital value of 0
(all(X,inst(X,numbuffer) => initalValue(X,0))).

% exists an initial world 
/*~
%~ kif_to_boxlog_attvars2 = forall('$VAR'('Nesc_Numbuffer3'),necessary(=>(inst('$VAR'('Nesc_Numbuffer3'),numbuffer),initalValue('$VAR'('Nesc_Numbuffer3'),0))))
%~ debugm( baseKB,
%~   show_success(baseKB,baseKB:ain(clif(all(X,inst(X,numbuffer)=>initalValue(X,0))))))




=======================================================
all('$VAR'('Numbuffer'),=>(inst('$VAR'('Numbuffer'),numbuffer),initalValue('$VAR'('Numbuffer'),0)))
============================================


?- kif_to_boxlog( all(Numbuffer,inst(Numbuffer,numbuffer)=>initalValue(Numbuffer,0)) ).



% In English: 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ 
%~  For all ?Numbuffer
%~    (If:
%~    ?Numbuffer inst numbuffer then it is
%~  Implied that:
%~    ?Numbuffer initalValue 0 )
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = forall('$VAR'('Numbuffer'),necessary(=>(inst('$VAR'('Numbuffer'),numbuffer),initalValue('$VAR'('Numbuffer'),0))))

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 2 entailment(s): 
nesc(inst(Numbuffer,numbuffer))==>nesc(initalValue(Numbuffer,0)).
poss(~initalValue(Numbuffer,0))==>poss(~inst(Numbuffer,numbuffer)).

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    " ?Numbuffer inst numbuffer " is necessarily true
%~  It's Proof that:
%~    " ?Numbuffer initalValue 0 " is necessarily true
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

nesc(inst(Numbuffer,numbuffer))==>nesc(initalValue(Numbuffer,0)).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    " ?Numbuffer initalValue 0 " is possibly false
%~  It's Proof that:
%~    " ?Numbuffer inst numbuffer " is possibly false
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

poss(~initalValue(Numbuffer,0))==>poss(~inst(Numbuffer,numbuffer)).

============================================
%~ kif_to_boxlog_attvars2 = forall('$VAR'('X'),necessary(=>(inst('$VAR'('X'),numbuffer),initalValue('$VAR'('X'),0))))
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    " ?X initalValue 0 " is possibly false
%~  It's Proof that:
%~    " ?X inst numbuffer " is possibly false
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

poss(~initalValue(X,0))==>poss(~inst(X,numbuffer)).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    " ?X inst numbuffer " is necessarily true
%~  It's Proof that:
%~    " ?X initalValue 0 " is necessarily true
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

nesc(inst(X,numbuffer))==>nesc(initalValue(X,0)).

~*/


% exists an initial world 
exists(C,initialWorld(C)).

% initial world is populated by inital values
/*~
%~ kif_to_boxlog_attvars2 = exists('$VAR'('InitialWorld_Nesc'),necessary(initialWorld('$VAR'('InitialWorld_Nesc'))))
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/fol_calc_01.pfc.pl:94 
%~ debugm(baseKB,show_success(baseKB,baseKB:ain(clif(exists(_47593036,initialWorld(_47593036))))))




=======================================================
exists('$VAR'('InitialWorld'),initialWorld('$VAR'('InitialWorld')))
============================================


?- kif_to_boxlog( exists(InitialWorld,initialWorld(InitialWorld)) ).



% In English: 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ 
%~  There exists ?InitialWorld
%~    " ?InitialWorld isa initialWorld "
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = exists('$VAR'('InitialWorld'),necessary(initialWorld('$VAR'('InitialWorld'))))

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s): 
'$existential'(InitialWorld,1,nesc(initialWorld(InitialWorld)))==>nesc(initialWorld(InitialWorld)).

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~     by default ?InitialWorld nesc(initialWorld(InitialWorld))
%~  It's Proof that:
%~    " ?InitialWorld isa initialWorld " is necessarily true
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( '$existential'(InitialWorld,1,nesc(initialWorld(InitialWorld))) ==> 
  nesc( initialWorld(InitialWorld))).

============================================
%~ kif_to_boxlog_attvars2 = exists('$VAR'('C'),necessary(initialWorld('$VAR'('C'))))
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~     by default ?C nesc(initialWorld(C))
%~  It's Proof that:
%~    " ?C isa initialWorld " is necessarily true
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

'$existential'(C,1,nesc(initialWorld(C)))==>nesc(initialWorld(C)).

~*/


% initial world is populated by inital values
initalValue(N,V) & initialWorld(W) =>  currentValue(W,N,V).

% All numeric buffers have a value
/*~
%~ kif_to_boxlog_attvars2 = necessary(=>(and(initalValue('$VAR'('InitalValue11'),'$VAR'('CurrentValue_InitalValue13')),initialWorld('$VAR'('InitialWorld_CurrentValue12'))),currentValue('$VAR'('InitialWorld_CurrentValue12'),'$VAR'('InitalValue11'),'$VAR'('CurrentValue_InitalValue13'))))
%~ debugm( baseKB,
%~   show_success( baseKB,
%~     baseKB : ain( clif( (initalValue(N,V)&initialWorld(W))=>currentValue(W,N,V)))))




=======================================================
=>(&(initalValue('$VAR'('InitalValue'),'$VAR'('CurrentValue_InitalValue5')),initialWorld('$VAR'('InitialWorld_CurrentValue'))),currentValue('$VAR'('InitialWorld_CurrentValue'),'$VAR'('InitalValue'),'$VAR'('CurrentValue_InitalValue5')))
============================================


?- kif_to_boxlog( (initalValue(InitalValue,CurrentValue_InitalValue5)&initialWorld(InitialWorld_CurrentValue))=>currentValue(InitialWorld_CurrentValue,InitalValue,CurrentValue_InitalValue5) ).



% In English: 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  If:
%~    " ?InitalValue initalValue ?CurrentValue_InitalValue5 "  and
%~    " ?InitialWorld_CurrentValue isa initialWorld " then it is
%~  Implied that:
%~    currentValue(InitialWorld_CurrentValue,InitalValue,CurrentValue_InitalValue5)
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(=>(and(initalValue('$VAR'('InitalValue'),'$VAR'('CurrentValue_InitalValue5')),initialWorld('$VAR'('InitialWorld_CurrentValue'))),currentValue('$VAR'('InitialWorld_CurrentValue'),'$VAR'('InitalValue'),'$VAR'('CurrentValue_InitalValue5'))))

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 3 entailment(s): 
nesc(initialWorld(InitialWorld_CurrentValue))&poss(~currentValue(InitialWorld_CurrentValue,InitalValue,CurrentValue_InitalValue5))==>poss(~initalValue(InitalValue,CurrentValue_InitalValue5)).
nesc(initalValue(InitalValue,CurrentValue_InitalValue5))&nesc(initialWorld(InitialWorld_CurrentValue))==>nesc(currentValue(InitialWorld_CurrentValue,InitalValue,CurrentValue_InitalValue5)).
nesc(initalValue(InitalValue,CurrentValue_InitalValue5))&poss(~currentValue(InitialWorld_CurrentValue,InitalValue,CurrentValue_InitalValue5))==>poss(~initialWorld(InitialWorld_CurrentValue)).

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    " ?InitialWorld_CurrentValue isa initialWorld " is necessarily true  and
%~    " currentValue(InitialWorld_CurrentValue,InitalValue,CurrentValue_InitalValue5) " is possibly false
%~  It's Proof that:
%~    " ?InitalValue initalValue ?CurrentValue_InitalValue5 " is possibly false
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( ( nesc( initialWorld(InitialWorld_CurrentValue)) & 
    poss( ~( currentValue(InitialWorld_CurrentValue,InitalValue,CurrentValue_InitalValue5)))) ==> 
  poss( ~( initalValue(InitalValue,CurrentValue_InitalValue5)))).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    " ?InitalValue initalValue ?CurrentValue_InitalValue5 " is necessarily true  and
%~    " ?InitialWorld_CurrentValue isa initialWorld " is necessarily true
%~  It's Proof that:
%~    " currentValue(InitialWorld_CurrentValue,InitalValue,CurrentValue_InitalValue5) " is necessarily true
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( ( nesc( initalValue(InitalValue,CurrentValue_InitalValue5)) & 
    nesc( initialWorld(InitialWorld_CurrentValue))) ==> 
  nesc( currentValue(InitialWorld_CurrentValue,InitalValue,CurrentValue_InitalValue5))).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    " ?InitalValue initalValue ?CurrentValue_InitalValue5 " is necessarily true  and
%~    " currentValue(InitialWorld_CurrentValue,InitalValue,CurrentValue_InitalValue5) " is possibly false
%~  It's Proof that:
%~    " ?InitialWorld_CurrentValue isa initialWorld " is possibly false
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( ( nesc( initalValue(InitalValue,CurrentValue_InitalValue5)) & 
    poss( ~( currentValue(InitialWorld_CurrentValue,InitalValue,CurrentValue_InitalValue5)))) ==> 
  poss( ~( initialWorld(InitialWorld_CurrentValue)))).

============================================
%~ kif_to_boxlog_attvars2 = necessary(=>(and(initalValue('$VAR'('N'),'$VAR'(v)),initialWorld('$VAR'('W'))),currentValue('$VAR'('W'),'$VAR'('N'),'$VAR'(v))))
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    ((?N initalValue ?v )is necessarily true ) and
%~    " ?W isa initialWorld " is necessarily true
%~  It's Proof that:
%~    (currentValue(W,N,'$VAR'(v)) )is necessarily true
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( nesc(initalValue(N,'$VAR'(v)))&nesc(initialWorld(W)) ==> 
  nesc( currentValue(W,N,'$VAR'(v)))).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    " ?W isa initialWorld " is necessarily true  and
%~    ((currentValue(W,N,'$VAR'(v)) )is possibly false )
%~  It's Proof that:
%~    (?N initalValue ?v )is possibly false
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( nesc(initialWorld(W))&poss(~currentValue(W,N,'$VAR'(v))) ==> 
  poss( ~( initalValue(N,'$VAR'(v))))).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    ((?N initalValue ?v )is necessarily true ) and
%~    ((currentValue(W,N,'$VAR'(v)) )is possibly false )
%~  It's Proof that:
%~    " ?W isa initialWorld " is possibly false
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( nesc(initalValue(N,'$VAR'(v)))&poss(~currentValue(W,N,'$VAR'(v))) ==> 
  poss( ~( initialWorld(W)))).

~*/


% All numeric buffers have a value
all(W,all(N,exists(V,inst(N,numbuffer) & world(W) => currentValue(W,N,V)))).

% Op buffer is intialized to null
/*~
%~ kif_to_boxlog_attvars2 = forall('$VAR'('World_All_CurrentValue13'),forall('$VAR'('Exists_Numbuffer12'),exists('$VAR'('CurrentValue_Nesc'),necessary(=>(and(inst('$VAR'('Exists_Numbuffer12'),numbuffer),world('$VAR'('World_All_CurrentValue13'))),currentValue('$VAR'('World_All_CurrentValue13'),'$VAR'('Exists_Numbuffer12'),'$VAR'('CurrentValue_Nesc')))))))
%~ debugm( baseKB,
%~   show_success( baseKB,
%~     baseKB : ain( clif( all( W,
%~                           all( N,
%~                             exists( V,
%~                               (inst(N,numbuffer)&world(W))=>currentValue(W,N,V))))))))




=======================================================
all('$VAR'('World_All_CurrentValue'),all('$VAR'('Exists_Numbuffer'),exists('$VAR'('CurrentValue8'),=>(&(inst('$VAR'('Exists_Numbuffer'),numbuffer),world('$VAR'('World_All_CurrentValue'))),currentValue('$VAR'('World_All_CurrentValue'),'$VAR'('Exists_Numbuffer'),'$VAR'('CurrentValue8'))))))
============================================


?- kif_to_boxlog( all(World_All_CurrentValue,all(Exists_Numbuffer,exists(CurrentValue8,(inst(Exists_Numbuffer,numbuffer)&world(World_All_CurrentValue))=>currentValue(World_All_CurrentValue,Exists_Numbuffer,CurrentValue8)))) ).



% In English: 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ 
%~  For all ?World_All_CurrentValue
%~    (
%~  For all ?Exists_Numbuffer
%~    (
%~  There exists ?CurrentValue8
%~    (If:
%~    " ?Exists_Numbuffer inst numbuffer "  and
%~    " ?World_All_CurrentValue isa world " then it is
%~  Implied that:
%~    currentValue(World_All_CurrentValue,Exists_Numbuffer,CurrentValue8) )))
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = forall('$VAR'('World_All_CurrentValue'),forall('$VAR'('Exists_Numbuffer'),exists('$VAR'('CurrentValue8'),necessary(=>(and(inst('$VAR'('Exists_Numbuffer'),numbuffer),world('$VAR'('World_All_CurrentValue'))),currentValue('$VAR'('World_All_CurrentValue'),'$VAR'('Exists_Numbuffer'),'$VAR'('CurrentValue8')))))))

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 3 entailment(s): 
nesc(world(World_All_CurrentValue))&poss(~currentValue(World_All_CurrentValue,Exists_Numbuffer,CurrentValue8))==>poss(~inst(Exists_Numbuffer,numbuffer)).
nesc(inst(Exists_Numbuffer,numbuffer))&poss(~currentValue(World_All_CurrentValue,Exists_Numbuffer,CurrentValue8))==>poss(~world(World_All_CurrentValue)).
(nesc(inst(Exists_Numbuffer,numbuffer))&nesc(world(World_All_CurrentValue)))&'$existential'(CurrentValue8,1,(nesc(inst(Exists_Numbuffer,numbuffer))&nesc(world(World_All_CurrentValue)))=>nesc(currentValue(World_All_CurrentValue,Exists_Numbuffer,CurrentValue8)))==>nesc(currentValue(World_All_CurrentValue,Exists_Numbuffer,CurrentValue8)).

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    " ?World_All_CurrentValue isa world " is necessarily true  and
%~    " currentValue(World_All_CurrentValue,Exists_Numbuffer,CurrentValue8) " is possibly false
%~  It's Proof that:
%~    " ?Exists_Numbuffer inst numbuffer " is possibly false
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( ( nesc( world(World_All_CurrentValue)) & 
    poss( ~( currentValue(World_All_CurrentValue,Exists_Numbuffer,CurrentValue8)))) ==> 
  poss( ~( inst(Exists_Numbuffer,numbuffer)))).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    " ?Exists_Numbuffer inst numbuffer " is necessarily true  and
%~    " currentValue(World_All_CurrentValue,Exists_Numbuffer,CurrentValue8) " is possibly false
%~  It's Proof that:
%~    " ?World_All_CurrentValue isa world " is possibly false
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( ( nesc( inst(Exists_Numbuffer,numbuffer)) & 
    poss( ~( currentValue(World_All_CurrentValue,Exists_Numbuffer,CurrentValue8)))) ==> 
  poss( ~( world(World_All_CurrentValue)))).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    (" ?Exists_Numbuffer inst numbuffer " is necessarily true  and
%~    " ?World_All_CurrentValue isa world " is necessarily true ) and
%~     by default ?CurrentValue8 (nesc(inst(Exists_Numbuffer,numbuffer))&nesc(world(World_All_CurrentValue)))=>nesc(currentValue(World_All_CurrentValue,Exists_Numbuffer,CurrentValue8))
%~  It's Proof that:
%~    " currentValue(World_All_CurrentValue,Exists_Numbuffer,CurrentValue8) " is necessarily true
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( ( nesc( inst(Exists_Numbuffer,numbuffer))  &
    nesc( world(World_All_CurrentValue)) & 
    '$existential'( CurrentValue8, 
      1, 
      ( nesc(inst(Exists_Numbuffer,numbuffer))&nesc(world(World_All_CurrentValue)) => 
        nesc( currentValue(World_All_CurrentValue,Exists_Numbuffer,CurrentValue8))))) ==> 
  nesc( currentValue(World_All_CurrentValue,Exists_Numbuffer,CurrentValue8))).

============================================
%~ kif_to_boxlog_attvars2 = forall('$VAR'('W'),forall('$VAR'('N'),exists('$VAR'(v),necessary(=>(and(inst('$VAR'('N'),numbuffer),world('$VAR'('W'))),currentValue('$VAR'('W'),'$VAR'('N'),'$VAR'(v)))))))
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    (" ?N inst numbuffer " is necessarily true  and
%~    " ?W isa world " is necessarily true ) and
%~     by default ?v (nesc(inst(N,numbuffer))&nesc(world(W)))=>nesc(currentValue(W,N,'$VAR'(v)))
%~  It's Proof that:
%~    (currentValue(W,N,'$VAR'(v)) )is necessarily true
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( ( nesc( inst(N,numbuffer))  &
    nesc( world(W)) & 
    '$existential'( '$VAR'(v), 
      1, 
      ( nesc(inst(N,numbuffer))&nesc(world(W)) => 
        nesc( currentValue(W,N,'$VAR'(v)))))) ==> 
  nesc( currentValue(W,N,'$VAR'(v)))).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    " ?W isa world " is necessarily true  and
%~    ((currentValue(W,N,'$VAR'(v)) )is possibly false )
%~  It's Proof that:
%~    " ?N inst numbuffer " is possibly false
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( nesc(world(W))&poss(~currentValue(W,N,'$VAR'(v))) ==> 
  poss( ~( inst(N,numbuffer)))).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    " ?N inst numbuffer " is necessarily true  and
%~    ((currentValue(W,N,'$VAR'(v)) )is possibly false )
%~  It's Proof that:
%~    " ?W isa world " is possibly false
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( nesc(inst(N,numbuffer))&poss(~currentValue(W,N,'$VAR'(v))) ==> 
  poss( ~( world(W)))).

~*/


% Op buffer is intialized to null
all(X,inst(X,opbuffer) => initalValue(X,null)).

% exists a current world (Fluent 1)
/*~
%~ kif_to_boxlog_attvars2 = forall('$VAR'('Nesc_Null_Opbuffer4'),necessary(=>(inst('$VAR'('Nesc_Null_Opbuffer4'),opbuffer),initalValue('$VAR'('Nesc_Null_Opbuffer4'),null))))
%~ debugm( baseKB,
%~   show_success(baseKB,baseKB:ain(clif(all(X,inst(X,opbuffer)=>initalValue(X,null))))))




=======================================================
all('$VAR'('Null_Opbuffer'),=>(inst('$VAR'('Null_Opbuffer'),opbuffer),initalValue('$VAR'('Null_Opbuffer'),null)))
============================================


?- kif_to_boxlog( all(Null_Opbuffer,inst(Null_Opbuffer,opbuffer)=>initalValue(Null_Opbuffer,null)) ).



% In English: 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ 
%~  For all ?Null_Opbuffer
%~    (If:
%~    ?Null_Opbuffer inst opbuffer then it is
%~  Implied that:
%~    ?Null_Opbuffer initalValue null )
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = forall('$VAR'('Null_Opbuffer'),necessary(=>(inst('$VAR'('Null_Opbuffer'),opbuffer),initalValue('$VAR'('Null_Opbuffer'),null))))

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 2 entailment(s): 
nesc(inst(Null_Opbuffer,opbuffer))==>nesc(initalValue(Null_Opbuffer,null)).
poss(~initalValue(Null_Opbuffer,null))==>poss(~inst(Null_Opbuffer,opbuffer)).

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    " ?Null_Opbuffer inst opbuffer " is necessarily true
%~  It's Proof that:
%~    " ?Null_Opbuffer initalValue null " is necessarily true
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

nesc(inst(Null_Opbuffer,opbuffer))==>nesc(initalValue(Null_Opbuffer,null)).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    " ?Null_Opbuffer initalValue null " is possibly false
%~  It's Proof that:
%~    " ?Null_Opbuffer inst opbuffer " is possibly false
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

poss(~initalValue(Null_Opbuffer,null))==>poss(~inst(Null_Opbuffer,opbuffer)).

============================================
%~ kif_to_boxlog_attvars2 = forall('$VAR'('X'),necessary(=>(inst('$VAR'('X'),opbuffer),initalValue('$VAR'('X'),null))))
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    " ?X initalValue null " is possibly false
%~  It's Proof that:
%~    " ?X inst opbuffer " is possibly false
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

poss(~initalValue(X,null))==>poss(~inst(X,opbuffer)).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    " ?X inst opbuffer " is necessarily true
%~  It's Proof that:
%~    " ?X initalValue null " is necessarily true
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

nesc(inst(X,opbuffer))==>nesc(initalValue(X,null)).

~*/


% exists a current world (Fluent 1)
exists(C,currentWorld(C)).

%:- rtrace.
/*~
%~ kif_to_boxlog_attvars2 = exists('$VAR'('CurrentWorld_Nesc'),necessary(currentWorld('$VAR'('CurrentWorld_Nesc'))))
%~ debugm(baseKB,show_success(baseKB,baseKB:ain(clif(exists(_61559882,currentWorld(_61559882))))))




=======================================================
exists('$VAR'('CurrentWorld'),currentWorld('$VAR'('CurrentWorld')))
============================================


?- kif_to_boxlog( exists(CurrentWorld,currentWorld(CurrentWorld)) ).



% In English: 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ 
%~  There exists ?CurrentWorld
%~    " ?CurrentWorld isa currentWorld "
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = exists('$VAR'('CurrentWorld'),necessary(currentWorld('$VAR'('CurrentWorld'))))

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s): 
'$existential'(CurrentWorld,1,nesc(currentWorld(CurrentWorld)))==>nesc(currentWorld(CurrentWorld)).

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~     by default ?CurrentWorld nesc(currentWorld(CurrentWorld))
%~  It's Proof that:
%~    " ?CurrentWorld isa currentWorld " is necessarily true
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( '$existential'(CurrentWorld,1,nesc(currentWorld(CurrentWorld))) ==> 
  nesc( currentWorld(CurrentWorld))).

============================================
%~ kif_to_boxlog_attvars2 = exists('$VAR'('C'),necessary(currentWorld('$VAR'('C'))))
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~     by default ?C nesc(currentWorld(C))
%~  It's Proof that:
%~    " ?C isa currentWorld " is necessarily true
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

'$existential'(C,1,nesc(currentWorld(C)))==>nesc(currentWorld(C)).

~*/


%:- rtrace.
nextWorld(C,N) => inst(C,world) & inst(N,world).
/*~
%~ kif_to_boxlog_attvars2 = necessary(=>(nextWorld('$VAR'('NextWorld6'),'$VAR'('NextWorld_World7')),and(inst('$VAR'('NextWorld6'),world),inst('$VAR'('NextWorld_World7'),world))))
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/fol_calc_01.pfc.pl:109 
%~ debugm( baseKB,
%~   show_success( baseKB,
%~     baseKB : ain( clif( nextWorld(C,N)=>(inst(C,world)&inst(N,world))))))




=======================================================
=>(nextWorld('$VAR'('NextWorld'),'$VAR'('World')),&(inst('$VAR'('NextWorld'),world),inst('$VAR'('World'),world)))
============================================


?- kif_to_boxlog( nextWorld(NextWorld,World)=>(inst(NextWorld,world)&inst(World,world)) ).



% In English: 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  If:
%~    ?NextWorld nextWorld ?World then it is
%~  Implied that:
%~    " ?NextWorld inst world "  and
%~    " ?World inst world "
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(=>(nextWorld('$VAR'('NextWorld'),'$VAR'('World')),and(inst('$VAR'('NextWorld'),world),inst('$VAR'('World'),world))))

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 6 entailment(s): 
nesc(inst(NextWorld,world))&poss(~inst(World,world))==>poss(~nextWorld(NextWorld,World)).
nesc(inst(World,world))&poss(~inst(NextWorld,world))==>poss(~nextWorld(NextWorld,World)).
nesc(nextWorld(NextWorld,World))&nesc(inst(NextWorld,world))==>nesc(inst(World,world)).
nesc(nextWorld(NextWorld,World))&nesc(inst(World,world))==>nesc(inst(NextWorld,world)).
nesc(nextWorld(NextWorld,World))&poss(~inst(NextWorld,world))==>poss(~inst(World,world)).
nesc(nextWorld(NextWorld,World))&poss(~inst(World,world))==>poss(~inst(NextWorld,world)).

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    " ?NextWorld inst world " is necessarily true  and
%~    " ?World inst world " is possibly false
%~  It's Proof that:
%~    " ?NextWorld nextWorld ?World " is possibly false
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( nesc(inst(NextWorld,world))&poss(~inst(World,world)) ==> 
  poss( ~( nextWorld(NextWorld,World)))).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    " ?World inst world " is necessarily true  and
%~    " ?NextWorld inst world " is possibly false
%~  It's Proof that:
%~    " ?NextWorld nextWorld ?World " is possibly false
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( nesc(inst(World,world))&poss(~inst(NextWorld,world)) ==> 
  poss( ~( nextWorld(NextWorld,World)))).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    " ?NextWorld nextWorld ?World " is necessarily true  and
%~    " ?NextWorld inst world " is necessarily true
%~  It's Proof that:
%~    " ?World inst world " is necessarily true
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( nesc(nextWorld(NextWorld,World))&nesc(inst(NextWorld,world)) ==> 
  nesc( inst(World,world))).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    " ?NextWorld nextWorld ?World " is necessarily true  and
%~    " ?World inst world " is necessarily true
%~  It's Proof that:
%~    " ?NextWorld inst world " is necessarily true
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( nesc(nextWorld(NextWorld,World))&nesc(inst(World,world)) ==> 
  nesc( inst(NextWorld,world))).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    " ?NextWorld nextWorld ?World " is necessarily true  and
%~    " ?NextWorld inst world " is possibly false
%~  It's Proof that:
%~    " ?World inst world " is possibly false
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( nesc(nextWorld(NextWorld,World))&poss(~inst(NextWorld,world)) ==> 
  poss( ~( inst(World,world)))).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    " ?NextWorld nextWorld ?World " is necessarily true  and
%~    " ?World inst world " is possibly false
%~  It's Proof that:
%~    " ?NextWorld inst world " is possibly false
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( nesc(nextWorld(NextWorld,World))&poss(~inst(World,world)) ==> 
  poss( ~( inst(NextWorld,world)))).

============================================
%~ kif_to_boxlog_attvars2 = necessary(=>(nextWorld('$VAR'('C'),'$VAR'('N')),and(inst('$VAR'('C'),world),inst('$VAR'('N'),world))))

totalTime=10.000

FAILED: /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-junit-minor -k fol_calc_01.pfc.pl (returned 137) Add_LABELS='Errors,Overtime' Rem_LABELS='Skipped,Skipped,Warnings,Skipped'

PFC - prologHybrid/prologBuiltin/etc predicates must all contain arities

=Acceptable assertions in user code

prologBuiltin(member/2).
prologBuiltin(member).
prologBuiltin(member(E,ftListOfFn(E))).

=Need to convert to canonical

==possible examples:

prologBuiltin(member). % throw/warn if arity is unknown

==% easiest
prologBuiltin(member,2).

==% asserted best
prologBuiltin(member(ftTerm,ftTerm)).
prologBuiltin(member(E,ftListOfFn(E))).

=Canonical query would be

==% queried best
prologBuiltin(member(,)).
prologBuiltin(member(E,ftListOfFn(E))).

logicmoo.base.examples.fol.SANITY_FI_HUMAN_01 JUnit

(cd /var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol ; timeout --foreground --preserve-status -s SIGKILL -k 10s 10s swipl -x /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-clif -t "['sanity_fi_human_01.pfc.pl']")

% EDIT: https://github.com/logicmoo/logicmoo_workspace/edit/master/packs_sys/logicmoo_base/t/examples/fol/sanity_fi_human_01.pfc.pl
% JENKINS: https://jenkins.logicmoo.org/job/logicmoo_workspace/lastBuild/testReport/logicmoo.base.examples.fol/SANITY_FI_HUMAN_01/
% ISSUE_SEARCH: https://github.com/logicmoo/logicmoo_workspace/issues?q=is%3Aissue+label%3ASANITY_FI_HUMAN_01
% ISSUE: #72

%~ init_phase(after_load)
%~ init_phase(restore_state)
%
%~ init_why(after_boot,program)
%~ after_boot.
%~ Dont forget to ?- logicmoo_i_cyc_xform.
running('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/sanity_fi_human_01.pfc.pl'),
%~ this_test_might_need( :-( use_module( library(logicmoo_plarkc))))




:- include('sanity_fi_sk.pfc').
/*~
% Term-position in <gt;clause>(0x55cd72149b00) at PC=20:
% clause_info(<gt;clause>(0x55cd72149b00)) (3-th clause of '$source_term'/8)... 
% from /var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl:1759 ... 
% Trying with syntax prolog
% read ...
% unified ...
% got names

% 	[2,1]

% Term-position in <gt;clause>(0x55cd72391000) at PC=116:
% clause_info(<gt;clause>(0x55cd72391000)) (2-nd clause of '$term_in_file'/8)... 
% from /var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl:1840 ... 
% Trying with syntax prolog
% read ...
% unified ...
% got names

% 	[2,2,2,2,2,2,2,2]

% Term-position in <gt;clause>(0x55cd723b9f00) at PC=5:
% clause_info(<gt;clause>(0x55cd723b9f00)) (1-st clause of setup_call_catcher_cleanup/4)... 
% from /var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl:646 ... 
% Trying with syntax prolog
% read ...
% unified ...
% got names

% 	[2,2,1]

% Term-position in <gt;clause>(0x55cd723c1e00) at PC=15:
% clause_info(<gt;clause>(0x55cd723c1e00)) (1-st clause of '$source_term'/7)... 
% from /var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl:1739 ... 
% Trying with syntax prolog
% read ...
% unified ...
% got names

% 	[2,1]

% Term-position in <gt;clause>(0x55cd72165400) at PC=32:
% clause_info(<gt;clause>(0x55cd72165400)) (1-st clause of '$load_file'/4)... 
% from /var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl:3007 ... 
% Trying with syntax prolog
% read ...
% unified ...
% got names

% 	[2,2,1,1,1]

% Term-position in <gt;clause>(0x55cd723b9f00) at PC=5:
% clause_info(<gt;clause>(0x55cd723b9f00)) (1-st clause of setup_call_catcher_cleanup/4)... 
% from /var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl:646 ... 
% Trying with syntax prolog
% read ...
% unified ...
% got names

% 	[2,2,1]

% Term-position in <gt;clause>(0x55cd725c0000) at PC=221:
% clause_info(<gt;clause>(0x55cd725c0000)) (1-st clause of '$do_load_file_2'/5)... 
% from /var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl:2592 ... 
% Trying with syntax prolog
% read ...
% unified ...
% got names

% 	[2,2,2,2,2,2,2,2,1,2,1,1,2,2,2]

% Term-position in <gt;clause>(0x55cd7238e9a0) at PC=10:
% clause_info(<gt;clause>(0x55cd7238e9a0)) (1-st clause of '$qdo_load_file'/4)... 
% from /var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl:2546 ... 
% Trying with syntax prolog
% read ...
% unified ...
% got names

% 	[2,1]

% Term-position in <gt;clause>(0x55cd723b9f00) at PC=5:
% clause_info(<gt;clause>(0x55cd723b9f00)) (1-st clause of setup_call_catcher_cleanup/4)... 
% from /var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl:646 ... 
% Trying with syntax prolog
% read ...
% unified ...
% got names

% 	[2,2,1]

% Term-position in <gt;clause>(0x55cd72398c80) at PC=12:
% clause_info(<gt;clause>(0x55cd72398c80)) (1-st clause of '$load_file'/3)... 
% from /var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl:2353 ... 
% Trying with syntax prolog
% read ...
% unified ...
% got names

% 	[2,2,1]

%~ message_hook_type(error)
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/sanity_fi_human_01.pfc.pl:5 
%~ message_hook(%~    error( existence_error(source_sink,'sanity_fi_sk.pfc'),%~      context(%~         prolog_stack( [ frame( 37,%~                           call( system : throw/1),%~                           throw( error(existence_error(source_sink,'sanity_fi_sk.pfc'),Existence_error))),%~                         frame( 33,%~                           clause(<gt;clause>(0x55cd72149b00),20),%~                           '$source_term'( 'sanity_fi_sk.pfc',%~                             Sanity_fi_sk_c46_pfc, Source_term4,Source_term3,%~                             Source_term,Source_term37,%~                             ['/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/sanity_fi_human_01.pfc.pl'],%~                             [ encoding(utf8), expand(false),expand(true)])),%~                         frame( 31,%~                           clause(<gt;clause>(0x55cd72391000),116),%~                           '$term_in_file'( <gt;stream>(0x55cd74a3d600),%~                             Stream_c62_c40_0x55cd74a3d600, Term_in_file8,Term_in_file7,%~                             Term_in_file,Term_in_file38,%~                             ['/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/sanity_fi_human_01.pfc.pl'],%~                             [ expand(false),%~                               expand(true)])),%~                         frame( 30,%~                           clause(<gt;clause>(0x55cd723b9f00),5),%~                           setup_call_catcher_cleanup(%~                              system : '$open_source'( '/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/sanity_fi_human_01.pfc.pl',%~                                         <gt;stream>(0x55cd74a3d600),%~                                         close(<gt;stream>(0x55cd74a3d600),'/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/sanity_fi_human_01.pfc.pl',<gt;clause>(0x55cd76719650)), [],[expand(false),expand(true)]),%~                              system : '$term_in_file'( <gt;stream>(0x55cd74a3d600),%~                                         Stream_c62_c40_0x55cd74a3d6009,%~                                         Term_in_file12,%~                                         Term_in_file11,%~                                         Term_in_file10,%~                                         Term_in_file1039,%~                                         ['/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/sanity_fi_human_01.pfc.pl'],%~                                         [ expand(false),%~                                           expand(true)]),%~                              Kw,%~                              system : '$close_source'( close(<gt;stream>(0x55cd74a3d600),'/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/sanity_fi_human_01.pfc.pl',<gt;clause>(0x55cd76719650)),%~                                         true))),%~                         frame( 27,%~                           clause(<gt;clause>(0x55cd723c1e00),15),%~                           '$source_term'( '/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/sanity_fi_human_01.pfc.pl',%~                             '<gt;garbage_collected>', '<gt;garbage_collected>',Garbage_collected,%~                             '<gt;garbage_collected>','<gt;garbage_collected>',%~                             '<gt;garbage_collected>')),%~                         frame( 26,%~                           clause(<gt;clause>(0x55cd72165400),32),%~                           '$load_file'( '/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/sanity_fi_human_01.pfc.pl',%~                             '/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/sanity_fi_human_01.pfc.pl',%~                             Var_c47_lib_c47_jenkins_c47_workspace_c47_logicmoo_workspace_c64_2_c47_packs_sys_c47_logicmoo_base_c47_t_c47_examples_c47_fol_c47_sanity_fi_human_01_c46_pfc_c46_pl,%~                             [ expand(false),%~                               expand(true)])),%~                         frame( 25,%~                           clause(<gt;clause>(0x55cd723b9f00),5),%~                           setup_call_catcher_cleanup(%~                              system : '$start_consult'('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/sanity_fi_human_01.pfc.pl',1632225669.708176),%~                              system : '$load_file'( '/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/sanity_fi_human_01.pfc.pl',%~                                         '/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/sanity_fi_human_01.pfc.pl',%~                                         Var_c47_lib_c47_jenkins_c47_workspace_c47_logicmoo_workspace_c64_2_c47_packs_sys_c47_logicmoo_base_c47_t_c47_examples_c47_fol_c47_sanity_fi_human_01_c46_pfc_c46_pl16,%~                                         [ expand(false),%~                                           expand(true)]),%~                              Kw17,%~                              system : '$end_consult'( '/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/sanity_fi_human_01.pfc.pl',%~                                         lexstate(202,swi),%~                                         user))),%~                         frame( 21,%~                           clause(<gt;clause>(0x55cd725c0000),221),%~                           '$do_load_file_2'( 'sanity_fi_human_01.pfc.pl',%~                             '/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/sanity_fi_human_01.pfc.pl', user,compiled,%~                             [ expand(false),%~                               expand(true)])),%~                         frame( 18,%~                           clause(<gt;clause>(0x55cd7238e9a0),10),%~                           '$qdo_load_file'( 'sanity_fi_human_01.pfc.pl',%~                             '/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/sanity_fi_human_01.pfc.pl', user,[expand(false),expand(true)])),%~                         frame( 16,%~                           clause(<gt;clause>(0x55cd723b9f00),5),%~                           setup_call_catcher_cleanup(%~                              system : with_mutex( '$load_file',%~                                         '$mt_start_load'( '/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/sanity_fi_human_01.pfc.pl',%~                                           <gt;clause>(0x55cd8673b100),%~                                           [ expand(false),%~                                             expand(true)])),%~                              system : '$mt_do_load'( <gt;clause>(0x55cd8673b100),%~                                         'sanity_fi_human_01.pfc.pl',%~                                         '/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/sanity_fi_human_01.pfc.pl',%~                                         user,%~                                         [ expand(false),%~                                           expand(true)]),%~                              Kw18,%~                              system : '$mt_end_load'(<gt;clause>(0x55cd8673b100)))),%~                         frame(14,meta_call,0),%~                         frame( 13,%~                           foreign( system : '$sig_atomic'/1),%~                           $sig_atomic( setup_call_cleanup(%~                                           with_mutex( '$load_file',%~                                             '$mt_start_load'( '/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/sanity_fi_human_01.pfc.pl',%~                                               <gt;clause>(0x55cd8673b100),%~                                               [ expand(false),%~                                                 expand(true)])),%~                                           '$mt_do_load'( <gt;clause>(0x55cd8673b100),%~                                             'sanity_fi_human_01.pfc.pl',%~                                             '/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/sanity_fi_human_01.pfc.pl', user,[expand(false),expand(true)]),%~                                           '$mt_end_load'(<gt;clause>(0x55cd8673b100))))),%~                         frame(10,clause(<gt;clause>(0x55cd72398c80),12),'$load_file'('sanity_fi_human_01.pfc.pl',user,'<gt;garbage_collected>'))]),%~         Context_Prolog_stack)),%~    error,%~    [ '~w `~p\' does not exist'-[source_sink,'sanity_fi_sk.pfc'], nl,'In:',nl,'~|~t[~D]~6+ '-[37],%~      '~p' - [ throw( error(existence_error(source_sink,'sanity_fi_sk.pfc'),Existence_error))], nl,'~|~t[~D]~6+ '-[33],%~      '~p' - [ '$source_term'( 'sanity_fi_sk.pfc',%~                 Sanity_fi_sk_c46_pfc, Source_term4,Source_term3,%~                 Source_term,Source_term37,%~                 ['/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/sanity_fi_human_01.pfc.pl'],%~                 [ encoding(utf8), expand(false),expand(true)])],%~      ' at ~w:~d'-['/var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl',1761], nl,'~|~t[~D]~6+ '-[31],%~      '~p' - [ '$term_in_file'( <gt;stream>(0x55cd74a3d600),%~                 Stream_c62_c40_0x55cd74a3d600, Term_in_file8,Term_in_file7,%~                 Term_in_file,Term_in_file37,%~                 ['/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/sanity_fi_human_01.pfc.pl'],%~                 [ expand(false),%~                   expand(true)])],%~      ' at ~w:~d'-['/var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl',1840], nl,'~|~t[~D]~6+ '-[30],%~      '~p' - [ setup_call_catcher_cleanup(%~                  system : '$open_source'( '/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/sanity_fi_human_01.pfc.pl',%~                             <gt;stream>(0x55cd74a3d600),%~                             close(<gt;stream>(0x55cd74a3d600),'/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/sanity_fi_human_01.pfc.pl',<gt;clause>(0x55cd76719650)), [],[expand(false),expand(true)]),%~                  system : '$term_in_file'( <gt;stream>(0x55cd74a3d600),%~                             Stream_c62_c40_0x55cd74a3d6009,%~                             Term_in_file12,%~                             Term_in_file11,%~                             Term_in_file10,%~                             Term_in_file1037,%~                             ['/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/sanity_fi_human_01.pfc.pl'],%~                             [ expand(false),%~                               expand(true)]),%~                  Kw,%~                  system : '$close_source'( close(<gt;stream>(0x55cd74a3d600),'/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/sanity_fi_human_01.pfc.pl',<gt;clause>(0x55cd76719650)),%~                             true))],%~      ' at ~w:~d'-['/var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl',646], nl,'~|~t[~D]~6+ '-[27],%~      '~p' - [ '$source_term'( '/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/sanity_fi_human_01.pfc.pl',%~                 '<gt;garbage_collected>', '<gt;garbage_collected>',Garbage_collected,%~                 '<gt;garbage_collected>','<gt;garbage_collected>',%~                 '<gt;garbage_collected>')],%~      ' at ~w:~d'-['/var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl',1740], nl,'~|~t[~D]~6+ '-[26],%~      '~p' - [ '$load_file'( '/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/sanity_fi_human_01.pfc.pl',%~                 '/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/sanity_fi_human_01.pfc.pl',%~                 Var_c47_lib_c47_jenkins_c47_workspace_c47_logicmoo_workspace_c64_2_c47_packs_sys_c47_logicmoo_base_c47_t_c47_examples_c47_fol_c47_sanity_fi_human_01_c46_pfc_c46_pl,%~                 [ expand(false),%~                   expand(true)])],%~      ' at ~w:~d'-['/var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl',3007], nl,'~|~t[~D]~6+ '-[25],%~      '~p' - [ setup_call_catcher_cleanup(%~                  system : '$start_consult'('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/sanity_fi_human_01.pfc.pl',1632225669.708176),%~                  system : '$load_file'( '/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/sanity_fi_human_01.pfc.pl',%~                             '/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/sanity_fi_human_01.pfc.pl',%~                             Var_c47_lib_c47_jenkins_c47_workspace_c47_logicmoo_workspace_c64_2_c47_packs_sys_c47_logicmoo_base_c47_t_c47_examples_c47_fol_c47_sanity_fi_human_01_c46_pfc_c46_pl16,%~                             [ expand(false),%~                               expand(true)]),%~                  Kw17,%~                  system : '$end_consult'( '/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/sanity_fi_human_01.pfc.pl',%~                             lexstate(202,swi),%~                             user))],%~      ' at ~w:~d'-['/var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl',646], nl,'~|~t[~D]~6+ '-[21],%~      '~p' - [ '$do_load_file_2'( 'sanity_fi_human_01.pfc.pl',%~                 '/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/sanity_fi_human_01.pfc.pl', user,compiled,%~                 [ expand(false),%~                   expand(true)])],%~      ' at ~w:~d'-['/var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl',2592], nl,'~|~t[~D]~6+ '-[18],%~      '~p' - [ '$qdo_load_file'( 'sanity_fi_human_01.pfc.pl',%~                 '/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/sanity_fi_human_01.pfc.pl', user,[expand(false),expand(true)])],%~      ' at ~w:~d'-['/var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl',2547], nl,'~|~t[~D]~6+ '-[16],%~      '~p' - [ setup_call_catcher_cleanup(%~                  system : with_mutex( '$load_file',%~                             '$mt_start_load'( '/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/sanity_fi_human_01.pfc.pl',%~                               <gt;clause>(0x55cd8673b100),%~                               [ expand(false),%~                                 expand(true)])),%~                  system : '$mt_do_load'( <gt;clause>(0x55cd8673b100),%~                             'sanity_fi_human_01.pfc.pl',%~                             '/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/sanity_fi_human_01.pfc.pl', user,[expand(false),expand(true)]),%~                  Kw18,%~                  system : '$mt_end_load'(<gt;clause>(0x55cd8673b100)))],%~      ' at ~w:~d'-['/var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl',646], nl,'~|~t[~D]~6+ '-[14],'<gt;meta call>',%~      nl,'~|~t[~D]~6+ '-[13],%~      '~p' - [ $sig_atomic( setup_call_cleanup(%~                               with_mutex( '$load_file',%~                                 '$mt_start_load'( '/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/sanity_fi_human_01.pfc.pl',%~                                   <gt;clause>(0x55cd8673b100),%~                                   [ expand(false),%~                                     expand(true)])),%~                               '$mt_do_load'( <gt;clause>(0x55cd8673b100),%~                                 'sanity_fi_human_01.pfc.pl',%~                                 '/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/sanity_fi_human_01.pfc.pl', user,[expand(false),expand(true)]),%~                               '$mt_end_load'(<gt;clause>(0x55cd8673b100))))], ' <gt;foreign>'-[],nl,%~      '~|~t[~D]~6+ '-[10],%~      '~p' - [ '$load_file'('sanity_fi_human_01.pfc.pl',user,'<gt;garbage_collected>')],%~      ' at ~w:~d'-['/var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl',2355], nl,nl,%~      'Note: some frames are missing due to last-call optimization.'-[],%~      nl,%~      'Re-run your program in debug mode (:- debug.) to get more detail.'-[]])source_sink `sanity_fi_sk.pfc' does not exist
In:
  [37] throw(error(existence_error(source_sink,sanity_fi_sk.pfc),_15322))
  [33] $source_term(sanity_fi_sk.pfc,_15354,_15356,_15358,_15360,_15362,['/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/sanity_fi_human_01.pfc.pl'],[encoding(utf8),expand(false),expand(true)]) at /var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl:1761
  [31] $term_in_file(<gt;stream>(0x55cd74a3d600),_15428,_15430,_15432,_15434,_15436,['/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/sanity_fi_human_01.pfc.pl'],[expand(false),expand(true)]) at /var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl:1840
  [30] setup_call_catcher_cleanup(system: $open_source('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/sanity_fi_human_01.pfc.pl',<gt;stream>(0x55cd74a3d600),close(<gt;stream>(0x55cd74a3d600),'/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/sanity_fi_human_01.pfc.pl',<gt;clause>(0x55cd76719650)),[],[expand(false),expand(true)]),system: $term_in_file(<gt;stream>(0x55cd74a3d600),_15554,_15556,_15558,_15560,_15562,['/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/sanity_fi_human_01.pfc.pl'],[expand(false),expand(true)]),_15494,system: $close_source(close(<gt;stream>(0x55cd74a3d600),'/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/sanity_fi_human_01.pfc.pl',<gt;clause>(0x55cd76719650)),true)) at /var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl:646
  [27] $source_term('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/sanity_fi_human_01.pfc.pl',<gt;garbage_collected>,<gt;garbage_collected>,_15642,<gt;garbage_collected>,<gt;garbage_collected>,<gt;garbage_collected>) at /var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl:1740
  [26] $load_file('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/sanity_fi_human_01.pfc.pl','/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/sanity_fi_human_01.pfc.pl',_15676,[expand(false),expand(true)]) at /var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl:3007
  [25] setup_call_catcher_cleanup(system: $start_consult('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/sanity_fi_human_01.pfc.pl',1632225669.708176),system: $load_file('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/sanity_fi_human_01.pfc.pl','/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/sanity_fi_human_01.pfc.pl',_15754,[expand(false),expand(true)]),_15726,system: $end_consult('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/sanity_fi_human_01.pfc.pl',lexstate(202,swi),user)) at /var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl:646
  [21] $do_load_file_2('sanity_fi_human_01.pfc.pl','/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/sanity_fi_human_01.pfc.pl',user,compiled,[expand(false),expand(true)]) at /var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl:2592
  [18] $qdo_load_file('sanity_fi_human_01.pfc.pl','/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/sanity_fi_human_01.pfc.pl',user,[expand(false),expand(true)]) at /var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl:2547
  [16] setup_call_catcher_cleanup(system:with_mutex($load_file,$mt_start_load('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/sanity_fi_human_01.pfc.pl',<gt;clause>(0x55cd8673b100),[expand(false),expand(true)])),system: $mt_do_load(<gt;clause>(0x55cd8673b100),'sanity_fi_human_01.pfc.pl','/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/sanity_fi_human_01.pfc.pl',user,[expand(false),expand(true)]),_15926,system: $mt_end_load(<gt;clause>(0x55cd8673b100))) at /var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl:646
  [14] <gt;meta call>
  [13] $sig_atomic(setup_call_cleanup(with_mutex($load_file,$mt_start_load('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/sanity_fi_human_01.pfc.pl',<gt;clause>(0x55cd8673b100),[expand(false),expand(true)])),$mt_do_load(<gt;clause>(0x55cd8673b100),'sanity_fi_human_01.pfc.pl','/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/sanity_fi_human_01.pfc.pl',user,[expand(false),expand(true)]),$mt_end_load(<gt;clause>(0x55cd8673b100)))) <gt;foreign>
  [10] $load_file('sanity_fi_human_01.pfc.pl',user,<gt;garbage_collected>) at /var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl:2355

Note: some frames are missing due to last-call optimization.
Re-run your program in debug mode (:- debug.) to get more detail.
ERROR: source_sink `sanity_fi_sk.pfc' does not exist
ERROR: In:
ERROR:   [37] throw(error(existence_error(source_sink,sanity_fi_sk.pfc),_15322))
ERROR:   [33] $source_term(sanity_fi_sk.pfc,_15354,_15356,_15358,_15360,_15362,['/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/sanity_fi_human_01.pfc.pl'],[encoding(utf8),expand(false),expand(true)]) at /var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl:1761
ERROR:   [31] $term_in_file(<gt;stream>(0x55cd74a3d600),_15428,_15430,_15432,_15434,_15436,['/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/sanity_fi_human_01.pfc.pl'],[expand(false),expand(true)]) at /var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl:1840
ERROR:   [30] setup_call_catcher_cleanup(system: $open_source('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/sanity_fi_human_01.pfc.pl',<gt;stream>(0x55cd74a3d600),close(<gt;stream>(0x55cd74a3d600),'/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/sanity_fi_human_01.pfc.pl',<gt;clause>(0x55cd76719650)),[],[expand(false),expand(true)]),system: $term_in_file(<gt;stream>(0x55cd74a3d600),_15554,_15556,_15558,_15560,_15562,['/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/sanity_fi_human_01.pfc.pl'],[expand(false),expand(true)]),_15494,system: $close_source(close(<gt;stream>(0x55cd74a3d600),'/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/sanity_fi_human_01.pfc.pl',<gt;clause>(0x55cd76719650)),true)) at /var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl:646
ERROR:   [27] $source_term('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/sanity_fi_human_01.pfc.pl',<gt;garbage_collected>,<gt;garbage_collected>,_15642,<gt;garbage_collected>,<gt;garbage_collected>,<gt;garbage_collected>) at /var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl:1740
ERROR:   [26] $load_file('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/sanity_fi_human_01.pfc.pl','/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/sanity_fi_human_01.pfc.pl',_15676,[expand(false),expand(true)]) at /var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl:3007
ERROR:   [25] setup_call_catcher_cleanup(system: $start_consult('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/sanity_fi_human_01.pfc.pl',1632225669.708176),system: $load_file('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/sanity_fi_human_01.pfc.pl','/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/sanity_fi_human_01.pfc.pl',_15754,[expand(false),expand(true)]),_15726,system: $end_consult('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/sanity_fi_human_01.pfc.pl',lexstate(202,swi),user)) at /var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl:646
ERROR:   [21] $do_load_file_2('sanity_fi_human_01.pfc.pl','/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/sanity_fi_human_01.pfc.pl',user,compiled,[expand(false),expand(true)]) at /var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl:2592
ERROR:   [18] $qdo_load_file('sanity_fi_human_01.pfc.pl','/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/sanity_fi_human_01.pfc.pl',user,[expand(false),expand(true)]) at /var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl:2547
ERROR:   [16] setup_call_catcher_cleanup(system:with_mutex($load_file,$mt_start_load('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/sanity_fi_human_01.pfc.pl',<gt;clause>(0x55cd8673b100),[expand(false),expand(true)])),system: $mt_do_load(<gt;clause>(0x55cd8673b100),'sanity_fi_human_01.pfc.pl','/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/sanity_fi_human_01.pfc.pl',user,[expand(false),expand(true)]),_15926,system: $mt_end_load(<gt;clause>(0x55cd8673b100))) at /var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl:646
ERROR:   [14] <gt;meta call>
ERROR:   [13] $sig_atomic(setup_call_cleanup(with_mutex($load_file,$mt_start_load('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/sanity_fi_human_01.pfc.pl',<gt;clause>(0x55cd8673b100),[expand(false),expand(true)])),$mt_do_load(<gt;clause>(0x55cd8673b100),'sanity_fi_human_01.pfc.pl','/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/sanity_fi_human_01.pfc.pl',user,[expand(false),expand(true)]),$mt_end_load(<gt;clause>(0x55cd8673b100)))) <gt;foreign>
ERROR:   [10] $load_file('sanity_fi_human_01.pfc.pl',user,<gt;garbage_collected>) at /var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl:2355
ERROR: 
ERROR: Note: some frames are missing due to last-call optimization.
ERROR: Re-run your program in debug mode (:- debug.) to get more detail.
^  Exception: (30) [system] setup_call_catcher_cleanup(system:'$open_source'('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/sanity_fi_human_01.pfc.pl', <gt;stream>(0x55cd74a3d600), close(<gt;stream>(0x55cd74a3d600), '/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/sanity_fi_human_01.pfc.pl', <gt;clause>(0x55cd76719650)), [], [expand(false), expand(true)]), system:'$term_in_file'(<gt;stream>(0x55cd74a3d600), _298, _300, _294, _296, _302, ['/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/sanity_fi_human_01.pfc.pl'], [expand(false), expand(true)]), _2129590, system:'$close_source'(close(<gt;stream>(0x55cd74a3d600), '/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/sanity_fi_human_01.pfc.pl', <gt;clause>(0x55cd76719650)), true)) ? EOF: exit (status 4)
%~ unused(no_junit_results)
logicmoo.base.examples.fol.SANITY_FI_HUMAN_01 JUnit	error	=	source_sink `sanity_fi_sk.pfc' does not exist
In:
  [37] throw(error(existence_error(source_sink,sanity_fi_sk.pfc),_15322))
  [33] $source_term(sanity_fi_sk.pfc,_15354,_15356,_15358,_15360,_15362,['/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/sanity_fi_human_01.pfc.pl'],[encoding(utf8),expand(false),expand(true)]) at /var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl:1761
  [31] $term_in_file(<gt;stream>(0x55cd74a3d600),_15428,_15430,_15432,_15434,_15436,['/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/sanity_fi_human_01.pfc.pl'],[expand(false),expand(true)]) at /var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl:1840
  [30] setup_call_catcher_cleanup(system: $open_source('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/sanity_fi_human_01.pfc.pl',<gt;stream>(0x55cd74a3d600),close(<gt;stream>(0x55cd74a3d600),'/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/sanity_fi_human_01.pfc.pl',<gt;clause>(0x55cd76719650)),[],[expand(false),expand(true)]),system: $term_in_file(<gt;stream>(0x55cd74a3d600),_15554,_15556,_15558,_15560,_15562,['/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/sanity_fi_human_01.pfc.pl'],[expand(false),expand(true)]),_15494,system: $close_source(close(<gt;stream>(0x55cd74a3d600),'/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/sanity_fi_human_01.pfc.pl',<gt;clause>(0x55cd76719650)),true)) at /var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl:646
  [27] $source_term('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/sanity_fi_human_01.pfc.pl',<gt;garbage_collected>,<gt;garbage_collected>,_15642,<gt;garbage_collected>,<gt;garbage_collected>,<gt;garbage_collected>) at /var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl:1740
  [26] $load_file('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/sanity_fi_human_01.pfc.pl','/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/sanity_fi_human_01.pfc.pl',_15676,[expand(false),expand(true)]) at /var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl:3007
  [25] setup_call_catcher_cleanup(system: $start_consult('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/sanity_fi_human_01.pfc.pl',1632225669.708176),system: $load_file('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/sanity_fi_human_01.pfc.pl','/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/sanity_fi_human_01.pfc.pl',_15754,[expand(false),expand(true)]),_15726,system: $end_consult('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/sanity_fi_human_01.pfc.pl',lexstate(202,swi),user)) at /var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl:646
  [21] $do_load_file_2('sanity_fi_human_01.pfc.pl','/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/sanity_fi_human_01.pfc.pl',user,compiled,[expand(false),expand(true)]) at /var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl:2592
  [18] $qdo_load_file('sanity_fi_human_01.pfc.pl','/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/sanity_fi_human_01.pfc.pl',user,[expand(false),expand(true)]) at /var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl:2547
  [16] setup_call_catcher_cleanup(system:with_mutex($load_file,$mt_start_load('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/sanity_fi_human_01.pfc.pl',<gt;clause>(0x55cd8673b100),[expand(false),expand(true)])),system: $mt_do_load(<gt;clause>(0x55cd8673b100),'sanity_fi_human_01.pfc.pl','/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/sanity_fi_human_01.pfc.pl',user,[expand(false),expand(true)]),_15926,system: $mt_end_load(<gt;clause>(0x55cd8673b100))) at /var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl:646
  [14] <gt;meta call>
  [13] $sig_atomic(setup_call_cleanup(with_mutex($load_file,$mt_start_load('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/sanity_fi_human_01.pfc.pl',<gt;clause>(0x55cd8673b100),[expand(false),expand(true)])),$mt_do_load(<gt;clause>(0x55cd8673b100),'sanity_fi_human_01.pfc.pl','/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/logicmoo_base/t/examples/fol/sanity_fi_human_01.pfc.pl',user,[expand(false),expand(true)]),$mt_end_load(<gt;clause>(0x55cd8673b100)))) <gt;foreign>
  [10] $load_file('sanity_fi_human_01.pfc.pl',user,<gt;garbage_collected>) at /var/lib/jenkins/workspace/logicmoo_workspace@2/lib/swipl/boot/init.pl:2355

Note: some frames are missing due to last-call optimization.
Re-run your program in debug mode (:- debug.) to get more detail. 

%~ test_completed_exit(32)
%~ message_hook_type(warning)
%~ message_hook(
%~    goal_failed(at_halt,system:test_completed),
%~    warning,
%~    [ 'Goal (~w) failed: ~p' - [ at_halt,
%~                                 system : test_completed]])
Goal (at_halt) failed: system:test_completed
Warning: Goal (at_halt) failed: system:test_completed

totalTime=1.000

FAILED: /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-junit-minor -k sanity_fi_human_01.pfc.pl (returned 4) Add_LABELS='' Rem_LABELS='Skipped,Skipped,Errors,Warnings,Overtime,Skipped'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.