How can I make good use of the 'class pie'?
Is it possible to publish some sample code in Visual Prolog where the class pie is used? How can I embed the Prolog Inference Engine into Component Object Model server? What interfaces should contain such server? If I had some code in PIE language inserted into the text file what is the sequence of the calls of pie class methods to run goals based on that text file?
KA3AKOB C.A.
- Thomas Linder Puls
- VIP Member
- Posts: 1411
- Joined: 28 Feb 2000 0:01
Re: How can I make good use of the 'class pie'?
If you have installed the examples (IDE: Help -> Install Examples...) you will have a directory named pieDemo, which contains an embedded PIE.
The PIE interface contains a predicate consult_p (and reconsult_p):
That is the predicate that the interpreter itself uses for consult (and reconsult).
But normally/often I think you would only have clauses and no goals in such files, and then you would run the goals (and goal like things) from the Visual Prolog using predicates like:
Or if you want to obtain a result:
Creating a COM Server is a different subject which should not be discussed together with PIE stuff. What interface to give such a server depends on what you want to use it for. But I think you should postpone that part until you have gained experience with PIE itself.
The PIE interface contains a predicate consult_p (and reconsult_p):
Code: Select all
predicates
consult_p : (string Filename) determ.
% @short consult #Filename into the PIE interpreter. To be used in invokePredicate's.
% @end
But normally/often I think you would only have clauses and no goals in such files, and then you would run the goals (and goal like things) from the Visual Prolog using predicates like:
Code: Select all
predicates
run : (string Goal).
% @short Run #Goal
% @end
Code: Select all
predicates
evalTerm : (term Term) -> term Evaluated.
% @short #Evaluated is the result of evaluating expressions and functions in #Term.
% @end
Regards Thomas Linder Puls
PDC
PDC
Re: How can I make good use of the 'class pie'?
Thank you for the help. I will learn the sample pieDemo with great attention.
Sincerely yours,
Sincerely yours,
KA3AKOB C.A.