IDNI / TML

Tau Meta-Language
http://www.idni.org
122 stars 28 forks source link

CLP _should_ be able to handle non ground number ranges #26

Closed TeamSPoon closed 4 years ago

TeamSPoon commented 4 years ago

Assertion of:

bigger_than_one(Y) :-  X = 1, Y >X.

Query with Answer:

?- bigger_than_one(A).

A>1.

I think would be acceptable (And of course what all CLP solvers do).

However,

Below is what is planned to do instead?

Query with Answers:

?- bigger_than_one(A).
A=2.
A=3.
A=4.
A=5.
A=6.
... And so on..

I do not think is a very good idea. And is definitely not CLP

I'll wait to hear confirmation of whether or not this non-CLP way is planned for Tau's version of CLP before I explain all the things wrong with such a plan.

naturalog commented 4 years ago

There isn't any plan to support CLP precisely as defined in prolog, but to support more fundamental constraints solving abilities, which should then make traditional CLP easy to do. That is not to say that TML's current abilities are strictly less than CLP's: it is more powerful in some aspects. But it doesn't support all CLP features out of the box, like returning an infinite interval, as in your example.

TeamSPoon commented 4 years ago

OK, so you are saying TML won't be able to do CLP like done Prolog. But it is also incapable of doing CLP(FD)/CLP(Q)/CLP(R) as done in other languages if it is unable to work with infinite intervals. I would suggest avoiding claiming it already has a working CLP until it does. Perhaps getting CLP(Boolean) working

Would you give an example of "it is more powerful in some aspects." ?