From: Stuart Palin <stuart.palin@0.0>
Subject: Re: Concatenation and Characters
Date: Tue, 22 Oct 2002 09:51:14 +0100
Date: 2002-10-22T09:51:14+01:00 [thread overview]
Message-ID: <3DB51182.BEBB0051@0.0> (raw)
In-Reply-To: 3DB44B9C.80007@worldnet.att.net
Jim Rogers wrote:
>
> Programmer Dude wrote:
<snip>
> >
> > So, bottom line from the answers I've read is that Ada (the language)
> > allows uninitialized variables to be used which *may* (must?) require
> > a run-time exception.... but what if the random value in the variable
> > isn't a contraint violation? Does that mean an uninitialized variable
> > *could* be taken seriously and never detected as having a random bit
> > pattern?
> >
>
> If the compiler detects that you are attempting to use an uninitialized
> value it will issue a diagnostic message. It is never a good thing to
> release a program without first addressing and eliminating all compiler
> diagnostic messages.
It is my experience that compilers only tend to give such
warnings where the use of the uninitialized value is
unconditional. Usually, where a variable may be
uninitialized under some conditions the compiler 'assumes'
the programmer knows what they are doing and does not give a
warning.
If you want the full set of warnings you need to consider
using tools such as SPARK (or possibly/probably) some of the
Abstract Interpretation analysis tools such as Polyspace
Verifier.
The matter of Initialization is one given considerable
attention in SPARK.
In response to Programmer Dude's comments: Ada is not a
'safe' language (whatever that may mean). It does a number
of trade-offs between supporting 'safety enhancing' concepts
and reasonably efficient implementation. Initialization of
variables is one of these trade-offs.
SPARK uses Ada as a basis, but takes the issues of
demonstrating safety-enhancing features (such as correctness
of data flow) much further. But it is worth noting that it
can not (always) do this within the scope of the Ada
language; which is why, in addition to sub-setting the
language, it requires annotations to add information about
the [intended] behaviour of the software.
If you are unfamiliar with SPARK, check out
www.sparkada.com.
--
Stuart Palin
[usual disclaimers]
next prev parent reply other threads:[~2002-10-22 8:51 UTC|newest]
Thread overview: 72+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-10-10 14:50 Concatenation and Characters Justin Birtwell
2002-10-10 14:55 ` Preben Randhol
2002-10-10 15:04 ` Justin Birtwell
2002-10-10 15:22 ` Preben Randhol
2002-10-10 15:30 ` Justin Birtwell
2002-10-10 16:05 ` Georg Bauhaus
2002-10-10 16:07 ` Preben Randhol
2002-10-10 17:45 ` Robert A Duff
2002-10-10 15:32 ` Justin Birtwell
2002-10-10 15:36 ` Preben Randhol
2002-10-10 16:44 ` Mark Biggar
2002-10-10 17:45 ` Stephen Leake
2002-10-10 21:53 ` Mark Biggar
2002-10-18 17:03 ` Programmer Dude
2002-10-18 18:13 ` Preben Randhol
2002-10-18 18:36 ` Wes Groleau
2002-10-21 15:16 ` Georg Bauhaus
2002-10-18 21:33 ` Mark Biggar
2002-10-20 2:01 ` Dmitry A.Kazakov
2002-10-21 14:13 ` Wes Groleau
2002-10-21 15:22 ` Dmitry A. Kazakov
2002-10-21 19:38 ` Georg Bauhaus
2002-10-22 22:15 ` Dmitry A.Kazakov
2002-10-22 12:05 ` Georg Bauhaus
2002-10-22 12:19 ` Lutz Donnerhacke
2002-10-22 14:43 ` Georg Bauhaus
2002-10-23 8:39 ` Dmitry A. Kazakov
2002-10-23 14:39 ` Georg Bauhaus
2002-10-24 8:18 ` Dmitry A. Kazakov
2002-10-21 16:50 ` Warren W. Gay VE3WWG
2002-10-21 15:20 ` Georg Bauhaus
2002-10-21 17:51 ` Programmer Dude
2002-10-21 18:48 ` Jim Rogers
2002-10-21 19:44 ` tmoran
2002-10-21 20:42 ` Programmer Dude
2002-10-22 1:42 ` Jeffrey Carter
2002-10-22 14:37 ` Robert A Duff
2002-10-22 18:51 ` Jeffrey Carter
2002-10-23 7:01 ` Pascal Obry
2002-10-22 14:45 ` Matthew Heaney
2002-10-22 18:47 ` Jeffrey Carter
2002-10-22 21:31 ` Robert A Duff
[not found] ` <3DB59D75.20609 <wccd6q29n3l.fsf@shell01.TheWorld.com>
2002-10-23 2:02 ` Jeffrey Carter
2002-10-23 13:16 ` Matthew Heaney
2002-10-23 19:11 ` Jeffrey Carter
2002-10-23 15:24 ` Robert A Duff
2002-10-23 19:24 ` Jeffrey Carter
2002-10-24 0:33 ` Robert A Duff
2002-10-22 3:46 ` Jim Rogers
2002-10-22 14:48 ` Robert A Duff
2002-10-22 15:02 ` Fraser Wilson
2002-10-22 15:38 ` David C. Hoos
2002-10-22 15:44 ` Fraser Wilson
2002-10-22 16:13 ` Robert A Duff
2002-10-23 8:58 ` Dmitry A. Kazakov
2002-10-23 9:08 ` Lutz Donnerhacke
2002-10-23 9:34 ` Dmitry A. Kazakov
2002-10-23 10:10 ` Lutz Donnerhacke
2002-10-23 17:15 ` Frank J. Lhota
2002-10-24 8:41 ` Dmitry A. Kazakov
2002-10-24 9:25 ` Fraser Wilson
2002-10-24 14:13 ` Matthew Heaney
[not found] ` <un <wcc7kgazc20.fsf@shell01.TheWorld.com>
2002-10-22 16:46 ` David C. Hoos
2002-10-22 8:51 ` Stuart Palin [this message]
2002-10-22 18:56 ` Programmer Dude
2002-10-21 19:42 ` Georg Bauhaus
-- strict thread matches above, loose matches on Subject: below --
2002-10-11 5:04 Grein, Christoph
2002-10-11 10:30 ` Preben Randhol
2002-10-23 5:15 Grein, Christoph
2002-10-23 13:19 ` Matthew Heaney
2002-10-24 5:53 Grein, Christoph
2002-10-24 14:04 ` Matthew Heaney
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox