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 plugin architecture for HCLP. To get an HCLP solver, you need to include:
 a kernel metainterpreter (PROLOG source code)
 a general hierarchy solver (PROLOG source code)
 a plugin module with flat constraint solver
 constraints over the Herbrand Universe (PROLOG source code)
 a plugin module that implements a specific comparator
 locallypredicatebetter comparator (PROLOG source code)
 regionallypredicatebetter comparator (PROLOG source code)
 weightedsumpredicatebetter comparator (PROLOG source code)
 worstcasebetter comparator (PROLOG source code)
 unsatisfiedcountbetter 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 plugin module containing a constraint solver to get a specific labeling procedure. Two examples of plugin modules are enclosed.
 PROLOG source code of labeling kernel
 plugin module for constraints over integers (backtracking)
 plugin 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
Metavariables 1996 
There is a PROLOG implementation of the metavariable concept originated from ECRC. With this module you can use metavariables in "normal" PROLOG.
 PROLOG source code for metavariables in PROLOG
 implementation of constructive negation using metavariables
Constructive negation 1994 
The program implements a constructive negation using the concept of metainterpreters. 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 