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] Is it possible to use tsets returned by logic functions in assigns?


  • Subject: [Frama-c-discuss] Is it possible to use tsets returned by logic functions in assigns?
  • From: tjoppen at acc.umu.se (Tomas Härdin)
  • Date: Tue, 28 Jan 2020 19:50:06 +0100

Hi

I am attempting to verify some code I am maintaining in FFmpeg. Section
"2.8.1 Finite sets" in the ACSL manual claims tsets can be used in
assigns clauses. But when I try to do so (via a logic function) I get
the following error:

  not an assignable left value: avio_assigns{Old}(s). Ignoring
specification of function avio_r8

My ACSL is as follows:

  /*@ predicate avio_valid(struct AVIOContext *s) = \valid(s);
      predicate avio_valid_read(AVIOContext *s) = \valid_read(s);
      logic set<char*> avio_assigns(AVIOContext *s) = {
        &s->buffer_size,
        s->buffer
      };
   */
  /*@ requires avio_valid(s);
      assigns avio_assigns(s);
      ensures 0 <= \result <= 255;
   */
  int          avio_r8  (AVIOContext *s);

The point of declaring avio_assigns() is of course to be able to reuse
and \union these tsets as one builds larger and larger call graphs.

What am I missing?

/Tomas