Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site decwrl.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!think!harvard!seismo!umcp-cs!gymble!lll-crg!dual!decwrl!dec-rhea!dec-logic!vantreeck From: vantreeck@logic.DEC Newsgroups: net.lang.prolog Subject: Re: Event handling in Prolog Message-ID: <2434@decwrl.UUCP> Date: Mon, 3-Jun-85 12:39:10 EDT Article-I.D.: decwrl.2434 Posted: Mon Jun 3 12:39:10 1985 Date-Received: Thu, 6-Jun-85 02:29:38 EDT Sender: daemon@decwrl.UUCP Organization: DEC Engineering Network Lines: 22 I'm not a theorist. From a programming point of view, the ease of establishing event handlers depends on the hardware/OS support more than some limitation of Prolog. Adding event handlers to Prolog implementations on VAX/VMS should be a trivial task. Adding an Prolog predicate to generate an exception, should also be easy. Besides control-C, probably the best other example common of a Prolog event handler, would be a garbage collection which occurs on the event of a stack running into a protected page. Establishing a handler for integer or floating point underflow over flow is easy - provided that the calculations are done with routines that generate an exception. I don't know if implementations like QUINTAS Prolog, which uses their own routines for their short floats, generate exceptions on underflow/overflow. If I were to write a concurrent Prolog, I think I would probably use an event handler to manage the concurrency. I hope that the newer Prologs that will be hitting the market in the next year or two of years will have predicates for establishing and handling events. George Van Treeck Digital Equip. Corp.