Some exercises in logic programming and constraint logic programming writen in ECLiPSe Prolog. The exercises are divided in two packages. The first one (see Lp20_A.pdf) is written in vanilla prolog, while the second one (see Lp20_B.pdf) uses the constraint logic programming extension of ECLiPSe Prolog.
A detailed description of the first two exercises is included in the file Lp20_A.pdf (in Greek):
- listsoflist.pl: A programme providing an implementation of some matrix operations. The matrices where encoded in Prolog as lists of lists (hence the name of the file).
- jobshop.pl: A programme solving two versions of a task scheduling problem.
- In the first version we have the following constraints:
- Each task has a duration.
- Each task can only be executed in a specific machine type.
- We have multiple instances of each machine type.
- Each task must end before the deadline.
- In the second version we also add the constraints:
- Each task needs some workers.
- There is a fixed number of available workers.
- In the first version we have the following constraints:
The description of the rest three exercises is included in the file Lp20_B.pdf (in Greek):
- vertexcover.pl: A programme finding a vertex cover in a random undirected graph, using constraints. This programme uses graph.pl to generate random graphs.
- stable.pl: A programme finding a stable match, using the fd constraint library of ECLiPSe. Some example data are given in stablefd_data.pl.
- jobshop_opt.pl: A programme solving the optimization variant of the second version of the homonymous task scheduling problem above. Some example data are given in jobshop_opt_data.pl.