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: guillaume.melquiond at inria.fr (Guillaume Melquiond)
- Date: Sat, 16 Jan 2010 12:13:39 +0100
- In-reply-to: <D6E8ED48-D985-47F0-B5A4-FE23BC9A7027@first.fraunhofer.de>
- References: <D6E8ED48-D985-47F0-B5A4-FE23BC9A7027@first.fraunhofer.de>
Jens Gerlach a ?crit : > then I obtain the error message > > adjacent_find.c:34:[kernel] user error: Error during annotations > analysis: invalid implicit conversion from integer to int > > which refers to the third loop invariant. > I am not sure whether it's a bug or a feature, It's a bug in your specification. Your predicate shouldn't use "int" as the type of "n" but "integer", so that it doesn't involve possibly overflowing arithmetic: /*@ predicate have_equal_neighbours{Label}(int* a, integer n) = \exists int i; 0 <= i < n-1 && a[i] == a[i+1]; */ All the proof obligations are then proved. Best regards, Guillaume
- Follow-Ups:
- [Frama-c-discuss] adjacent_find problem
- From: jens.gerlach at first.fraunhofer.de (Jens Gerlach)
- [Frama-c-discuss] adjacent_find problem
- From: Claude.Marche at inria.fr (Claude Marche)
- [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
- 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):