项目作者: merkouris148

项目描述 :
Some exercises in logic programming and constraint logic programming writen in ECLiPSe Prolog
高级语言: Prolog
项目地址: git://github.com/merkouris148/prolog-exercises.git
创建时间: 2020-05-30T11:36:29Z
项目社区:https://github.com/merkouris148/prolog-exercises

开源协议:GNU General Public License v3.0

下载


prolog-exercises

Some exercises in logic programming and constraint logic programming writen in ECLiPSe Prolog. The exercises are divided in two packages. The first one (see Lp20A.pdf) is written in vanilla prolog, while the second one (see Lp20_B.pdf) uses the _constraint logic programming extension of ECLiPSe Prolog.

Contents

A detailed description of the first two exercises is included in the file Lp20_A.pdf (in Greek):

  1. 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).
  2. jobshop.pl: A programme solving two versions of a task scheduling problem.
    1. 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.
    2. In the second version we also add the constraints:
      • Each task needs some workers.
      • There is a fixed number of available workers.

The description of the rest three exercises is included in the file Lp20_B.pdf (in Greek):

  1. vertexcover.pl: A programme finding a vertex cover in a random undirected graph, using constraints. This programme uses graph.pl to generate random graphs.
  2. stable.pl: A programme finding a stable match, using the fd constraint library of ECLiPSe. Some example data are given in stablefd_data.pl.
  3. 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.