Re: ...Constraints and attributes.



I possess SWI-Prolog with CLP(R) (beta) and have now looked at some examples
of constraint solvers. But in the future I will look more closely to follow
up on your advice.

I realise that I did make some mistakes about constraint solvers. My first
observation is that I can understand the constraint solver which is given as
an example in the documentation partially, without really understanding
attributed variables. Which contradicts my earlier posts. It's just that a
developer of SWI-Prolog told me that the Constraint Handling Rules (CHR)
which simplify constraints until they can be solved, actually work in
SWI-Prolog through attributed variables. Maybe this differs from one
compiler to the next, but if you can understand the logic of the constraint
solver, you don't actually need to know this. {:-(}

And my second mistake was, to think that it was the Prolog clauses which
form a part of the constraint solver have as purpose to assign a value to
the variables. They simply fulfill an "isolation axiom" or 'final case' .
{:-)}

Dirk


"A.L." <alewando@xxxxxxxxxx> wrote in message
news:l5t0h158k927v29o1asgv3rni43eei9v1r@xxxxxxxxxx
> On Fri, 26 Aug 2005 22:29:40 -0400, "Dirk Mittler"
> <mdirk@xxxxxxxxxxxx> wrote:
>
>>
>>"A.L." <alewando_won_@xxxxxxxxxxxxxxx> wrote in message
>>news:9v7pg1pr95s0q0dh6nl95fpqm70ra2fkpb@xxxxxxxxxx
>>
>>>
>>> Could you please summarize in one SHORT paragraph what is your
>>> point?...
>>>
>>> A.L.
>>
>>You are focussing on the fact that an earlier exercise of mine, which
>>people
>>would have a hard time even to find on the bulletin board by now, was in
>>fact not functional, and that yet I spent time on it. But I believe that
>>one
>>would need to understand precisely the text which you have omitted here,
>>in
>>order to begin to write one's own constraint *solvers* . As opposed to
>>just
>>using a CLP(R) solving system that came with the Prolog compiler.
>
> It is not one paragraph, and this is not short. In addition, despite
> reading your post multiple times, I have no idea what is your point.
>
> As I understand (and I may be wrong...) one is that Bratko doesn't
> explain how to write your own constraint solver. This is not a
> rocket science to write simple (probably not efficient) constraint
> solver. Taka a book about constraint programming (Krzysztof Apt
> dicusses this in his book in details, although the code he provides
> is not in Prolog) or implement Prolog constraint solver that is
> posted on Roman Bartak's page:
>
> http://kti.ms.mff.cuni.cz/~bartak/html/constraints.html
>
> See the section
>
> "CSP (Constraint Satisfaction Problems) (1996)
>
> The program implements a skeleton for labeling, the main part of CSP
> solvers. You need to include a plug-in module containing a
> constraint solver to get a specific labeling procedure. Two examples
> of plug-in modules are enclosed.
>
> PROLOG source code of labeling kernel
> plug-in module for constraints over integers (backtracking)
> plug-in module for constraints over integers (forward checking)
> Word Puzzle Solver
>
> This is a program, based on CSP, for solving word puzzles. Example
> of usage is enclosed.
>
> PROLOG source code of Word Puzzle Solver
> word puzzle example.."
>
> In addition, there are a lot of publications about implementing
> constraint solvers in Prolog or extending Prolog for constraint
> solving. See papers by Daniel Diaz who did this for Gnu Prolog. Go
> to SICS page and look for SICStus Prolog. There are publications by
> Mats Carlsson who implemented constraint solver for SICStus Prolog.
>
> Use google. Stop complaining.
>
> A.L.


.



Relevant Pages

  • Re: ...Contemplating unspecified constraint SOLVERS.
    ... >>using a CLPsolving system that came with the Prolog compiler. ... > explain how to write your own constraint solver. ... > PROLOG source code of Word Puzzle Solver ...
    (comp.lang.prolog)
  • Re: ...Contemplating unspecified constraint SOLVERS.
    ... >order to begin to write one's own constraint *solvers*. ... >using a CLPsolving system that came with the Prolog compiler. ... explain how to write your own constraint solver. ... PROLOG source code of Word Puzzle Solver ...
    (comp.lang.prolog)
  • Re: Car-sequencing problem
    ... >>I'm trying to learn Prolog because I must develop an application for ... In particular I must plan a solver in order to resolve the ... > implement constraint solver in standard Prolog see Roman Bartak's ... > PROLOG source code of Word Puzzle Solver ...
    (comp.lang.prolog)