CSE 599F1 - Constraint Languages

Constraint Logic Programming

SWI Prolog has two libraries to support constraint logic programming, clpr for constraints over the reals and clpfd for finite domain constraints. This requires using some slightly annoying syntax to mark the constraints, but otherwise provides full constraint logic programming.

The standard file extension for Prolog programs is .pl. However, browsers tend to interpret files with this extension as perl programs and do something other than just displaying them, so all the code files linked from this page have a .txt extension. If you download one, rename it to .pl before running it.

Alternatively, if you are running on a CSE machine, you can just copy the following directory -- this is the web directory that includes these notes, and includes the source files with the .pl extension (the text files are actually just symlinks to them): /cse/web/courses/cse599f1/17wi/clp

Getting Started

Prolog Lecture Notes

Source Code and Additional Lecture Notes

Useful Links