From: "Yannick Duchêne (Hibou57)" <yannick_duchene@yahoo.fr>
Subject: Re: Strategies with SPARK which does not support exceptions
Date: Thu, 17 Jun 2010 20:19:04 +0200
Date: 2010-06-17T20:19:04+02:00 [thread overview]
Message-ID: <op.vegih2owule2fv@garhos> (raw)
In-Reply-To: Xns9D9A86312F108WarrensBlatherings@81.169.183.62
Le Thu, 17 Jun 2010 19:11:29 +0200, Warren <ve3wwg@gmail.com> a écrit:
> It is often not sufficient to simply know that OK is false.
> For example, wouldn't it be nice for the user to know that
> the open failed because of permissions, instead of the file
> not existing.
>
> Warren
Hillo Warren
I see what you mean (I like the C analogy for this, that is meaningful),
while I don't fully agree with this later point : an exception typically
do not holds such details. The exception says “If fails”, and don't say
why (or just sightly, via its ID). Don't confuse Ada exception mechanism
with other OO exception mechanisms, which comes with many and too much
(because unusable in real life) members to hold informations about the
exception occurence.
By the way, you are talking about propagated exceptions (as you talked
about callers). I did not already set up a strategy for this. The way I
was talking about just applies to exception raised and caught inside the
same subprogram. I suppose this way could be extended to propagated
exceptions, but I'm afraid of bloating doing so. I though about something
looking like “software register” (analogy with CPU status registers), but
I'm afraid this may not be safe (while luckily, SPARK can help a lot to
properly use global variables ;) ).
Have a nice day
--
There is even better than a pragma Assert: a SPARK --# check.
--# check C and WhoKnowWhat and YouKnowWho;
--# assert Ada;
-- i.e. forget about previous premises which leads to conclusion
-- and start with new conclusion as premise.
next prev parent reply other threads:[~2010-06-17 18:19 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-17 15:33 Strategies with SPARK which does not support exceptions Yannick Duchêne (Hibou57)
2010-06-17 17:11 ` Warren
2010-06-17 18:19 ` Yannick Duchêne (Hibou57) [this message]
2010-06-21 13:31 ` Warren
2010-06-21 14:10 ` Alexandre K
2010-06-17 19:54 ` Pascal Obry
2010-06-17 22:47 ` Peter C. Chapin
2010-06-18 6:07 ` Claude
2010-06-18 8:06 ` Phil Thornley
2010-06-18 8:49 ` Martin
2010-06-18 17:16 ` mockturtle
2010-06-18 21:51 ` Alexandre K
2010-06-22 17:01 ` Phil Clayton
2010-06-22 23:14 ` Claude
2010-06-23 16:22 ` Warren
2010-06-24 3:24 ` Claude
2010-06-28 13:14 ` Warren
2010-06-29 8:39 ` Stephen Leake
2010-06-29 20:05 ` Randy Brukardt
2010-06-29 20:49 ` Georg Bauhaus
2010-06-30 5:08 ` Simon Wright
2010-06-30 8:17 ` stefan-lucks
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox