<div><div dir="auto">+1</div></div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jan 5, 2021 at 16:30 Thiede, Christoph <<a href="mailto:Christoph.Thiede@student.hpi.uni-potsdam.de">Christoph.Thiede@student.hpi.uni-potsdam.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">



<div>

<div id="m_2874944391287748510divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif" dir="ltr">
<p><span style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt">> </span><span style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt">Maybe it makes sense to think in terms of "simulation depth"? In a non-debugging
 scenario, that "simulation depth" is 0 because no simulation code is executed. When you debug/simulate your application code, depth is 1. When you debug/simulate the simulation code, depth is 2. If one would construct deeper "simulate the simulating simulator"
 processes, depth can be greater than 2. :-)</span></p>
<div id="m_2874944391287748510Signature">
<div id="m_2874944391287748510divtagdefaultwrapper" dir="ltr" style="font-size:12pt;color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols">
<div name="divtagdefaultwrapper">
<div>
<div id="m_2874944391287748510Item.MessagePartBody">
<div><br>
</div>
<div>Yahoo, a Meta-Object Facility adoption for Smalltalk systems. :-) And depth -1 would correspond to the Slang-generated VM implementation, right? ;-)</div>
<div><br>
</div>
<div>Best,</div>
<div>Christoph</div>
<div id="m_2874944391287748510Item.MessageUniqueBody" style="font-family:wf_segoe-ui_normal,"Segoe UI","Segoe WP",Tahoma,Arial,sans-serif,serif,EmojiFont">
<div dir="ltr">
<div id="m_2874944391287748510divtagdefaultwrapper"><font face="Calibri,Helvetica,sans-serif,EmojiFont,Apple Color Emoji,Segoe UI Emoji,NotoColorEmoji,Segoe UI Symbol,Android Emoji,EmojiSymbols">
<div id="m_2874944391287748510Signature">
<div style="margin:0px"><font style="font-family:Calibri,Arial,Helvetica,sans-serif,serif,EmojiFont"></font></div>
</div>
</font></div>
</div>
</div>
</div>
</div>
<div><font size="2" color="#808080"></font></div>
</div>
</div>
</div>
</div>
<hr style="display:inline-block;width:98%">
<div id="m_2874944391287748510divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>Von:</b> Squeak-dev <<a href="mailto:squeak-dev-bounces@lists.squeakfoundation.org" target="_blank">squeak-dev-bounces@lists.squeakfoundation.org</a>> im Auftrag von Taeumel, Marcel<br>
<b>Gesendet:</b> Dienstag, 8. Dezember 2020 13:44:09<br>
<b>An:</b> squeak-dev<br>
<b>Betreff:</b> Re: [squeak-dev] A discrepancy between bytecode execution and simulation</font>
<div> </div>
</div></div><div>
<div>
<div id="m_2874944391287748510__MailbirdStyleContent" style="font-size:10pt;font-family:Arial;color:#000000;text-align:left" dir="ltr">
Hi Christoph
<div><br>
</div>
<div>> [...] <span style="font-family:Calibri,Helvetica,sans-serif;font-size:16px">between simulation and production (btw did I choose the right terms for them? :)</span></div>
<div><span style="font-family:Calibri,Helvetica,sans-serif;font-size:16px"><br>
</span></div>
<div><span style="font-family:Calibri,Helvetica,sans-serif;font-size:16px">Since code simulation needs code execution, I think that "simulation" is a part of "execution".</span></div>
<div><span style="font-family:Calibri,Helvetica,sans-serif;font-size:16px"><br>
</span></div>
<div><span style="font-family:Calibri,Helvetica,sans-serif;font-size:16px">Maybe it makes sense to think in terms of "simulation depth"? In a non-debugging scenario, that "simulation depth" is 0 because no simulation code is executed. When you debug/simulate
 your application code, depth is 1. When you debug/simulate the simulation code, depth is 2. If one would construct deeper "simulate the simulating simulator" processes, depth can be greater than 2. :-)</span></div>
<div><span style="font-family:Calibri,Helvetica,sans-serif;font-size:16px"><br>
</span></div>
<div><span style="font-family:Calibri,Helvetica,sans-serif;font-size:16px">"Production" is then simulation depth 0. :-D</span></div>
<div><span style="font-family:Calibri,Helvetica,sans-serif;font-size:16px"><br>
</span></div>
<div><span style="font-family:Calibri,Helvetica,sans-serif;font-size:16px">Best,</span></div>
<div><span style="font-family:Calibri,Helvetica,sans-serif;font-size:16px">Marcel</span></div>
<div></div>
<blockquote type="cite" style="border-left-style:solid;border-width:1px;margin-top:20px;margin-left:0px;padding-left:10px;min-width:500px">
<p style="color:#aaaaaa;margin-top:10px">Am 07.12.2020 18:55:31 schrieb Thiede, Christoph <<a href="mailto:christoph.thiede@student.hpi.uni-potsdam.de" target="_blank">christoph.thiede@student.hpi.uni-potsdam.de</a>>:</p>
<div style="font-family:Arial,Helvetica,sans-serif">
<div id="m_2874944391287748510divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif" dir="ltr">
<p>Hi all, hi Eliot,</p>
<p><br>
</p>
<p>I constructed the following code snippet which evaluates to true when running it using the production execution machinery:</p>
<p><br>
</p>
<p>nil == thisContext pop</p>
<p><br>
</p>
<p>I guess this is fine, because what alternatives would the execution machinery have? It could terminate the whole VM or we could introduce something like #cannotReturn: for invalid stack frame objects. Probably the current implementation is the best despite
 an invalid position in the context stack has been addressed.</p>
<p><br>
</p>
<p>However, the simulation machinery treats the same snippet differently, and it throws:</p>
<p><br>
</p>
<p><span>Error: subscript is out of bounds: 0</span><br>
</p>
<p><span><br>
</span></p>
<p><span>I wonder whether it is acceptable to have diverging behaviors for such an ill-defined edge case between simulation and production (btw did I choose the right terms for them? :)). Might it a better alternative to raise a Warning (#notify:) only and
 then return nil such as the VM appears to do?</span></p>
<p><span><br>
</span></p>
<p><span>Best,</span></p>
<p><span>Christoph</span></p>
<div id="m_2874944391287748510Signature">
<div id="m_2874944391287748510divtagdefaultwrapper" dir="ltr" style="font-size:12pt;color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols">
<div name="divtagdefaultwrapper">
<div><span style="font-size:10pt;color:#808080"></span></div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
</div>
</div>

<br>
</blockquote></div></div>