{"id":5850,"date":"2024-06-27T13:45:44","date_gmt":"2024-06-27T11:45:44","guid":{"rendered":"https:\/\/oopm.org\/?page_id=5850"},"modified":"2025-01-12T13:39:36","modified_gmt":"2025-01-12T12:39:36","slug":"2-8-1-the-program-execution","status":"publish","type":"page","link":"https:\/\/oopm.org\/?page_id=5850","title":{"rendered":"2.9 The program execution"},"content":{"rendered":"<div class=\"pdfprnt-buttons pdfprnt-buttons-page pdfprnt-top-right\"><a href=\"https:\/\/oopm.org\/index.php?rest_route=wpv2pages5850&print=pdf\" class=\"pdfprnt-button pdfprnt-button-pdf\" target=\"_blank\"><img decoding=\"async\" src=\"https:\/\/oopm.org\/wp-content\/plugins\/pdf-print\/images\/pdf.png\" alt=\"image_pdf\" title=\"View PDF\" \/><\/a><a href=\"https:\/\/oopm.org\/index.php?rest_route=wpv2pages5850&print=print\" class=\"pdfprnt-button pdfprnt-button-print\" target=\"_blank\"><img decoding=\"async\" src=\"https:\/\/oopm.org\/wp-content\/plugins\/pdf-print\/images\/print.png\" alt=\"image_print\" title=\"Print Content\" \/><\/a><\/div>\n<style>\ncode{\n     font-size: 0.85em;\n}\n<\/style>\n\n\n\n<p class=\"wp-block-paragraph\">The general theme in this book is that programming is modeling and that the model is the dynamic system of objects generated in a computer when executing a program describing the model &#8211; referred to as the <em>program execution<\/em>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It is thus important to understand what goes on in a program execution. In the previous sections, we have shown program text and corresponding diagrams described by a given program, but these are <em>static<\/em> descriptions of the program execution.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">We have also shown snapshots of objects as they may appear in a program execution. Such diagrams illustrate snapshots of the state of an object during <em>program execution<\/em>, and they thus illustrate part of the dynamic structure of a program execution.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The <em>state<\/em> of a program execution at a given point in time is:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The <em>set of objects<\/em> (including method objects) in the program execution.<\/li>\n\n\n\n<li>The <em>datums<\/em> currently hold by objects in the program execution\n<ul class=\"wp-block-list\">\n<li>A <em>datum<\/em> may be a <em>reference<\/em> to an object or a <em>value<\/em>. For a further description of datum, value and reference see chapter<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-custom-color-3-color\"> <script>mkRef(\"Data items\");<\/script><\/mark><\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>The <em>stage of execution<\/em> &#8211; the state of the activities currently taking place in the program execution.\n<ul class=\"wp-block-list\">\n<li>Below we explain what exactly is meant by stage of execution.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">In general, a <em>snapshot<\/em> of a program execution is part of the state of the program execution at a particular point in time. The term snapshot is used as an analogy to that a in photography.<\/p>\n<\/blockquote>\n\n\n\n<p class=\"wp-block-paragraph\">In this section, we introduce diagrams for showing snapshots that further illustrate the dynamic structure of a program execution including the state of objects, method objects and method invocations. As these diagrams include state of objects, they are called <em>Object-Sequence Diagrams<\/em> (<em>OSD<\/em>). In addition to object diagrams, they illustrate method invocations.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">We use the object <code>mySecondProgram<\/code> from the previous section. The diagram below shows a snapshot at the following point of the execution of <code>mySecondProgram<\/code>:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The computer-system object <code>VM<\/code> has invoked the <code>mySecondProgram<\/code> object. As mentioned before, an invocation of an object implies generation of the object and execution of its statements.<\/li>\n\n\n\n<li><code>mySecondProgram<\/code> has invoked the <code>handle<\/code> method of <code>clerk<\/code>.<\/li>\n\n\n\n<li>The <code>clerk<\/code> has invoked <code>deposit<\/code> on <code>account_1010<\/code>.<\/li>\n<\/ul>\n\n\n\n<style>\n#VM {\n  width: 45%;\n  padding-left: 15px;\n  margin-left: 15px;\n   float: right;\n  background-color: lightgray;\n  font-size: 0.8em\n}\n<\/style>\n<div id=\"VM\">As mentioned in <script>mkRef(\"Introduction\");<\/script>, the abbreviation VM stands for Virtual Machine, which is the component in the computer system that takes care of executing qBeta programs.<\/div>\n\n\n\n<p class=\"wp-block-paragraph\">As said, <code>VM<\/code> is an object that is generated by the computer-system with the purpose of initiating execution of <code>mySecondProgram<\/code>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">As mentioned, the symbols <code>-\"-<\/code> stands for code, which has been shown in previous examples &#8211; see chapter <script>mkRef(\"Notation\");<\/script>.<\/p>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-7387b849 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<pre class=\"wp-block-code\"><code>mySecondProgram: <strong>obj<\/strong>\n   aClerk: <strong>obj<\/strong>\n      handle:\n         newBalance :=\n                 account_1010.deposit(100)   \n      -\"-\n   account_1010: <strong>obj<\/strong>\n      -\"-\n      deposit(amount: var float):\n<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-custom-color-3-color\">--&gt; <\/mark>     balance := balance + amount \n      -\"-\n   aClerk.handle  <\/code><\/pre>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-image size-large\"><img fetchpriority=\"high\" decoding=\"async\" width=\"1024\" height=\"534\" src=\"https:\/\/oopm.org\/wp-content\/uploads\/2024\/10\/mySecondProgram_1-1024x534.png\" alt=\"\" class=\"wp-image-8369\" srcset=\"https:\/\/oopm.org\/wp-content\/uploads\/2024\/10\/mySecondProgram_1-1024x534.png 1024w, https:\/\/oopm.org\/wp-content\/uploads\/2024\/10\/mySecondProgram_1-300x156.png 300w, https:\/\/oopm.org\/wp-content\/uploads\/2024\/10\/mySecondProgram_1-768x400.png 768w, https:\/\/oopm.org\/wp-content\/uploads\/2024\/10\/mySecondProgram_1.png 1132w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/div>\n<\/div>\n\n\n\n<p class=\"wp-block-paragraph\">The four columns of the diagram represent the four objects, <code>VM<\/code>, <code>mySecondProgram<\/code>, <code>clerk<\/code> and <code>account_1010<\/code>. The vertical lines from these objects are called <em>lifelines<\/em> and represents time as seen by the object. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A method invocation is shown as an arrow from the lifeline of the invoker object to the lifeline of the context of the method. The arrows are labeled by the name of the method being invoked.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The arrow from <code>VM<\/code> to <code>mySecondProgram<\/code> has no method label. Such an arrow represents the following situation.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The invoker (in this case <code>VM<\/code>) has generated<mark style=\"background-color:rgba(0, 0, 0, 0);color:#41339f\" class=\"has-inline-color\"> <\/mark>the <code>mySecondProgram<\/code> object;<\/li>\n\n\n\n<li>the generation of the <code>mySecondProgram<\/code> Object implies generation of the <code>aClerk<\/code> object and the <code>account_1010<\/code> object;<\/li>\n\n\n\n<li>Execution the <code>mySecondProgram<\/code> object, i.e. execution of <code>aClerk.handle<\/code>.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">The arrow from <code>VM<\/code> to <code>mySecondProgram<\/code> is above the arrow from <code>clerk.handle<\/code>, which is above the arrow for <code>account.deposit(100)<\/code>, illustrating the order in time of these method invocations.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Generation of objects<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">In the next snapshots, we show the generation of the objects during program execution.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The snapshot below shows the situation after <code>VM<\/code> has generated the object <code>mySecondProgram<\/code>. The local objects <code>aClerk<\/code> and <code>account_1010<\/code> are generated as part of the generation of <code>mySecondProgram<\/code>. The red arrow (<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-custom-color-3-color\">&#8211;&gt;<\/mark>) before <code>aClerk<\/code>, illustrates that the next object to be generated is <code>aClerk<\/code>:<\/p>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-7387b849 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:58%\">\n<pre class=\"wp-block-code\"><code><code>mySecondProgram<span style=\"font-family: inherit; font-size: inherit;\">: <\/span><strong style=\"font-family: inherit; font-size: inherit;\">obj<\/strong><\/code><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-custom-color-3-color\">--&gt; <\/mark>aClerk: <strong>obj<\/strong>  \n       -\"-\n    account_1010: <strong>obj<\/strong>\n       -\"-\n    -\"- <\/code><\/pre>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:42%\">\n<figure class=\"wp-block-image size-full is-resized\"><img decoding=\"async\" width=\"560\" height=\"318\" src=\"https:\/\/oopm.org\/wp-content\/uploads\/2024\/10\/mySecondProgram_2.png\" alt=\"\" class=\"wp-image-8851\" style=\"width:268px;height:auto\" srcset=\"https:\/\/oopm.org\/wp-content\/uploads\/2024\/10\/mySecondProgram_2.png 560w, https:\/\/oopm.org\/wp-content\/uploads\/2024\/10\/mySecondProgram_2-300x170.png 300w\" sizes=\"(max-width: 560px) 100vw, 560px\" \/><\/figure>\n<\/div>\n<\/div>\n\n\n\n<p class=\"wp-block-paragraph\">The next snapshot shows the situation after <code>aClerk<\/code> has been generated. The red arrow is positioned at the beginning of the items in <code>aClerk<\/code>, but since <code>aClerk<\/code> has no local objects no more objects are generated here:<\/p>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-7387b849 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:58%\">\n<pre class=\"wp-block-code\"><code><code>mySecondProgram<span style=\"font-family: inherit; font-size: inherit;\">: <\/span><strong style=\"font-family: inherit; font-size: inherit;\">obj<\/strong><\/code><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-custom-color-3-color\">    <\/mark>aClerk: <strong>obj<\/strong>  \n<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-custom-color-3-color\">--&gt;<\/mark>    -\"-\n    account_1010: <strong>obj<\/strong>\n       -\"-\n    -\"- <\/code><\/pre>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:42%\">\n<figure class=\"wp-block-image size-full is-resized\"><img decoding=\"async\" width=\"712\" height=\"318\" src=\"https:\/\/oopm.org\/wp-content\/uploads\/2024\/10\/mySecondProgram_3.png\" alt=\"\" class=\"wp-image-8854\" style=\"width:374px;height:auto\" srcset=\"https:\/\/oopm.org\/wp-content\/uploads\/2024\/10\/mySecondProgram_3.png 712w, https:\/\/oopm.org\/wp-content\/uploads\/2024\/10\/mySecondProgram_3-300x134.png 300w\" sizes=\"(max-width: 712px) 100vw, 712px\" \/><\/figure>\n<\/div>\n<\/div>\n\n\n\n<p class=\"wp-block-paragraph\">The situation here is after generation of <code>aClerk<\/code> has returned to <code>mySecondProgram<\/code> and the next object to be generated is <code>account_1010<\/code>;<\/p>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-7387b849 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:58%\">\n<pre class=\"wp-block-code\"><code><code>mySecondProgram<span style=\"font-family: inherit; font-size: inherit;\">: <\/span><strong style=\"font-family: inherit; font-size: inherit;\">obj<\/strong><\/code><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-custom-color-3-color\">    <\/mark>aClerk: <strong>obj<\/strong>  \n       -\"-\n<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-custom-color-3-color\">--&gt;<\/mark> account_1010: <strong>obj<\/strong>\n       -\"-\n    -\"- <\/code><\/pre>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:42%\">\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"712\" height=\"318\" src=\"https:\/\/oopm.org\/wp-content\/uploads\/2024\/10\/mySecondProgram_4.png\" alt=\"\" class=\"wp-image-8857\" style=\"width:352px;height:auto\" srcset=\"https:\/\/oopm.org\/wp-content\/uploads\/2024\/10\/mySecondProgram_4.png 712w, https:\/\/oopm.org\/wp-content\/uploads\/2024\/10\/mySecondProgram_4-300x134.png 300w\" sizes=\"(max-width: 712px) 100vw, 712px\" \/><\/figure>\n<\/div>\n<\/div>\n\n\n\n<p class=\"wp-block-paragraph\">This snapshot shows the situation after <code>account_1010<\/code> has been generated:<\/p>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-7387b849 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<pre class=\"wp-block-code\"><code><code>mySecondProgram<span style=\"font-family: inherit; font-size: inherit;\">: <\/span><strong style=\"font-family: inherit; font-size: inherit;\">obj<\/strong><\/code><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-custom-color-3-color\">    <\/mark>aClerk: <strong>obj<\/strong>  \n       -\"-\n    account_1010: <strong>obj<\/strong>\n<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-custom-color-3-color\">--&gt;<\/mark>    -\"-\n    -\"- <\/code><\/pre>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:42%\">\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"836\" height=\"318\" src=\"https:\/\/oopm.org\/wp-content\/uploads\/2024\/10\/mySecondProgram_5-2.png\" alt=\"\" class=\"wp-image-8858\" style=\"width:376px;height:auto\" srcset=\"https:\/\/oopm.org\/wp-content\/uploads\/2024\/10\/mySecondProgram_5-2.png 836w, https:\/\/oopm.org\/wp-content\/uploads\/2024\/10\/mySecondProgram_5-2-300x114.png 300w, https:\/\/oopm.org\/wp-content\/uploads\/2024\/10\/mySecondProgram_5-2-768x292.png 768w\" sizes=\"(max-width: 836px) 100vw, 836px\" \/><\/figure>\n<\/div>\n<\/div>\n\n\n\n<p class=\"wp-block-paragraph\">The situation here is after generation of <code>account_1010<\/code> has returned to <code>mySecondProgram<\/code> and generation of <code>mySecondProgram<\/code> has been completed:<\/p>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-7387b849 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<pre class=\"wp-block-code\"><code><code>mySecondProgram<span style=\"font-family: inherit; font-size: inherit;\">: obj<\/span><\/code>    aClerk: obj  \n       -\"-\n    account_1010: obj\n       -\"-\n<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-custom-color-3-color\">--&gt;<\/mark> -\"-<\/code><\/pre>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:42%\">\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"836\" height=\"318\" src=\"https:\/\/oopm.org\/wp-content\/uploads\/2024\/10\/mySecondProgram_6.png\" alt=\"\" class=\"wp-image-8861\" style=\"width:392px;height:auto\" srcset=\"https:\/\/oopm.org\/wp-content\/uploads\/2024\/10\/mySecondProgram_6.png 836w, https:\/\/oopm.org\/wp-content\/uploads\/2024\/10\/mySecondProgram_6-300x114.png 300w, https:\/\/oopm.org\/wp-content\/uploads\/2024\/10\/mySecondProgram_6-768x292.png 768w\" sizes=\"(max-width: 836px) 100vw, 836px\" \/><\/figure>\n<\/div>\n<\/div>\n\n\n\n<p class=\"wp-block-paragraph\">The situation here is after generation of <code>mySecondProgram<\/code> has returned to <code>VM<\/code> and generation of <code>mySecondProgram<\/code> has been completed:<\/p>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-7387b849 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<pre class=\"wp-block-code\"><code><code>mySecondProgram<span style=\"font-family: inherit; font-size: inherit;\">: <\/span><strong style=\"font-family: inherit; font-size: inherit;\">obj<\/strong><\/code><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-custom-color-3-color\"> <\/mark>   aClerk: <strong>obj<\/strong>  \n       -\"-\n    account_1010: <strong>obj<\/strong>\n       -\"-\n    aClerk.handle\n<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-custom-color-3-color\">--&gt;<\/mark><\/code><\/pre>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:38.4%\">\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"602\" height=\"318\" src=\"https:\/\/oopm.org\/wp-content\/uploads\/2024\/10\/mySecondProgram_7.png\" alt=\"\" class=\"wp-image-8863\" style=\"width:282px;height:auto\" srcset=\"https:\/\/oopm.org\/wp-content\/uploads\/2024\/10\/mySecondProgram_7.png 602w, https:\/\/oopm.org\/wp-content\/uploads\/2024\/10\/mySecondProgram_7-300x158.png 300w\" sizes=\"(max-width: 602px) 100vw, 602px\" \/><\/figure>\n<\/div>\n<\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Execution of statements<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The next snapshots show how the execution of statements in <code>mySecondProgram<\/code> takes place.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The snapshot below shows the situation just before statements in <code>mySecondProgram<\/code> are executed. As mentioned before, the line with arrow with no method from <code>VM<\/code> to <code>mySecondProgram<\/code> illustrates that<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-custom-color-3-color\"> <\/mark><code>v<\/code> has been generated by <code>VM<\/code>. The snapshot shows the situation before invocation of <code>clerk.handle<\/code> in <code><code>mySecondProgram<\/code><\/code>:<\/p>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-7387b849 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<pre class=\"wp-block-code\"><code><code>mySecondProgram<span style=\"font-family: inherit; font-size: inherit;\">: <strong>obj<\/strong><\/span><\/code>    aClerk: obj  \n       -\"-\n    account_1010: <strong>obj<\/strong>\n       -\"-\n<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-custom-color-3-color\">--&gt;<\/mark> aClerk.handle<\/code><\/pre>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"602\" height=\"318\" src=\"https:\/\/oopm.org\/wp-content\/uploads\/2024\/10\/mySecondProgram_8.png\" alt=\"\" class=\"wp-image-8865\" style=\"width:322px;height:auto\" srcset=\"https:\/\/oopm.org\/wp-content\/uploads\/2024\/10\/mySecondProgram_8.png 602w, https:\/\/oopm.org\/wp-content\/uploads\/2024\/10\/mySecondProgram_8-300x158.png 300w\" sizes=\"(max-width: 602px) 100vw, 602px\" \/><\/figure>\n<\/div>\n<\/div>\n\n\n\n<p class=\"wp-block-paragraph\">Snapshot when <code>clerk.handle<\/code> has been invoked; before first statement in <code>handle<\/code>:<\/p>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-7387b849 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<pre class=\"wp-block-code\"><code><code>mySecondProgram<span style=\"font-family: inherit; font-size: inherit;\">: <strong>obj<\/strong><\/span><\/code>    aClerk: <strong>obj<\/strong>  \n       newBalance: <strong>var<\/strong> float\n<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-custom-color-3-color\">--&gt;<\/mark>    newBalance := \n                account_1010.deposit(100)  \n       -\"-\n    account_1010: <strong>obj<\/strong>\n       -\"-\n<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-custom-color-3-color\">   <\/mark> aClerk.handle<\/code><\/pre>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"758\" height=\"318\" src=\"https:\/\/oopm.org\/wp-content\/uploads\/2024\/10\/mySecondProgram_9.png\" alt=\"\" class=\"wp-image-8868\" style=\"width:403px;height:auto\" srcset=\"https:\/\/oopm.org\/wp-content\/uploads\/2024\/10\/mySecondProgram_9.png 758w, https:\/\/oopm.org\/wp-content\/uploads\/2024\/10\/mySecondProgram_9-300x126.png 300w\" sizes=\"(max-width: 758px) 100vw, 758px\" \/><\/figure>\n<\/div>\n<\/div>\n\n\n\n<p class=\"wp-block-paragraph\">Snapshot when <code>account_1010.deposit<\/code> has been invoked, but before execution of the statement:<\/p>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-7387b849 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<pre class=\"wp-block-code\"><code><code>mySecondProgram<span style=\"font-family: inherit; font-size: inherit;\">: <strong>obj<\/strong><\/span><\/code>    aClerk: <strong>obj<\/strong>\n    -\"-\n    account_1010: <strong>obj<\/strong>\n       deposit(amount: <strong>var<\/strong> float):\n<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-custom-color-3-color\">--&gt;<\/mark>       balance := balance + amount\n       -\"-\n<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-custom-color-3-color\">   <\/mark> aClerk.handle<\/code><\/pre>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"998\" height=\"318\" src=\"https:\/\/oopm.org\/wp-content\/uploads\/2024\/10\/mySecondProgram_10-1.png\" alt=\"\" class=\"wp-image-8870\" srcset=\"https:\/\/oopm.org\/wp-content\/uploads\/2024\/10\/mySecondProgram_10-1.png 998w, https:\/\/oopm.org\/wp-content\/uploads\/2024\/10\/mySecondProgram_10-1-300x96.png 300w, https:\/\/oopm.org\/wp-content\/uploads\/2024\/10\/mySecondProgram_10-1-768x245.png 768w\" sizes=\"(max-width: 998px) 100vw, 998px\" \/><\/figure>\n<\/div>\n<\/div>\n\n\n\n<p class=\"wp-block-paragraph\">Return from <code>deposit<\/code>:<\/p>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-7387b849 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<p class=\"wp-block-paragraph\"><\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"998\" height=\"376\" src=\"https:\/\/oopm.org\/wp-content\/uploads\/2024\/10\/mySecondProgram_11-1.png\" alt=\"\" class=\"wp-image-8871\" srcset=\"https:\/\/oopm.org\/wp-content\/uploads\/2024\/10\/mySecondProgram_11-1.png 998w, https:\/\/oopm.org\/wp-content\/uploads\/2024\/10\/mySecondProgram_11-1-300x113.png 300w, https:\/\/oopm.org\/wp-content\/uploads\/2024\/10\/mySecondProgram_11-1-768x289.png 768w\" sizes=\"(max-width: 998px) 100vw, 998px\" \/><\/figure>\n<\/div>\n<\/div>\n\n\n\n<p class=\"wp-block-paragraph\">Next <code>account_1010.deposit(225)<\/code> is executed, but no snapshots are shown since they are similar to the above two.<\/p>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-7387b849 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<p class=\"wp-block-paragraph\">These two snapshots show invocation and return of <code>addInterest<\/code>.<\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"352\" src=\"https:\/\/oopm.org\/wp-content\/uploads\/2024\/10\/mySecondProgram_12-1-1024x352.png\" alt=\"\" class=\"wp-image-8873\" srcset=\"https:\/\/oopm.org\/wp-content\/uploads\/2024\/10\/mySecondProgram_12-1-1024x352.png 1024w, https:\/\/oopm.org\/wp-content\/uploads\/2024\/10\/mySecondProgram_12-1-300x103.png 300w, https:\/\/oopm.org\/wp-content\/uploads\/2024\/10\/mySecondProgram_12-1-768x264.png 768w, https:\/\/oopm.org\/wp-content\/uploads\/2024\/10\/mySecondProgram_12-1.png 1094w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"352\" src=\"https:\/\/oopm.org\/wp-content\/uploads\/2024\/10\/mySecondProgram_13-1-1024x352.png\" alt=\"\" class=\"wp-image-8875\" srcset=\"https:\/\/oopm.org\/wp-content\/uploads\/2024\/10\/mySecondProgram_13-1-1024x352.png 1024w, https:\/\/oopm.org\/wp-content\/uploads\/2024\/10\/mySecondProgram_13-1-300x103.png 300w, https:\/\/oopm.org\/wp-content\/uploads\/2024\/10\/mySecondProgram_13-1-768x264.png 768w, https:\/\/oopm.org\/wp-content\/uploads\/2024\/10\/mySecondProgram_13-1.png 1094w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-7387b849 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<p class=\"wp-block-paragraph\">These two snapshots show invocation and return of <code>withdraw<\/code>.<\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"352\" src=\"https:\/\/oopm.org\/wp-content\/uploads\/2024\/10\/mySecondProgram_14-1-1024x352.png\" alt=\"\" class=\"wp-image-8879\" srcset=\"https:\/\/oopm.org\/wp-content\/uploads\/2024\/10\/mySecondProgram_14-1-1024x352.png 1024w, https:\/\/oopm.org\/wp-content\/uploads\/2024\/10\/mySecondProgram_14-1-300x103.png 300w, https:\/\/oopm.org\/wp-content\/uploads\/2024\/10\/mySecondProgram_14-1-768x264.png 768w, https:\/\/oopm.org\/wp-content\/uploads\/2024\/10\/mySecondProgram_14-1.png 1094w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"352\" src=\"https:\/\/oopm.org\/wp-content\/uploads\/2024\/10\/mySecondProgram_15-1-1024x352.png\" alt=\"\" class=\"wp-image-8881\" srcset=\"https:\/\/oopm.org\/wp-content\/uploads\/2024\/10\/mySecondProgram_15-1-1024x352.png 1024w, https:\/\/oopm.org\/wp-content\/uploads\/2024\/10\/mySecondProgram_15-1-300x103.png 300w, https:\/\/oopm.org\/wp-content\/uploads\/2024\/10\/mySecondProgram_15-1-768x264.png 768w, https:\/\/oopm.org\/wp-content\/uploads\/2024\/10\/mySecondProgram_15-1.png 1094w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-7387b849 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<p class=\"wp-block-paragraph\">This snapshot shows return from <code>console.print<\/code>.<\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"352\" src=\"https:\/\/oopm.org\/wp-content\/uploads\/2024\/10\/mySecondProgram_16-1-1024x352.png\" alt=\"\" class=\"wp-image-8882\" srcset=\"https:\/\/oopm.org\/wp-content\/uploads\/2024\/10\/mySecondProgram_16-1-1024x352.png 1024w, https:\/\/oopm.org\/wp-content\/uploads\/2024\/10\/mySecondProgram_16-1-300x103.png 300w, https:\/\/oopm.org\/wp-content\/uploads\/2024\/10\/mySecondProgram_16-1-768x264.png 768w, https:\/\/oopm.org\/wp-content\/uploads\/2024\/10\/mySecondProgram_16-1.png 1094w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-7387b849 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<p class=\"wp-block-paragraph\">Finally, <code>aClerk<\/code> has no more statements to execute, and this snapshot shows the return from <code>handle<\/code>.<\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"770\" height=\"376\" src=\"https:\/\/oopm.org\/wp-content\/uploads\/2024\/10\/mySecondProgram_17-1.png\" alt=\"\" class=\"wp-image-8890\" style=\"width:344px;height:auto\" srcset=\"https:\/\/oopm.org\/wp-content\/uploads\/2024\/10\/mySecondProgram_17-1.png 770w, https:\/\/oopm.org\/wp-content\/uploads\/2024\/10\/mySecondProgram_17-1-300x146.png 300w, https:\/\/oopm.org\/wp-content\/uploads\/2024\/10\/mySecondProgram_17-1-768x375.png 768w\" sizes=\"(max-width: 770px) 100vw, 770px\" \/><\/figure>\n<\/div>\n<\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Termination<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">After return from <code>handle<\/code>, <code>mySecondProgram<\/code> there is no more statement; <code>mySecondProgram<\/code> returns to <code>VM<\/code> and execution is terminated.<\/p>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-7387b849 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"568\" height=\"376\" src=\"https:\/\/oopm.org\/wp-content\/uploads\/2024\/10\/mySecondProgram_18-1.png\" alt=\"\" class=\"wp-image-8892\" srcset=\"https:\/\/oopm.org\/wp-content\/uploads\/2024\/10\/mySecondProgram_18-1.png 568w, https:\/\/oopm.org\/wp-content\/uploads\/2024\/10\/mySecondProgram_18-1-300x199.png 300w\" sizes=\"(max-width: 568px) 100vw, 568px\" \/><\/figure>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"240\" height=\"376\" src=\"https:\/\/oopm.org\/wp-content\/uploads\/2024\/10\/mySecondProgram_19-1.png\" alt=\"\" class=\"wp-image-8894\" style=\"width:135px;height:auto\" srcset=\"https:\/\/oopm.org\/wp-content\/uploads\/2024\/10\/mySecondProgram_19-1.png 240w, https:\/\/oopm.org\/wp-content\/uploads\/2024\/10\/mySecondProgram_19-1-191x300.png 191w\" sizes=\"(max-width: 240px) 100vw, 240px\" \/><\/figure>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\"><\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-7387b849 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<p class=\"wp-block-paragraph\">Return from <code>mySecondProgram<\/code>.<\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<p class=\"wp-block-paragraph\">Execution of <code>mySecondProgram<\/code> has terminated.<\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\"><\/div>\n<\/div>\n\n\n\n<p class=\"wp-block-paragraph\">As said above, the lifelines and arrows showing method invocations represents how actions are ordered in time. The ordering of the objects in the columns does not matter, but usually a diagram may be more readable if the ordering in time flows from left to right to the extent that this is possible.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">The stage of execution<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The stage of execution includes the objects and method objects currently executing actions as described below. <\/p>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-7387b849 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:50%\">\n<p class=\"wp-block-paragraph\">The horizontal lines in the diagrams show the active method objects and\/or objects of the program execution. For the snapshot here, these are:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code>VM<span style=\"font-family: inherit; font-size: inherit;\">; mySecondProgram; handle; deposit<\/span><\/code><\/code><\/pre>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:50%\">\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"998\" height=\"318\" src=\"https:\/\/oopm.org\/wp-content\/uploads\/2024\/10\/mySecondProgram_10-2.png\" alt=\"\" class=\"wp-image-8884\" style=\"width:524px;height:auto\" srcset=\"https:\/\/oopm.org\/wp-content\/uploads\/2024\/10\/mySecondProgram_10-2.png 998w, https:\/\/oopm.org\/wp-content\/uploads\/2024\/10\/mySecondProgram_10-2-300x96.png 300w, https:\/\/oopm.org\/wp-content\/uploads\/2024\/10\/mySecondProgram_10-2-768x245.png 768w\" sizes=\"(max-width: 998px) 100vw, 998px\" \/><\/figure>\n<\/div>\n<\/div>\n\n\n\n<p class=\"wp-block-paragraph\">As said <code>VM<\/code> is executing <code>mySecondProgram<\/code>; <code>mySecondProgram<\/code> is executing <code>handle<\/code>; and <code>handle<\/code> is executing <code>deposit<\/code>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">As can be seen, the active objects may include objects like <code>mySecondProgram<\/code> and method objects like <code>handle<\/code> and <code>deposit<\/code>. <em>Below the term object also covers method object<\/em>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The active objects are often referred to as the <em>invocation stack<\/em>, <em>execution stack<\/em> or just <em>stack<\/em>. The <em>top <\/em>element of a stack is the object that has been invoked last. The <em>bottom<\/em> element is the first object being invoked. In the figure above, <code>deposit<\/code> is on top of the stack and <code>VM<\/code> is the bottom of the stack.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The term stack comes from the fact that a new invocation is always made from the top element, and this new object must return to the previous top object before the previous top object can return. That is, the last object on the stack is the first to return.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In general, a stack is a data-structure that may contain a collection of objects where you may insert and remove objects. Insertion is called <em>push<\/em> and removal is called <em>pop<\/em>. Elements are pushed on top of the stack which means that when you pop an element, you get the one that has been pushed latest. We further explain stacks in section <script>mkRef(\"Cooperative coroutines\");<\/script>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The active objects on the stack have a <em>local sequence control<\/em> (LSC), which points to the next statement to be executed:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>For the object top of the stack, its LSC points to the next statement to be executed.<\/li>\n\n\n\n<li>For an object, that has invoked a method, its LSC points to the statement\/action to be executed when the method returns.<\/li>\n\n\n\n<li>Each object has an implicit statement\/action at the very end, which when executed returns to its invoker.<\/li>\n<\/ul>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">The <em>stage of execution<\/em> at a given point in time is thus the current stack including the LSC&#8217;s of the active objects on the stack. <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-custom-color-3-color\"><br><\/mark><\/p>\n<\/blockquote>\n\n\n\n<h2 class=\"wp-block-heading\">Inspecting objects<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">It is possible to inspect the state of the objects and method activations as illustrated by the next diagram:<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"672\" src=\"https:\/\/oopm.org\/wp-content\/uploads\/2024\/10\/mySecondProgram_20-2-1024x672.png\" alt=\"\" class=\"wp-image-8896\" style=\"width:490px;height:auto\" srcset=\"https:\/\/oopm.org\/wp-content\/uploads\/2024\/10\/mySecondProgram_20-2-1024x672.png 1024w, https:\/\/oopm.org\/wp-content\/uploads\/2024\/10\/mySecondProgram_20-2-300x197.png 300w, https:\/\/oopm.org\/wp-content\/uploads\/2024\/10\/mySecondProgram_20-2-768x504.png 768w, https:\/\/oopm.org\/wp-content\/uploads\/2024\/10\/mySecondProgram_20-2.png 1124w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">In this snapshot, the <code>Account_1010<\/code> object and the <code>deposit<\/code> invocation have been expanded, and we may thus see the datums of these objects at this point of execution.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The <code>amount<\/code> parameter of <code>deposit<\/code> has the value 100.00; the return value <code>newB<\/code> has the value 0.00.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For <code>Account_1010,<\/code> the value of <code>owner<\/code> is the <code>String<\/code> <code>\"John Smith\"<\/code>; the value of <code>balance<\/code> is 0.00 and the value of <code>interestRate<\/code> is 0.70.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The next snapshot shows the state at the return of <code>deposit<\/code>. Here we can see that the <code>balance<\/code> of <code>Account_1010<\/code> has been updated to 100.00 and that <code>newB<\/code> of <code>deposit<\/code> also has the value 100.00.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"672\" src=\"https:\/\/oopm.org\/wp-content\/uploads\/2024\/10\/mySecondProgram_21-1-1024x672.png\" alt=\"\" class=\"wp-image-8898\" style=\"width:509px;height:auto\" srcset=\"https:\/\/oopm.org\/wp-content\/uploads\/2024\/10\/mySecondProgram_21-1-1024x672.png 1024w, https:\/\/oopm.org\/wp-content\/uploads\/2024\/10\/mySecondProgram_21-1-300x197.png 300w, https:\/\/oopm.org\/wp-content\/uploads\/2024\/10\/mySecondProgram_21-1-768x504.png 768w, https:\/\/oopm.org\/wp-content\/uploads\/2024\/10\/mySecondProgram_21-1.png 1124w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The next snapshot shows the state at the return of <code>addInterest<\/code> and the <code>balance<\/code> is now 327.27.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"672\" src=\"https:\/\/oopm.org\/wp-content\/uploads\/2024\/10\/mySecondProgram_22-1-1024x672.png\" alt=\"\" class=\"wp-image-8899\" style=\"width:551px;height:auto\" srcset=\"https:\/\/oopm.org\/wp-content\/uploads\/2024\/10\/mySecondProgram_22-1-1024x672.png 1024w, https:\/\/oopm.org\/wp-content\/uploads\/2024\/10\/mySecondProgram_22-1-300x197.png 300w, https:\/\/oopm.org\/wp-content\/uploads\/2024\/10\/mySecondProgram_22-1-768x504.png 768w, https:\/\/oopm.org\/wp-content\/uploads\/2024\/10\/mySecondProgram_22-1.png 1124w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The final snapshot shows the state at the return of the <code>withdraw<\/code> made by the <code>clerk<\/code> before invoking <code>console.print<\/code>. As can be seen, the <code>balance<\/code> is 216.27.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"672\" src=\"https:\/\/oopm.org\/wp-content\/uploads\/2024\/10\/mySecondProgram_23-1-1024x672.png\" alt=\"\" class=\"wp-image-8900\" style=\"width:548px;height:auto\" srcset=\"https:\/\/oopm.org\/wp-content\/uploads\/2024\/10\/mySecondProgram_23-1-1024x672.png 1024w, https:\/\/oopm.org\/wp-content\/uploads\/2024\/10\/mySecondProgram_23-1-300x197.png 300w, https:\/\/oopm.org\/wp-content\/uploads\/2024\/10\/mySecondProgram_23-1-768x504.png 768w, https:\/\/oopm.org\/wp-content\/uploads\/2024\/10\/mySecondProgram_23-1.png 1124w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The above snapshots just show the active method invocations. Sometimes one may want to show (a subset of ) previous method invocations. The next diagram shows the history of all method invocations performed by the <code>clerk<\/code> on <code>account_1010<\/code>.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"672\" src=\"https:\/\/oopm.org\/wp-content\/uploads\/2024\/10\/mySecondProgram_24-1-1024x672.png\" alt=\"\" class=\"wp-image-8903\" style=\"width:532px;height:auto\" srcset=\"https:\/\/oopm.org\/wp-content\/uploads\/2024\/10\/mySecondProgram_24-1-1024x672.png 1024w, https:\/\/oopm.org\/wp-content\/uploads\/2024\/10\/mySecondProgram_24-1-300x197.png 300w, https:\/\/oopm.org\/wp-content\/uploads\/2024\/10\/mySecondProgram_24-1-768x504.png 768w, https:\/\/oopm.org\/wp-content\/uploads\/2024\/10\/mySecondProgram_24-1.png 1124w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The OSD&#8217;s being used in this book are generated by a tool called qenv that may execute qBeta programs. <\/p>\n<div style=\"display:flex; gap:10px;justify-content:center\" class=\"wps-pgfw-pdf-generate-icon__wrapper-frontend\">\n\t\t<a  href=\"https:\/\/oopm.org?action=genpdf&amp;id=5850\" class=\"pgfw-single-pdf-download-button\" ><img src=\"https:\/\/oopm.org\/wp-content\/plugins\/pdf-generator-for-wp\/admin\/src\/images\/PDF_Tray.svg\" title=\"Generate PDF\" style=\"width:auto; height:45px;\"><\/a>\n\t\t<\/div>","protected":false},"excerpt":{"rendered":"<p>The general theme in this book is that programming is modeling and that the model is the dynamic system of objects generated in a computer when executing a program describing the model &#8211; referred to as the program execution. It is thus important to understand what goes on in a program execution. In the previous [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":175,"menu_order":9,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-5850","page","type-page","status-publish","hentry"],"mb":[],"mfb_rest_fields":["title","gutenberg_elementor_mode"],"_links":{"self":[{"href":"https:\/\/oopm.org\/index.php?rest_route=\/wp\/v2\/pages\/5850","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/oopm.org\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/oopm.org\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/oopm.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/oopm.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5850"}],"version-history":[{"count":168,"href":"https:\/\/oopm.org\/index.php?rest_route=\/wp\/v2\/pages\/5850\/revisions"}],"predecessor-version":[{"id":11002,"href":"https:\/\/oopm.org\/index.php?rest_route=\/wp\/v2\/pages\/5850\/revisions\/11002"}],"up":[{"embeddable":true,"href":"https:\/\/oopm.org\/index.php?rest_route=\/wp\/v2\/pages\/175"}],"wp:attachment":[{"href":"https:\/\/oopm.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5850"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}