Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

New Concept: CLP(*) from Hell

42 views
Skip to first unread message

burs...@gmail.com

unread,
Jun 30, 2017, 5:33:17 PM6/30/17
to
Dear All,

Samer Abdallahs SWI-Prolog thread Automatic differ-
entiation in CHR did an interesting experiment
in CAS and Prolog.

It showed that we can use CLP forward checking
(a variable gets a value assigned, and constraints are
updated) also in the context of this marriage.

But somehow I have the impression that the goal of a new
CLP(*) schema instance was not reached. This is
mainly due to the fact, that comparison operators

were not considered. But I guess with the help of
CHR we could also implement a couple of comparison
operators, that would react on forward checking.

We could then possibly do:

?- mul(X,2,Y), less(Y,10), X=4.
Yes
?- mul(X,2,Y), less(Y,10), X=5.
No

So there is still room to further develop CAS and Prolog.
In my auto diff variant I was already overriding is/2
and all the arithmetic comparison operators <, =:= etc...

But they arithmetic comparison operators don't react
yet on forward checking, so here is my idea for a
new CLP(*) from Hell:

**CLP(*) from Hell concept**

1) We would not have operators #<, #>, #=<, #>=,
but instead the usual ISO arithmetic operators
are overriden: <, >, =<, >=. So an existing Prolog
program needs zero changes.

2) We would not have operators #=, #\=,
but instead the usual ISO arithmetic operators
are overriden: =:=, =\=. So an existing Prolog
program needs zero changes.

3) The domain would not be the integers as in CLP(FD),
and also declaring ranges for variables would not
be so important, instead the following would happen:

3.1) The domain would be rather the reals itself, and
its more manageable incarnations, for example
the radical datatype.

3.2) Possibly there will be predicate similar to label/1,
but it would then compute a Gröbner Base, and from it
determine the variety, yielding constant values if
possible, similary like CLP(FD) already does.

Point 1) and 2) are rather cosmetics. The interesting
point is 3.1) and 3.2), especially the solver in 3.2).
That 3.2) is possible is already demonstrated in existing
systems, such as SAGE:

Gröbner Bases, Martin R. Albrecht,
DTU Crypto Group, 22 October 2013
http://martinralbrecht.files.wordpress.com/2010/07/20131022_buchberger_dtu.pdf

What I wonder is whether there will be some advantage of
using Prolog. For example the SAGE variety() function
has some similarity to constraint logic programming, the
CLP(*) scheme, for example an equation:

x^3-x = x*(x-1)*(x+1) = 0

Has 3 solutions, and if we have a triangular equation system,
back propagating this in Prolog, we would typically use
backtracking. What I did not yet find, is so much material
about Gröbner Bases and inequalities.

Concerning inequalities, some algorithms are just variations
of Gauss Elimination, maybe something similar can be
also done for Gröbner Bases. We will possibly get into the
waters of https://en.wikipedia.org/wiki/Hilbert's_seventeenth_problem

Bye

burs...@gmail.com

unread,
Jul 19, 2017, 11:54:43 AM7/19/17
to
Dear All,

Heaven needs a lot of data management, all these
acending souls, and angles decending and ascending.
So basicall we should marry the next CLP(*)

with DBMS technology. We can learn from Stephen
Henley 2005 paper, it starts with:

Yesterday upon the stair,
I met a man who wasn’t there
He wasn’t there again today:
I wish that man would go away.
– Children’s nonsense rhyme

His conclusions are then:

"Commercial DBMSs that are accessed through SQL
are very bad at handling missing data, and have no
mechanisms at all for handling imprecise or ‘partially
missing’ data. They use an incomplete 3-valued logic,
and a ‘null’ whose meaning is not properly defined."

Well with a good CLP(*), and scalling it to DB
dimensions, and maybe introducing also some Fuzzy,
Bayes reasoning, for us Earthlings between Heaven

and Hell, it should help in finding all those
inexhaustible oil source, with much better Geo
information systems. But these systems should not

only implement sceptical reasoning, but also credoulous
reasoning, so that in the future, when we fly by a
planet Star Trek style in our spaceship Enterprise, a

quick scan will tell us where to start digging.
0 new messages