logicmoo_workspace
logicmoo_workspace copied to clipboard
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: https://github.com/logicmoo/logicmoo_workspace/issues/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'
Broken in https://github.com/logicmoo/logicmoo_workspace/commit/47cfb56e12234430e980d22dbcca206411201b38 https://logicmoo.org:2082/gitlab/logicmoo/logicmoo_workspace/-/commit/47cfb56e12234430e980d22dbcca206411201b38
Fixed in https://github.com/logicmoo/logicmoo_workspace/commit/51a38b8a8cc92a39cbea53faf8883a32e6dc3b61 https://logicmoo.org:2082/gitlab/logicmoo/logicmoo_workspace/-/commit/51a38b8a8cc92a39cbea53faf8883a32e6dc3b61
Broken in https://github.com/logicmoo/logicmoo_workspace/commit/157f663e9aafee41e1bef5aa3e17fd16962ab8c7 https://logicmoo.org:2082/gitlab/logicmoo/logicmoo_workspace/-/commit/157f663e9aafee41e1bef5aa3e17fd16962ab8c7
Fixed in https://github.com/logicmoo/logicmoo_workspace/commit/90f5d1e5fc22fb1b2f7fdc46074babc473034f36 https://logicmoo.org:2082/gitlab/logicmoo/logicmoo_workspace/-/commit/90f5d1e5fc22fb1b2f7fdc46074babc473034f36