[e-lang] Quick comments needed on tgc draft

Ka-Ping Yee e-lang at zesty.ca
Sat Jun 18 04:08:36 EDT 2005


Hi, Mark.

I spent a chunk of this evening drawing up a figure to help illustrate
the E event processing model.  I think you need to insert a figure to
explain how the stack and queue work before jumping right into the big
complicated figure with the two communicating vats.  This figure is my
suggestion for what to insert.

See the attached Inkscape SVG file.  The figure i have in mind has two
parts, Figure 1a and 1b.  To produce Figure 1a, turn on all the layers
except those with "Queue" in their names.  This would have a caption
such as:

    Figure 1a.  In procedural programming languages, each thread of
    execution can be modelled as a stack of execution frames and a
    memory space for objects.  Each procedure call places a new frame
    on the top of the stack, and the frames are processed from top
    to bottom.  In a message-passing system, each frame corresponds
    to a message (arrow) and its target (dot).

To produce Figure 1b, turn on all the layers except those with "Stack"
in their names.  This would have a caption such as:

    Figure 1b.  E adds a queue of frames to the model in Figure 1a.
    Whereas immediate calls add frames to the top of the stack,
    eventual sends add frames to the end of the queue, each one
    carrying a message and the target to whom it should be sent.  The
    frames are processed from top to bottom and then left to right.

I have yet to draw up the big complicated figure in a similar style,
but i hope to get to that soon.  You'll notice that I have flipped
the message arrows; this is intentional, because I plan to rearrange
the big figure so that it reads from left to right.  I think that
will make it easier to understand than having it read from bottom to
top, as it does now.

I would like to relabel the entities in the big figure as well, which
would mean also relabeling them in the text.  Instead of calling them
SH, AM, and XL, I would like to use concrete names such as Account,
Manager, and Display respectively.  If feasible I would even like to
use method names "setBalance" and "balanceChanged" instead of "setStatus"
and "statusChanged".  What do you think?


