Thanks to Paco Bueno's changes to mycin_tr.pl, I can now use the example horse_riding.
As explained by Paco, mycin is a package. At compile-time it rewrites its clauses into a different form.
This provokes the question: Is is possible to prompt for some of the properties (like sunny(yes) cf 0.6) and then submit them from the top level to mycin.
I am trying to build a small expert system (for claims processing). So I want to use something like the Solve program in Art of Prolog (p 312) to get the answers to a series of questions - assert a set of statements of the form: property(x) cf CF, then query: ?- file:mycin(payout(x),CF).
Can this be done simply and directly?
Or will I have to write code to 1. Prompt for the answers (where necessary) 2. Build a file (like horse_riding.pl) and compile it. 3. use_module the new file. 4. delete the file.
John O'Gorman
Francisco Bueno Carrillo wrote:
The mycin library is a package (also assertions). The use of packages can be declared in three ways:
:- use_package(mycin). :- module(MyModule,[...],[mycin]). :- mycin(MyModule).
As mentioned, :- mycin(MyModule). is just a way of declaring the use of the mycin package within a file. It is not a call to a predicate. So, in fact, there is no much use in calling it from the top level.
Paco Bueno
============================================================================== Message: Address: Action: help majordomo(a)clip.dia.fi.upm.es Info. on useful commands subscribe ciao-users-request(a)clip.dia.fi.upm.es Subscribe to this list unsubscribe ciao-users-request(a)clip.dia.fi.upm.es Unsubscribe from this list <whatever> ciao-users(a)clip.dia.fi.upm.es Send message to list ----------------------------------------------------------------------------- Archived messages: http://www.clip.dia.fi.upm.es/Mail/ciao-users/ -----------------------------------------------------------------------------