18.10.2014 Views

Constraint Logic Programming (Ch.14)

Constraint Logic Programming (Ch.14)

Constraint Logic Programming (Ch.14)

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Example: money puzzle!<br />

• This implementation (module clpfd - finite domains) uses its own<br />

operators, utilities (no { }’s):<br />

#= is constraint ‘=‘<br />

all_different/1: indicates all variables in argument must differ<br />

domain/3: indicates integer domain of variables<br />

labeling/2: does the actual inference (backtracking, etc.)<br />

B. Ross COSC 2Y01 Prolog<br />

8

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!