<br><br><div class="gmail_quote">On Thu, Feb 5, 2009 at 2:19 AM, Ted Kremenek <span dir="ltr"><<a href="mailto:kremenek@apple.com">kremenek@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div style=""><br><div><div><div></div><div class="Wj3C7c"><div>On Feb 3, 2009, at 7:28 PM, Zhongxing Xu wrote:</div><br><blockquote type="cite"><span style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><br>
On Wed, Feb 4, 2009 at 11:13 AM, Zhongxing Xu<span> </span><span dir="ltr"><<a href="mailto:xuzhongxing@gmail.com" target="_blank">xuzhongxing@gmail.com</a>></span><span> </span>wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="gmail_quote"><div><div></div><div>On Wed, Feb 4, 2009 at 11:04 AM, Zhongxing Xu<span> </span><span dir="ltr"><<a href="mailto:xuzhongxing@gmail.com" target="_blank">xuzhongxing@gmail.com</a>></span><span> </span>wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Consider this code:<br><br>void foo(int *p) {<br>  p[0] = 1;<br>}<br><br>Currently we evaluate p[0] to loc::SymbolVal. I want it to be<span> </span><br>
loc::MemRegionVal(ElementRegion(SymbolicRegion(SymbolRegionRValue(p)), 0)). But<br>ElementRegion assumes its super region be typed. Is this assumption too strong?</blockquote></div></div><div><br>Or, we could always know the RValue type of a symblic region?</div>
</div></blockquote><div><br>How about we make SymbolicRegion subclass TypedRegion?</div></span></blockquote><div><br></div></div></div><div>Sounds great to me.</div></div></div></blockquote><div><br>If we do this, it would lead to a series of changes:<br>
<br>To get the rvalue type of the region, we need to get the type of the symbol. SymbolManager is required to do this: get the SymbolData by SymbolRef. The interface need to be changed:<br>  <br>TypedRegion::getRValueType(ASTContext&) -> TypedRegion::getRValueType(ASTContext&, SymbolManager&)<br>
<br>But this is not desired for other typed regions.<br><br>Or, we can make getRValueType a method of MemRegionManager. But that would need the access to MemRegionManager everywhere when we need the type of the region.<br>
</div></div><br>