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] Issue with modulo over unsigned int
- Subject: [Frama-c-discuss] Issue with modulo over unsigned int
- From: dmentre at linux-france.org (David MENTRE)
- Date: Thu, 5 Mar 2009 12:01:04 +0100
Hello, I have following code: === //@ ensures \result > 0 && \result < 4294967295; unsigned int f(void) { return 10; } void main(void) { unsigned int a, b, r; a = f(); b = f(); //@ assert a > 0 && b > 0; r = a % b; //@ assert r < b; } === With Alt-Ergo, I cannot prove "assert r < b" while this property seems obvious to me as "r = a % b". Is this a limitation of Alt-Ergo (Alt-Ergo does not know about modulo mathematical properties) or am I missing something (e.g. Frama-C works on mathematical integers which are different from unsigned int)? Yours, david
- Prev by Date: [Frama-c-discuss] [Jessie] Issue with behavior in contracts
- Next by Date: [Frama-c-discuss] Best approach when specifying regular C functions from stdlib?
- Previous by thread: [Frama-c-discuss] extracting information from jessie-gui
- Next by thread: [Frama-c-discuss] an example involving floats
- Index(es):