--- layout: fc_discuss_archives title: Message 50 from Frama-C-discuss on December 2009 ---
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 |