chicken-hackers
[Top][All Lists]
Advanced

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

Re: [Chicken-hackers] [PATCH] Flow-analysis enhancement for assigned var


From: Peter Bex
Subject: Re: [Chicken-hackers] [PATCH] Flow-analysis enhancement for assigned variables
Date: Mon, 30 Jan 2012 09:39:19 +0100
User-agent: Mutt/1.4.2.3i

On Mon, Jan 30, 2012 at 08:35:22AM +0100, Felix wrote:
> Since the scrutinizer tracks program-flow, assignment can theoretically
> be used to update the currently known type-information for a variable
> (that's the "blist", a list of updated type-information of variables,
> kept separate from the "env", and keyed by varname + flow tag). But when
> a variable is captured, then assignment may occur at all possible 
> places. Previously assignments where generally not tracked, due to this
> fact. Now we check explicitly whether the variable is captured and keep
> the type-information (in the blist) if we know it is not.

Thank you for the detailed description, Felix!

> Note: there is a certain class of variable manipulation that we can not
> track: assignments from other threads and side-effects caused by
> finalizers. I see no way to handle this without being excessively
> conservative (and thus reducing the analysis to a minimum, which would
> make it mostly useless).

How is this taken care of?

> The scrutinizer is not *that* complicated - the difficult part is the
> flow-tracking and the quite elaborate type-matching stuff. And it is
> exceedingly easy to make mistakes, unfortunately. The amount of work
> that went into it is massive (and is likely not to be finished). If I
> had known how complex and error-prone it would become, it would not
> exist.

Well, I guess we can be glad you didn't know ;)  The scrutinizer is a
wondrous and extremely useful tool!

Cheers,
Peter
-- 
http://sjamaan.ath.cx
--
"The process of preparing programs for a digital computer
 is especially attractive, not only because it can be economically
 and scientifically rewarding, but also because it can be an aesthetic
 experience much like composing poetry or music."
                                                        -- Donald Knuth



reply via email to

[Prev in Thread] Current Thread [Next in Thread]