comp.lang.ada
 help / color / mirror / Atom feed
From: "Yannick Duchêne (Hibou57)" <yannick_duchene@yahoo.fr>
Subject: Re: SPARK : surprising failure with implication
Date: Thu, 03 Jun 2010 18:45:26 +0200
Date: 2010-06-03T18:45:26+02:00	[thread overview]
Message-ID: <op.vdqgt0usxmjfy8@garhos> (raw)
In-Reply-To: op.vdnz65ucule2fv@garhos

Le Wed, 02 Jun 2010 10:50:55 +0200, Yannick Duchêne (Hibou57)  
<yannick_duchene@yahoo.fr> a écrit:

I feel I have noticed a tip with substitution (people with knowledge in  
SPARK implementation may confirm perhaps).

As usual, to expect to have a substitution to be applied, it is needed to  
define an equality first

    check A = B;

The tip takes place when the expression in which you expect the  
substitution to be applied is itself an equality expression

    check (... C ...) = (... A ...); -- Suppose it is proved
    check (... C ...) = (... B ...); -- Seems to mostly fails

Then, it seems better to use an intermediate step and to do

    check (... C ...) = (... A ...); -- Suppose it is proved
    check (... A ....) = (... B ...); -- Suggest to apply the substitution  
to the RHS
    check (... C ...) = (... B ...); -- Use the modified RHS

-- 
There is even better than a pragma Assert: a SPARK --# check.
--# check C and WhoKnowWhat and YouKnowWho;
--# assert Ada;
--  i.e. forget about previous premises which leads to conclusion
--  and start with new conclusion as premise.



      parent reply	other threads:[~2010-06-03 16:45 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-01 18:51 SPARK : surprising failure with implication Yannick Duchêne (Hibou57)
2010-06-02  4:34 ` Yannick Duchêne (Hibou57)
2010-06-02  7:42   ` Dmitry A. Kazakov
2010-06-02  7:56     ` Yannick Duchêne (Hibou57)
2010-06-02  8:55       ` Dmitry A. Kazakov
2010-06-02  8:59         ` Yannick Duchêne (Hibou57)
2010-06-02  8:50 ` Yannick Duchêne (Hibou57)
2010-06-03  8:54   ` Yannick Duchêne (Hibou57)
2010-06-03  9:06     ` Yannick Duchêne (Hibou57)
2010-06-03 11:19     ` Yannick Duchêne (Hibou57)
2010-06-03 16:45   ` Yannick Duchêne (Hibou57) [this message]
replies disabled

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