On 12/08/2013 09:42 PM, Walter Bright wrote:
On 12/8/2013 12:06 PM, Timon Gehr wrote:
On 12/08/2013 07:53 PM, Walter Bright wrote:
On 12/8/2013 2:13 AM, Araq wrote:
From this list only (7) is a valid point. All the others can be
trivially dealt
with whole program optimization (1,2,3)

If it's trivial, it's not happening. (1) would require solving the
halting problem.  ...

No it would not. If all you need to do is catching up with D, just
infer where
immutability qualifiers should go. This is decidable (the search space is
finite). Of course, an analysis of this style could infer more
fine-grained
global aliasing information anyway.

I don't believe it is remotely correct that any amount of static
analysis will determine where a pointer points to,
just as it won't tell you what value the variable 'i' has in it.

?

Static analysis will tell you where a pointer might point to (more importantly, it may exclude aliasing) and what values the variable 'i' might have in it. How precise this information is hinges on the details of the analysis and the program it is applied on. I'm just saying that this may be more precise than what 'immutable' qualifiers give you (since those are quite easy to infer, given the program, and alias analysis may be non-trivial.)

Reply via email to