Pfc - upgraded, seems to have some issues with forward chaining

Hi @DouglasRMiles,

First, many thanks for the great effort to upgrade pfc. I managed to reinstall it.

I noticed a slight problem, with starting it up, as follows:

Welcome to SWI-Prolog (threaded, 64 bits, version 8.1.24)
SWI-Prolog comes with ABSOLUTELY NO WARRANTY. This is free software.
Please run ?- license. for legal details.

For online help and background, visit https://www.swi-prolog.org
For built-in help, use ?- help(Topic). or ?- apropos(Word).

?- use_module(library(pfc)).
% c:/programdata/swi-prolog/pack/pfc/prolog/pfc.pl:84 
% add_pfc_to_module(using_pfc(baseKB, user, baseKB, pfc_load)).
% debugm(system, show_success(system, delete_import_module(baseKB, user))).
% debugm(not_is_pfc_file, show_success(not_is_pfc_file, ensure_abox_hybrid(baseKB))).
% add_pfc_to_module(using_pfc(user, user, user, pfc_load)).
% warn(mtHybrid(user)).
% debugm(not_is_pfc_file, show_success(not_is_pfc_file, ensure_abox_hybrid(user))).
true.

?- ain(gender(P, male) ==> male(P)).
true.

?- ain(gender(joe, male)).
true.

?- male(X).
false.

?- ain(gender(P, male) ==> male(P)).
true.

?- male(X).
X = joe.

?- ain(\+ gender(joe, male)).
% debugm(pfc_lib, show_success(pfc_lib, mpred_withdraw(gender(joe, male),  (mfl4(_19374, user, user_input, 33), ax)))).
true.

?- male(X).
X = joe.

?- ain(gender(P, male) ==> male(P)).
true.

?- male(X).
X = joe.

I now did the example again following your lead to first create a module.

This worked – so perhaps there is some minor issues with the top level.

thanks,

Dan

?- module(foo).
Warning: foo is not a current module (created)
true.

foo:  ?- use_module(library(pfc)).
% c:/programdata/swi-prolog/pack/pfc/prolog/pfc.pl:84 
% add_pfc_to_module(using_pfc(baseKB, foo, baseKB, pfc_load)).
% debugm(system, show_success(system, delete_import_module(baseKB, user))).
% debugm(not_is_pfc_file, show_success(not_is_pfc_file, ensure_abox_hybrid(baseKB))).
% add_pfc_to_module(using_pfc(foo, foo, foo, pfc_load)).
% debugm(system, show_success(system, delete_import_module(foo, user))).
%  c:/programdata/swi-prolog/pack/pfc/prolog/pfclib/system_each_module.pfc.pl compiled into foo 0.00 sec, 2 clauses
% debugm(not_is_pfc_file, show_success(not_is_pfc_file, ensure_abox_hybrid(foo))).
true.

foo:  ?- ain(gender(P, male) ==> male(P)).
% make_as_dynamic(do_call_inherited(baseKB, gender(_923470, male)), baseKB, gender, 2).
true.

foo:  ?- ain(gender(joe, male)).
true.

foo:  ?- male(X).
% moving_to_last_clause(foo, male(_1045392)) :-
%     zwc,
%     inherit_above(foo, male(_1045392)).
% make_as_dynamic(do_call_inherited(baseKB, male(X)), baseKB, male, 1).
X = joe .

foo:  ?- ain(\+ gender(joe, male)).
% debugm(pfc_lib, show_success(pfc_lib, mpred_withdraw(gender(joe, male),  (mfl4(_7978, foo, user_input, 37), ax)))).
true.

foo:  ?- male(X).
false.