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] adjacent_find problem
- Subject: [Frama-c-discuss] adjacent_find problem
- From: Pascal.CUOQ at cea.fr (CUOQ Pascal)
- Date: Sat, 16 Jan 2010 14:07:00 +0100
- References: <D6E8ED48-D985-47F0-B5A4-FE23BC9A7027@first.fraunhofer.de><4B519F63.5010805@inria.fr> <1C3E80B4-C87C-4369-AAB1-16953A0107B9@first.fraunhofer.de>
Hello, > thanks for your answer but I do not see where an overflow could occur. Technically, Guillaume did not say there could be an overflow in an expression inside your predicates. He said you wrote some of them using "possibly overflowing [int] arithmetic". By typing your predicate as accepting an int, you forced a cast to be applied to its argument each time the argument is of type integer. This is what Jessie is warning you about. ints can be promoted to integers silently, but the conversion in the other direction involves loss of information and requires an explicit "(int)" cast. One last word: it's the ACSL type-checker talking here, not any prover. The type-checker is simple-minded and does not know that there cannot be an overflow in the conditions you are in. From this point of view it is just like the type-checker of any programming language. Regards, Pascal
- Follow-Ups:
- [Frama-c-discuss] adjacent_find problem
- From: Pascal.CUOQ at cea.fr (CUOQ Pascal)
- [Frama-c-discuss] adjacent_find problem
- References:
- [Frama-c-discuss] adjacent_find problem
- From: jens.gerlach at first.fraunhofer.de (Jens Gerlach)
- [Frama-c-discuss] adjacent_find problem
- From: guillaume.melquiond at inria.fr (Guillaume Melquiond)
- [Frama-c-discuss] adjacent_find problem
- From: jens.gerlach at first.fraunhofer.de (Jens Gerlach)
- [Frama-c-discuss] adjacent_find problem
- Prev by Date: [Frama-c-discuss] adjacent_find problem
- Next by Date: [Frama-c-discuss] adjacent_find problem
- Previous by thread: [Frama-c-discuss] adjacent_find problem
- Next by thread: [Frama-c-discuss] adjacent_find problem
- Index(es):