[Edu-sig] COUNTER class.
Dustin Mitchell
dustin@cs.uchicago.edu
Sat, 2 Mar 2002 17:36:13 -0600 (CST)
On 27 Feb 2002, Jeffrey Elkner wrote:
> I couldn't find a way to give this property to assignment. Every time an
> assignment happens with one of these things, I would like to count it.
> Is there a way to do that?
I would guess that assignments you're interested in don't have the form
a = 2 * x + 15
but rather have the form
array[i] = 2 * x + 15
because scalar variables like 'a' are seldom significant in the analysis
of a program, while arrays are. If, then, you attached an "assign"
counter to array objects' __setitem__ functions, I think you'd be in
business..
Dustin
--
Dustin Mitchell
dustin@cs.uchicago.edu
dustin@ywlcs.org
http://people.cs.uchicago.edu/~dustin/