Path: 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 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.