The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » sci.math.* » sci.math

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: Simulating PROLOG inside PROLOG!
Replies: 2   Last Post: Nov 19, 2012 6:34 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Alan Smaill

Posts: 1,103
Registered: 1/29/05
Re: Simulating PROLOG inside PROLOG!
Posted: Nov 19, 2012 6:53 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Graham Cooper <> writes:

> On Nov 19, 9:30 am, Alan Smaill <> wrote:
>> Graham Cooper <> 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

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.