🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.prolog
Article #2171

Cost of cyclic unification?

#2171
From: Mark Johnson
Date: Wed, 23 Dec 1992 15:50
20 lines
1148 bytes
For two acyclic terms, can cyclic unification run in time proportional
to the size of the *smaller* term?

That is, if a program doesn't make use of cyclic terms then can it
run as efficiently on a Prolog that supports cyclic unification
as it would on a Prolog that doesn't support cyclic unification?

If true, it seems that cyclic unification would be preferable
to acyclic unification without the occur check.

Mark

P.S.: I constructed a small program to see if unifying two terms
of the form f(f(...f(f(_))...)) depended on the size of the larger
term.  I could detect no change in time required in Sicstus.


Mark Johnson
Cognitive Science, Box 1978
Brown University
Technical Details
Message-ID: <1992Dec23.155044.15225@cs.brown.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!brunix!brunix!mj
References: <TORKEL.92Dec21175440@bast.sics.se> <1992Dec21.195646.3776@cs.brown.edu> <1992Dec23.010930.2892@cs.sfu.ca>

Show Full Headers
Complete Article Headers
Newsgroups: comp.lang.prolog
Path: arc1-ca.pugleaf.net!sparky!uunet!brunix!brunix!mj
From: mj@cs.brown.edu (Mark Johnson)
Subject: Cost of cyclic unification?
Message-ID: <1992Dec23.155044.15225@cs.brown.edu>
Sender: news@cs.brown.edu
Organization: Brown University Department of Computer Science
References: <TORKEL.92Dec21175440@bast.sics.se> <1992Dec21.195646.3776@cs.brown.edu> <1992Dec23.010930.2892@cs.sfu.ca>
Date: Wed, 23 Dec 1992 15:50:44 GMT
Lines: 20