Transforming CHIP Programs to KL1: Design and Implementation of the CHUKL Preprocessor

Konstantinos D. Varsamos, Transforming CHIP Programs to KL1: Design and Implementation of the CHUKL Preprocessor. PhD thesis. Department of Computer Science, University of Bristol. September 1994. PDF, 389 Kbytes.


The CHUKL system is a prototype parallel implementation of finite domain constraint logic programming (CLP(FD)) in the committed choice concurrent logic programming language KL1. The system has been implemented in KL1 running under KLIC and has two components: a preprocessor and a runtime system. The preprocessor takes a CHIP program as input, and transforms it into a KL1 program which can be run by linking it with the runtime system. All basic primitives to solve the finite domain constraints are supported by the runtime system. Finally, C code is obtained, by applying the KLIC compiler. The transformation of the non-Prolog features of a CHIP program (i.e. the domain definition part, the constraints and the labelling) to KL1 is mainly a source-to-source translation. The transformation of the Prolog-like program to KL1 is the most interesting and important part of the whole transformation. To transform the Prolog-like program to KL1 the Input/Output mode for each predicate has to be inferred, the commit operator and guards have to be added where necessary and output unification has to be moved to the body. This thesis describes these issues that are related to the CHIP to KL1 transformation by means of the design and implementation in Prolog of the preprocessor which applies this transformation in the CHUKL system. The actual code for the transformation of Prolog programs to KL1 and transformation results are also included.

Bibtex entry.

Publication Admin