From: Phil Thornley <phil.jpthornley@googlemail.com>
Subject: Re: Lost in translation (with SPARK user rules)
Date: Wed, 26 May 2010 03:38:52 -0700 (PDT)
Date: 2010-05-26T03:38:52-07:00 [thread overview]
Message-ID: <0466e131-cc80-4db4-b080-eec9aefcb1c7@z17g2000vbd.googlegroups.com> (raw)
In-Reply-To: op.vda45rsfule2fv@garhos
On 26 May, 11:09, Yannick Duchêne (Hibou57) <yannick_duch...@yahoo.fr>
wrote:
[...]
> I tried with this:
>
> bitwise(112): bit__and(X div (2**N), 1)=0 may_be_deduced_from [
> (bit__and(X, 2**N)=0), X>=0, N>=0 ].
> bitwise(113): bit__and(X, 2**N)=0 may_be_deduced_from [ (bit__and(X div
> (2**N), 1)=0), X>=0, N>=0 ].
>
> But this fails, although the simplifier does not returns me any syntax
> error messages about this *.RLU file. This fails, because it cannot prove
> something like this:
>
> --# check ((Instance and 2) = 0) -> (((Instance / 2) and 1) = 0);
>
> The latter should be directly deduced from the two previous rules if these
> were OK. So I suppose something is wrong with these rules, and the
> expression in “[...]” is not interpreted the way it seems to be to me.
I don't think there us anything wrong with these rules, but the
Simplifier will not use a *combination* of user rules to discharge a
proof. (They are not as 'powerful' as the built-in rules as they are
not consulted until the Simplifier has tried all its other
strategies).
For example, section 7.3.1 of the Simplifier User Manual says:
"For an inference rule of the form
rulename(1): Goal may_be_deduced_from Conditions.
the Simplifier will attempt to find a means of instantiating
all of the wildcards in Goal such that it becomes an exact
match for an existing undischarged conclusion."
This means that a single inference rule is applied only if it
*directly* matches a conclusion.
Also, since user rules are applied right at the end, you have to use
the form of the conclusion as it appears in the SIV file, so:
> One entertaining thing: I've noticed “and 1” is always replaced by “mod 2”
> in the simplifier's *.SIV output files. As an example, the latter Check
> clause is replaced by:
>
> C1: bit__and(instance, 2) = 0 -> instance div 2 mod 2 = 0 .
If that is the conclusion left in the SIV file then the user rule to
prove it is:
user_bitwise(1): bit__and(X, 2) = 0 -> X div 2 mod 2 = 0
may_be_deduced .
(and a minor comment is that it is probably not a good idea to use the
Proof Checker rule family names for Simplifier user rules - it just
adds to the confusion about how the rules are used.)
Cheers,
Phil
next prev parent reply other threads:[~2010-05-26 10:38 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-26 10:09 Lost in translation (with SPARK user rules) Yannick Duchêne (Hibou57)
2010-05-26 10:38 ` Phil Thornley [this message]
2010-05-26 10:57 ` Yannick Duchêne (Hibou57)
2010-05-26 14:15 ` Pascal Obry
2010-05-26 14:28 ` Dmitry A. Kazakov
2010-05-26 19:28 ` Yannick Duchêne (Hibou57)
2010-05-26 20:14 ` Dmitry A. Kazakov
2010-05-26 21:14 ` Yannick Duchêne (Hibou57)
2010-05-26 21:15 ` Yannick Duchêne (Hibou57)
2010-05-26 22:01 ` Peter C. Chapin
2010-05-27 12:32 ` Mark Lorenzen
2010-05-27 18:34 ` Pascal Obry
2010-05-27 19:18 ` Yannick Duchêne (Hibou57)
2010-05-28 9:39 ` Maciej Sobczak
2010-05-28 11:57 ` SPARK and testing. Was: " Peter C. Chapin
2010-05-28 12:59 ` SPARK and testing Peter C. Chapin
2010-05-28 23:06 ` Yannick Duchêne (Hibou57)
2010-05-26 19:16 ` Lost in translation (with SPARK user rules) Yannick Duchêne (Hibou57)
2010-05-26 19:32 ` Pascal Obry
2010-05-26 20:56 ` Yannick Duchêne (Hibou57)
2010-05-26 22:06 ` Peter C. Chapin
2010-05-27 18:39 ` Pascal Obry
2010-05-26 22:17 ` Peter C. Chapin
2010-05-27 10:11 ` Sockets package in SPARK (Was: Lost in translation (with SPARK user rules)) Jacob Sparre Andersen
2010-05-27 18:41 ` Pascal Obry
2010-05-27 19:20 ` Yannick Duchêne (Hibou57)
2010-05-28 7:43 ` Sockets package in SPARK Jacob Sparre Andersen
2010-05-27 8:13 ` Lost in translation (with SPARK user rules) Yannick Duchêne (Hibou57)
2010-05-27 10:55 ` Yannick Duchêne (Hibou57)
2010-05-27 11:32 ` Yannick Duchêne (Hibou57)
2010-05-27 11:41 ` Phil Thornley
2010-05-27 12:42 ` Yannick Duchêne (Hibou57)
2010-05-27 12:22 ` stefan-lucks
2010-05-27 11:37 ` Yannick Duchêne (Hibou57)
2010-05-27 11:57 ` Phil Thornley
2010-05-27 12:36 ` Yannick Duchêne (Hibou57)
2010-05-27 13:38 ` Phil Thornley
2010-06-03 2:44 ` Yannick Duchêne (Hibou57)
2010-05-27 19:53 ` Warren
2010-05-29 23:03 ` Yannick Duchêne (Hibou57)
2010-05-30 6:55 ` Yannick Duchêne (Hibou57)
2010-05-30 9:30 ` Phil Thornley
2010-05-30 9:46 ` Yannick Duchêne (Hibou57)
2010-05-30 9:26 ` Phil Thornley
2010-05-30 9:57 ` Yannick Duchêne (Hibou57)
2010-06-01 5:42 ` Yannick Duchêne (Hibou57)
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox