Formal and Practical Aspects of Implementing Abstract Data Types in the Prolog Instruction
Volume 19, Issue 1 (2008), pp. 17–30
Pub. online: 1 January 2008
Type: Research Article
Received
1 October 2006
1 October 2006
Published
1 January 2008
1 January 2008
Abstract
Abstract data types constitute a central tool in computer science and play an important role in problem solving, knowledge representation, and programming. In this paper, formal and practical aspects of utilizing abstract data types (ADTs) are discussed in the context of logic programming when using the Prolog programming language. The approach is presented in the following stages: (a) First, alternative ways of implementing ADTs in terms of Prolog constructs are presented and partial encapsulation of ADTs in terms of grey boxes is demonstrated. (b) Next, complete encapsulation of ADTs in terms of black boxes is suggested in a way that strictly reflects the concept's formal computer science definition while taking into consideration the characteristics and constraints of the logic programming paradigm. (c) Finally, implications for instruction are discussed.