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.7 required=5.0 tests=BAYES_00,FREEMAIL_FROM, FREEMAIL_REPLYTO,REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,bcb4211c58dfce86 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit X-Received: by 10.68.208.99 with SMTP id md3mr955872pbc.6.1366261487911; Wed, 17 Apr 2013 22:04:47 -0700 (PDT) Path: bp1ni1264pbd.1!nntp.google.com!npeer03.iad.highwinds-media.com!feed-me.highwinds-media.com!cyclone03.ams2.highwinds-media.com!news.highwinds-media.com!voer-me.highwinds-media.com!border6.a.newsrouter.astraweb.com!news.astraweb.com!border5.a.newsrouter.astraweb.com!xlned.com!feeder3.xlned.com!news2.euro.net!feeds.phibee-telecom.net!dedekind.zen.co.uk!zen.net.uk!hamilton.zen.co.uk!reader01.nrc01.news.zen.net.uk.POSTED!not-for-mail From: Phil Thornley Newsgroups: comp.lang.ada Subject: Re: Spark non-working example in book ? Date: Thu, 18 Apr 2013 06:04:39 +0100 Message-ID: References: <695e718e-2c5d-4db8-b8e7-d099f4a305db@googlegroups.com> Reply-To: phil.jpthornley@gmail.com MIME-Version: 1.0 User-Agent: MicroPlanet-Gravity/3.0.4 Organization: Zen Internet NNTP-Posting-Host: c945ca52.news.zen.co.uk X-Trace: DXC=V<`HYjhTXnf>Ld3Y]EVP9ma0UP_O8AJol=dR0\ckLKG`WeZ<[7LZNRfOfK`7^BYPhoUhLi?]0KG=kBP[5W6W;mWd@__W9[:iOAf X-Complaints-To: abuse@zen.co.uk X-Received-Bytes: 2730 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Date: 2013-04-18T06:04:39+01:00 List-Id: In article <695e718e-2c5d-4db8-b8e7-d099f4a305db@googlegroups.com>, a.michelizza@gmail.com says... > > Hi, > > I'm learning Spark and I'm currently trying to understand how to prove the 'find_smallest' function describe in chapter 15 (sections 5 and 6). > > There are 2 examples in the book. > > The one in 15.5 needs the Checker tool. I was expecting to find some *.rul file in the example tarball (found on altran-praxis website), but there's none. > This section is now somewhat redundant, particularly for anyone starting to learn SPARK and using the current version. (It is perhaps there for anyone who used earlier versions, and wants to see something familiar.) > About the 2nd example, in 15.6, the book is not clear about the need or not of the Checker tool. There's no *.rul nor *.rlu file and the downloaded example don't work either. > No, there is no need to use the Checker - but you do have to use Victor/Alt-Ergo to complete all the proofs. How you do this depends on how you are using the tools. (If you are using GPS then the switch to use Victor isn't set in the provided gpr file - it's on the SPARKSimp tab under Switches.) You also have to provide the 'perm' rule specified at the bottom of page 442. (Note that the function is called "perm" in the book but is "permutation" in the downloaded code, so the rule you need is: perm(1): permutation(A,C) may_be_deduced_from [ permutation(A,B), permutation(B,C) ] . Put this in a file called sort.rlu (or array_utilities.rlu) in the array_utilities folder. All the VCs are then proved. Cheers, Phil