<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
        {mso-style-priority:99;
        mso-style-link:"Texto simples Carácter";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.5pt;
        font-family:Consolas;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
span.EstiloCorreioElectrnico18
        {mso-style-type:personal-reply;
        color:black;}
span.TextosimplesCarcter
        {mso-style-name:"Texto simples Carácter";
        mso-style-priority:99;
        mso-style-link:"Texto simples";
        font-family:Consolas;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body lang=PT link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><span lang=EN-US style='color:black'>I get it, I&#8217;m not
really surprised&#8230; I was hoping that maybe there was a way to use </span><span
lang=EN-US>s</span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'>criptSource.Compile(options,errorTracker),
</span><span lang=EN-US>or something like that, and get the errors from </span><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'>errorTracker </span><span
lang=EN-US>or some kind of sink.<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span lang=EN-US>Very much apreciated for your time.</span><span
lang=EN-US><o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='color:black'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='color:black'>­­­­­­­­­­­­­­­­­­___________________________________________________________________________________________________________________</span><o:p></o:p></p>

<div>

<p class=MsoNormal><span lang=EN-US style='color:black'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='color:black'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span lang=EN-US>Are you familiar with &quot;the halting
problem&quot;? :) (</span><a href="http://en.wikipedia.org/wiki/Halting_problem"><span
lang=EN-US>http://en.wikipedia.org/wiki/Halting_problem)</span></a><span
lang=EN-US><o:p></o:p></span></p>

</div>

<div>

<p class=MsoNormal><span lang=EN-US><o:p>&nbsp;</o:p></span></p>

</div>

<div>

<p class=MsoNormal>The only reliable way to find if a particular program
returns a runtime error is to execute the program. &nbsp;For limited, targeted
cases, (such as importing modules) you could write an analyzer program which
would be *often* right -- but I could create a program &nbsp;that tricks your
analyzer into reporting a problem where none exists. &nbsp;Consider this:<o:p></o:p></p>

</div>

<div>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

</div>

<div>

<p class=MsoNormal>import sys<o:p></o:p></p>

</div>

<div>

<p class=MsoNormal>sys.modules['foo'] = type(sys)('foo')<o:p></o:p></p>

</div>

<div>

<p class=MsoNormal>import foo<o:p></o:p></p>

</div>

<div>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

</div>

<div>

<p class=MsoNormal>Your static analyzer would have a tough time recognizing
that this program would not raise a runtime error.<o:p></o:p></p>

</div>

<p class=MsoNormal><span style='color:black'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='color:black'>­­­­­­­­­­­­­­­­­­___________________________________________________________________________________________________________________</span><span
lang=EN-US><o:p></o:p></span></p>

<p class=MsoPlainText><span lang=EN-US><o:p>&nbsp;</o:p></span></p>

<p class=MsoPlainText><span lang=EN-US>Those things are run-time errors (failed
imports et al). You would<o:p></o:p></span></p>

<p class=MsoPlainText><span lang=EN-US>possibly look at the parse tree for any
imports and determine if the<o:p></o:p></span></p>

<p class=MsoPlainText><span lang=EN-US>modules to be imported exist, but that
sounds like a lot of trouble :)<o:p></o:p></span></p>

<p class=MsoPlainText><span lang=EN-US><o:p>&nbsp;</o:p></span></p>

<p class=MsoPlainText>slide<o:p></o:p></p>

<p class=MsoNormal><span style='color:black'>­­­­­­­­­­­­­­­­­­___________________________________________________________________________________________________________________</span><o:p></o:p></p>

<p class=MsoNormal><span style='color:black'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='color:black'><o:p>&nbsp;</o:p></span></p>

<div>

<p class=MsoNormal>On Fri, Jan 23, 2009 at 8:45 AM, António Piteira &lt;<a
href="mailto:antonio.piteira@wtvision.com">antonio.piteira@wtvision.com</a>&gt;
wrote:<o:p></o:p></p>

<div>

<div>

<p><span lang=EN-US style='color:black'>Hi,</span><o:p></o:p></p>

<p><span lang=EN-US style='color:black'>&nbsp;</span><o:p></o:p></p>

<p><span lang=EN-US style='color:black'>I'm trying get all runtime errors
without actually executing the code. I can get all syntax errors using the
parser, but runtime errors like &quot;import ys&quot; and stuff like that I',
not able to.</span><o:p></o:p></p>

<p><span lang=EN-US style='color:black'>Is there any way to do this?</span><o:p></o:p></p>

<p><span lang=EN-US style='color:black'>&nbsp;</span><o:p></o:p></p>

<p><span lang=EN-US style='color:black'>Thanks,</span><o:p></o:p></p>

<p><span lang=EN-US style='color:black'>Vision</span><o:p></o:p></p>

</div>

</div>

<p class=MsoNormal style='margin-bottom:12.0pt'><br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.ironpython.com">Users@lists.ironpython.com</a><br>
<a href="http://lists.ironpython.com/listinfo.cgi/users-ironpython.com"
target="_blank">http://lists.ironpython.com/listinfo.cgi/users-ironpython.com</a><o:p></o:p></p>

</div>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

</div>

</body>

</html>