|[7 earlier articles]|
|Re: Value range tracing email@example.com (1995-12-09)|
|Value range tracing firstname.lastname@example.org (1995-12-09)|
|Re: Value range tracing email@example.com (John Gough) (1995-12-09)|
|Re: Value range tracing firstname.lastname@example.org (Jason Patterson) (1995-12-09)|
|Re: Value range tracing email@example.com (1995-12-09)|
|Re: Value range tracing firstname.lastname@example.org (1995-12-17)|
|Re: Value range tracing email@example.com (1995-12-17)|
|From:||firstname.lastname@example.org (Mark A Biggar)|
|Date:||17 Dec 1995 00:36:19 -0500|
|Organization:||Loral Western Development Labs|
email@example.com (Jeremy Fitzhardinge) writes:
>I'm wondering if people bother with value range tracing....
>Is this kind of thing useful? Is it useful enough to implement?
>This isn't very complex, so I assume people have thought about it,
>but I've seen very little literature on it.
firstname.lastname@example.org (Preston Briggs) writes:
>Sure you have, but it was couched in language that wasn't very
>helpful. There's a lot of ways to do this sort of thing, ranging from
>the not very useful but cheap to compute up to pretty useful for
>real-programs but too expensive for even Andy Glew. What gets built
>is usually the result of some sort of cost-benefit tradeoff in the
>compiler writer's head.
A overlooked area is found in hte literature for Ada compilers. Most
Ada Compilers do some amount of value range tracing becasue it allows
the compiler of optimize away many of the language required constraint
checks specified by the typing system (e.g. array index bounds checks,
assigning wide subtype to naroe subtype, etc.)
>Notice that the case I've shown above involves equality. If we want
>to handle things like i < 19, it's harder and more expensive.
>Vaugh Pratt showed a cute way to handle relationships like
> x <= y + c
>where x and y are variables, and c is a constant. By "handle", I mean
>the compiler walk over a routine's dominator tree, accumulating sets
>of these relationships (as well as the ordinary equality relationships
>implied by assignments). Given the set of relationships holding at
>any point, the compiler could answer certain questions, like does x =
>y, or is x < 10, or is x < y + 5, etc.
>Fancier (and more expensive) forms of analysis will handle
>relationships of the form ax + by + ... >= c, where a, b, and c are
>all constants and the sums are of arbitrary length.
Another possible area to look at is query optimization in SQL, where the
logical simplification of query conditons makes a large peed difference.
Return to the
Search the comp.compilers archives again.