logicmoo / Logicmoo_docker

Docker Master Container that starts the rest of the Logicmoo services (see https://hub.docker.com/repository/docker/logicmoo/logicmoo_starter_image )
GNU Lesser General Public License v2.1
4 stars 0 forks source link

logicmoo.pfc.test.sanity_base.IF_MISSING_04 JUnit #236

Open TeamSPoon opened 3 years ago

TeamSPoon commented 3 years ago

!/usr/bin/env lmoo-junit

% % PFC is a language extension for prolog.. there is so much that can be done in this language extension to Prolog % % Dec 13, 2035 % Douglas Miles % cls ; kill -9 %1 ; fg ; swipl -g "ensure_loaded(pack(logicmoo_base/t/examples/base/'sanity_abc.pfc'))."

% was_module(sanity,[]).

:- include(library(logicmoo_test_header)).

:- dynamic((foob/1,if_missing/2,good/1)).

:- expects_dialect(pfc).

% this should have been ok (if_missing(Missing,Create) ==> (( (+ Missing/(Missing\=@=Create)), + ~(Create)) ==> Create)). % and is now is OK !

:- ain((good(X) ==> ifmissing(foob(),foob(X)))).

:- ain(good(az)).

:- mpred_test(foob(az)).

==> foob(b).

:- mpred_test(+foob(az)).

==> (+ foob(b)).

:- mpred_test(foob(az)).

:- (mpred_blast( good(az) )).

:- listing([foob,good]).

:- mpred_test( +foob(az)).

~ foob(b).

:- mpred_test(+foob(b)).

:- ain(good(az)).

:- mpred_test(foob(az)).