Article View: comp.lang.prolog
Article #1652Re: co-routining
From: David John Hawley
Date: Fri, 07 Dec 1990 05:33
Date: Fri, 07 Dec 1990 05:33
29 lines
1387 bytes
1387 bytes
In article <TED.90Dec6145517@aiaia.nmsu.edu> ted@nmsu.edu (Ted Dunning) writes: > > >i have two questions about prologs which contain a freeze/2 predicate >such as sicstus prolog. > >1) how can one delay a goal until _either_ of two variables are >instantiated? How about: ?- freeze(X,foo(Flag,G)), freeze(Y,foo(Flag,G)). foo(Flag,G) :- var(Flag), !, Flag=done, G. foo(_,_). By continuations you can do this to an arbitrarily complex delay condition. I think. >2) how can freeze/2 be used to do co-routining? does this require a >modification of what is normally taken to be co-routining? Don't know. I use a concurrent logic language :-). Speaking of which, our local cll (KL1) runs 3 times slower than our local Prolog (ESP) on the same hardware. If anyone can answer the above question (2), maybe (s)he can comment on the performance hit of doing heavy freeze-based coroutining in Prolog. David Hawley
Technical Details
Message-ID:
<8155@icot32.icot.or.jp>Path:
arc1-ca.pugleaf.net!utzoo!attcan!telly!lethe!torsqnt!news-server.csri.toronto.edu!rutgers!cs.utexas.edu!uunet!kddlab!icot32!hawleyReferences:
<TED.90Dec6145517@aiaia.nmsu.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!telly!lethe!torsqnt!news-server.csri.toronto.edu!rutgers!cs.utexas.edu!uunet!kddlab!icot32!hawley From: hawley@icot32.icot.or.jp (David John Hawley) Newsgroups: comp.lang.prolog Subject: Re: co-routining Message-ID: <8155@icot32.icot.or.jp> Date: 7 Dec 90 05:33:16 GMT References: <TED.90Dec6145517@aiaia.nmsu.edu> Distribution: comp Organization: Fifth Generation Computing Systems (ICOT), Tokyo, Japan Lines: 29