Article View: comp.lang.prolog
Article #1486co-routining
From: Ted Dunning
Date: Thu, 06 Dec 1990 21:55
Date: Thu, 06 Dec 1990 21:55
24 lines
990 bytes
990 bytes
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? something like this could be done by the following, freeze(X,Y,G) :- freeze(X,G), freeze(Y,G). but this has the nasty consequence that G is called twice. note that freeze(X,freeze(Y,G)) does _not_ work since Y may instantiated before X, and i want G to be called in that case, too. 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?
Technical Details
Message-ID:
<TED.90Dec6145517@aiaia.nmsu.edu>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!know!news.cs.indiana.edu!ariel.unm.edu!nmsu!opus!tedShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!know!news.cs.indiana.edu!ariel.unm.edu!nmsu!opus!ted From: ted@nmsu.edu (Ted Dunning) Newsgroups: comp.lang.prolog Subject: co-routining Message-ID: <TED.90Dec6145517@aiaia.nmsu.edu> Date: 6 Dec 90 21:55:17 GMT Sender: news@NMSU.Edu Distribution: comp Organization: Computing Research Lab Lines: 24