Article View: comp.lang.prolog
Article #2192Re: Occurs check
From: Peter Baumgartner
Date: Mon, 14 Dec 1992 19:50
Date: Mon, 14 Dec 1992 19:50
35 lines
1926 bytes
1926 bytes
In article <1992Dec13.173016.8849@nntp.hut.fi> jur@robin.cs.hut.fi (Jussi Rintanen) writes: > Question 1: What implementations of Prolog implement the occurs check? > (Our university has both Sicstus and NU-Prolog.) > Try SEPIA-Prolog from ECRC in munich/Germany. It has some nice features, including the possibility for sound unification. It also includes "iterative deepening", so you need not program it explicitly. Sepia is cheap and pretty fast. Contact sepia_request@ecrc.de (i'm not quite sure about this adress) As an alternative you could "linearize" the heads of your rules, i.e. eliminate multiple occurences of variables in the head. For example, your rule axiom(impl(A,impl(B,A)),k). then becomes axiom(impl(A,impl(B,A1)),k) :- unify(A,A1). where unify/2 is a sound unification procedure, as can be found e.g. in the quintus library. This works sufficiently well for many programs. However, the first alternative, a Prolog with built-in sound unification, is superior (wrt. efficiency). Peter -- ____________________________________________________________________ Peter Baumgartner | peter@infko.uni-koblenz.de Universitaet Koblenz, | Institut fuer Informatik | Voice: +49 261 9119-426 Rheinau 3-4, D-5400 Koblenz, Germany | Fax: +49 261 37524
Technical Details
Message-ID:
<PETER.92Dec14145051@bax.infko.uni-koblenz.de>Path:
arc1-ca.pugleaf.net!sparky!uunet!mcsun!Germany.EU.net!infko!infko!peterReferences:
<1992Dec13.173016.8849@nntp.hut.fi>Show Full Headers
Complete Article Headers
Newsgroups: comp.lang.prolog Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!Germany.EU.net!infko!infko!peter From: peter@infko.uni-koblenz.de (Peter Baumgartner) Subject: Re: Occurs check In-Reply-To: jur@robin.cs.hut.fi's message of Sun, 13 Dec 1992 17:30:16 GMT Message-ID: <PETER.92Dec14145051@bax.infko.uni-koblenz.de> Sender: news@infko.uucp (that is the account for news) Nntp-Posting-Host: bax.uni-koblenz.de Organization: University of Koblenz, Germany References: <1992Dec13.173016.8849@nntp.hut.fi> Date: Mon, 14 Dec 1992 19:50:50 GMT Lines: 35