Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
Drexel University or The Math Forum.
|
|
|
|
Re: Simulating PROLOG inside PROLOG!
Posted:
Nov 19, 2012 6:53 AM
|
|
Graham Cooper <grahamcooper7@gmail.com> writes:
> On Nov 19, 9:30 am, Alan Smaill <sma...@SPAMinf.ed.ac.uk> wrote: >> Graham Cooper <grahamcoop...@gmail.com> writes: >> > Imagine if you could cut down on all the PROLOG RULES >> >> > f(a,b,c) :- g(a,b) , h(b,c). >> >> > and just use SINGLE FACTS! >> >> > if( g(a,b)&h(b,c) , f(a,b,c)). >> >> > This would greatly simplify tracing the program run and give you more >> > control over the facts and implications you manipulate! >> >> ever heard of clause/2 from the Prolog standard? >> > > > It looks like it traces the subgoals being invoked.
No, it doesn't; it gives what you were talking about, a unit clause corresponding to each normal Prolog program clause.
> > > Herc
-- Alan Smaill
|
|
|
|