Article View: comp.lang.prolog
Article #2154Re: Occurs check
From: Fernando Pereira
Date: Mon, 21 Dec 1992 19:38
Date: Mon, 21 Dec 1992 19:38
37 lines
2626 bytes
2626 bytes
In article <1h4g5tINN5l6@eagle.dfki.uni-sb.de> smolka@dfki.uni-sb.de (Gert Smolka) writes: >I seriously doubt that rational tree unification pays any significant >efficiency penalties in practise over Edinburgh-style unification >without occurs check. As has been mentioned by Torkel before, >UNIFICATION IN SICSTUS IS RATIONAL TREE UNIFICATION, and Sicstus seems >to be rather efficient. I don't know what "rather efficient" means without actual numbers to back it up. But *all* the rational unification algorithms I know of need to make and trail more assignments, and chase more pointers, than the original Prolog unification without the occurs check. I would be happy it it were shown *over a well-chosen mix of programs* that the overhead in question is negligible. But I've not seen such a demonstration. >However, given the efficiency and >the clean *logical* status of rational tree unification, I would expect >that rational tree unification is taken as default and finite tree >unification is accommodated as a built-in predicate .he reason is that the efficiency issues mentioned above have not been addressed to everyone's satisfaction. >By the way, was it Edinburgh or Marseille which first dropped >the occurs check? Marseille. A very detailed and interesting account of the design history of the first Prolog, written by Alain Colmerauer and Philipe Roussel, will appear in the forthcoming proceedings of the History of Programming Languages Conference (April 1993). Their choice was based on the considerations that I have mentioned before. However, Alain eventually changed his mind, as shown by the exclusive use of rational unification in Prolog II. Nevertheless, the efficiency tradeoffs might still be different for fast compiled Prologs than for interpreted systems like the original Prolog and Prolog II: when the cost of clause chasing goes down, the relative cost of term chasing goes up. Fernando Pereira 2D-447, AT&T Bell Laboratories 600 Mountain Ave, PO Box 636 Murray Hill, NJ 07974-0636 pereira@research.att.com
Technical Details
Message-ID:
<24461@alice.att.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!cs.utexas.edu!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!att!allegra!alice!pereiraReferences:
<1992Dec13.173016.8849@nntp.hut.fi> <1992Dec17.111142.24450@dcs.qmw.ac.uk> <24435@alice.att.com> <1h4g5tINN5l6@eagle.dfki.uni-sb.de>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!cs.utexas.edu!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!att!allegra!alice!pereira From: pereira@alice.att.com (Fernando Pereira) Newsgroups: comp.lang.prolog Subject: Re: Occurs check Message-ID: <24461@alice.att.com> Date: 21 Dec 92 19:38:23 GMT Article-I.D.: alice.24461 References: <1992Dec13.173016.8849@nntp.hut.fi> <1992Dec17.111142.24450@dcs.qmw.ac.uk> <24435@alice.att.com> <1h4g5tINN5l6@eagle.dfki.uni-sb.de> Reply-To: pereira@alice.UUCP () Organization: AT&T, Bell Labs Lines: 38