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,48e1a3c594fb62e8 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,UTF8 Path: g2news2.google.com!news4.google.com!feeder.news-service.com!feeder.visyn.net!visyn.net!aioe.org!not-for-mail From: =?utf-8?Q?Yannick_Duch=C3=AAne_=28Hibou57?= =?utf-8?Q?=29?= Newsgroups: comp.lang.ada Subject: Re: SPARK Date: Sat, 15 May 2010 00:55:08 +0200 Organization: Ada At Home Message-ID: References: NNTP-Posting-Host: fCI7vZMbq1ONnadCf5ASPg.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes Content-Transfer-Encoding: Quoted-Printable X-Complaints-To: abuse@aioe.org X-Notice: Filtered by postfilter v. 0.8.2 User-Agent: Opera Mail/10.53 (Win32) Xref: g2news2.google.com comp.lang.ada:11623 Date: 2010-05-15T00:55:08+02:00 List-Id: Le Thu, 13 May 2010 05:06:23 +0200, Yannick Duch=C3=AAne (Hibou57) = a =C3=A9crit: > Block statements are not allowed in SPARK. Let say a procedure can do = = > the same. Was this only to have one-matter-one-feature (avoid to have = = > both block-statement and procedure, and keep only one) for the sake of= = > simplicity or was there some other reasons properly dealing with = > verifiability ? Here is an answer: A document from SparkSure ( http://www.sparksure.com/7.html ), namely = Part4_Multiple_Paths.pdf, warns about consecutive conditional statements= , = giving the example of ten simple chained If statement which turns into = 1024 validation conditions. In this document, Phil logically advice to = avoid such cases, using small procedures instead. Doing so, you end up = with a single path instead of 1014. So far this is not about blocks, however here comes the matter: block = statements does not break such a chain of If statements and cannot be = given annotations. Lack of annotations with block statement makes these = = ineffective to reach the goal of simplifying the program provability. So why not annotations on block statements ? Well, simply because a bloc= k = statement does not come with a signature and using a procedure instead o= f = a block statement, requires you to better specify what was the role of = that block. And adding extra-annotations to the language, to be used wit= h = blocks, would just load the language with unnecessary complications (not= = welcome in this area) Finally, block statements are disallowed to help avoid explosive = complexity. -- = There is even better than a pragma Assert: an --# assert