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!c65g2000hsa.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:21:44 -0700 (PDT) Organization: http://groups.google.com Message-ID: <9620f961-8b81-45b7-8ab1-db6db5e381a5@c65g2000hsa.googlegroups.com> References: <30917be5-1446-417c-8a4e-18b2f9a1f420@b1g2000hsg.googlegroups.com> 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 1211822504 9841 127.0.0.1 (26 May 2008 17:21:44 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Mon, 26 May 2008 17:21:44 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: c65g2000hsa.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:377 Date: 2008-05-26T10:21:44-07:00 List-Id: > I've been using pragma Fixme; for this -- OK, won't fail in production > (unless you use GNAT & -gnatwe, treat warnings as errors, or your > compiler's equivalent). > Interesting, that's very close to this type of assertions (except that it doesn't document much, and it won't fail if any test tries to exercise the unimplemented code). Which compiler has that pragma? http://www.adacore.com/wp-content/files/auto_update/gnat-unw-docs/html/gnat_= rm_2.html Currently GNAT has the following related pragmas, but none is close to pragma Fixme or Assumption: pragma Assert (boolean_EXPRESSION [, string_EXPRESSION]); pragma Check ( [Name =3D>] Identifier, [Check =3D>] Boolean_EXPRESSION [, [Message =3D>] string_EXPRESSION] ); pragma Check_Name (check_name_IDENTIFIER); pragma Check_Policy ([Name =3D>] Identifier, CHECK|IGNORE); pragma Compile_Time_Error (boolean_EXPRESSION, static_string_EXPRESSION); pragma Compile_Time_Warning (boolean_EXPRESSION, static_string_EXPRESSION); pragma Debug ([CONDITION, ]PROCEDURE_CALL_WITHOUT_SEMICOLON); pragma Debug_Policy (CHECK | IGNORE); pragma Postcondition ( [Check =3D>] Boolean_Expression [,[Message =3D>] String_Expression]); pragma Precondition ( [Check =3D>] Boolean_Expression [,[Message =3D>] String_Expression]); Pragma Assert, Check (generalization of Assert), Debug, Postcondition and Postcondition are evaluated at run-time, but are intended for the whole life of the application. In contrast, pragma Compile_Time_Error and Compile_Time_Warning are evaluated at compilation time (mainly to detect assertion errors when instantiating a generic), so cannot be equivalent to pragma Assumption. Regards, -- Santiago Urue=F1a-Pascual Technical University of Madrid (UPM)