CSE 341 - Programming Languages - Autumn 2012
Prolog & Constraints
Getting Started
Running Prolog
: basic commands for running Prolog; information on installing it on a personal machine; editing programs; debugging
Prolog Lecture Notes
Prolog Basics
Note about append
Prolog Mini-Exercises #1
;
mini1.pl
(answers);
mini1.txt
(answers as text file)
Controlling Search in Prolog
Prolog Mini-Exercises #2
(difference lists, controlling search);
answers
Prolog Mini-Exercises #3
(more difference lists);
answers
Constraints and Interactive Graphics
(includes two mini-exercises)
Source Code
basics.pl
(to accompany the Prolog Basics notes);
basics.txt
(as .txt file)
unittests.pl
(unit tests in SWI Prolog);
unittests.txt
(as .txt file)
clpr.pl
- the clpr library (constraint logic programming over the reals);
clpr.txt
(as .txt file)
search.pl
(to accompany the search notes);
search.txt
(as .txt file)
difference_lists.pl
;
difference_lists.txt
(as .txt file)
puzzle.pl
(finite domain constraints);
puzzle.txt
(as .txt file)
Useful Links
SWI Prolog home page
A Prolog Tutorial
by J.R. Fisher
Other Prolog tutorials
SWI Prolog reference manual