🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.prolog
Article #2288

Re: Trapping interrupts cleanly

#2288
From: Richard A. O'Keefe
Date: Mon, 10 Jun 1991 12:12
23 lines
1589 bytes
In article <9105310922.AA22183@ucbvax.Berkeley.EDU>, POPX@vax.oxford.ac.uk (Jocelyn Paine) writes:
> I'd be interested to know whether there are any Prologs that handle
> interrupts in a way that doesn't destroy functional purity.

I don't see how it can possibly be done.
If you want something in the spirit of Prolog in which it _can_ be
done cleanly, look at the LOGIX implementation of FCP, or at Strand,
or Parlog, or something like that.

But what you want is very definitely a way of causing a computation
to be aborted (if you just want to stop output to a terminal, doesn't
VMS have a ^O keyboard command? I thought Berkeley got it from DEC).
That's not something that can readily be done in Prolog-as-we-know-it
while maintaining "purity".  You might be able to adapt some ideas
from the functional programming people; treat every interaction with
the "operating system" as _terminating_, but give the OS one or more
"continuations" it can run.


-- 
Should you ever intend to dull the wits of a young man and to
incapacitate his brains for any kind of thought whatever, then
you cannot do better than give him Hegel to read.  -- Schopenhauer.
Technical Details
Message-ID: <6200@goanna.cs.rmit.oz.au>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!munnari.oz.au!goanna!ok
References: <9105310922.AA22183@ucbvax.Berkeley.EDU>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!munnari.oz.au!goanna!ok
From: ok@goanna.cs.rmit.oz.au (Richard A. O'Keefe)
Newsgroups: comp.lang.prolog
Subject: Re: Trapping interrupts cleanly
Message-ID: <6200@goanna.cs.rmit.oz.au>
Date: 10 Jun 91 12:12:18 GMT
References: <9105310922.AA22183@ucbvax.Berkeley.EDU>
Organization: Comp Sci, RMIT, Melbourne, Australia
Lines: 23