Abstract Encapsulation is a well-established concept that has been used extensively in programming languages as a tool for disciplined and reliable program organization. In this paper we try to elucidate the critical issues involved, when introducing encapsulation constructs in the programming language PROLOG. It is argued that two different forms of encapsulation are needed in order to incorporate modules and abstract data types into the language. We present a general representation framework which can be used as the basis for the implementaion of various modular systems. We also describe a construct ADT which is used for the encapsulation of user defined abstract data types, and an interpreter that handles the execution of PROLOG goals in the context of modules and abstract data types.
[1]
Keith L. Clark,et al.
Micro-Prolog - programming in logic
,
1984,
Prentice Hall international series in computer science.
[2]
Peter M. D. Gray,et al.
Perlog: A Prolog With Persistence and Modules
,
1988,
Comput. J..
[3]
Péter Szeredi,et al.
Prolog in Practice
,
1983,
IFIP Congress.
[4]
Robert A. Kowalski,et al.
Logic for problem solving
,
1982,
The computer science library : Artificial intelligence series.
[5]
William F. Clocksin,et al.
Programming in Prolog
,
1981,
Springer Berlin Heidelberg.