Lambda the Ultimate

inactiveTopic ATC in Ada and in Real Time Java (RTSJ)
started 6/22/2003; 2:58:47 AM - last post 6/26/2003; 12:22:28 PM
Ehud Lamm - ATC in Ada and in Real Time Java (RTSJ)  blueArrow
6/22/2003; 2:58:47 AM (reads: 1425, responses: 4)
ATC in Ada and in Real Time Java (RTSJ)
A Comparison of the Asynchronous Transfer of Control Features in Ada and the Real-Time Specification for Java. Benjamin M. Brosgol & A.J. Wellings. 8th International Conference on Reliable Software Technologies - Ada-Europe 2003 (AE03), Toulouse, France, 16-20 June 2003

Asynchronous Transfer of Control ("ATC") is a transfer of control within a thread, triggered not by the thread itself but rather from some external source such as another thread or an interrupt handler. ATC is useful for several purposes; e.g. expressing common idioms such as timeouts and thread termination, and reducing the latency for responses to events. However, ATC presents significant issues semantically, methodologically, and implementationally. This paper describes the approaches to ATC taken by Ada and the Real-Time Specification for Java [2, 3], and compares them with respect to safety, programming style / expressive power, and implementability / latency / efficiency.

One of the interesting papers in Ada-Europe this year. ATC essentialy means that control can jump inside a thread, without the thread's knowledge or preparation. This, of course, has immediate safety implications. Programming languages must provide ways for the programmer to ensure the consistency of his system.

ATC is a difficult issue in language design, and both Ada and the RTSJ have made serious attempts to provide workable solutions. They share a common philosophy in opting for safety as the most important objective, and thus in defining ATC to be deferred in certain regions that must be executed to completion. They offer roughly comparable expressive power, but they differ significantly in how the mechanism is realized and in the resulting programming style.


Posted to Software-Eng by Ehud Lamm on 6/22/03; 3:05:09 AM

Ehud Lamm - Re: ATC in Ada and in Real Time Java (RTSJ)  blueArrow
6/22/2003; 4:25:48 AM (reads: 574, responses: 0)
One interesting comment: These stylistic problems are due somewhat to the constraint on the RTSJ to not introduce new syntax. ATC is a control mechanism, and modeling control features with method calls tends to sacrifice readability and program clarity.

Ehud Lamm - Re: ATC in Ada and in Real Time Java (RTSJ)  blueArrow
6/26/2003; 8:46:46 AM (reads: 506, responses: 0)
It seems no one here is interested. But if you think this is some esoteric subject, do read Chris Brumme about asynchronous expections in CLR managed code.

It looks like someone over there should go and read the paper I linked to above...

Dan Shappir - Re: ATC in Ada and in Real Time Java (RTSJ)  blueArrow
6/26/2003; 9:19:09 AM (reads: 478, responses: 1)
Guilty of not reading the paper, though interestingly we have a problem here at work that falls into this category. It's a threaded Java (not RTJS) application where thread operations need to be timed. If an operation exceeds a certain timeout period it must be terminated. Since the operations are implemented externally (that is not by us but by system integrators) we have little control over their form. As a result, we're forced to use the deprecated stop() method as a last recourse means of stopping an errant operation. Fortunately such occurrences in the system are very very rare (and are logged).

Ehud Lamm - Re: ATC in Ada and in Real Time Java (RTSJ)  blueArrow
6/26/2003; 12:22:28 PM (reads: 508, responses: 0)
By the way, one nice thing about Ada is that there's a very precise defintion of abort deferred regions.