comp.lang.ada
 help / color / mirror / Atom feed
From: Peter Amey <pna@praxis-cs.co.uk>
Subject: Re: Computation of exception handling
Date: Mon, 29 Jan 2001 09:15:02 +0000
Date: 2001-01-29T09:15:02+00:00	[thread overview]
Message-ID: <3A753496.67442B90@praxis-cs.co.uk> (raw)
In-Reply-To: 3A7316F6.87EDF50B@ntlworld.com



"martin.m.dowie" wrote:
> 
> i've yet to come across any definitions of a safe subset of Ada that
> don't exclude exceptions - do you know of any, or are they normally
> excluded because it makes life (much) easier from a proof/certification
> stand point?
> 

One of the main reasons SPARK does not support exceptions is that we
wanted a language free from implementation dependencies.  If you allow
an exception to propagate then, at the point where you eventually try
and handle it, the system is in an "unknown" (or at least
"implementation-defined") state.  For example, if your compiler passes
subprogram parameters by copy-in, copy-out and an exception is raised
part way through a subprogram then any changes to those parameters will
not get propagated back to the system state; however, if the compiler
passes parameters by reference then the changes will already have
affected the system's state when the exception is raised.  I have always
considered that the chances of writing code that correctly deals with
exceptional situations in a system of unknown state to be relatively
small :-)  It might be possible to reason about exceptions locally but
propogation causes real difficulties.  

BTW, we don't just wash our hands of this: SPARK does provide a
straightforward way of proving that code will not raise any predefined
exceptions.

Peter

-- 
---------------------------------------------------------------------------   
      __         Peter Amey, Product Manager
        )                    Praxis Critical Systems Ltd
       /                     20, Manvers Street, Bath, BA1 1PX
      / 0        Tel: +44 (0)1225 466991
     (_/         Fax: +44 (0)1225 469006
                 http://www.praxis-cs.co.uk/

--------------------------------------------------------------------------



  reply	other threads:[~2001-01-29  9:15 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <94jr16$j2q$1@nnrp1.deja.com>
     [not found] ` <94ki0n$j4d$1@usenet.rational.com>
     [not found]   ` <gauthier-2401011437350001@193.50.185.13>
     [not found]     ` <3a6ef4d9$1@pull.gecm.com>
     [not found]       ` <gauthier-2601011508270001@193.50.185.13>
     [not found]         ` <3a7188ec$1@pull.gecm.com>
2001-01-26 20:12           ` Computation of exception handling Florian Weimer
     [not found]           ` <94s4ov$qfo$1@nnrp1.deja.com>
2001-01-27 18:44             ` martin.m.dowie
2001-01-29  9:15               ` Peter Amey [this message]
2001-01-30  6:33                 ` Robert Dewar
2001-01-30  9:15                   ` Martin Dowie
2001-02-05  9:02                     ` Peter Amey
2001-02-05 12:19                       ` Martin Dowie
2001-01-28  7:35           ` Simon Wright
     [not found]   ` <94mgqh$suo$1@nnrp1.deja.com>
2001-02-02 22:17     ` Mark Lundquist
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox