Path: utzoo!mnetor!uunet!husc6!mailrus!nrl-cmf!ames!elroy!cit-vax!ucla-cs!william From: william@CS.UCLA.EDU Newsgroups: comp.lang.prolog Subject: Re: AAIS Prolog for MacIntosh Message-ID: <10371@shemp.CS.UCLA.EDU> Date: 15 Mar 88 17:20:56 GMT Sender: news@CS.UCLA.EDU Reply-To: william@CS.UCLA.EDU (William Cheng) Organization: UCLA Computer Science Department Lines: 61 I've used AAIS Prolog for more than a year, and I am reasonably happy with it. Programs that works under C-Prolog or SICS Prolog MAY need a little bit of modification before it can run under AAIS. The major differences are: 1) The I/O predicates, such as get0/1 and read/1, fails when end of file is reached. In SICS, get0/1 will return a -1 and read/1 will return end_of_file when end of file is reached. (This may be nice sometimes.) 2) AAIS has predicates such as append/3 and member/2 built in. However, you can make the system forget about such built-ins by using the new/2 directive as follows: :- new(append, 3). :- new(member, 2). In porting a program that consists of several files, just create a file that consults everything, and put the new/2 directives at the top of this file. 3) File naming convention is different, if you move from a UNIX to the Mac environment, and if you want to use files not in the current directory. 4) AAIS implements the clause/2 predicate a little bit differently. For example, if you have the following clause in the database: a :- b, c. When you do clause(a, X), X will become [b, c], instead of the usual b, c. This may be the biggest problem when you want to port something to AAIS. Other than 4), porting is not a big problem. What basically needs to be done is to create a Mac specific file that handles the differences. Some of the good things: 1) AAIS is very robust, I don't recall that I've ever got any crashes. 2) It handles GARBAGE COLLECTION. You can also disable/enable the garbage collection messages. 3) Although it does not have a compiler, it runs a little bit slower than the C-Prolog on our departmental VAX. 4) It has interface to the Mac toolbox, so graphics is possible, although I've never tried it. 5) It has a familiar Mac application user interface. It's not like a product of a garage operation. 6) Very nice debugger. It even pretty-prints the current goal, so things don't disappear into the right edge of the screen or have unreadable wrap around. 7) It catches user interrupt (.), just like C-Prolog or SICS handles C. 8) It's inexpensive. When I bought it, I cost about $99 or $95. The price must have gone up. However, to get a full language system for less than $150 is a very good price. Also, their support is pretty good. When I wrote to them, they actually responded. ***Disclaimer: I am in no way associated with Advanced A.I. Systems Inc.***