comp.lang.ada
 help / color / mirror / Atom feed
From: "Yannick Duchêne (Hibou57)" <yannick_duchene@yahoo.fr>
Subject: Re: SPARK
Date: Mon, 17 May 2010 03:24:42 +0200
Date: 2010-05-17T03:24:42+02:00	[thread overview]
Message-ID: <op.vctsvga9ule2fv@garhos> (raw)
In-Reply-To: e09fbd41-b3b9-4803-b532-2ce55cba92c2@c13g2000vbr.googlegroups.com

Le Sun, 16 May 2010 20:17:49 +0200, Phil Thornley  
<phil.jpthornley@googlemail.com> a écrit:
> [...]
> Therefore the hypotheses that are generated in VCs that follow a cut
> point cannot include any of the hypotheses that have been included in
> the VCs before the cut point - [...]
Otherwise this would not be a cut-point any more, indeed, and starting  
with a new state, is not a side effect, it's the purpose.

> Another key point to understand is that the Simplifier does not prove
> all provable VCs (so when the tutorials ask you to "make all VCs
> provable" don't expect to get all the VCs proved by the Simplifier.)
Unfortunately, I wanted to prove every things (cheese)

TBH, I did not work on all, just some and just had a quick overview on  
others.

> There are (at least) three ways to deal with these (other than
> changing the code itself).
Sorry for that Er Professor, I've modified it a bit (re-cheese).

> 1) Give the Simplifier 'hints' by adding check annotations.
> 2) Use the Proof Checker to prove the VCs left after simplfication.
As said in another message, this was exactly the purpose : I wanted to  
prove without relying on the Checker, in order to have all proofs in the  
text. It seems to be possible, as long as one is explicit enough.

> 3) Give the Simplifier more rules to use ('user rules').
I would better like add a very few rule in the whole system, better than  
adding some rules here and there, all being package specific.

> My experience is that trying 1) can get very frustrating as the
> Simplifier sometimes seems to be extremely stupid.
That's an important matter. On an other thread, on the french c.l.a (where  
I’ve talked about the same), I was afraid some people may think SPARK is  
not working properly and is unusable for that reason. That's why I  
insisted a lot on the Check clause and to not be afraid to detail proofs  
as much as needed.

> 2) works OK but isn't practical for any software under development as
> the proof scripts that are created (and are needed each time the VCs
> are generated) are extremely fragile to minor changes in the software.
> The current recommendation is to use 3) - create user rules as
> appropriate.  These are easy to write and usually work as expected.
> (But they are a very powerful mechanism, so are correspondingly
> dangerous - it is quite easy to create unsound user rules.)
I would prefer the choice #3, which seems more logical to me. Just that  
this may be better to add these rules system wide better than on a package  
basis. If I'm not wrong, there is provision for that also.

The requirement for a rule to be sound, is indeed important. There may be  
some rule of thumb in that area, like check all special cases, all special  
ranges. As an example, before adding a rule on real, one may carefully  
check the rule is valid for multiple combinations of special values and  
bounds and range on each items appearing in the rule, like 0, 1, -1, 0 ..  
1, 0 .. -1, > 1, < -1, and so on. The same with set, there are special  
values as well : empty set/sequence, one element set/sequence, more than  
one, a set included in an other, etc.

In that area, I was wondering how built-in rules were  choose : from a  
well know set of scientist ? Empirically ? By expansion during SPARK's  
life ? Others ?

I was wondering about it, because I could not find one rule which seems  
important to me, and which does not seems to be part of the predefined set  
(well, there are actually +500 rules, however, may be some useful rules  
are still missing).

> (If you are working through the tutorials in sequence then user rules
> are in section 11 - the next to the last).
Yes, I've seen it, and I've also read Part 6, which is about the  
difference between Check and Assert (I've it later after the question you  
were answering).

Have a nice day (Peter as well, obviously)

Yannick D.

-- 
There is even better than a pragma Assert: a SPARK --# check.

Wanted: if you know about some though in the area of comparisons between  
SPARK and VDM, please, let me know. Will enjoy to talk with you about it.



  reply	other threads:[~2010-05-17  1:24 UTC|newest]

