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] [wp] unproved goals for strlen() function
- Subject: [Frama-c-discuss] [wp] unproved goals for strlen() function
- From: dmentre at linux-france.org (David MENTRÉ)
- Date: Sat, 11 Jan 2014 17:24:09 +0100
- In-reply-to: <20140111151411.GB8702@ritchie.cas.mcmaster.ca>
- References: <CAA1cxuhydGEd8bf0rb=JXUo2Xr5RmTqzoumwWXb=veO2ZLOjZw@mail.gmail.com> <BAY169-W52B876ABED797CD32641A097B20@phx.gbl> <20140111151411.GB8702@ritchie.cas.mcmaster.ca>
Hello, 2014-01-11 16:14, Wolfram Kahl: > You cannot expect very much without a loop invariant --- > the only thing known after the loop right now is probably > > *(s - 1) == '\0' > > (I haven't done C in a long time) if I remember correctly that > the ++ increments after the use in the expression... > > Your postcondition probably does not follow from that alone... Wolfram is perfectly right, Xiao-lei you need to add loop invariant to *establish* the property you want to prove, i.e. the body of axiom strlen(s). Please find attached an UNFINISHED version of such kind of loop invariants. You'll notice that several things are still unproved. More home work for you. ;-) Best regards, david -------------- next part -------------- A non-text attachment was scrubbed... Name: str_len.c Type: text/x-csrc Size: 842 bytes Desc: not available URL: <http://lists.gforge.inria.fr/pipermail/frama-c-discuss/attachments/20140111/ce54919e/attachment.c>
- Follow-Ups:
- [Frama-c-discuss] [wp] unproved goals for strlen() function
- From: x_cui at hotmail.com (Xiao-lei Cui)
- [Frama-c-discuss] [wp] unproved goals for strlen() function
- References:
- [Frama-c-discuss] [wp] unproved goals for strlen() function
- From: abiao.yang at gmail.com (David Yang)
- [Frama-c-discuss] [wp] unproved goals for strlen() function
- From: x_cui at hotmail.com (Xiao-lei Cui)
- [Frama-c-discuss] [wp] unproved goals for strlen() function
- From: kahl at cas.mcmaster.ca (Wolfram Kahl)
- [Frama-c-discuss] [wp] unproved goals for strlen() function
- Prev by Date: [Frama-c-discuss] some questions about the "-lib-entry -main " option while value analysis a partial application
- Next by Date: [Frama-c-discuss] [wp] unproved goals for strlen() function
- Previous by thread: [Frama-c-discuss] [wp] unproved goals for strlen() function
- Next by thread: [Frama-c-discuss] [wp] unproved goals for strlen() function
- Index(es):