Newsgroups: comp.lang.prolog
Path: cantaloupe.srv.cs.cmu.edu!fs7.ece.cmu.edu!hudson.lm.com!news.pop.psu.edu!news.cac.psu.edu!howland.reston.ans.net!pipex!uunet!sparky!kwiudl.kwi.com!usenet
From: tom@kwi.com (Tom Howland)
Subject: Death to Arity!
In-Reply-To: mcovingt@ai.uga.edu's message of 6 Dec 1994 04:53:42 GMT
Message-ID: <TOM.94Dec9150953@heather.kwi.com>
Lines: 65
Sender: usenet@kwiudl.kwi.com
Organization: KnowledgeWare Inc, Redwood City, CA 94065-1417
References: <1994Dec5.215606.15801@bnlux1.bnl.gov> <3c0qom$eb4@hobbes.cc.uga.edu>
Date: Fri, 9 Dec 1994 23:09:53 GMT

>>>>> "mc" == Michael Covington <mcovingt@ai.uga.edu> writes:
In article <3c0qom$eb4@hobbes.cc.uga.edu> mcovingt@ai.uga.edu (Michael Covington) writes:

    mc> Arity Corporation and others have Prolog-to-SQL query-converters
    mc> for accessing SQL systems from Prolog.

    mc> Some Prologs (e.g., Arity) let you create a "database" distinct
    mc> from the main knowledge base.  As I recall the "database"
    mc> consists only of facts (not rules) and is updatable more easily
    mc> than the knowledge base.

Quintus & Sicstus both have SQL interfaces and other forms of
persistence. Also, with these systems, you get to program in a real
Prolog.

I really hate Arity Prolog. Some of the reasons include

** doesn't have -> (if-then-else). Instead, they have the non-standard
construct "snip", written as [! (begin snip) and !] (end snip). Snip can
be translated directly into "->" as

	   [! foo, baz !] <==> (foo, baz -> true)

But there is no way to translate very basic uses of standard Prologs
"->" into "snip". For example

	(   foo
	->  b
	;   baz
	),

where "b" backtracks. You can't say this using "snip".

** doesn't have indexing on asserted code. This forces you to use the
recorded database and use database references for fast access to the
database. With indexing on dynamic code, you don't need database
references anymore.

** doesn't have dynamic stack expansion, nor does it have a garbage
collector. For example, a seasoned Arity Prolog programmer would *never*
call sort/2 -- he's afraid of running out of stack space! Here is a
typical atrocity I came across

what they meant was

    append_once(X,Y,Z) :- ( append(X,Y,Z) -> true ).

what they wrote was

    append_once(L1,L2,L3) :-
        [! append(L1,L2,L3),  recordz(append_once,append(L1,L2,L3),_) !],
        fail.
    append_once(L1,L2,L3) :-
        [! recorded(append_once,append(L1,L2,L3),Ref), hard_erase(Ref) !].

Now, you may look at that and think it is merely incompetent, but in
fact, it is clever when using Arity.

This is because it is safer in Arity to get your bindings from the
database then from normal unification. You're less likely to get stack
overflows.

Working in an environment like this has a profound impact on the style
of Prolog that you write. In other words, Arity forces you write crummy
code.
