From: Tim Rowe <spamtrap@tgrowe.plus.net>
Subject: Re: Newbie question: SPARK verification condition on member of private record
Date: Thu, 02 Apr 2009 00:50:44 +0100
Date: 2009-04-02T00:50:44+01:00 [thread overview]
Message-ID: <et6dnUO6O_dLYE7UnZ2dnUVZ8o-dnZ2d@posted.plusnet> (raw)
In-Reply-To: <cg$c+4BZb90JJwWv@diphi.demon.co.uk>
JP Thornley wrote:
> The rule should look like:
> a_name(1): get_order(X) may_be_replaced_by fld_highest_valid_index(X).
> where 'a_name' can be any name you like. X will be treated as a wildcard
> that matches to anything in the VC.
That works nicely, thanks. Although...
> The justification for the rule is the code of the function Get_Order. It
> really would be nice to have a return annotation on the function but, as
> you have found, this isn't possible with private types.
> [Actually it is possible, but very longwinded and involves the
> additional definition of a proof function, so it isn't usually
> considered worthwhile for such simple code.]
... I'll probably want to get around to that approach eventually. In
fact, sooner rather than later I think. Otherwise for some of the other
proof obligations it looks as if I'm going to need a lot of user rules
to tell the simplifier that various operations don't affect the results
of Get_Order. I had thought of proof functions but couldn't see how not
to move the same problem into the proof function.
How long-winded is long-winded?
next prev parent reply other threads:[~2009-04-01 23:50 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-01 19:38 Newbie question: SPARK verification condition on member of private record Tim Rowe
2009-04-01 21:04 ` JP Thornley
2009-04-01 23:50 ` Tim Rowe [this message]
2009-04-02 9:00 ` JP Thornley
2009-04-02 12:00 ` Tim Rowe
2009-04-02 15:22 ` JP Thornley
2009-04-02 18:09 ` roderick.chapman
2009-04-03 11:26 ` Tim Rowe
2009-04-02 23:58 ` Tim Rowe
2009-04-03 13:36 ` JP Thornley
2009-04-06 11:49 ` Tim Rowe
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox