and then tried what seems to be the straightforward next step (reported in all posts on the pack I could find within the next few hours):
?- use_module(library(pfc)).
As I got:
ERROR: source_sink `library(pfc)' does not exist
I came across one post discussing setting proper library path, but once I was sure the path is actually ok, I realized that there is no pfc.pl file in my <...>/pack/pfc/prolog/ installation directory at all.
Reading further every letter of the post I learned the post was related to a PFC pack like v1.4.111 or so. Looking then into the GitHub repo I became aware of two āmainā branches (āmasterā and āmultiple_versionsā):
in āmultiple_versionsā branch there exists pfc.pl file in the .../pack/pfc/prolog/ directory, so with this version ?- use_module(library(pfc)). is supposed to work āout of the boxā.
in āmasterā branch (from which I guess PFC pack was installed by default) there is no pfc.pl file in the .../pack/pfc/prolog/ dir (but exist some others, the āclosestā seems pfc_old.pl).
So here are (finally) my questions:
Assuming I installed āmasterā version, which module I have to load as the very first step?
What is the current status of the pack, does it work correctly in order I can follow the example given in the manual?
Or, should I install the HEAD of āmultiple_versionā branch instead?
@EricGT :
Regarding link to install PFC pack: yes, this is the one.
Regarding the post discussing proper library path: will post it soon, just to find it againā¦
that discusses similar problem of loading pce pack. As the error message is of the same type, I used this post to see if maybe I have to set the proper path to pfc library. But now I think that was never my problem, the installation of pfc pack added all the necessary paths, so what I got originally was (in the meantime I was experimenting with some other installations, so I must restore this original state now):
?- file_search_path(library,X).
X = app_config(lib) ;
X = swi(library) ;
X = swi(library/clp) ;
X = 'c:/users/goran/appdata/local/swi-prolog/pack/dictoo/prolog' ;
X = 'c:/users/goran/appdata/local/swi-prolog/pack/gvar_syntax/prolog' ;
X = 'c:/users/goran/appdata/local/swi-prolog/pack/logicmoo_utils/prolog' ;
X = 'c:/users/goran/appdata/local/swi-prolog/pack/pfc/prolog' ;
X = 'c:/users/goran/appdata/local/swi-prolog/pack/predicate_streams/prolog' ;
X = pce('prolog/lib').
If the screen is blurry use the Gear Icon and select 1080p
?- pack_install(pfc)
% Load the support for PFC
?- ensure_loaded(library(pfc_lib)).
% By default persons in database are male/1
?- add_PFC((person(P), ~female(P) ==> male(P))).
% Add Joe is person
?- add_PFC(person(joe)).
% Show the clause database
?- listing([male,female,person]).
% Why is Joe is a male
?- mpred_why(male(joe)).
% Remove Joe is a person.
?- add_PFC( \+ person(joe)).
% Why is Joe is a male
?- mpred_why(male(joe)).
% Show the clause database
?- listing([male,female,person]).
Oh, sorry! It just crossed my mind few minutes ago while preparing morning coffee (itās morning here, I live in CET Time Zone):
When I was referring in the previous post to the installation step, I was telling about the original installation (v2.0.3) BEFORE I opened this thread.
But I see now in the repository that you also updated the installation, so it is not just matter of loading the library. My bad, sorry!