Prolog & Constraints
The standard file extension for Prolog programs is .pl.
However, a file with this extension will get interpreted as a perl
program. So we've included a .txt version of each Prolog
program linked on this page that should show in your browser and that can
be downloaded. If you download it, rename it to a .pl file
before loading it into Prolog. Or use the zip file.
Getting Started
- Running Prolog: basic commands for running
Prolog; information on installing it on a personal machine;
editing programs; debugging
Prolog Lecture Notes
Source Code
zip file with all the source code files:
prolog-source-files.zip
- 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)
- search.pl (to accompany the search notes);
search.txt (as .txt file)
- clpr.pl - the clpr library (constraint logic
programming over the reals);
clpr.txt (as .txt file)
- clpfd.pl (finite domain constraints);
clpfd.txt (as .txt file)
- difference_lists.pl;
difference_lists.txt (as .txt file)
- deriv.pl (symbolic differentiation in Prolog);
deriv.txt (as .txt file)
Useful Links