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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,43216c2d2bcda533 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,CP1252 Path: g2news1.google.com!postnews.google.com!36g2000yqu.googlegroups.com!not-for-mail From: =?ISO-8859-1?Q?Hibou57_=28Yannick_Duch=EAne=29?= Newsgroups: comp.lang.ada Subject: Re: Specifying the order of ops on an ADT with aspects Date: Thu, 4 Feb 2010 10:07:17 -0800 (PST) Organization: http://groups.google.com Message-ID: <91ab6070-fc9e-4575-a967-8fe43353ba26@36g2000yqu.googlegroups.com> References: <4b6aaed4$0$7625$9b4e6d93@newsspool1.arcor-online.net> NNTP-Posting-Host: 86.75.149.136 Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1265306838 10743 127.0.0.1 (4 Feb 2010 18:07:18 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 4 Feb 2010 18:07:18 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: 36g2000yqu.googlegroups.com; posting-host=86.75.149.136; posting-account=vrfdLAoAAAAauX_3XwyXEwXCWN3A1l8D User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; fr),gzip(gfe),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:8891 Date: 2010-02-04T10:07:17-08:00 List-Id: On 4 f=E9v, 12:26, Georg Bauhaus wrote: > Defining a private type, I'd like to know whether > it is possible to specify, with the help of the new > aspects, possible orders of calling the operations. > Showing my ignorance, to which extent might it be > possible to analyse the order of calls at compile time? Your package example looks good to me, except the assumption you've made about =93 analyse the order of calls at compile time =94 The new pre-post-condition which will comes for 2015 (I suppose), is not intended to be checked at compile time nor even at runtime. I gonna miss this last one (the first one would be a heavy pain to implement), but I suppose some compiler vendors will probably have an option for that and will go the Eiffel way with this contract clauses : enable or disable clauses-check, just like you can enable or disable generation of debugging information with any compiler. AI05-0145-2 says http://www.ada-auth.org/cgi-bin/cvsweb.cgi/ai05s/ai05-0145-2.txt?rev=3D1.4 > This is based on the previous alternative AI05-0145-1. The > Pre/Post aspects are specified using the aspect_specification > syntax defined in AI05-0183-1. There is no message associated > with the failure of a precondition or postcondition check: it > was deemed that these annotations are intended for verification, > and that for debugging purposes the Assert pragma is sufficient. The last sentence is the most important for you topic. All providing I've really understood your question =93 intended for verification, and that for debugging purposes the Assert pragma is sufficient =94 I was exactly feeling the opposite, that Assert pragmas are not sufficient and are hard to maintain and copy in implementations accordingly to contracts in specifications.