Logo Search packages:      
Sourcecode: why version File versions

ghost.c

/**************************************************************************/
/*                                                                        */
/*  The Why/Caduceus/Krakatoa tool suite for program certification        */
/*  Copyright (C) 2002-2006                                               */
/*    Jean-Franšois COUCHOT                                               */
/*    Mehdi DOGGUY                                                        */
/*    Jean-Christophe FILLI┬TRE                                           */
/*    Thierry HUBERT                                                      */
/*    Claude MARCH╔                                                       */
/*    Yannick MOY                                                         */
/*                                                                        */
/*  This software is free software; you can redistribute it and/or        */
/*  modify it under the terms of the GNU General Public                   */
/*  License version 2, as published by the Free Software Foundation.      */
/*                                                                        */
/*  This software is distributed in the hope that it will be useful,      */
/*  but WITHOUT ANY WARRANTY; without even the implied warranty of        */
/*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.                  */
/*                                                                        */
/*  See the GNU General Public License version 2 for more details         */
/*  (enclosed in the file GPL).                                           */
/*                                                                        */
/**************************************************************************/


int x;

/*@ ghost int pre_x = x */

/*@ ensures pre_x == \old(x) */
int f() {
  /*@ set pre_x = x */
  return x++;
}

/******** ghost arrays *******/

/*@ ghost int t[] */

int u[5];

/*@ ensures u[0] == \old(u[0]) && t[0] == 3 */
void g (){
  u[1]= 3;
  /*@set t[0] = u[1]*/
}


typedef struct S {
  int a;
  int b;
} S;



/*@ghost S tab[]*/

/*@ensures tab[0].a == 1*/
void h (){
  struct S a ;
  a.a = 1;
  /*@set tab[0] = a*/
}

/*@ ghost S s */


/*@ ensures s.a == 1*/
void i (){
  struct S a ;
  a.a = 1;
  /*@set s = a*/
}




/*
Local Variables: 
compile-command: "make ghost.gui"
End: 
*/

Generated by  Doxygen 1.6.0   Back to index