Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!usc!samsung!dali.cs.montana.edu!ogicse!pdxgate!eecs!antoy From: antoy@eecs.cs.pdx.edu (Sergio Antoy) Newsgroups: comp.lang.prolog Subject: Re: Abstract Type in Prolog ? Message-ID: <1123@pdxgate.UUCP> Date: 11 Jan 91 00:32:46 GMT References: <1991Jan3.154717.27057@watserv1.waterloo.edu> Sender: news@pdxgate.UUCP Reply-To: antoy@cs.pdx.edu (Sergio Antoy) Organization: Portland State University, Portland, OR Lines: 19 In article <1991Jan3.154717.27057@watserv1.waterloo.edu> yfeng@watnow.waterloo.edu (Feng Yang) writes: >I am wondering if prolog can be used to represent abstract data type. >For example: an axiomatic specification of stack is something like: > >top(push(i,s)) = i >isemptystack(createstack) = true >isemptystack(push(i,s)) = false >pop(push(i,s)) = s > >Can this set of axioms be represented in prolog directly ? Chapter 5 of Algebraic Specification, (Bergstra, Heering, and Klint eds.) ACM Press, Addison-Wesley, 1989, gives an overview of several methods for translating algebraic specifications in Prolog. Sergio Antoy Portland State University