Thread overview: 61+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-12 22:55 SPARK Yannick Duchêne (Hibou57)
2010-05-13  0:52 ` SPARK Yannick Duchêne (Hibou57)
2010-05-13  3:06 ` SPARK Yannick Duchêne (Hibou57)
2010-05-13  9:28   ` SPARK stefan-lucks
2010-05-13 16:48     ` SPARK Yannick Duchêne (Hibou57)
2010-05-15 13:09       ` SPARK Peter C. Chapin
2010-05-14 22:55   ` SPARK Yannick Duchêne (Hibou57)
2010-05-13  4:00 ` SPARK Yannick Duchêne (Hibou57)
2010-05-13 16:54 ` SPARK Yannick Duchêne (Hibou57)
2010-05-13 17:15   ` SPARK Rod Chapman
2010-05-13 19:43     ` SPARK Yannick Duchêne (Hibou57)
2010-05-13 20:05       ` SPARK Rod Chapman
2010-05-13 21:43         ` SPARK Yannick Duchêne (Hibou57)
2010-05-14 14:47         ` SPARK Yannick Duchêne (Hibou57)
2010-05-14  1:20 ` SPARK Yannick Duchêne (Hibou57)
2010-05-14  4:15   ` SPARK Yannick Duchêne (Hibou57)
2010-05-14  8:17     ` SPARK Phil Thornley
2010-05-14  9:32       ` SPARK Rod Chapman
2010-05-14 14:20       ` SPARK Yannick Duchêne (Hibou57)
2010-05-14  3:07 ` SPARK Yannick Duchêne (Hibou57)
2010-05-14  3:26   ` SPARK Yannick Duchêne (Hibou57)
2010-05-14  8:11   ` SPARK Phil Thornley
2010-05-14 14:28     ` SPARK Yannick Duchêne (Hibou57)
2010-05-14 21:45 ` SPARK Yannick Duchêne (Hibou57)
2010-05-15 16:41 ` SPARK Yannick Duchêne (Hibou57)
2010-05-15 18:00   ` SPARK Yannick Duchêne (Hibou57)
2010-05-15 18:14   ` SPARK Yannick Duchêne (Hibou57)
2010-05-15 19:08     ` SPARK Yannick Duchêne (Hibou57)
2010-05-15 20:23       ` SPARK Yannick Duchêne (Hibou57)
2010-05-16 18:13         ` SPARK Peter C. Chapin
2010-05-17  0:59           ` SPARK Yannick Duchêne (Hibou57)
2010-05-16 18:17         ` SPARK Phil Thornley
2010-05-17  1:24           ` Yannick Duchêne (Hibou57) [this message]
2010-05-15 18:43   ` SPARK Phil Clayton
2010-05-15 19:12     ` SPARK Yannick Duchêne (Hibou57)
2010-05-15 21:02       ` SPARK Phil Clayton
2010-05-15 22:48 ` SPARK Yannick Duchêne (Hibou57)
2010-05-16  1:48   ` SPARK Yannick Duchêne (Hibou57)
2010-05-16  1:53     ` SPARK Yannick Duchêne (Hibou57)
2010-05-16  5:28 ` SPARK Yannick Duchêne (Hibou57)
2010-05-18 18:01   ` SPARK Yannick Duchêne (Hibou57)
2010-05-19  8:09     ` SPARK Phil Thornley
2010-05-19 20:38       ` SPARK Simon Wright
2010-05-19 21:27         ` SPARK Yannick Duchêne (Hibou57)
2010-05-20  6:21           ` SPARK Simon Wright
2010-05-20  6:58             ` SPARK Yannick Duchêne (Hibou57)
2010-05-20 21:51               ` SPARK Simon Wright
2010-05-19 21:35       ` SPARK Yannick Duchêne (Hibou57)
  -- strict thread matches above, loose matches on Subject: below --
2009-06-10  9:47 SPARK Robert Matthews
2004-08-18 23:46 timeouts Brian May
2004-08-19  3:40 ` timeouts Steve
2004-08-22  4:18   ` timeouts Brian May
2004-08-22 12:54     ` timeouts Jeff C,
2004-08-26  1:28       ` timeouts Brian May
2004-08-26 13:34         ` timeouts Steve
2004-08-26 14:02           ` timeouts Georg Bauhaus
2004-08-26 23:03             ` SPARK Brian May
2004-08-27 10:11               ` SPARK Georg Bauhaus
2001-08-08  9:46 SPARK Soeren.Henssel-Rasmussen
2001-08-08 20:04 ` SPARK McDoobie
2001-08-06 16:49 SPARK programmer
2001-08-07  7:04 ` SPARK Hambut
2001-08-07  7:18 ` SPARK Hambut
2001-08-07  8:37 ` SPARK Peter Amey
2001-08-07 14:42   ` SPARK McDoobie
2001-08-09 12:36   ` SPARK Peter Amey
2001-08-14  3:14   ` SPARK Prof Karl Kleine
2001-08-14 10:25     ` SPARK Rod Chapman
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox