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] Jessie and CHAR_MIN

  • Subject: [Frama-c-discuss] Jessie and CHAR_MIN
  • From: jens.gerlach at (Jens Gerlach)
  • Date: Sun, 24 May 2009 20:49:32 +0200


I wrote a short program in order to find out whether Jessie  
understands the limits of the builti-in
integer types (see Section Sizes of integer types <limits.h>  


char char_range(char i)
     //@ assert i >= CHAR_MIN;
     //@ assert i <= CHAR_MAX;
     return i;

signed char schar_range(signed char i)
     //@ assert i >= SCHAR_MIN;
     //@ assert i <= SCHAR_MAX;
     return i;

unsigned char uchar_range(unsigned char i)
     //@ assert i >= UCHAR_MIN;
     //@ assert i <= UCHAR_MAX;
     return i;

short short_range(short i)
     //@ assert i >= SHRT_MIN;
     //@ assert i <= SHRT_MAX;
     return i;


I compiled with "frama-c -jessie-analysis -jessie-int-model modulo - 
jessie-gui ranges.c" and noticed the following:

1.) I did not need to include limits.h
	So Jessie nows about these limits?

2.) All three provers (alt-ergo, yices, CVC3) that I used under Mac OS  
X cannot prove the line
	 //@ assert i >= CHAR_MIN;
       Is this an oversight?

3.) The line  //@ assert i >= UCHAR_MIN; is not recognised at all.

Regards Jens, Berlin

-------------- next part --------------
An HTML attachment was scrubbed...