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] question about hybrid logic functions


  • Subject: [Frama-c-discuss] question about hybrid logic functions
  • From: Patrick.Baudin at cea.fr (BAUDIN Patrick)
  • Date: Tue, 25 Aug 2009 09:18:49 +0200
  • In-reply-to: <4A9289C8.8060202@inria.fr>
  • References: <B0130C58-E12F-44DA-8F19-E94169F4BBE3@di.uminho.pt> <4A9289C8.8060202@inria.fr>

Just a minor correction
> //@ logic type abstract_stack;
>
> struct stack {
>   //@ ghost abstract_stack my_abstraction;
> } st;
>
> /*@ axiomatic A {
>   @    logic integer count_of{L} (Stack s) reads s.my_abstraction;
>   @*/
>   
The label {L} isn't used into the reads definition of count_of (it's a 
meaning of a good abstraction).

> /*@ requires 0 < count_of{Here}(st);
>   @ assigns st.my_abstraction;
>   @ ensures  count_of{Here}(st) == count_of{Old}(st) - 1;
>   @*/
>   
so, the specification shoud be corrected as follow:

 /*@ requires 0 < count_of{Here}(st);
  @ assigns st.my_abstraction;
  @ ensures  count_of{Here}(st) == count_of{Old}(\old(st)) - 1;
  @*/ 

in fact, the labels {Here} and {Old} given to count_of are insignificant

Patrick.

-- 
Patrick Baudin,
CEA, LIST, SOL, 91191 Gif-surYvette cedex, France.
tel: +33 (0)1 6908 2072