-- ?!ng
-------------- next part --------------
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
   xmlns:xml="http://www.w3.org/XML/1998/namespace"
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:cc="http://web.resource.org/cc/"
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:svg="http://www.w3.org/2000/svg"
   xmlns="http://www.w3.org/2000/svg"
   xmlns:xlink="http://www.w3.org/1999/xlink"
   xmlns:sodipodi="http://inkscape.sourceforge.net/DTD/sodipodi-0.dtd"
   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
   width="210mm"
   height="297mm"
   id="svg2"
   sodipodi:version="0.32"
   inkscape:version="0.40+cvs"
   sodipodi:docbase="C:\Documents and Settings\kaping\Desktop"
   sodipodi:docname="stackvat.svg">
  <defs
     id="defs3">
    <linearGradient
       id="linearGradient7291">
      <stop
         id="stop7293"
         offset="0"
         style="stop-color:#a8a8ff;stop-opacity:1;" />
      <stop
         id="stop7295"
         offset="1.0000000"
         style="stop-color:#e0e0ff;stop-opacity:1.0000000;" />
    </linearGradient>
    <linearGradient
       id="linearGradient2057">
      <stop
         style="stop-color:#7575ff;stop-opacity:1.0000000;"
         offset="0.00000000"
         id="stop2059" />
      <stop
         style="stop-color:#e3e3ff;stop-opacity:1.0000000;"
         offset="1.0000000"
         id="stop2061" />
    </linearGradient>
    <linearGradient
       inkscape:collect="always"
       xlink:href="#linearGradient2057"
       id="linearGradient2063"
       gradientTransform="scale(0.936674,1.067607)"
       x1="115.13297"
       y1="205.19275"
       x2="243.16158"
       y2="116.76492"
       gradientUnits="userSpaceOnUse" />
    <linearGradient
       gradientUnits="userSpaceOnUse"
       y2="46.654747"
       x2="197.15215"
       y1="92.470940"
       x1="137.71503"
       gradientTransform="scale(0.498425,2.006319)"
       id="linearGradient7297"
       xlink:href="#linearGradient7291"
       inkscape:collect="always" />
  </defs>
  <sodipodi:namedview
     id="base"
     pagecolor="#ffffff"
     bordercolor="#666666"
     borderopacity="1.0"
     inkscape:pageopacity="0.0"
     inkscape:pageshadow="2"
     inkscape:zoom="1.6477025"
     inkscape:cx="179.32611"
     inkscape:cy="854.10337"
     inkscape:document-units="px"
     inkscape:current-layer="layer9"
     gridspacingx="10.000000px"
     gridspacingy="10.000000px"
     gridtolerance="4.0000000px"
     gridempspacing="6"
     inkscape:grid-points="true"
     showgrid="true"
     inkscape:guide-points="true"
     guidetolerance="4.0000000px"
     showguides="true"
     inkscape:guide-bbox="true"
     inkscape:window-width="715"
     inkscape:window-height="734"
     inkscape:window-x="-3"
     inkscape:window-y="-4" />
  <metadata
     id="metadata4">
    <rdf:RDF
       id="RDF5">
      <cc:Work
         rdf:about=""
         id="Work6">
        <dc:format
           id="format7">image/svg+xml</dc:format>
        <dc:type
           id="type9"
           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
      </cc:Work>
    </rdf:RDF>
  </metadata>
  <g
     inkscape:label="Fills"
     inkscape:groupmode="layer"
     id="layer1"
     style="display:inline">
    <rect
       style="fill:url(#linearGradient2063);fill-opacity:1.0;fill-rule:evenodd;stroke:none;stroke-width:1.0000000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"
       id="rect1291"
       width="139.50000"
       height="159.00000"
       x="100.50000"
       y="92.362183" />
    <rect
       style="fill:url(#linearGradient7297);fill-opacity:1.0;fill-rule:evenodd;stroke:none;stroke-width:0.99380803;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"
       id="rect1293"
       width="39.500000"
       height="159.00000"
       x="60.000000"
       y="92.362183" />
  </g>
  <g
     style="display:none"
     inkscape:label="Queue Fill"
     id="layer9"
     inkscape:groupmode="layer">
    <rect
       y="252.36218"
       x="60.000000"
       height="20.000000"
       width="180.00000"
       id="rect4221"
       style="fill:#5959ff;fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:1.0000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000" />
  </g>
  <g
     style="display:inline"
     inkscape:groupmode="layer"
     id="layer3"
     inkscape:label="Frames">
    <g
       transform="translate(0.000000,-1.000000)"
       id="g2115"
       inkscape:tile-w="38.500324"
       inkscape:tile-h="19.003922"
       inkscape:tile-cx="79.749979"
       inkscape:tile-cy="242.36022">
      <rect
         style="fill:#ffffff;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.0000002;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"
         id="rect2080"
         width="37.500324"
         height="18.003922"
         x="60.999817"
         y="233.35826" />
      <path
         style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;display:inline"
         d="M 64.500000,244.86022 L 64.500000,239.86022 L 74.500000,239.86022 L 74.500000,237.36022 L 84.500000,242.36022 L 74.500000,247.36022 L 74.500000,244.86022 L 64.500000,244.86022 z "
         id="path2102"
         sodipodi:nodetypes="cccccccc" />
      <path
         sodipodi:type="arc"
         style="fill:#000000;fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:1.0000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"
         id="path2113"
         sodipodi:cx="50.000000"
         sodipodi:cy="130.36218"
         sodipodi:rx="2.0000000"
         sodipodi:ry="2.0000000"
         d="M 52.000000 130.36218 A 2.0000000 2.0000000 0 1 1  48.000000,130.36218 A 2.0000000 2.0000000 0 1 1  52.000000 130.36218 z"
         transform="translate(42.00000,111.9980)" />
    </g>
    <use
       x="0.00000000"
       y="0.00000000"
       inkscape:tiled-clone-of="#g2115"
       xlink:href="#g2115"
       transform="translate(0.000000,-20.00000)"
       id="use2124"
       width="744.09448"
       height="1052.3622" />
    <use
       x="0.00000000"
       y="0.00000000"
       inkscape:tiled-clone-of="#g2115"
       xlink:href="#g2115"
       transform="translate(0.000000,-40.00000)"
       id="use2126"
       width="744.09448"
       height="1052.3622" />
    <use
       x="0.00000000"
       y="0.00000000"
       xlink:href="#use2126"
       id="use2128"
       transform="translate(0.000000,-20.00000)"
       width="744.09448"
       height="1052.3622" />
  </g>
  <g
     style="display:none"
     inkscape:label="Queue Frames"
     id="layer7"
     inkscape:groupmode="layer">
    <g
       transform="translate(0.000000,20.00000)"
       id="use4203">
      <rect
         style="fill:#ffffff;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.0000002;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4.0000000;stroke-dasharray:2.0000005 1.0000002 ;stroke-dashoffset:0.00000000;stroke-opacity:1.0000000"
         id="rect4983"
         width="37.500324"
         height="18.003922"
         x="60.999817"
         y="233.35826" />
      <path
         style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;display:inline"
         d="M 64.500000,244.86022 L 64.500000,239.86022 L 74.500000,239.86022 L 74.500000,237.36022 L 84.500000,242.36022 L 74.500000,247.36022 L 74.500000,244.86022 L 64.500000,244.86022 z "
         id="path4985"
         sodipodi:nodetypes="cccccccc" />
      <path
         sodipodi:type="arc"
         style="fill:#000000;fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:1.0000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"
         id="path4987"
         sodipodi:cx="50.000000"
         sodipodi:cy="130.36218"
         sodipodi:rx="2.0000000"
         sodipodi:ry="2.0000000"
         d="M 52.000000 130.36218 A 2.0000000 2.0000000 0 1 1  48.000000,130.36218 A 2.0000000 2.0000000 0 1 1  52.000000 130.36218 z"
         transform="translate(42.00000,111.9980)" />
    </g>
    <use
       height="1052.3622"
       width="744.09448"
       transform="translate(40.00018,0.000000)"
       id="use4207"
       xlink:href="#use4203"
       y="0.00000000"
       x="0.00000000" />
    <use
       height="1052.3622"
       width="744.09448"
       transform="translate(40.00000,0.000000)"
       id="use4209"
       xlink:href="#use4207"
       y="0.00000000"
       x="0.00000000" />
  </g>
  <g
     inkscape:label="Objects"
     id="layer6"
     inkscape:groupmode="layer">
    <path
       sodipodi:type="arc"
       style="fill:#ffffff;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.0000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000;display:inline"
       id="path2134"
       sodipodi:cx="150.00000"
       sodipodi:cy="152.36218"
       sodipodi:rx="30.000000"
       sodipodi:ry="30.000000"
       d="M 180.00000 152.36218 A 30.000000 30.000000 0 1 1  120.00000,152.36218 A 30.000000 30.000000 0 1 1  180.00000 152.36218 z"
       transform="translate(-12.50000,-19.50000)" />
    <path
       sodipodi:type="arc"
       style="display:inline;stroke-opacity:1.0000000;stroke-miterlimit:4.0000000;stroke-linejoin:round;stroke-linecap:round;stroke-width:1.0000000;stroke:#000000;fill-rule:evenodd;fill-opacity:1.0000000;fill:#ffffff"
       id="path2136"
       sodipodi:cx="150.00000"
       sodipodi:cy="152.36218"
       sodipodi:rx="30.000000"
       sodipodi:ry="30.000000"
       d="M 180.00000 152.36218 A 30.000000 30.000000 0 1 1  120.00000,152.36218 A 30.000000 30.000000 0 1 1  180.00000 152.36218 z"
       transform="translate(54.78840,4.551845)" />
    <path
       sodipodi:type="arc"
       style="fill:#ffffff;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.0000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000;display:inline"
       id="path2138"
       sodipodi:cx="150.00000"
       sodipodi:cy="152.36218"
       sodipodi:rx="30.000000"
       sodipodi:ry="30.000000"
       d="M 180.00000 152.36218 A 30.000000 30.000000 0 1 1  120.00000,152.36218 A 30.000000 30.000000 0 1 1  180.00000 152.36218 z"
       transform="translate(2.788401,58.78840)" />
  </g>
  <g
     style="display:inline"
     inkscape:groupmode="layer"
     id="layer4"
     inkscape:label="Stack Labels">
    <g
       style="display:inline"
       id="g2155"
       transform="translate(0.000000,2.000000)">
      <rect
         style="fill:#ffffff;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#000000;stroke-width:0.99999988;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"
         id="rect2143"
         width="39.000603"
         height="6.4165893"
         x="59.999702"
         y="80.359810"
         ry="2.8547411"
         rx="11.545349" />
      <path
         style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000"
         d="M 80.000000,80.362183 L 80.000000,77.362183"
         id="path2149"
         sodipodi:nodetypes="cc" />
      <rect
         style="fill:#ffffff;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.0000000;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"
         id="rect2151"
         width="138.99745"
         height="6.4165893"
         x="100.99649"
         y="80.362183"
         ry="2.5011878"
         rx="16.617010" />
      <rect
         style="fill:#ffffff;fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:1.0000000;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"
         id="rect2145"
         width="220.00000"
         height="7.0000000"
         x="40.000000"
         y="83.362183" />
      <path
         style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000"
         d="M 170.00000,77.362183 L 170.00000,80.362183 L 170.00000,80.362183"
         id="path2153"
         sodipodi:nodetypes="ccc" />
    </g>
    <text
       xml:space="preserve"
       style="font-size:10.000000;font-style:italic;font-variant:normal;font-weight:normal;font-stretch:normal;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;display:inline;font-family:Franklin Gothic Medium;text-anchor:middle;writing-mode:lr-tb"
       x="80.251953"
       y="77.235229"
       id="text2162"
       sodipodi:linespacing="100%"><tspan
         sodipodi:role="line"
         id="tspan2164"
         x="80.251953"
         y="77.235229">stack</tspan></text>
    <text
       xml:space="preserve"
       style="font-size:10.000000;font-style:italic;font-variant:normal;font-weight:normal;font-stretch:normal;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;display:inline;font-family:Franklin Gothic Medium;text-anchor:middle;writing-mode:lr-tb"
       x="170.25195"
       y="77.235229"
       id="text2166"
       sodipodi:linespacing="100%"><tspan
         x="170.25195"
         y="77.235229"
         sodipodi:role="line"
         id="tspan2170">objects</tspan></text>
  </g>
  <g
     style="display:none"
     inkscape:label="Queue Label"
     id="layer10"
     inkscape:groupmode="layer">
    <g
       transform="translate(3.500000,0.000000)"
       id="g6528">
      <rect
         rx="2.2415657"
         ry="8.8338919"
         y="252.84518"
         x="48.045326"
         height="19.516981"
         width="6.2188292"
         id="rect5756"
         style="fill:none;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.0000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4.0000000;stroke-dashoffset:0.00000000;stroke-opacity:1.0000000" />
      <rect
         ry="0.00000000"
         rx="0.00000000"
         y="240.86781"
         x="50.516983"
         height="42.241570"
         width="2.9830170"
         id="rect5758"
         style="fill:#ffffff;fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:1.0000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4.0000000;stroke-dashoffset:0.00000000;stroke-opacity:1.0000000" />
      <path
         sodipodi:nodetypes="cc"
         id="path6518"
         d="M 48.000000,262.36218 L 45.000000,262.36218"
         style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000" />
    </g>
    <text
       xml:space="preserve"
       style="font-size:10.000000;font-style:italic;font-variant:normal;font-weight:normal;font-stretch:normal;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;display:inline;font-family:Franklin Gothic Medium;text-anchor:middle;writing-mode:lr-tb"
       x="33.22015"
       y="265.12802"
       id="text5748"
       sodipodi:linespacing="100%"><tspan
         id="tspan5754"
         sodipodi:role="line"
         y="265.12802"
         x="33.220150">queue</tspan></text>
    <path
       sodipodi:nodetypes="cc"
       id="path6520"
       d="M 39.000000,277.52765 L 39.000000,277.52765 z "
       style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000" />
  </g>
  <g
     inkscape:groupmode="layer"
     id="layer2"
     inkscape:label="Stack Outline"
     style="display:inline">
    <rect
       style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#000000;stroke-width:2.9999993;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"
       id="rect1296"
       width="185.00072"
       height="164.00989"
       x="57.499565"
       y="89.857231" />
  </g>
  <g
     style="display:none"
     inkscape:label="Queue Outline"
     id="layer8"
     inkscape:groupmode="layer">
    <rect
       style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#000000;stroke-width:2.9479141;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000;display:inline"
       id="rect4212"
       width="185.05087"
       height="184.70110"
       x="57.473957"
       y="90.011612" />
  </g>
  <g
     style="display:none"
     inkscape:label="Bounding Box"
     id="layer5"
     inkscape:groupmode="layer">
    <rect
       style="fill:#ffa6a6;fill-opacity:0.39459458;fill-rule:evenodd;stroke:none;stroke-width:1.0000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000;display:inline"
       id="rect3985"
       width="250.00000"
       height="230.00000"
       x="10.000000"
       y="62.362183" />
  </g>
</svg>


More information about the e-lang mailing list