<html 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=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (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:Aptos;
panose-1:2 11 0 4 2 2 2 2 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:0in;
font-size:12.0pt;
font-family:"Aptos",sans-serif;}
span.EmailStyle19
{mso-style-type:personal-reply;
font-family:"Aptos",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;
mso-ligatures:none;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style>
</head>
<body lang="EN-US" link="blue" vlink="purple" style="word-wrap:break-word;line-break:after-white-space">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<div id="mail-editor-reference-message-container">
<div>
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal" style="margin-bottom:12.0pt"><b><span style="color:black">From:
</span></b><span style="color:black">Paul Sandoz <paul.sandoz@oracle.com><br>
<br>
</span><o:p></o:p></p>
</div>
<div>
<div>
<p class="MsoNormal">> All I was suggesting is to replace the operand whose operation refers to the catch block as a successor with that successor. (Of course it's not really a successor in the conventional sense for either region enter or exit). Just less
moving parts. <o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">Yes, let's start with this and see the effect on exits from the nested regions. It will definitely reduce the complexity.
<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">> The exit and re-enter to handle variable modifications is interesting. Although, those variable modifications should covered by the exception region and if we modify the program otherwise are we not changing its behavior?
<o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">The trick is that exception region is interrupted (with zero gap) right after the VarStore. Everything is still covered, just one more flow graph path (passing through the modified var) leads to the handler.
Ultimatelly the try blocks should be modeled as each individual op is in its own block with alternative successor leading to the exception handler (that is how verification tests the stack maps). Practically only instructions modifying variables are important
and even more practically only instructions modifying variables consumed in the exception handler matter.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">Ultimate flow graph of a try/catch:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"></span><span style="font-size:11.0pt;font-family:Consolas">-(try start)- INS -- INS -- STORE 1 -- INS -- STORE 2 -- INS -(try end)- ...<o:p></o:p></span></p>
</div>
<p class="MsoNormal"><span style="font-family:Consolas"> \ \ \ \ \ \ \
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:Consolas"> ------------------------------------------(handler)- LOAD 1 -- ...<br>
<br>
</span><span style="font-size:11.0pt"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">Flow graph reflecting all variable modifications:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"></span><span style="font-size:11.0pt;font-family:Consolas">-(try start)- INS -- INS -- STORE 1 -- INS -- STORE 2 -- INS -(try end)- ...<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:Consolas"> \ \ \
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:Consolas"> ------------------------------------------(handler)- LOAD 1 -- ...<br>
<br>
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">Flow graph reflecting modifications of variables consumed in the handler:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"></span><span style="font-size:11.0pt;font-family:Consolas">-(try start)- INS -- INS -- STORE 1 -- INS -- STORE 2 -- INS -(try end)- ...<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:Consolas"> \ \ <o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:Consolas"> ------------------------------------------(handler)- LOAD 1 -- ...<br>
<br>
</span><span style="font-size:11.0pt"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">Flow graph we have now:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"></span><span style="font-size:11.0pt;font-family:Consolas">-(try start)- INS -- INS -- STORE 1 -- INS -- STORE 2 -- INS -(try end)- ...<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:Consolas"> \ <o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:Consolas"> ------------------------------------------(handler)- LOAD 1 -- ...<br>
<br>
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">And this is the trick that might help:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"></span><span style="font-size:11.0pt;font-family:Consolas">-(try start)- INS -- INS -- STORE 1 -(try end/re-start)- INS -- STORE 2 -- INS -(try end)- ...<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:Consolas"> \ \ <o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:Consolas"> ------------------------------------------(handler)- LOAD 1 -- ...<br>
<br>
</span><span style="font-size:11.0pt"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:Consolas"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:Consolas"><o:p> </o:p></span></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<div>
<div id="mail-editor-reference-message-container">
<div>
<div>
<div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</div>
</div>
</div>
</body>
</html>