From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,7d3cb5920e882220 X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!out04b.usenetserver.com!news.usenetserver.com!in02.usenetserver.com!news.usenetserver.com!uns-out.usenetserver.com!news.usenetserver.com!pc03.usenetserver.com!news.flashnewsgroups.com-b7.4zTQh5tI3A!not-for-mail Newsgroups: comp.lang.ada Subject: Re: Contracted exceptions for Ada References: <5947aa62-2547-4fbb-bc46-1111b4a0dcc9@x69g2000hsx.googlegroups.com> <7m9wkymyi5h7.1235e72is9mp9.dlg@40tude.net> From: Stephen Leake Date: Sun, 09 Dec 2007 05:22:44 -0500 Message-ID: User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/22.1 (windows-nt) Cancel-Lock: sha1:ekLHCX1mLwP++xasTANZGdVpTys= MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Complaints-To: abuse@flashnewsgroups.com Organization: FlashNewsgroups.com X-Trace: 58ff2475bc1eee05e48ed01759 Xref: g2news1.google.com comp.lang.ada:18799 Date: 2007-12-09T05:22:44-05:00 List-Id: "Dmitry A. Kazakov" writes: > On Fri, 7 Dec 2007 21:30:05 -0600, Randy Brukardt wrote: > >> Another one is what to do if a contract is violated. The obvious answer of >> raising Program_Error doesn't do anything other than lose information about >> an exception, so that isn't very satisfying. > > Yes, in my view exception contracts have to be static. The only way to statically enforce exception contracts is to use SPARK Ada (http://www.praxis-his.com/sparkada/). SPARK Ada does do exactly that (among other things); it also signficantly restricts the Ada language to a manageable subset. So if you like exception contracts, use SPARK Ada. If you like all the things SPARK Ada leaves out (I don't have the current list handy; it doesn't seem to be on the web site), use standard Ada. -- -- Stephe