house(H1) & house(H2). /*~ %~ debugm( baseKB, %~ show_success( baseKB, %~ baseKB : ain( clif( leftof(H1,H2)=>(house(H1)&house(H2)))))) ======================================================= =>(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 " %~ %~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %~ 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)))). ============================================ %~ 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)). ~*/ :- mpred_test(kif_compile). % intractive_test/1 means only run if interactive /*~ %~ ?-( mpred_test("Test_0002_Line_0000__Kif_compile",baseKB:kif_compile)). %~ kif_to_boxlog_attvars2 = necessary(leftof(h1,h2)) %~ kif_to_boxlog_attvars2 = necessary(leftof(h2,h3)) %~ kif_to_boxlog_attvars2 = necessary(leftof(h3,h4)) %~ kif_to_boxlog_attvars2 = necessary(leftof(h4,h5)) %~ kif_to_boxlog_attvars2 = =>(leftof('$VAR'('House_Leftof'),'$VAR'('House_Leftof1')),and(house('$VAR'('House_Leftof')),house('$VAR'('House_Leftof1')))) passed=info(why_was_true(baseKB:kif_compile)) no_proof_for(kif_compile). no_proof_for(kif_compile). no_proof_for(kif_compile). name = 'logicmoo.base.fol.quick_test.FIVE_LEFTOF_TYPE_01-Test_0002_Line_0000__Kif_compile'. JUNIT_CLASSNAME = 'logicmoo.base.fol.quick_test.FIVE_LEFTOF_TYPE_01'. JUNIT_CMD = 'timeout --foreground --preserve-status -s SIGKILL -k 10s 10s swipl -x /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-clif -t "[\'five_leftof_type_01.pl\']"'. % saving_junit: /var/lib/jenkins/workspace/logicmoo_workspace/test_results/jenkins/Report-logicmoo-base-fol-quick_test-vSTARv0vSTARvvDOTvvSTARv-2-1--grep-2-i-WARN-ERROR-_file-00-fail-pass--Units-Logicmoo_base_fol_quick_test_FIVE_LEFTOF_TYPE_01_Test_0002_Line_0000_Kif_compile-junit.xml ~*/ % intractive_test/1 means only run if interactive :- interactive_test(listing(pfclog)). % mpred_test/1 each become a Junit test that must succeed /*~ ?-listing(pfclog) :- dynamic pfclog/1. :- multifile pfclog/1. :- public pfclog/1. :- module_transparent pfclog/1. pfclog(nesc(leftof(h1, h2))). pfclog(nesc(leftof(h2, h3))). pfclog(nesc(leftof(h3, h4))). pfclog(nesc(leftof(h4, h5))). pfclog((poss(house(A)), nesc(~house(B))==>nesc(~leftof(B, A)))). pfclog((nesc(leftof(A, B)), nesc(~house(A))==>nesc(~house(B)))). pfclog((nesc(leftof(A, B)), poss(house(B))==>nesc(house(A)))). pfclog((poss(house(A)), nesc(~house(B))==>nesc(~leftof(A, B)))). pfclog((nesc(leftof(A, B)), nesc(~house(B))==>nesc(~house(A)))). pfclog((nesc(leftof(A, B)), poss(house(A))==>nesc(house(B)))). ~*/ % mpred_test/1 each become a Junit test that must succeed :- mpred_test(pfclog_compile). % :- mpred_test(nesc(leftof(h4, h5))). % EDIT: https://github.com/logicmoo/logicmoo_workspace/edit/master/packs_sys/logicmoo_base/t/examples/fol/quick_test/five_leftof_type_01.pl % JENKINS: https://jenkins.logicmoo.org/job/logicmoo_workspace/lastBuild/testReport/logicmoo.base.fol.quick_test/FIVE_LEFTOF_TYPE_01/ % ISSUE_SEARCH: https://github.com/logicmoo/logicmoo_workspace/issues?q=is%3Aissue+label%3AFIVE_LEFTOF_TYPE_01 % ISSUE: https://github.com/logicmoo/logicmoo_workspace/issues/623 /*~ %~ ?-( mpred_test("Test_0003_Line_0000__Pfclog_compile",baseKB:pfclog_compile)). passed=info(why_was_true(baseKB:pfclog_compile)) no_proof_for(pfclog_compile). no_proof_for(pfclog_compile). no_proof_for(pfclog_compile). name = 'logicmoo.base.fol.quick_test.FIVE_LEFTOF_TYPE_01-Test_0003_Line_0000__Pfclog_compile'. JUNIT_CLASSNAME = 'logicmoo.base.fol.quick_test.FIVE_LEFTOF_TYPE_01'. JUNIT_CMD = 'timeout --foreground --preserve-status -s SIGKILL -k 10s 10s swipl -x /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-clif -t "[\'five_leftof_type_01.pl\']"'. % saving_junit: /var/lib/jenkins/workspace/logicmoo_workspace/test_results/jenkins/Report-logicmoo-base-fol-quick_test-vSTARv0vSTARvvDOTvvSTARv-2-1--grep-2-i-WARN-ERROR-_file-00-fail-pass--Units-Logicmoo_base_fol_quick_test_FIVE_LEFTOF_TYPE_01_Test_0003_Line_0000_Pfclog_compile-junit.xml ~*/ %~ unused(no_junit_results) Test_0001_Line_0000__True result = passed. Test_0002_Line_0000__Kif_compile result = passed. Test_0003_Line_0000__Pfclog_compile result = passed. %~ test_completed_exit(64) ``` totalTime=5.000 SUCCESS: /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-junit-minor -k five_leftof_type_01.pl (returned 64) Add_LABELS='' Rem_LABELS='Skipped,Errors,Warnings,Overtime,Skipped,Skipped']]>