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=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.200.28.98 with SMTP id j31mr25647211qtk.57.1509261611833; Sun, 29 Oct 2017 00:20:11 -0700 (PDT) X-Received: by 10.157.14.201 with SMTP id 67mr546505otj.4.1509261611775; Sun, 29 Oct 2017 00:20:11 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!border1.nntp.ams1.giganews.com!border2.nntp.ams1.giganews.com!nntp.giganews.com!peer03.ams1!peer.ams1.xlned.com!news.xlned.com!peer02.am4!peer.am4.highwinds-media.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!k31no4620075qta.1!news-out.google.com!r5ni4393qtc.1!nntp.google.com!k31no4620071qta.1!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Sun, 29 Oct 2017 00:20:11 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=85.229.245.108; posting-account=HFCrOQoAAABZD_f-UUbYHm3lJDIrh-UX NNTP-Posting-Host: 85.229.245.108 References: <81f4fbf9-fef3-4592-a95e-64889e564df4@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: What am I doing wrong with contracts? Why are they succeeding when they should be failing? From: joakimds@kth.se Injection-Date: Sun, 29 Oct 2017 07:20:11 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Received-Body-CRC: 4125730524 X-Received-Bytes: 2077 Xref: news.eternal-september.org comp.lang.ada:48624 Date: 2017-10-29T00:20:11-07:00 List-Id: Den s=C3=B6ndag 29 oktober 2017 kl. 03:42:07 UTC+1 skrev Andrew Shvets: > On Saturday, October 28, 2017 at 8:34:12 PM UTC-4, Andrew Shvets wrote: > > I think I'm misunderstanding how proofs/contracts work at some fundamen= tal level. Hence my confusion. >=20 > I figured it out, I needed to have the following at the top of where the = contract was written in order to have it be checked/enforced: >=20 > pragma Assertion_Policy(Check); >=20 > I'm reading more about this right now. To get run-time checks for the contracts you need to use the gcc Enable Ass= ertions flag "-gnata" during compilation. Best regards, Joakim