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] Casting puzzle - unproved?
- Subject: [Frama-c-discuss] Casting puzzle - unproved?
- From: dganesan at fc-md.umd.edu (Dharmalingam Ganesan)
- Date: Thu, 20 Feb 2014 13:43:32 -0500
- In-reply-to: <CA+yPOVibqr5ZKOagXheGRFrvU-hGCLzc-wKq9U5euyJDPJo9Jw@mail.gmail.com>
- References: <CA+yPOViksq-bpf_4rnHBzgmwm_GQ9C0=vVy58haE7_s_iK-TXA@mail.gmail.com> <1310126872.10487660.1392910902718.JavaMail.root@mail.gatech.edu>, <CA+yPOVibqr5ZKOagXheGRFrvU-hGCLzc-wKq9U5euyJDPJo9Jw@mail.gmail.com>
Hi, In my understanding conversion from int to double and then back to int should be the same. I was expecting this assert to be true. Did I model it wrong? #include <stdio.h> #include <limits.h> /*@ requires x != 0; assigns \nothing; */ void assert(int x); int x = 0; int main() { assert(x == (int)(double)x); return 0; } [formal_verification]$ frama-c -wp -wp-rte -lib-entry -pp-annot -wp-proof=alt-ergo double_casting_puzzle.c [kernel] preprocessing with "gcc -C -E -I. -dD double_casting_puzzle.c" [wp] Running WP plugin... [wp] Collecting axiomatic usage [rte] annotating function main [wp] 3 goals scheduled [wp] [Alt-Ergo] Goal typed_main_assert_rte_float_to_int_2 : Unknown (1s) [wp] [Alt-Ergo] Goal typed_main_assert_rte_float_to_int : Unknown (1s) [wp] [Alt-Ergo] Goal typed_main_call_assert_pre : Unknown (1s)
- References:
- [Frama-c-discuss] multiple behaviors in statement contracts
- From: virgile.prevosto at m4x.org (Virgile Prevosto)
- [Frama-c-discuss] multiple behaviors in statement contracts
- From: jobredeaux at gatech.edu (Jobredeaux, Romain J)
- [Frama-c-discuss] multiple behaviors in statement contracts
- From: virgile.prevosto at m4x.org (Virgile Prevosto)
- [Frama-c-discuss] multiple behaviors in statement contracts
- Prev by Date: [Frama-c-discuss] multiple behaviors in statement contracts
- Next by Date: [Frama-c-discuss] ocaml cannot allocate memory
- Previous by thread: [Frama-c-discuss] multiple behaviors in statement contracts
- Next by thread: [Frama-c-discuss] [frama-c-discuss] Is it possible to run jessie without gui?
- Index(es):