Re: CLP vs. plain old Prolog?
- From: Bart Demoen <bmd@xxxxxxxxxxxxxxxxx>
- Date: Thu, 28 Apr 2005 23:05:55 +0200
Robert Oschler wrote:
> In my uneducated view, I see standard Prolog as a constraint solving tool in
> it's native state. So the question becomes, what does CLP add to the party?
It has become common to think about "everything" as a domain over which constraints are solved, so one talks about the Herbrand domain (the Prolog terms) and a solver for equality (also inequality) between terms, given by unification (and diff). So Prolog just has the Herbrand domain, and CLP has also other domains, like R, Q, FD ... No big deal at first sight, but ...
The research community has come up with nifty theories and algorithms for the numerical (and some finite) domains, so that you can "specify" a difficult optimization problem and rely on the solver to solve it efficiently. For the Herbrand domain, we are really nowhere: you cannot speficy (as a constraint) that L3 is the result of appending L1 and L2. Instead, you have to program it (using append/3 for instance). And there are numerous examples of this weakness of the Herbrand solvers currently implemented in Prolog systems: the Herbrand solver is of the kind DIY. Indeed, for every Herbrand constraint between terms, you must write a piece of code yourself in Prolog.
Do you need CLP(X) ? It is difficult to tell - what is the X for you ?
Do you need CLP(Herbrand) ? Not really: you have been used to writing your own Herbrand solvers with almost no builtin support - just unification.
Would LP benefit from a true CLP(Herbrand) ? Of course: it would lift LP one level higher in expressivity.
> I know it has heuristics for automatically pruning the search space
The concept of search space becomes less important when you have CLP(X). Since we live without CLP(Herbrand), search space is on our minds all the time, unfortunately.
> So I am trying to see if CLP is something that I need so badly, that I > should just bite the bullet and start digging into it. Or, if it's only > absolutely necessary for a niche class of problems and I can live without > it.
But what if you happen to live in that niche ? What sort of problems are you solving with your software ?
Cheers
Bart Demoen .
- References:
- CLP vs. plain old Prolog?
- From: Robert Oschler
- CLP vs. plain old Prolog?
- Prev by Date: Re: CLP vs. plain old Prolog?
- Next by Date: Re: Non dominating queens problem
- Previous by thread: Re: CLP vs. plain old Prolog?
- Next by thread: Re: CLP vs. plain old Prolog?
- Index(es):
Relevant Pages
|
|