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] Integer-arithmetics, rational postconditions
- Subject: [Frama-c-discuss] Integer-arithmetics, rational postconditions
- From: michaelschausten at googlemail.com (Michael Schausten)
- Date: Tue, 24 Aug 2010 16:43:40 +0200
Hello, I have a function doing calculations based on integers. However, I'd like to verify the conditions wit Coq based on rational arithmetic. A simple example: /*@ requires x > 0; ensures (\result / 2 > x); */ int function1(int x) { return (2*x + 1); } With the normal integer arithmetics, (\result / 2 == x) would be correct. What I'd like to do is cast \result and x to rationals and do a rational division, so that the ensures-part as above is correct. Is this possible? Sincerely,
- Follow-Ups:
- [Frama-c-discuss] Integer-arithmetics, rational postconditions
- From: pascal.cuoq at gmail.com (Pascal Cuoq)
- [Frama-c-discuss] Integer-arithmetics, rational postconditions
- From: Claude.Marche at inria.fr (Claude Marche)
- [Frama-c-discuss] Integer-arithmetics, rational postconditions
- Prev by Date: [Frama-c-discuss] Functions in Predicates
- Next by Date: [Frama-c-discuss] Integer-arithmetics, rational postconditions
- Previous by thread: [Frama-c-discuss] Functions in Predicates
- Next by thread: [Frama-c-discuss] Integer-arithmetics, rational postconditions
- Index(es):