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 - type invariants

  • Subject: [Frama-c-discuss] Jessie - type invariants
  • From: kerstin.hartig at (Kerstin Hartig)
  • Date: Mon, 21 Sep 2009 10:05:32 +0200


I have a question regarding the new Beryllium-implementation.
Since in the ACSL-Beryllium-document data invariants are not marked as
"experimental" I wonder if they are supposed to work.
Trying to use them I realized global invariants work, but type invariants
unfortunately do not.
I tried the temperature example, which is delivered in the document, but
unsuccessfully.(I send the code below)
Anyway, there are syntax errors when using the strength modifiers weak or
strong. (using both - global or type invariants)
Is this a case for a bug report or is it supposed to not work yet?
And if so, do you know already if and when this feature is planned to work?
Just asking because I would find it very useful.

Thank you in advance,

/* not working with type invariants*/
typedef double temperature;
//@ type invariant temp_in_celsius(temperature t) = t >= -273.15;

//@ ensures \result >= -273.15;
double test(temperature t) {
  return t;
/* working with global invariants*/
static double temperature;
//@ global invariant temperature_in_celsius :  temperature >= -273.15;

//@ ensures \result >= -273.15;
double test() {
  return temperature;