[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [csmith-dev] Variable Names in the Comments of Function Definitions



I should also add that there is a rare situation that the side effect analysis could be wrong: while generating a function 'f',  if the generator creates a function call that might write 'g_618', and later the generator back tracks and removes the call, the side effect of the invocation might be still included in the overall effect of the function 'f'.

In your test case, if 'g_618' is only read/written by a dead function,  the wrong analysis is most likely caused by a removed call to that function.

-Xuejun 

On Thu, Jan 21, 2016 at 7:24 AM, Eric Eide <eeide@cs.utah.edu> wrote:
Chengnian Sun <chengniansun@gmail.com> writes:

> I notice that the comment of each function definition contains the names of
> the variables that are being read or written in the function. However, this
> set of variant names seems to be a super set of the variants that are
> actually being manipulated.
>
> My question is whether it is possible to make this set precise? The following
> is an example. The global variant g_618 is not used in the function func_34.

John Regehr already answered the main question about precision, but I'd like to
add:

The function that you included (`func_34') calls other functions.  I bet that
one of those, or their callees, may read or write global `g_618'.

Eric.

--
-------------------------------------------------------------------------------
Eric Eide <eeide@cs.utah.edu>  .         University of Utah School of Computing
http://www.cs.utah.edu/~eeide/ . +1 (801) 585-5512 voice, +1 (801) 581-5843 FAX