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=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,78447032bdbeb343 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!postnews.google.com!26g2000hsk.googlegroups.com!not-for-mail From: =?ISO-8859-1?Q?Santiago_Urue=F1a?= Newsgroups: comp.lang.ada Subject: Re: Proposal: pragma Assumption Date: Mon, 26 May 2008 10:10:44 -0700 (PDT) Organization: http://groups.google.com Message-ID: <379b6b72-261a-4f5b-a84e-04e58cfe55f9@26g2000hsk.googlegroups.com> References: <30917be5-1446-417c-8a4e-18b2f9a1f420@b1g2000hsg.googlegroups.com> <4839e959$0$6551$9b4e6d93@newsspool3.arcor-online.net> NNTP-Posting-Host: 81.35.4.43 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1211821845 7948 127.0.0.1 (26 May 2008 17:10:45 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Mon, 26 May 2008 17:10:45 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: 26g2000hsk.googlegroups.com; posting-host=81.35.4.43; posting-account=Lcd2wAoAAAADW2SqWO5AWY55Q-jjpVWU User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux i686; es-ES; rv:1.9b5) Gecko/2008050509 Firefox/3.0b5,gzip(gfe),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:376 Date: 2008-05-26T10:10:44-07:00 List-Id: > This sounds much like pragma Debug together with the language > defined restriction =A0No_Implementation_Pragmas =A0to me. > pragma Debug ([CONDITION, ]PROCEDURE_CALL_WITHOUT_SEMICOLON); Although in theory it is possible to achieve the same effects of pragma Assumption using pragma Debug, it would be very awkward: it doesn't receive a boolean condition but a subprogram call (the first parameter is just to enable/disable it at run-time), so a new procedure should be created to evaluate the desired condition, and then raise an exception explicitly when false. This pragma is more focused for execution logs. Furthermore, pragma Debug is very similar to pragma Assert in the sense that it can be left on production code during the whole life of the application. So even if a programmer is willing to add so much code for each assumption, she won't be able to use pragma Debug for any other uses (probably she shouldn't use any other implementation defined pragma at all). Best regards,