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] difference between specifying side effects for value analysis in two different ways


  • Subject: [Frama-c-discuss] difference between specifying side effects for value analysis in two different ways
  • From: kahl at cas.mcmaster.ca (Wolfram Kahl)
  • Date: Sun, 8 Dec 2013 18:33:57 -0500
  • In-reply-to: <CAA1cxuiO8NOtb-jOg_NU0vJVu+6j82=N0EOZNxqgZ_ujTAXFpQ@mail.gmail.com>
  • References: <CAA1cxuiO8NOtb-jOg_NU0vJVu+6j82=N0EOZNxqgZ_ujTAXFpQ@mail.gmail.com>

On Sun, Dec 08, 2013 at 11:26:58PM +0000, David Yang wrote:
> For function:
> int f(int *p);
> 
> specifying the side effects of function f by two different ways:
> 
> 1. /*@ assings *p; */ only assign *p
> 2. /*@ assigns *p; assigns p;*/ assign the address p would also be
> changed at the same time

p is a local variable of f;
if the implementation of f assigns p, this is not
a side effect visible to the caller.
(The actual parameter of f might not even be a variable,
 as for example in  f(q + 1).
)


Wolfram