comp.lang.ada
 help / color / mirror / Atom feed
* Constraint_Error from arithmetic operations
@ 2012-12-27  9:26 Florian Weimer
  2012-12-27 10:33 ` Phil Thornley
  0 siblings, 1 reply; 5+ messages in thread
From: Florian Weimer @ 2012-12-27  9:26 UTC (permalink / raw)


This is somewhat related to the recent discussion on exception
contracts, but I'm more interested in what can be right now (with
current tools).

I recently browsed through Barnes' 2006 SPARK book and noticed that
SPARK has a rather drastic approach to arithmetic operations which
overflow and fail to deliver the mathematically correct result
(program termination).  The SPARK tools do not seem to be able to
statically show that arithmetic operators do not overflow, which is
obviously difficult in the general case, but should be doable with
help from the programmer.

Eventually, I hope to be able to show that protocol decoders do not
trigger arithmetic overflow due to sufficient manual checking.  (It
does not matter if this checking is actually dead code, or if the
checks are somewhat conservative, they just need to be there.)
Checking for the absence of Constraint_Error from indexed components
would be a bonus.



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-12-27 15:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-12-27  9:26 Constraint_Error from arithmetic operations Florian Weimer
2012-12-27 10:33 ` Phil Thornley
2012-12-27 11:11   ` Brian Drummond
2012-12-27 13:19   ` Florian Weimer
2012-12-27 15:38     ` Phil Thornley

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