🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.prolog
Article #1651

Re: co-routining

#1651
From: Chikayama Takashi
Date: Fri, 07 Dec 1990 05:28
22 lines
1376 bytes
In article <TED.90Dec6145517@aiaia.nmsu.edu> ted@nmsu.edu (Ted Dunning) writes:
 |1) how can one delay a goal until _either_ of two variables are
 |instantiated?

A standard technique is:

  freeze(X, Y, G) :- freeze(X, V=go), freeze(Y, V=go), freeze(V, G).

 |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?

The same technique as in concurrent logic languages like Concurrent
Prolog, Parlog or Guarded Horn Clauses is available.  See, for
example:

    Ehud Shapiro and Akikazu Takeuchi
    "Object Oriented Programming in Concucrrent Prolog"
    in Ehud Shapiro ed. "Concurrent Prolog Collected Papers", Vol. 2
    The MIT Press
    ISBN 0-262-19267-5

Takashi Chikayama
Technical Details
Message-ID: <CHIK.90Dec7142813@icot21.icot.or.jp>
Path: arc1-ca.pugleaf.net!utzoo!attcan!telly!lethe!torsqnt!news-server.csri.toronto.edu!rutgers!cs.utexas.edu!wuarchive!uunet!kddlab!icot32!icot21!chik
References: <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!wuarchive!uunet!kddlab!icot32!icot21!chik
From: chik@icot.or.jp (Chikayama Takashi)
Newsgroups: comp.lang.prolog
Subject: Re: co-routining
Message-ID: <CHIK.90Dec7142813@icot21.icot.or.jp>
Date: 7 Dec 90 05:28:13 GMT
References: <TED.90Dec6145517@aiaia.nmsu.edu>
Sender: chik@icot32.icot.or.jp
Reply-To: chikayama@icot.or.jp
Distribution: comp
Organization: Institute for New Generation Computer Technology, Tokyo, Japan.
Lines: 22
In-reply-to: ted@nmsu.edu's message of 6 Dec 90 21:55:17 GMT