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] Help with using user-declared functions in preconditions

On 15/06/2019 11:15, Gerlach, Jens wrote:
> The code of the examples and the various logic functions and predicates can be found under
> it... you define a predicate called "Empty" and use that in the 
"ensures" clause of the "stack_empty" function... which can then be used 
in the preconditions of other functions...

>  From time to time I hear the Frama-C developers talk about the idea of allowing “pure” C functions
> (no side effects etc) in contracts. However, this hasn’t materialized yet.
Ah...of SPARK, functions are always pure, so using them 
directly in contracts is always OK...

  Thanks for the help,