=>, is this "forward chaining"

Hello,

I am still trying to understand the new =>/2 operator.

Is this essentially, a simple forward chaining mechanism – how does backtracking intended to work with this.

Dan

1 Like

How would it be forward chaining? It is just a Prolog clause with single sided unification and an implicit commit (cut). The search for rules is the same, only the matching differs. The simplest answer to forward chaining is tabling :slight_smile:

Thank you.

Yes, no “chaining” here, just some kind of “forward” …

I don’t know why i am blanking on this new construct to graps it.

Perhaps, if you can explain why its called “single sided unification” what is single sided vs. multi-sided about this, and what is multi-sided …

Is side, the side of the operator “=>” or “:-” …

Dan

Could you provide at least some explanation of or examples to the statement: the simplest answer to forward chaining is tabling?

(Will delete later, Discourse doesn’t allow me right now)

Oops I thought the question by @grossdan is fresh. And not the question
by @erikkaplun . So I guess I am a little bit off topic. Sorry.

Would still be interesting to know how tabling enables forward chaining – if you have some thoughts on that, that would be great.

I dont know whether the phrase “The simplest answer to forward chaining
is tabling :slight_smile:” implies that tabling does strictly forward chaining.

It could also mean that problems that can be solved with forward chaining
can alternatively be also solved with tabling.

Tabling could indeed be considered as an answer to forward chaining. Roughly, tabling performs backward chaining while identifying recursive calls that call the same variant goal. Such goals and delayed. The subsequent tabling completion phase identifies the delayed goals and performs forward chaining on them until fixed point is reached.

2 Likes

Jan, what is a same and a variant goal … could you provide an example … can these calls be traced … to see (and learn) what happens in practice.

Dan

1 Like

Did you read:

https://www.swi-prolog.org/pldoc/man?section=tabling-subsumptive

https://www.swi-prolog.org/pldoc/man?predicate=%3D@%3D/2

?

Thank you – indeed its there …

Dan