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] alt-ergo silently ignored / any idea?


  • Subject: [Frama-c-discuss] alt-ergo silently ignored / any idea?
  • From: sylvain.nahas at googlemail.com (sylvain nahas)
  • Date: Tue, 19 Jun 2012 17:21:25 +0200
  • In-reply-to: <CA+yPOVhMFXw3r9y_vh_YcgJ-TCL3H1yuYT_==OGjaEdy69ny5A@mail.gmail.com>
  • References: <CAFaEDLC0QHAoOfUC6mE9fGL8da4JPBC_JoHM2zCBH-9iQ+UnBA@mail.gmail.com> <CA+yPOVhMFXw3r9y_vh_YcgJ-TCL3H1yuYT_==OGjaEdy69ny5A@mail.gmail.com>

Hi Virgile,

first, thanks for the fast response!

My bad, I should have given the following information:

Here is the code to check (from the WP manual):
/*@ requires \valid(a) && \valid(b);
  @ ensures A: *a == \old(*b) ;
  @ ensures B: *b == \old(*a) ;
  @ assigns *a,*b ;
  @*/
void swap(int *a,int *b)
{
  int tmp = *a ;
  *a = *b ;
  *b = tmp ;
  return ;
}

Here the result that is to be expected (from the WP manual):

# frama - c - wp -wp - rte swap . c swap2 . c
[ kernel ] preprocessing with " gcc -C -E -I . swap . c "
[ kernel ] preprocessing with " gcc -C -E -I . swap2 . c "
[ rte ] annotating function swap
[ wp ] [ WP : simplified ] Goal s t o r e _ s w a p _ f u n c t i o n
_ a s s i g n s : Valid
[ wp ] [ Alt - Ergo ] Goal s t o r e _ s w a p _ a s s e r t _ 4 _ r t e : Valid
[ wp ] [ Alt - Ergo ] Goal s t o r e _ s w a p _ a s s e r t _ 3 _ r t e : Valid
[ wp ] [ Alt - Ergo ] Goal s t o r e _ s w a p _ a s s e r t _ 2 _ r t e : Valid
[ wp ] [ Alt - Ergo ] Goal s t o r e _ s w a p _ a s s e r t _ 1 _ r t e : Valid
[ wp ] [ Alt - Ergo ] Goal s t o r e _ s w a p _ p o s t _ 2 _ B : Valid
[ wp ] [ Alt - Ergo ] Goal s t o r e _ s w a p _ p o s t _ 1 _ A : Valid

Here is the result I get:

$ frama-c -wp -wp-rte -wp-proof alt-ergo  /c/src/wp.c
[kernel] preprocessing with "gcc -C -E -I.  c:/src/wp.c"
[rte] annotating function swap
[wp] [WP:simplified] Goal store_swap_function_assigns : Valid

Expected and actual are not the same so I stay to my point. :-)

Thanks in advance for any hint, this is driving me crazy!
Sylvain