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] Verifying recursive functions
- Subject: [Frama-c-discuss] Verifying recursive functions
- From: Pascal.Cuoq at cea.fr (Pascal Cuoq)
- Date: Fri, 20 Mar 2009 14:54:26 +0100
- In-reply-to: <FC0686BB6178BC43B9DC035287A11A7204EAF43D@SI-MBX12.de.bosch.com>
- References: <FC0686BB6178BC43B9DC035287A11A7204EAF43D@SI-MBX12.de.bosch.com>
> > I don't understand the assert clause in the code below: > - "0 <= n" follows from the precondition > - "n-1 < n" is a tautology > So the assert clause should always evaluate to true, irrespective of > what the program does? The assertion is there to illustrate how decreases clauses will work when they are supported. If the decreases clause had been supported by Jessie, it would have been translated into a verification condition very much like the property 0 <= n && n-1 < n; to be proved at the point of the assert. The fact that the property holds means that the decreases clause is a valid one, and consequently that the termination of the function is guaranteed. Pascal
- Follow-Ups:
- [Frama-c-discuss] Verifying recursive functions
- From: Claude.Marche at inria.fr (Claude Marché)
- [Frama-c-discuss] Verifying recursive functions
- References:
- [Frama-c-discuss] Verifying recursive functions
- From: Boris.Hollas at de.bosch.com (Hollas Boris (CR/AEY1))
- [Frama-c-discuss] Verifying recursive functions
- Prev by Date: [Frama-c-discuss] Verifying recursive functions
- Next by Date: [Frama-c-discuss] Global initialization of variables not taken into account?
- Previous by thread: [Frama-c-discuss] Verifying recursive functions
- Next by thread: [Frama-c-discuss] Verifying recursive functions
- Index(es):