<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hi Jaromir,<br>
<br>
On 1/22/2023 10:18 AM, Jaromir Matas via Cuis-dev wrote:
<blockquote
cite="mid:PH7PR12MB7987B2B5F4EC567CF0C6F3FFEECB9@PH7PR12MB7987.namprd12.prod.outlook.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<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:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:"Calibri Light";
panose-1:2 15 3 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
pre
{mso-style-priority:99;
mso-style-link:"HTML Preformatted Char";
margin:0in;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:"Courier New";
color:black;}
p.MsoNoSpacing, li.MsoNoSpacing, div.MsoNoSpacing
{mso-style-priority:1;
margin:0in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
span.HTMLPreformattedChar
{mso-style-name:"HTML Preformatted Char";
mso-style-priority:99;
mso-style-link:"HTML Preformatted";
font-family:"Courier New";
color:black;}
.MsoChpDefault
{mso-style-type:export-only;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style>
<div class="WordSection1">
<p class="MsoNormal">Hi Juan,</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Here’s a test illustrating the situation
described below, resulting in executing unwind blocks of a
process considered terminated by the current termination
semantics. I assume it’s no harm to keep this semantics; an
alternative would be to consider a process terminated iff the
suspended context is nil or all remaining contexts have their
pc atEnd. The downside of this approach would be that a
process found not terminated could not be simply resumed to
finish because there might be dangerous contexts with pc=nil
which could crash the vm when run.</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Best,</p>
<p class="MsoNoSpacing"><span lang="CS">--</span></p>
<p class="MsoNormal"><strong><span style="font-family:
"Calibri Light",sans-serif; color: rgb(51, 51,
51); font-weight: normal;">Jaromír Matas</span></strong><span
style="font-family: "Calibri Light",sans-serif;
color: rgb(85, 85, 85);"><o:p></o:p></span></p>
</div>
</blockquote>
<br>
I guess you are the first person to realize of this.<br>
<br>
I think that changing the semantics of #isTerminated or any other
such method is likely to break existing code, and create a
compatibility problem. Maybe we'd need to add a new possible state
to Process, and new testing selector(s).<br>
<br>
WRT the code in the message below, it looks OK AFAIK. It is now at
GitHub.<br>
<br>
<br>
Thanks!!!<br>
<br>
<blockquote
cite="mid:PH7PR12MB7987B2B5F4EC567CF0C6F3FFEECB9@PH7PR12MB7987.namprd12.prod.outlook.com"
type="cite">
<div class="WordSection1">
<p class="MsoNormal"><span style="color: rgb(143, 170, 220);"><o:p>
<br>
</o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div style="border-right: medium none; border-width: 1pt medium
medium; border-style: solid none none; border-color: rgb(225,
225, 225) -moz-use-text-color -moz-use-text-color; padding:
3pt 0in 0in;">
<p class="MsoNormal" style="border: medium none; padding:
0in;"><b>From: </b><a moz-do-not-send="true"
href="mailto:cuis-dev@lists.cuis.st">Jaromir Matas via
Cuis-dev</a><br>
<b>Sent: </b>Saturday, January 21, 2023 17:12<br>
<b>To: </b><a moz-do-not-send="true"
href="mailto:juan@cuis.st">Juan Vuletich</a>; <a
moz-do-not-send="true"
href="mailto:cuis-dev@lists.cuis.st">
Discussion of Cuis Smalltalk</a><br>
<b>Cc: </b><a moz-do-not-send="true"
href="mailto:mail@jaromir.net">Jaromir Matas</a><br>
<b>Subject: </b>Re: [Cuis-dev] Follow-up: #terminate and
#suspend update</p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Hi Juan,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thanks for your message.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I’m enclosing a test for isTerminated
documenting the current semantics.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">A few notes here:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">1) I’ve added MethodContext>>#endpc
as an analogue to MethodContext>>#startpc but could you
please doublecheck it’s ok? I could have used a temp var
assignment "endpc := self closure startpc + self closure size
- 1" instead but it seemed a bit awkward.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">2) Currently we consider contexts with
pc=nil as a sign of terminated processes. In theory a context
with pc=nil can still contain a relevant unexecuted code, e.g.
unwind blocks:
<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Example: if you terminate a “terminated”
process with an unexecuted unwind block(s) and pc=nil in the
suspended context (or below in the sender chain) the unwind
block(s) will get executed – which may be perfectly
appropriate but sounds a bit unexpected. I know these are
wildly hypothetical scenarios but I just wanted to make you
aware.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Best,<o:p></o:p></p>
<p class="MsoNormal">Jaromir<o:p></o:p></p>
<br>
</div>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Juan Vuletich
cuis.st
github.com/jvuletich
researchgate.net/profile/Juan-Vuletich
independent.academia.edu/JuanVuletich
patents.justia.com/inventor/juan-manuel-vuletich
linkedin.com/in/juan-vuletich-75611b3
twitter.com/JuanVuletich</pre>
</body>
</html>