Frama-C-discuss mailing list archives

This page gathers the archives of the old Frama-C-discuss archives, that was hosted by Inria's gforge before its demise at the end of 2020. To search for mails newer than September 2020, please visit the page of the new mailing list on Renater.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Frama-c-discuss] Lemma from ACSL doc doesn't verify



Hollas Boris (CR/AEY1) wrote:
> If I use
>
> /@ lemma mean_property2: \forall integer l, h; l <= h  ==>  l <= (l+h)/2 <= h;
>
> Instead of the lemma above and try to use it for numbers of type int, will the prover detect that mean_property2 doesn't hold for int as (l+h) may overflow?
>
>   
Lemma mean_property2 DOES HOLD for int since in annotations, + means 
addition on integers and not on ints.

- Claude

PS: If for some weird reason you want to use addition of ints in logic 
you can add a cast: (int)(l+h), but in general there is no reason to do 
that.


> -Boris
>
> _______________________________________________
> Frama-c-discuss mailing list
> Frama-c-discuss at lists.gforge.inria.fr
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/frama-c-discuss
>   


-- 
Claude March?                          | tel: +33 1 72 92 59 69           
INRIA Saclay - ?le-de-France           | mobile: +33 6 33 14 57 93 
Parc Orsay Universit?                  | fax: +33 1 74 85 42 29   
4, rue Jacques Monod - B?timent N      | http://www.lri.fr/~marche/
F-91893 ORSAY Cedex                    |