comp.lang.ada
 help / color / mirror / Atom feed
From: Rakesh Malhotra <rakesh.malhotra@safetran.com>
Subject: Re: Beware: Rep spec on an enumeration type causes code explosion
Date: 1997/12/12
Date: 1997-12-12T00:00:00+00:00	[thread overview]
Message-ID: <66s5k1$f1t$1@gte2.gte.net> (raw)
In-Reply-To: mheaney-ya023680001112972244020001@news.ni.net


Matthew Heaney wrote:
> 
> In article <66po35$1a1$1@gte2.gte.net>, Rakesh Malhotra
> <rakesh.malhotra@safetran.com> wrote:
> 
>[snip]
> >
> >Hence type SIGNAL_TYPE is (RED, GREEN);
> >for SIGNAL_TYPE use (RED => 16#00#, GREEN => 16#03#);
> >[snip]
> >Pretty horrible eh ?
> 
> This is a seriously wrong way to build safety-critical software.  As a
> matter of fact, it's a wrong way to build *any* software.  You are quite
> correct in pointing out that it is "pretty horrible."

It may be a wrong way of building safe software but it (seems to be ?)
is not uncommon.  I know of and have worked in 3 different companies in
3 different countries who have chosen to implement their enumeration
types this way. And successfully.  1 project was in Pascal and 3 in Ada
and all did it the same way for enum types.

Just as an aside safety can be implemented on a project in many
different ways.  One of the best ways is to implement safety as high up
in the system as possible - so maybe one chooses a diverse or redundant
design.  However this tends to be expensive as one duplicates hardware.

So for cost reasons we had to implement safety at a fairly low level and
one of the areas is consideration of what would happen if an alpha
particle from the sun hit the RAM chip and corrupted your signal state
from RED to GREEN due to a 1 bit corruption.  Would you now turn your
signal GREEN ?

Obviously bit separation of enums is not the only thing we do, however
it is one of the tools in our cupboard.

--
Rakesh




  parent reply	other threads:[~1997-12-12  0:00 UTC|newest]

Thread overview: 70+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-12-05  0:00 Beware: Rep spec on an enumeration type causes code explosion Joe Gwinn
1997-12-06  0:00 ` Robert Dewar
1997-12-06  0:00 ` Robert Dewar
1997-12-08  0:00   ` Joe Gwinn
1997-12-09  0:00     ` Stanley R. Allen
1997-12-06  0:00 ` Corey Minyard
1997-12-08  0:00   ` Joe Gwinn
1997-12-10  0:00     ` Robert Dewar
1997-12-06  0:00 ` Ken Garlington
1997-12-06  0:00 ` Robert Dewar
1997-12-06  0:00   ` Matthew Heaney
1997-12-10  0:00   ` GNORT information ( Was Re: Beware: Rep spec on an enumeration type causes code explosion ) Mark Bennison
1997-12-10  0:00     ` Robert Dewar
1997-12-06  0:00 ` Beware: Rep spec on an enumeration type causes code explosion Kevin D. Heatwole
     [not found]   ` <dewar.881478386@merv>
1997-12-07  0:00     ` Robert Dewar
1997-12-09  0:00   ` Jim Gleason
1997-12-06  0:00 ` David Marshall
1997-12-06  0:00 ` Tucker Taft
1997-12-06  0:00   ` Robert Dewar
1997-12-06  0:00   ` Robert Dewar
1997-12-08  0:00   ` Joe Gwinn
1997-12-08  0:00     ` Mats Weber
1997-12-09  0:00     ` Geert Bosch
1997-12-10  0:00       ` Robert Dewar
1997-12-09  0:00     ` Tucker Taft
1997-12-09  0:00       ` Matthew Heaney
1997-12-10  0:00         ` Charles Hixson
1997-12-10  0:00       ` Ken Garlington
1997-12-11  0:00         ` John G. Volan
1997-12-11  0:00           ` Ken Garlington
1997-12-12  0:00             ` Matthew Heaney
1997-12-12  0:00               ` Ken Garlington
1997-12-16  0:00                 ` John G. Volan
1997-12-17  0:00                   ` Ken Garlington
1997-12-12  0:00           ` Joe Gwinn
1997-12-12  0:00             ` Robert Dewar
1997-12-16  0:00             ` John G. Volan
1997-12-17  0:00               ` Ken Garlington
1997-12-17  0:00               ` Joe Gwinn
1997-12-17  0:00                 ` John G. Volan
1997-12-18  0:00                   ` Joe Gwinn
1997-12-12  0:00           ` Alan E & Carmel J Brain
1997-12-12  0:00             ` Robert Dewar
1997-12-15  0:00               ` Tucker Taft
1997-12-16  0:00                 ` Brian Rogoff
1997-12-10  0:00       ` Stanley R. Allen
1997-12-14  0:00         ` Robert Dewar
1997-12-10  0:00       ` Stephen Leake
1997-12-14  0:00         ` Robert Dewar
1997-12-10  0:00       ` Robert Dewar
1997-12-10  0:00       ` Jean-Pierre Rosen
1997-12-11  0:00       ` Rakesh Malhotra
1997-12-11  0:00         ` Matthew Heaney
1997-12-12  0:00           ` Samuel Tardieu
1997-12-12  0:00             ` Robert Dewar
1997-12-12  0:00           ` Rakesh Malhotra [this message]
1997-12-12  0:00           ` Robert Dewar
1997-12-14  0:00         ` Alan E & Carmel J Brain
1997-12-12  0:00       ` Joe Gwinn
1997-12-15  0:00         ` Robert Dewar
1997-12-16  0:00           ` Joe Gwinn
1997-12-16  0:00             ` Robert Dewar
1997-12-06  0:00 ` Robert Dewar
1997-12-06  0:00 ` Robert Dewar
1997-12-08  0:00   ` Joe Gwinn
1997-12-07  0:00 ` Larry Kilgallen
  -- strict thread matches above, loose matches on Subject: below --
1997-12-09  0:00 tmoran
1997-12-11  0:00 Marin David Condic, 561.796.8997, M/S 731-96
1997-12-11  0:00 ` Robert Dewar
1997-12-11  0:00 Marin David Condic, 561.796.8997, M/S 731-96
replies disabled

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