comp.lang.ada
 help / color / mirror / Atom feed
* Using .rlu files in SPARK Ada
@ 2012-08-13 14:00 Ben Hocking
  2012-08-13 15:46 ` Phil Thornley
  0 siblings, 1 reply; 3+ messages in thread
From: Ben Hocking @ 2012-08-13 14:00 UTC (permalink / raw)


I'm trying to satisfy all of the Verification Conditions that SPARK Ada generates in some code of mine.

I've been unable to satisfy the following check statement:
   a2 := x3 - x1;
   b := y3 - y1;
   --# check b < a2 -> (b rem a2 = b);

It generates the following VC:
y3 - y1 < x3 - x1 -> y3 - y1 - (y3 - y1) div (x3 - x1) * (x3 - x1) = y3 - y1

In my .rlu file (which I know is being read because other rules are being applied, and I see it mentioned in my .slg file), I have:
small_rem: y3 - y1 - (y3 - y1) div (x3 - x1) * (x3 - x1) = (y3 - y1) may_be_deduced_from [y3 - y1 < x3 - x1].

(Note that I originally had:
small_rem: x rem y = x may_be_deduced_from [x < y].

However, in an effort to rule out any possible source of confusion, I expanded it to exactly what I was seeing in the .siv file.)

Am I doing something incorrectly, or is there some limitation of SPARK here?



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-08-15 11:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-13 14:00 Using .rlu files in SPARK Ada Ben Hocking
2012-08-13 15:46 ` Phil Thornley
2012-08-15 11:50   ` Ben Hocking

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