INTERACTIVE PROLOG
GUIDE
© Roman Barták 1997
Table of Contents | Previous Chapter |
Next Chapter |
This page contains a collection of more or less advanced PROLOG programs which I developed to test some research ideas. The programs pose experimental implementations and, thus, they are not intended for beginners. I plan to publish a collection of introductory programs for learning PROLOG later this year. So, stay tuned.
All programs at this page are written in "standard" PROLOG so it is possible to use them almost everywhere. However, I do not guarantee that you will not have to make some slight changes depending on PROLOG implementation that you use. I developed all programs at this page using Open Prolog on Apple Macintosh.
This page contains following programs (click on the title to get to a specific program):
|
Tip: | Look at page with general references on PROLOG or page with my publications for information on algorithms that are implemented in following programs. |
A Generalized Algorithm for Solving Constraint Hierarchies 1997 |
The program implements a generalized algorithm for solving constraint hierarchies. This algorithm consists of two phases: planning phase that constructs constraint networks and executing phase that traverses the network and computes valuation of variables.
The following two modules implement a planning phase:
The following two modules implement an executing phase based on Indigo algorithm:
Here is a Read Me file and some examples of usage.
For a theoretical background of the algorithm I recommend to read my paper accepted to JFPLC '97 (postscript file), the revised version submitted to CP'97 (postscript file) or summary of my PhD Thesis (postscript file).
HCLP (Hierarchical Constraint Logic Programming) 1996 |
The program implements a plug-in architecture for HCLP. To get an HCLP solver, you need to include:
- a kernel meta-interpreter (PROLOG source code)
- a general hierarchy solver (PROLOG source code)
- a plug-in module with flat constraint solver
- constraints over the Herbrand Universe (PROLOG source code)
- a plug-in module that implements a specific comparator
- locally-predicate-better comparator (PROLOG source code)
- regionally-predicate-better comparator (PROLOG source code)
- weighted-sum-predicate-better comparator (PROLOG source code)
- worst-case-better comparator (PROLOG source code)
- unsatisfied-count-better comparator (PROLOG source code)
CSP (Constraint Satisfaction Problems) 1996 |
The program implements a skeleton for labeling, the main part of CSP solvers. You need to include a plug-in module containing a constraint solver to get a specific labeling procedure. Two examples of plug-in modules are enclosed.
- PROLOG source code of labeling kernel
- plug-in module for constraints over integers (backtracking)
- plug-in module for constraints over integers (forward checking)
Word Puzzle Solver
This is a program, based on CSP, for solving word puzzles. Example of usage is enclosed.
- PROLOG source code of Word Puzzle Solver
- word puzzle example
Meta-variables 1996 |
There is a PROLOG implementation of the meta-variable concept originated from ECRC. With this module you can use meta-variables in "normal" PROLOG.
- PROLOG source code for meta-variables in PROLOG
- implementation of constructive negation using meta-variables
Constructive negation 1994 |
The program implements a constructive negation using the concept of meta-interpreters. It is a refined version of program from my Master Thesis.
You can go through some slides which I prepared to describe the idea of constructive negation.
BinWAM Compiler 1994 |
The program contains a simple PROLOG compiler developed during my studies of PROLOG compilers. It compiles PROLOG source to BinWAM instructions.
Table of Contents | Previous Chapter |
Next Chapter |