Check-in [ac285fc8ed]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Rework to pycca and tack to bring in latest changes in STSA mechanisms and latest versions of ral package.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: ac285fc8ed4b1a48a6214fddb40208bbeae5a059
User & Date: andrewm 2016-09-15 23:33:26
Context
2016-11-06
17:50
Changes in pycca and tack to improve build under macosx. check-in: 1b62fec06c user: andrewm tags: trunk
2016-09-15
23:33
Rework to pycca and tack to bring in latest changes in STSA mechanisms and latest versions of ral package. check-in: ac285fc8ed user: andrewm tags: trunk
2014-05-22
14:34
Archive package files for linux x86_64. check-in: 63d4cf2042 user: andrewm tags: trunk, mpssespi-1.0
Changes

Changes to pycca/build/linux/pycca.

cannot compute difference between binary files

Changes to pycca/build/linux/pycca.tpj.

     1      1   format  {TclDevKit Project File}
     2      2   fmtver  2.0
     3      3   fmttool {TclDevKit TclApp} 5.3
     4      4   
     5         -##  Saved at : Thu Aug 22 07:17:18 PDT 2013
     6         -##  By       : andrewm@zabox
            5  +##  Saved at : Fri Aug 12 16:23:19 PDT 2016
            6  +##  By       : andrewm@Office-NUC
     7      7   
     8      8   ########
     9      9   #####
    10     10   ###
    11     11   ##
    12     12   #
    13     13   
    14     14   App/Code               {}
    15     15   App/Package            {}
    16     16   App/PostCode           {}
    17         -Metadata               {subject {tclkit basekit starkit starpack deployment} description {A single file tcl interpreter for the execution of starkits, also a prefix file usable by Tcl Dev Kit's TclApp for the creation of starpacks.} as::origin http://www.activestate.com/activetcl platform linux-glibc2.3-ix86 copyright {(c) 2007 - 2013 G. Andrew Mangogna} name pycca summary {Single File Tcl Executable} version 4.3 license {{ActiveTcl Community License v2.1} http://www.activestate.com/activetcl/license/} author {G. Andrew Mangogna} tdk-licensed-to {George Mangogna}}
           17  +Metadata               {as::origin http://www.activestate.com/activetcl description {A single file tcl interpreter for the execution of starkits, also a prefix file usable by Tcl Dev Kit's TclApp for the creation of starpacks.} subject {tclkit basekit starkit starpack deployment} name pycca copyright {(c) 2007 - 2015 G. Andrew Mangogna} platform linux-glibc2.3-ix86 version 4.4 summary {Single File Tcl Executable} tdk-licensed-to {George Mangogna} author {G. Andrew Mangogna} license {{ActiveTcl Community License v2.1} http://www.activestate.com/activetcl/license/}}
    18     18   OSX/Info.plist         {}
    19     19   Path                   {Relativeto /home/andrewm/working/tcl-cm3/pycca/src}
    20     20   Path                   {File /home/andrewm/working/tcl-cm3/pycca/src/pycca.tcl}
    21     21   Path                   Startup
    22     22   Path                   {File /home/andrewm/working/tcl-cm3/pycca/src/pycca_gen.tcl}
    23     23   Path                   {File /home/andrewm/working/tcl-cm3/pycca/src/pycca_mm.tcl}
    24     24   Path                   {File /home/andrewm/working/tcl-cm3/pycca/src/pycca_parse.tab.tcl}
    25     25   Path                   {File /home/andrewm/working/tcl-cm3/pycca/src/pycca_parse.tcl}
    26     26   Path                   {File /home/andrewm/working/tcl-cm3/pycca/src/pycca_scan.tcl}
    27     27   Path                   {File /home/andrewm/working/tcl-cm3/pycca/src/cdcl.tcl}
    28     28   Path                   {File /home/andrewm/working/tcl-cm3/pycca/src/pycca_portal.h}
    29     29   Path                   {File /home/andrewm/working/tcl-cm3/pycca/src/pycca_portal.c}
    30         -Pkg/Architecture       linux-glibc2.3-ix86
           30  +Pkg/Architecture       linux-glibc2.19-x86_64
           31  +Pkg/Architecture       linux-glibc2.3-x86_64
    31     32   Pkg/Archive            /opt/ActiveTcl-8.6/lib/teapot
    32     33   Pkg/Reference          Mk4tcl
    33     34   Pkg/Reference          {Tcl 8.6}
    34     35   Pkg/Reference          cmdline
    35     36   Pkg/Reference          crc16
    36     37   Pkg/Reference          csv
    37     38   Pkg/Reference          ral
................................................................................
    45     46   Pkg/Reference          textutil::adjust
    46     47   Pkg/Reference          textutil::expander
    47     48   Pkg/Reference          textutil::repeat
    48     49   Pkg/Reference          textutil::split
    49     50   Pkg/Reference          textutil::string
    50     51   Pkg/Reference          textutil::tabify
    51     52   Pkg/Reference          textutil::trim
    52         -Pkg/Reference          try
    53     53   StringInfo             {}
    54     54   System/Nocompress      0
    55     55   System/TempDir         {}
    56     56   System/Verbose         0
    57     57   Wrap/Compile/NoTbcload 0
    58     58   Wrap/Compile/Tcl       0
    59     59   Wrap/Compile/Version   {}
    60     60   Wrap/FSMode            {}
    61     61   Wrap/Icon              {}
    62         -Wrap/InputPrefix       /opt/ActiveTcl-8.6/bin/base-tcl8.6-thread-linux-ix86
           62  +Wrap/InputPrefix       /home/andrewm/opt/ActiveTcl-8.6/bin/base-tcl8.6-thread-linux-x86_64
    63     63   Wrap/Interpreter       {}
    64     64   Wrap/Merge             0
    65     65   Wrap/NoProvided        0
    66     66   Wrap/NoSpecials        0
    67     67   Wrap/Output            /home/andrewm/working/tcl-cm3/pycca/build/linux/pycca
    68     68   Wrap/Output/OSXApp     0
    69     69   
    70     70   #
    71     71   ##
    72     72   ###
    73     73   #####
    74     74   ########

Changes to pycca/doc/pycca-translate/xuml-translation.pdf.

cannot compute difference between binary files

Changes to pycca/doc/pycca.html.

     1      1   <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
     2      2       "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
     3      3   <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
     4      4   <head>
     5      5   <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
     6         -<meta name="generator" content="AsciiDoc 8.6.7" />
            6  +<meta name="generator" content="AsciiDoc 8.6.9" />
     7      7   <title>PYCCA(1)</title>
     8      8   <style type="text/css">
     9      9   /* Shared CSS for AsciiDoc xhtml11 and html5 backends */
    10     10   
    11     11   /* Default font. */
    12     12   body {
    13     13     font-family: Georgia,serif;
................................................................................
    83     83   
    84     84   ul, ol, li > p {
    85     85     margin-top: 0;
    86     86   }
    87     87   ul > li     { color: #aaa; }
    88     88   ul > li > * { color: black; }
    89     89   
    90         -pre {
           90  +.monospaced, code, pre {
           91  +  font-family: "Courier New", Courier, monospace;
           92  +  font-size: inherit;
           93  +  color: navy;
    91     94     padding: 0;
    92     95     margin: 0;
    93     96   }
           97  +pre {
           98  +  white-space: pre-wrap;
           99  +}
    94    100   
    95    101   #author {
    96    102     color: #527bbd;
    97    103     font-weight: bold;
    98    104     font-size: 1.1em;
    99    105   }
   100    106   #email {
................................................................................
   215    221   
   216    222   div.exampleblock > div.content {
   217    223     border-left: 3px solid #dddddd;
   218    224     padding-left: 0.5em;
   219    225   }
   220    226   
   221    227   div.imageblock div.content { padding-left: 0; }
   222         -span.image img { border-style: none; }
          228  +span.image img { border-style: none; vertical-align: text-bottom; }
   223    229   a.image:visited { color: white; }
   224    230   
   225    231   dl {
   226    232     margin-top: 0.8em;
   227    233     margin-bottom: 0.8em;
   228    234   }
   229    235   dt {
................................................................................
   411    417   
   412    418   
   413    419   /*
   414    420    * xhtml11 specific
   415    421    *
   416    422    * */
   417    423   
   418         -tt {
   419         -  font-family: "Courier New", Courier, monospace;
   420         -  font-size: inherit;
   421         -  color: navy;
   422         -}
   423         -
   424    424   div.tableblock {
   425    425     margin-top: 1.0em;
   426    426     margin-bottom: 1.5em;
   427    427   }
   428    428   div.tableblock > table {
   429    429     border: 3px solid #527bbd;
   430    430   }
................................................................................
   450    450   
   451    451   
   452    452   /*
   453    453    * html5 specific
   454    454    *
   455    455    * */
   456    456   
   457         -.monospaced {
   458         -  font-family: "Courier New", Courier, monospace;
   459         -  font-size: inherit;
   460         -  color: navy;
   461         -}
   462         -
   463    457   table.tableblock {
   464    458     margin-top: 1.0em;
   465    459     margin-bottom: 1.5em;
   466    460   }
   467    461   thead, p.tableblock.header {
   468    462     font-weight: bold;
   469    463     color: #527bbd;
................................................................................
   535    529   body.manpage div.sectionbody {
   536    530     margin-left: 3em;
   537    531   }
   538    532   
   539    533   @media print {
   540    534     body.manpage div#toc { display: none; }
   541    535   }
          536  +
          537  +
   542    538   </style>
   543    539   <script type="text/javascript">
   544    540   /*<![CDATA[*/
   545    541   var asciidoc = {  // Namespace.
   546    542   
   547    543   /////////////////////////////////////////////////////////////////////
   548    544   // Table Of Contents generator
................................................................................
   763    759   The language that <strong>pycca</strong> translates is a simple configuration language
   764    760   that allows the specification of domains, classes and state machines.
   765    761   Any associated processing is specified in ordinary "C" code.
   766    762   The language is translated into the necessary data structures required by
   767    763   STSA with the included "C" code passed through into the definitions.</p></div>
   768    764   <div class="paragraph"><p><strong>Pycca</strong> generates two files from its input.
   769    765   One file is the generated "C" code,
   770         -named by appending a <tt>.c</tt> suffix to the basename of the first input file.
   771         -The other file is a generated header file which has a <tt>.h</tt> suffix.
          766  +named by appending a <code>.c</code> suffix to the basename of the first input file.
          767  +The other file is a generated header file which has a <code>.h</code> suffix.
   772    768   More than one input file may be given in the invocation.
   773    769   Subsequent files are processes as if all the files had been concatenated
   774    770   together.
   775    771   Typically, second and subsequent files hold domain population
   776    772   information so that a domain may be populated differently without
   777    773   modifying the file containing its logic.
   778    774   However, additional domains may also be processed with the resulting
................................................................................
   802    798   </p>
   803    799   </dd>
   804    800   <dt class="hdlist1">
   805    801   -noline
   806    802   </dt>
   807    803   <dd>
   808    804   <p>
   809         -    Do not output <tt>#line</tt> directives in the generated file that reference
          805  +    Do not output <code>#line</code> directives in the generated file that reference
   810    806       the <strong>pycca</strong> file.
   811    807       Normally, the generated "C" code contains line
   812    808       directives to so that compiler error messages reference the <strong>pycca</strong>
   813    809       source rather than the generated code.
   814    810       However, some compilers and debuggers are confused by these directives.
   815    811   </p>
   816    812   </dd>
................................................................................
   970    966   <dt class="hdlist1">
   971    967   -header file
   972    968   </dt>
   973    969   <dd>
   974    970   <p>
   975    971       Use <em>file</em> as the name of the header file that contains the interface
   976    972       declarations for the software architectural mechanisms.
   977         -    By default, the file <tt>mechs.h</tt> is assumed to be the mechanisms interface
          973  +    By default, the file <code>mechs.h</code> is assumed to be the mechanisms interface
   978    974       file.
   979    975   </p>
   980    976   </dd>
   981    977   </dl></div>
   982    978   </div>
   983    979   </div>
   984    980   <div class="sect1">
................................................................................
  1017   1013   </dt>
  1018   1014   <dd>
  1019   1015   <p>
  1020   1016   any text appearing between matching parentheses, (&#8230;),
  1021   1017   is taken to be a list of comma separated "C" variable or parameter declarations.
  1022   1018   As of pycca version 3.0,
  1023   1019   parameter lists and attribute declarations are parsed.
  1024         -Because of the inherent ambiguity of <tt>typedef</tt> type aliases
         1020  +Because of the inherent ambiguity of <code>typedef</code> type aliases
  1025   1021   and the complexity of certain "C" declarations that involve constant
  1026   1022   expressions,
  1027   1023   it is possible for <strong>pycca</strong> to incorrectly parse the declaration.
  1028   1024   These issues can usually be solved with an appropriate typedef included
  1029   1025   in the implementation prolog section.
  1030   1026   </p>
  1031   1027   </dd>
................................................................................
  1215   1211   The token name is given to match as it appears in the syntax definition below.</p></div>
  1216   1212   <div class="dlist"><dl>
  1217   1213   <dt class="hdlist1">
  1218   1214   MPOINTS
  1219   1215   </dt>
  1220   1216   <dd>
  1221   1217   <p>
  1222         -<tt>-&gt;&gt;</tt> or <tt>-&gt;&gt;c</tt> or <tt>-&gt;&gt;n</tt>
         1218  +<code>-&gt;&gt;</code> or <code>-&gt;&gt;c</code> or <code>-&gt;&gt;n</code>
  1223   1219   </p>
  1224   1220   </dd>
  1225   1221   <dt class="hdlist1">
  1226   1222   MLPOINTS
  1227   1223   </dt>
  1228   1224   <dd>
  1229   1225   <p>
  1230         -<tt>-&gt;&gt;l</tt>
         1226  +<code>-&gt;&gt;l</code>
  1231   1227   </p>
  1232   1228   </dd>
  1233   1229   <dt class="hdlist1">
  1234   1230   MCPOINTS
  1235   1231   </dt>
  1236   1232   <dd>
  1237   1233   <p>
  1238         -<tt>-ddd&gt;&gt;</tt>, where <em>ddd</em> is a sequence of decimal digits
         1234  +<code>-ddd&gt;&gt;</code>, where <em>ddd</em> is a sequence of decimal digits
  1239   1235   </p>
  1240   1236   </dd>
  1241   1237   <dt class="hdlist1">
  1242   1238   POINTS
  1243   1239   </dt>
  1244   1240   <dd>
  1245   1241   <p>
  1246         -<tt>-&gt;</tt>
         1242  +<code>-&gt;</code>
  1247   1243   </p>
  1248   1244   </dd>
  1249   1245   <dt class="hdlist1">
  1250   1246   NAME
  1251   1247   </dt>
  1252   1248   <dd>
  1253   1249   <p>
................................................................................
  1287   1283   </div>
  1288   1284   <div class="sect1">
  1289   1285   <h2 id="_syntax">SYNTAX</h2>
  1290   1286   <div class="sectionbody">
  1291   1287   <div class="paragraph"><p>The following is a <em>yacc</em> style syntax of the language accepted by <strong>pycca</strong>.</p></div>
  1292   1288   <div class="listingblock">
  1293   1289   <div class="content">
  1294         -<pre><tt>translation
         1290  +<pre><code>translation
  1295   1291       :
  1296   1292       |   domainDefs
  1297   1293       ;
  1298   1294   
  1299   1295   domainDefs
  1300   1296       :   domain
  1301   1297       |   domainDefs domain
................................................................................
  1521   1517   
  1522   1518   attrValue
  1523   1519       :   CODE
  1524   1520       |   POINTS NAME
  1525   1521       |   POINTS NAME '.' NAME
  1526   1522       |   MPOINTS nameList END
  1527   1523       |   '-'
  1528         -    ;</tt></pre>
         1524  +    ;</code></pre>
  1529   1525   </div></div>
  1530   1526   </div>
  1531   1527   </div>
  1532   1528   <div class="sect1">
  1533   1529   <h2 id="_semantics">SEMANTICS</h2>
  1534   1530   <div class="sectionbody">
  1535   1531   <div class="paragraph"><p>The <strong>pycca</strong> language allows the definition of <em>domains</em>.
................................................................................
  1540   1536   constructs of the <strong>pycca</strong> language.</p></div>
  1541   1537   <div class="sect2">
  1542   1538   <h3 id="_domain">DOMAIN</h3>
  1543   1539   <div class="paragraph"><p>Domain definitions start with the <strong>domain</strong> keyword followed by the
  1544   1540   name of the domain and stops at the matching <strong>end</strong> keyword.</p></div>
  1545   1541   <div class="listingblock">
  1546   1542   <div class="content">
  1547         -<pre><tt>domain myDomain
         1543  +<pre><code>domain myDomain
  1548   1544       # Put your domain definition here
  1549         -end</tt></pre>
         1545  +end</code></pre>
  1550   1546   </div></div>
  1551   1547   <div class="paragraph"><p>The procedural interface to a domain consists of a set of <em>domain operations</em>.
  1552   1548   Domain operations are converted into ordinary "C" functions.
  1553   1549   They are made external in scope and their prototype is inserted into the
  1554   1550   generated header file.
  1555   1551   To help manage the global namespace, the name of the domain and an underscore
  1556   1552   are prepended to the "C" function that is generated for a domain operation.</p></div>
  1557   1553   <div class="listingblock">
  1558   1554   <div class="content">
  1559         -<pre><tt>domain myDomain
         1555  +<pre><code>domain myDomain
  1560   1556       domain operation
  1561   1557       init(void)
  1562   1558       {
  1563   1559           // the domain initialization is done here
  1564   1560       }
  1565         -end</tt></pre>
         1561  +end</code></pre>
  1566   1562   </div></div>
  1567   1563   <div class="paragraph"><p>So this would generate:</p></div>
  1568   1564   <div class="listingblock">
  1569   1565   <div class="content">
  1570         -<pre><tt>void myDomain_init(void)
         1566  +<pre><code>void myDomain_init(void)
  1571   1567   {
  1572   1568       // the domain initialization is done here
  1573         -}</tt></pre>
         1569  +}</code></pre>
  1574   1570   </div></div>
  1575   1571   <div class="paragraph"><p>If a domain operation returns a value, then the type is
  1576   1572   specified by following the interface with a colon (:) and a variable type.
  1577   1573   If no return type is specified,
  1578   1574   then the function is typed as <strong>void</strong>.</p></div>
  1579   1575   <div class="listingblock">
  1580   1576   <div class="content">
  1581         -<pre><tt>domain myDomain
         1577  +<pre><code>domain myDomain
  1582   1578       domain operation
  1583   1579       getStatus(void) : (int)
  1584   1580       {
  1585   1581           return 3 ;
  1586   1582       }
  1587         -end</tt></pre>
         1583  +end</code></pre>
  1588   1584   </div></div>
  1589   1585   <div class="paragraph"><p>This would generate:</p></div>
  1590   1586   <div class="listingblock">
  1591   1587   <div class="content">
  1592         -<pre><tt>int myDomain_getStatus(void)
         1588  +<pre><code>int myDomain_getStatus(void)
  1593   1589   {
  1594   1590       return 3 ;
  1595         -}</tt></pre>
         1591  +}</code></pre>
  1596   1592   </div></div>
  1597   1593   <div class="paragraph"><p>Since domain operations form the external interface of the domain,
  1598   1594   it is convenient to be able to associate comments and declarations
  1599   1595   in the pycca source and have that information placed in the
  1600   1596   generated header file.
  1601   1597   An optional "C" segment may precede the domain operation definition
  1602   1598   and this will be placed in the generated header.</p></div>
  1603   1599   <div class="listingblock">
  1604   1600   <div class="content">
  1605         -<pre><tt>domain myDomain
         1601  +<pre><code>domain myDomain
  1606   1602       domain operation {
  1607   1603       /*
  1608   1604        * This operation is used to modify parameters.
  1609   1605        */}
  1610   1606       modParam(int a)
  1611   1607       {
  1612   1608           // modify parameters here!
  1613   1609       }
  1614         -}</tt></pre>
         1610  +}</code></pre>
  1615   1611   </div></div>
  1616   1612   <div class="paragraph"><p>This construct would result in the comment being passed to the generated
  1617   1613   header file (and only the generated header) as:</p></div>
  1618   1614   <div class="listingblock">
  1619   1615   <div class="content">
  1620         -<pre><tt>/*
         1616  +<pre><code>/*
  1621   1617    * This operation is used to modify parameters.
  1622   1618    */
  1623         -extern void myDomain_modParam(int a) ;</tt></pre>
         1619  +extern void myDomain_modParam(int a) ;</code></pre>
  1624   1620   </div></div>
  1625   1621   <div class="paragraph"><p>Although this construct is intended primarily to pass comments associated with
  1626   1622   domain operations through to the generated header file that serves as the
  1627   1623   interface specification to the domain,
  1628   1624   the "C" code lines (like all other pycca constructs enclosed in <strong>{}</strong>)
  1629   1625   is passed through unmodified (except for whitespace trimming) and may be used
  1630   1626   to pass through pre-processor include directives or for any other useful
  1631   1627   purposes.</p></div>
  1632   1628   <div class="paragraph"><p>Complementary to domain operations are external operations.
  1633   1629   They are defined similarly to domain operations.</p></div>
  1634   1630   <div class="listingblock">
  1635   1631   <div class="content">
  1636         -<pre><tt>domain myDomain
         1632  +<pre><code>domain myDomain
  1637   1633       external operation
  1638   1634       getReactorTemp(int reactor)
  1639   1635       {
  1640   1636           // any code here is not passed through
  1641   1637       }
  1642         -}</tt></pre>
         1638  +}</code></pre>
  1643   1639   </div></div>
  1644   1640   <div class="paragraph"><p>External operations define the external function dependencies of the
  1645   1641   domain.
  1646   1642   The domain expects these functions to be supplied from elsewhere.
  1647   1643   The above example generates external declarations such as:</p></div>
  1648   1644   <div class="listingblock">
  1649   1645   <div class="content">
  1650         -<pre><tt>extern void eop_myDomain_getReactorTemp(int reactor) ;</tt></pre>
         1646  +<pre><code>extern void eop_myDomain_getReactorTemp(int reactor) ;</code></pre>
  1651   1647   </div></div>
  1652   1648   <div class="paragraph"><p>in both the generated header file and in the code file.
  1653   1649   The intent of the external operation declarations is to aid in generating
  1654   1650   bridge functions for the domain.
  1655   1651   For each external operation, a function must be provided that
  1656   1652   satisfies the semantics of the operation by bridging to domain
  1657   1653   functions of another domain.
................................................................................
  1659   1655   done via a macro.
  1660   1656   Other bridges may be more complex, mapping encoded identifiers in one
  1661   1657   domain to encoded identifiers in another domain.
  1662   1658   Any code associated with the external operation does <strong>not</strong> get placed
  1663   1659   in the generated code.
  1664   1660   However, this code may be used in other pycca-based tools.
  1665   1661   To invoke an external operation from with in the code of a domain,
  1666         -use the <tt>ExternalOp()</tt> macro described below.</p></div>
         1662  +use the <code>ExternalOp()</code> macro described below.</p></div>
  1667   1663   </div>
  1668   1664   <div class="sect2">
  1669   1665   <h3 id="_classes">CLASSES</h3>
  1670   1666   <div class="paragraph"><p>A <em>Domain</em> contains <em>classes</em>.
  1671   1667   A <em>class</em> is <strong>template</strong> for data and behavior.
  1672   1668   A particular <strong>instance</strong> of a class (often called an <strong>object</strong>)
  1673   1669   performs the computational actions.
  1674   1670   All instances of a given class have the same attribute data and
  1675   1671   same general behavior.
  1676   1672   A class has a name and optionally attributes and a state machine.</p></div>
  1677   1673   <div class="listingblock">
  1678   1674   <div class="content">
  1679         -<pre><tt>class c1
         1675  +<pre><code>class c1
  1680   1676       # class definition appears here.
  1681         -end</tt></pre>
         1677  +end</code></pre>
  1682   1678   </div></div>
  1683   1679   <div class="sect3">
  1684   1680   <h4 id="_class_attributes">CLASS ATTRIBUTES</h4>
  1685   1681   <div class="paragraph"><p>Attributes are declared in the same way as structure members in "C",
  1686   1682   but without any punctuation.
  1687   1683   Attributes are optional, but useful classes usually have attributes.
  1688   1684   Following the lexical conventions,
  1689   1685   the "C" declarations appear in parentheses.</p></div>
  1690   1686   <div class="listingblock">
  1691   1687   <div class="content">
  1692         -<pre><tt>class c1
         1688  +<pre><code>class c1
  1693   1689       attribute (int a1)
  1694         -end</tt></pre>
         1690  +end</code></pre>
  1695   1691   </div></div>
  1696   1692   <div class="paragraph"><p>The default value of an instance can also be specified.
  1697   1693   The default value is used only if no value is specified when
  1698   1694   an initial instance of the class is defined.
  1699   1695   Default values are used only when specifying the set of initial instances.
  1700   1696   For dynamically created instances,
  1701   1697   all attribute values are set by running code.
  1702   1698   The default value must evaluate to a valid "C" compile-time constant expression
  1703   1699   (since it will be used as an initializer)
  1704   1700   and since it is passed through must be enclosed in braces.</p></div>
  1705   1701   <div class="listingblock">
  1706   1702   <div class="content">
  1707         -<pre><tt>class c1
         1703  +<pre><code>class c1
  1708   1704       attribute (int a2) default {sizeof(int) + 32}
  1709         -end</tt></pre>
         1705  +end</code></pre>
  1710   1706   </div></div>
  1711   1707   </div>
  1712   1708   <div class="sect3">
  1713   1709   <h4 id="_class_references">CLASS REFERENCES</h4>
  1714   1710   <div class="paragraph"><p>Sometimes classes need to refer to other classes or themselves in
  1715   1711   order to implement relationships.
  1716   1712   A reference is a special kind of attribute
................................................................................
  1722   1718   as a pointer to a structure that matches the class name.</p></div>
  1723   1719   <div class="sect4">
  1724   1720   <h5 id="_singular_references">SINGULAR REFERENCES</h5>
  1725   1721   <div class="paragraph"><p>Usually a single valued reference is used to implement
  1726   1722   traversal of a relationship on the side that is <em>one</em> or <em>one-conditional</em>.
  1727   1723   In the case of a singular reference,
  1728   1724   a simple pointer member holds the address of the referenced instance
  1729         -and <tt>NULL</tt> may be used to indicate conditionality.
         1725  +and <code>NULL</code> may be used to indicate conditionality.
  1730   1726   So</p></div>
  1731   1727   <div class="listingblock">
  1732   1728   <div class="content">
  1733         -<pre><tt>class c1
         1729  +<pre><code>class c1
  1734   1730       reference R1 -&gt; c1
  1735         -end</tt></pre>
         1731  +end</code></pre>
  1736   1732   </div></div>
  1737   1733   <div class="paragraph"><p>is translated to</p></div>
  1738   1734   <div class="listingblock">
  1739   1735   <div class="content">
  1740         -<pre><tt>struct c1 {
         1736  +<pre><code>struct c1 {
  1741   1737       ...
  1742   1738       struct c1 *R1 ;
  1743   1739       ...
  1744         -} ;</tt></pre>
         1740  +} ;</code></pre>
  1745   1741   </div></div>
  1746   1742   </div>
  1747   1743   <div class="sect4">
  1748   1744   <h5 id="_multiple_references">MULTIPLE REFERENCES</h5>
  1749   1745   <div class="paragraph"><p>A reference may also implement a relationship traversal for the side
  1750   1746   that is "many" or "many-conditional".
  1751   1747   This type of reference storage is more complicated since we must
................................................................................
  1755   1751   relationships.
  1756   1752   Static relationships don&#8217;t change in time over the course of program
  1757   1753   execution.
  1758   1754   They are occur relatively frequently in some applications and which
  1759   1755   instance are related to each other is known at compile time.
  1760   1756   Two different storage strategies are available for static multiple
  1761   1757   references.</p></div>
  1762         -<div class="paragraph"><p>Using the <tt>-&gt;&gt;</tt> symbol will cause <strong>pycca</strong> to insert an
         1758  +<div class="paragraph"><p>Using the <code>-&gt;&gt;</code> symbol will cause <strong>pycca</strong> to insert an
  1763   1759   array of pointers.
  1764         -The <tt>-&gt;&gt;</tt> notation comes in several alternate forms that are used
         1760  +The <code>-&gt;&gt;</code> notation comes in several alternate forms that are used
  1765   1761   to control the details of how the array of pointers is allocated.
  1766         -If <tt>-&gt;&gt;</tt> or <tt>-&gt;&gt;n</tt> is used to define the multiple reference,
         1762  +If <code>-&gt;&gt;</code> or <code>-&gt;&gt;n</code> is used to define the multiple reference,
  1767   1763   then the class structure has a pointer member defined for it
  1768         -that will point to a <tt>NULL</tt> terminated array of class references.
         1764  +that will point to a <code>NULL</code> terminated array of class references.
  1769   1765   For example, the class fragment:</p></div>
  1770   1766   <div class="listingblock">
  1771   1767   <div class="content">
  1772         -<pre><tt>class c2
         1768  +<pre><code>class c2
  1773   1769       reference R2 -&gt;&gt; c1
  1774         -end</tt></pre>
         1770  +end</code></pre>
  1775   1771   </div></div>
  1776   1772   <div class="paragraph"><p>translates into the "C" structure fragment:</p></div>
  1777   1773   <div class="listingblock">
  1778   1774   <div class="content">
  1779         -<pre><tt>    struct c1 *const*const R2 ;</tt></pre>
         1775  +<pre><code>    struct c1 *const*const R2 ;</code></pre>
  1780   1776   </div></div>
  1781         -<div class="paragraph"><p>If <tt>-&gt;&gt;c</tt> is used to define the reference, then the array
         1777  +<div class="paragraph"><p>If <code>-&gt;&gt;c</code> is used to define the reference, then the array
  1782   1778   of class references is <strong>counted</strong> and the class structure will have
  1783   1779   two members defined for it, a pointer to the array and a count value.
  1784   1780   In this case the class fragment:</p></div>
  1785   1781   <div class="listingblock">
  1786   1782   <div class="content">
  1787         -<pre><tt>class c3
         1783  +<pre><code>class c3
  1788   1784       reference R3 -&gt;&gt;c c5
  1789         -end</tt></pre>
         1785  +end</code></pre>
  1790   1786   </div></div>
  1791   1787   <div class="paragraph"><p>translates into the "C" structure fragment:</p></div>
  1792   1788   <div class="listingblock">
  1793   1789   <div class="content">
  1794         -<pre><tt>    struct c5 *const*const R3 ;
  1795         -    unsigned R3__count ;</tt></pre>
         1790  +<pre><code>    struct c5 *const*const R3 ;
         1791  +    unsigned R3__count ;</code></pre>
  1796   1792   </div></div>
  1797         -<div class="paragraph"><p>The <em>&lt;name&gt;__count</em> member should be accessed using the <tt>RefCountMember()</tt>
         1793  +<div class="paragraph"><p>The <em>&lt;name&gt;__count</em> member should be accessed using the <code>RefCountMember()</code>
  1798   1794   macro described below to insulate any code from the member naming convention.</p></div>
  1799   1795   <div class="paragraph"><p>In both cases,
  1800   1796   <strong>pycca</strong> will examine the initial instance population and build an array of
  1801   1797   pointers in constant memory that point to the related instances and will
  1802   1798   initialize the class instance with the pointer to the reference array.
  1803         -If a <tt>NULL</tt> terminated array was requested then the array of references
  1804         -will have a <tt>NULL</tt> value as its last element.
         1799  +If a <code>NULL</code> terminated array was requested then the array of references
         1800  +will have a <code>NULL</code> value as its last element.
  1805   1801   If a counted array was requested, the array contains just as many
  1806   1802   pointers as indicated by the initial instance population and a count
  1807   1803   of the number of pointers in the array is set in the initializer
  1808   1804   of the referrring instance.</p></div>
  1809   1805   <div class="paragraph"><p>For dynamic relationships,
  1810   1806   two alternatives are provided.
  1811   1807   If the reference specification is of the form "-ddd&gt;&gt;",
................................................................................
  1813   1809   of class references is allocated in non-constant memory.
  1814   1810   When the count form is used,
  1815   1811   then the class instances will have an array of pointers of the specified size
  1816   1812   defined as part of their class structure.
  1817   1813   For example, the class fragment:</p></div>
  1818   1814   <div class="listingblock">
  1819   1815   <div class="content">
  1820         -<pre><tt>class c6
         1816  +<pre><code>class c6
  1821   1817       reference R4 -20&gt;&gt; c7
  1822         -end</tt></pre>
         1818  +end</code></pre>
  1823   1819   </div></div>
  1824   1820   <div class="paragraph"><p>translates into the "C" structure fragment:</p></div>
  1825   1821   <div class="listingblock">
  1826   1822   <div class="content">
  1827         -<pre><tt>    struct c7 *R4[20] ;</tt></pre>
         1823  +<pre><code>    struct c7 *R4[20] ;</code></pre>
  1828   1824   </div></div>
  1829   1825   <div class="paragraph"><p>Where the <em>R4</em> member is an array of of class references
  1830   1826   (<em>i.e.</em> pointers of type <em>struct c7 *</em> in this case).
  1831   1827   The array will be initialized for each instance with the references specified
  1832   1828   in the instance definition for the instance and any unused slots will be set to
  1833         -<tt>NULL</tt>.
         1829  +<code>NULL</code>.
  1834   1830   Action code can then manage that storage to implement dynamic one-to-many
  1835         -type relationships where a <tt>NULL</tt> value is used to indicate that a reference
         1831  +type relationships where a <code>NULL</code> value is used to indicate that a reference
  1836   1832   storage slot is not being used.</p></div>
  1837         -<div class="paragraph"><p>Finally, if the reference specification is of the form <tt>-&gt;&gt;l</tt>,
         1833  +<div class="paragraph"><p>Finally, if the reference specification is of the form <code>-&gt;&gt;l</code>,
  1838   1834   a doubly linked list is set up to manage the multiple relationship.
  1839   1835   This entails two things.
  1840   1836   First, a set of links is added as a member of the class that defines
  1841   1837   the reference.
  1842   1838   Second, a corresponding set of links is added as a member of the class to which
  1843   1839   the reference is made.
  1844   1840   This allows a list be built starting at the referring class and threading
................................................................................
  1847   1843   Thus the memory for the links is relatively easily managed and
  1848   1844   referenced instances may be easily added and removed from the list.
  1849   1845   A set of macros, defined below, is provided to hide the details of the
  1850   1846   linking, unlinking and traversal mechanism.</p></div>
  1851   1847   <div class="paragraph"><p>For example, the class fragment:</p></div>
  1852   1848   <div class="listingblock">
  1853   1849   <div class="content">
  1854         -<pre><tt>class c8
         1850  +<pre><code>class c8
  1855   1851       reference R10 -&gt;&gt;l c9
  1856         -end</tt></pre>
         1852  +end</code></pre>
  1857   1853   </div></div>
  1858   1854   <div class="paragraph"><p>adds the following member to <em>struct c8</em>:</p></div>
  1859   1855   <div class="listingblock">
  1860   1856   <div class="content">
  1861         -<pre><tt>    rlink_t R10 ;</tt></pre>
         1857  +<pre><code>    rlink_t R10 ;</code></pre>
  1862   1858   </div></div>
  1863   1859   <div class="paragraph"><p>and adds the following member to <em>struct c9</em>:</p></div>
  1864   1860   <div class="listingblock">
  1865   1861   <div class="content">
  1866         -<pre><tt>    rlink_t R10__links ;</tt></pre>
         1862  +<pre><code>    rlink_t R10__links ;</code></pre>
  1867   1863   </div></div>
  1868   1864   <div class="paragraph"><p>Any initial instances of <em>c9</em> that are referenced by <em>c8</em> are linked
  1869   1865   together as part of the initializers defined by the initial instance
  1870   1866   population.</p></div>
  1871   1867   </div>
  1872   1868   </div>
  1873   1869   <div class="sect3">
  1874   1870   <h4 id="_class_constructors_and_destructors">CLASS CONSTRUCTORS AND DESTRUCTORS</h4>
  1875   1871   <div class="paragraph"><p>A class may define a constructor or a destructor.
  1876   1872   Neither constructors nor destructors can take parameters.</p></div>
  1877   1873   <div class="listingblock">
  1878   1874   <div class="content">
  1879         -<pre><tt>class c3
         1875  +<pre><code>class c3
  1880   1876       attribute (int count)
  1881   1877       constructor {
  1882   1878           self-&gt;count = 0 ;
  1883   1879       }
  1884   1880       destructor {
  1885   1881           reportCount(self-&gt;count) ;
  1886   1882       }
  1887         -end</tt></pre>
         1883  +end</code></pre>
  1888   1884   </div></div>
  1889   1885   <div class="paragraph"><p>If any class that contains a constructor also has an initial instance
  1890   1886   population specified,
  1891         -then <strong>pycca</strong> will generate a function of the form, <tt>&lt;domain name&gt;_Ctor</tt>
         1887  +then <strong>pycca</strong> will generate a function of the form, <code>&lt;domain name&gt;_Ctor</code>
  1892   1888   where &lt;domain name&gt; is replaced by the name of the domain.
  1893   1889   This function will invoke the constructor for all initial instances of
  1894   1890   all classes that have defined a set of initial instances and also
  1895   1891   have defined a constructor.
  1896   1892   It is up to the user to invoke this function during the application
  1897   1893   initialization phase (<em>e.g.</em> in some domain operation that is invoked
  1898   1894   at initialization time).</p></div>
................................................................................
  1900   1896   <div class="sect3">
  1901   1897   <h4 id="_class_operations">CLASS OPERATIONS</h4>
  1902   1898   <div class="paragraph"><p>A class may define class based operations.
  1903   1899   Class operations do reference any particular instance and provide a means of
  1904   1900   factoring common class operations into a single function.</p></div>
  1905   1901   <div class="listingblock">
  1906   1902   <div class="content">
  1907         -<pre><tt>class c4
         1903  +<pre><code>class c4
  1908   1904       class operation
  1909   1905       common(
  1910   1906           int a,
  1911   1907           char *b) : (int)
  1912   1908       {
  1913   1909           // Common class operation code.
  1914   1910           // No defined instance variable.
  1915   1911           return -1 ;
  1916   1912       }
  1917         -end</tt></pre>
         1913  +end</code></pre>
  1918   1914   </div></div>
  1919   1915   </div>
  1920   1916   <div class="sect3">
  1921   1917   <h4 id="_instance_operations">INSTANCE OPERATIONS</h4>
  1922   1918   <div class="paragraph"><p>A class may define instance based operations.
  1923   1919   Instance operations have an implicit first parameter which is a pointer
  1924   1920   to the instance on which the operation is to be performed.
  1925         -It is not necessary to declare the <tt>self</tt> variable as <strong>pycca</strong> will
         1921  +It is not necessary to declare the <code>self</code> variable as <strong>pycca</strong> will
  1926   1922   insert it.
  1927   1923   However, since this is "C", it is necessary to supply a value for the
  1928         -implied <tt>self</tt> parameter when invoking an instance operation.</p></div>
         1924  +implied <code>self</code> parameter when invoking an instance operation.</p></div>
  1929   1925   <div class="listingblock">
  1930   1926   <div class="content">
  1931         -<pre><tt>class c5
         1927  +<pre><code>class c5
  1932   1928       attribute (int count)
  1933   1929       instance operation
  1934   1930       addFive()
  1935   1931       {
  1936   1932           // Can reference "self"
  1937   1933           self-&gt;count += 5 ;
  1938   1934       }
  1939         -end</tt></pre>
         1935  +end</code></pre>
  1940   1936   </div></div>
  1941   1937   </div>
  1942   1938   <div class="sect3">
  1943   1939   <h4 id="_instance_storage">INSTANCE STORAGE</h4>
  1944   1940   <div class="paragraph"><p>A separate pool of storage of instances is generated for each class.
  1945   1941   Instances may be declared as initial instances, as slots in the
  1946   1942   storage pool for dynamically created instances or the pool may contain both
  1947   1943   initially defined instances and slots for dynamic instance creation.
  1948   1944   If a class definition contains a <em>slots</em> statement, then the storage
  1949   1945   pool for the class will contain at least the given number of instance
  1950   1946   storage locations.</p></div>
  1951   1947   <div class="listingblock">
  1952   1948   <div class="content">
  1953         -<pre><tt>class c6
         1949  +<pre><code>class c6
  1954   1950       attribute (int count)
  1955   1951       population dynamic
  1956   1952       slots 5
  1957         -end</tt></pre>
         1953  +end</code></pre>
  1958   1954   </div></div>
  1959   1955   <div class="paragraph"><p>The above example insures that there are five dynamically allocatable
  1960   1956   instances of class <em>c6</em>.</p></div>
  1961   1957   <div class="sect4">
  1962   1958   <h5 id="_initial_instances">INITIAL INSTANCES</h5>
  1963   1959   <div class="paragraph"><p>The <strong>instance</strong> and <strong>table</strong> statements are used to define
  1964   1960   initial class instances.
................................................................................
  1968   1964   for that class may be defined.
  1969   1965   Instances may be named or anonymous.
  1970   1966   Named instances are useful when creating initial instances that
  1971   1967   have instance references in them.
  1972   1968   Anonymous instances cannot be referred to directly by other
  1973   1969   initial instances.
  1974   1970   Named instances also have the advantage of being able to be
  1975         -located at run time using the <tt>Instance()</tt> macro.</p></div>
         1971  +located at run time using the <code>Instance()</code> macro.</p></div>
  1976   1972   <div class="paragraph"><p>The values of all attributes that do not have a defined default
  1977   1973   value must be specified.
  1978   1974   For attributes that have a defined default value,
  1979   1975   they are given that default value if not mentioned in the
  1980   1976   instance definition.
  1981   1977   Otherwise the default value is overrided when mention in the instance
  1982   1978   definition.</p></div>
  1983   1979   <div class="listingblock">
  1984   1980   <div class="content">
  1985         -<pre><tt>class c6
         1981  +<pre><code>class c6
  1986   1982       attribute (int count) default {0}
  1987   1983       attribute (int age)
  1988   1984       reference R13 -&gt; c7
  1989   1985   end
  1990   1986   
  1991   1987   instance c6@i1
  1992   1988       (int age) {22}
  1993   1989       (int count) {17}
  1994   1990       R13 -&gt; i14
  1995         -end</tt></pre>
         1991  +end</code></pre>
  1996   1992   </div></div>
  1997   1993   <div class="paragraph"><p>The above example defines a named initial instance, <strong>i1</strong>, of class, <strong>c6</strong>.
  1998         -The default value of <tt>(int count)</tt> is overridden to be 17 rather than
         1994  +The default value of <code>(int count)</code> is overridden to be 17 rather than
  1999   1995   the default of 0.
  2000   1996   The singular reference, <strong>R13</strong>, is set to point to the <strong>i14</strong> instance of
  2001   1997   class, <strong>c7</strong>.</p></div>
  2002   1998   <div class="paragraph"><p>When there are a number of instances of a particular class,
  2003   1999   the <strong>instance</strong> statement can be tedious to use and obscures the
  2004   2000   nature of the instances as a group.
  2005   2001   In this case, the <strong>table</strong> command allows many instances to be defined
  2006   2002   in a tabular arrangement.</p></div>
  2007   2003   <div class="listingblock">
  2008   2004   <div class="content">
  2009         -<pre><tt>table
         2005  +<pre><code>table
  2010   2006       c6      (int age)       (int count)     R13
  2011   2007       @i2     {19}            {26}            -&gt; i8
  2012   2008       @       -               {27}            -&gt; i9
  2013   2009       @i3     {42}            {28}            -&gt; i10
  2014         -end</tt></pre>
         2010  +end</code></pre>
  2015   2011   </div></div>
  2016   2012   <div class="paragraph"><p>The above example shows three more initial instances for class <strong>c6</strong>.
  2017   2013   The attributes are listed as a heading, followed by lines that
  2018   2014   give the name of the instance and the values of the attributes it is to have.
  2019   2015   The heading need only contain those attributes that you wish to define
  2020   2016   to be different from the default.
  2021   2017   If the instance name is not given (<em>i.e.</em> a plain <em>@</em> is present)
................................................................................
  2057   2053   Neither <strong>constant</strong> nor <strong>static</strong> class storage types
  2058   2054   may have a <strong>slots</strong> statement to declare dynamic instances.
  2059   2055   Pycca will issue a warning for <strong>constant</strong> or <strong>static</strong> classes whose
  2060   2056   initial instance population is empty and no storage pool will be
  2061   2057   defined for such classes.</p></div>
  2062   2058   <div class="listingblock">
  2063   2059   <div class="content">
  2064         -<pre><tt>class c7
         2060  +<pre><code>class c7
  2065   2061       attribute (int count)
  2066   2062       attribute (int year)
  2067   2063       population constant
  2068   2064   end
  2069   2065   
  2070   2066   instance c7
  2071   2067       (int count) 3
  2072   2068       (int year) 1977
  2073   2069   end
  2074   2070   
  2075   2071   instance c7
  2076   2072       (int count) 7
  2077   2073       (int year) 1978
  2078         -end</tt></pre>
         2074  +end</code></pre>
  2079   2075   </div></div>
  2080   2076   <div class="paragraph"><p>The above example declares two anonymous instances of the constant class, <strong>c7</strong>.
  2081   2077   The storage pool for <strong>c7</strong> will be declared as <em>const</em> and its size is
  2082   2078   fixed at two.</p></div>
  2083   2079   </div>
  2084   2080   </div>
  2085   2081   </div>
................................................................................
  2092   2088   type state machines.
  2093   2089   For Moore machines,
  2094   2090   action code is associated with the state and that code is executed
  2095   2091   upon the transition into the state.
  2096   2092   There are quite a number of rules for state machines as we shall see below.</p></div>
  2097   2093   <div class="listingblock">
  2098   2094   <div class="content">
  2099         -<pre><tt>class Dog
         2095  +<pre><code>class Dog
  2100   2096       machine
  2101   2097           initial state born
  2102   2098           final state die
  2103   2099   
  2104   2100           state born()
  2105   2101           {
  2106   2102               // "C" code for the "born" state goes here
................................................................................
  2114   2110           transition grow - Age -&gt; die
  2115   2111   
  2116   2112           state die()
  2117   2113           {
  2118   2114               // "C" code for the "die" state goes here
  2119   2115           }
  2120   2116       end
  2121         -end</tt></pre>
         2117  +end</code></pre>
  2122   2118   </div></div>
  2123   2119   <div class="paragraph"><p>Each machine may specify a default initial state using the
  2124   2120   <strong>initial state</strong> statement.
  2125   2121   If none is given, then the first state defined is taken to be
  2126   2122   the default initial state.
  2127   2123   A state may be marked as a final state using the <strong>final state</strong>
  2128   2124   statement.
................................................................................
  2141   2137   Thus it is not allowed for the same event to cause a transition
  2142   2138   into states that have a different parameter signatures.
  2143   2139   <strong>Pycca</strong> detects this error, issuing an appropriate error message.</p></div>
  2144   2140   <div class="paragraph"><p>The state action is supplied by the "C" code in the enclosing
  2145   2141   braces.
  2146   2142   When an event causes a transition into a state,
  2147   2143   the given "C" code executes.
  2148         -The code may refer to <tt>self</tt> which is declared as a pointer
         2144  +The code may refer to <code>self</code> which is declared as a pointer
  2149   2145   to a class instance and contains the reference to the instance
  2150   2146   to which the event was directed.</p></div>
  2151   2147   <div class="paragraph"><p>Transitions are specified by the <strong>transition</strong> statement.
  2152   2148   This statement lists the current state, event and new state.
  2153   2149   <strong>Pycca</strong> allows the state machine to be specified in any order.
  2154   2150   You may list all the state definitions followed by the transitions
  2155   2151   or any combination you find clearest.
................................................................................
  2179   2175   <div class="paragraph"><p>The STSA supports dynamic instance creation.
  2180   2176   Each class has its own storage pool.
  2181   2177   This is in keeping with the minimal system assumptions that STSA
  2182   2178   makes.
  2183   2179   Class instances may be created in a synchronous manner or in an
  2184   2180   asynchronous manner.
  2185   2181   Synchronous creation involves invoking a create function from STSA.
  2186         -Pycca provides a convenience macro, <tt>PYCCA_createInstance</tt>, to
         2182  +Pycca provides a convenience macro, <code>PYCCA_createInstance</code>, to
  2187   2183   help in the interface to STSA.
  2188   2184   Synchronously created instances may be placed in any state when
  2189   2185   they are created.
  2190   2186   Usually the default initial state is chosen using the
  2191         -<tt>InitialStateNumber()</tt> macro (or just 0 for creating instances that
         2187  +<code>InitialStateNumber()</code> macro (or just 0 for creating instances that
  2192   2188   have no associated state machine).
  2193   2189   It is important to remember that synchronously created instances
  2194   2190   <em>do not execute the action of their initial state</em>.
  2195   2191   They are simply allocated from the class storage pool, run the
  2196   2192   constructor if any and are placed in the state.
  2197   2193   So for example:</p></div>
  2198   2194   <div class="listingblock">
  2199   2195   <div class="content">
  2200         -<pre><tt>ClassRefVar(Dog, d) ;
  2201         -d = PYCCA_createInstance(Dog, InitialStateNumber(Dog)) ;</tt></pre>
         2196  +<pre><code>ClassRefVar(Dog, d) ;
         2197  +d = PYCCA_createInstance(Dog, InitialStateNumber(Dog)) ;</code></pre>
  2202   2198   </div></div>
  2203         -<div class="paragraph"><p>will create an instance of <em>Dog</em> held in the <tt>d</tt> variable in its
         2199  +<div class="paragraph"><p>will create an instance of <em>Dog</em> held in the <code>d</code> variable in its
  2204   2200   default initial state, but state action of the default initial state
  2205   2201   has not been run.</p></div>
  2206   2202   <div class="paragraph"><p>The other form of instance creation is asynchronous instance creation.
  2207   2203   Any <strong>transition</strong> statement where the current state is named by the
  2208   2204   period character (.) is a creation transition.
  2209   2205   The period state name represents an initial pseudo state where
  2210   2206   the instance has been created and will be delivered a event causing
  2211   2207   a transition into the new state given in the <strong>transition</strong> statement.
  2212   2208   For asynchronous creation, the state action into which the
  2213   2209   instance transition upon receiving the creation event is executed.</p></div>
  2214   2210   <div class="paragraph"><p>For example:</p></div>
  2215   2211   <div class="listingblock">
  2216   2212   <div class="content">
  2217         -<pre><tt>class Dog
         2213  +<pre><code>class Dog
  2218   2214       machine
  2219   2215           transition . - Born -&gt; born
  2220   2216           transition born - GrowUp -&gt; grown
  2221   2217           state born()
  2222   2218           {
  2223   2219               puts("Dog is born") ;
  2224   2220           }
  2225   2221   
  2226   2222           state grown()
  2227   2223           {
  2228   2224               puts("Dog is grown") ;
  2229   2225           }
  2230   2226       end
  2231         -end</tt></pre>
         2227  +end</code></pre>
  2232   2228   </div></div>
  2233         -<div class="paragraph"><p>defines a class with a creation event, <tt>Born</tt>.
         2229  +<div class="paragraph"><p>defines a class with a creation event, <code>Born</code>.
  2234   2230   Executing the statement:</p></div>
  2235   2231   <div class="listingblock">
  2236   2232   <div class="content">
  2237         -<pre><tt>PYCCA_generateCreation(Born, Dog, self) ;</tt></pre>
         2233  +<pre><code>PYCCA_generateCreation(Born, Dog, self) ;</code></pre>
  2238   2234   </div></div>
  2239         -<div class="paragraph"><p>will cause the creation event <tt>Born</tt> to be queued.
         2235  +<div class="paragraph"><p>will cause the creation event <code>Born</code> to be queued.
  2240   2236   When that event is dispatched, an instance of Dog will
  2241   2237   be created in the initial pseudo state (with the constructor
  2242   2238   executed if any) and the
  2243         -<tt>Born</tt> event will be delivered to the new instance.
         2239  +<code>Born</code> event will be delivered to the new instance.
  2244   2240   The event will cause a transition from the initial pseudo state
  2245         -into the <tt>born</tt> state
         2241  +into the <code>born</code> state
  2246   2242   and the action associated with that state will be executed.</p></div>
  2247   2243   <div class="paragraph"><p>The creation rules may seem complex, but they cover all the
  2248   2244   required circumstances.
  2249   2245   It is worth noting that any state that is an initial state and
  2250   2246   which does not have any <em>incoming</em> transitions should have
  2251   2247   an empty state action.
  2252   2248   Since there is never any transition into the state,
................................................................................
  2272   2268   <h4 id="_generalizations_implemented_by_reference">GENERALIZATIONS IMPLEMENTED BY REFERENCE</h4>
  2273   2269   <div class="paragraph"><p>A class defines a storage for generalization relationship implmented
  2274   2270   by reference using the <strong>subtype &#8230; reference</strong> statement.
  2275   2271   This statement gives a list of classes that are to be considered
  2276   2272   as the subtype classes.</p></div>
  2277   2273   <div class="listingblock">
  2278   2274   <div class="content">
  2279         -<pre><tt>class c8
         2275  +<pre><code>class c8
  2280   2276       subtype R9 reference
  2281   2277           cs1
  2282   2278           cs2
  2283   2279           cs3
  2284   2280       end
  2285         -end</tt></pre>
         2281  +end</code></pre>
  2286   2282   </div></div>
  2287   2283   <div class="paragraph"><p><strong>Pycca</strong> will translate a <strong>subtype &#8230; reference</strong> statement into
  2288   2284   two structure members:</p></div>
  2289   2285   <div class="listingblock">
  2290   2286   <div class="content">
  2291         -<pre><tt>struct c8 {
         2287  +<pre><code>struct c8 {
  2292   2288       SubtypeCode R9__code ;
  2293   2289       MechInstance R9 ;
  2294         -} ;</tt></pre>
         2290  +} ;</code></pre>
  2295   2291   </div></div>
  2296   2292   <div class="paragraph"><p>The <strong>R9</strong> member holds a pointer to one of the subtypes of the <strong>R9</strong>
  2297   2293   reference.
  2298   2294   The <strong>R9__code</strong> member holds an integer encoding of the type of the
  2299   2295   <strong>R9</strong> pointer.
  2300   2296   In this scheme of subtyping,
  2301   2297   the subtype instances are quite distinct from the supertype and
................................................................................
  2306   2302   <div class="paragraph"><p>In simple cases,
  2307   2303   typically a generalization hierarchy that is only a single level deep,
  2308   2304   it is sometimes more convenient to hold the subtype classes of the supertype
  2309   2305   directly in the storage of the supertype instances as a union data type.
  2310   2306   Considering the above example, it would appear in union form as below:</p></div>
  2311   2307   <div class="listingblock">
  2312   2308   <div class="content">
  2313         -<pre><tt>class c8
         2309  +<pre><code>class c8
  2314   2310       subtype R9 union
  2315   2311           cs1
  2316   2312           cs2
  2317   2313           cs3
  2318   2314       end
  2319         -end</tt></pre>
         2315  +end</code></pre>
  2320   2316   </div></div>
  2321   2317   <div class="paragraph"><p>In this case,
  2322   2318   <strong>pycca</strong> would translate this subtype statement into:</p></div>
  2323   2319   <div class="listingblock">
  2324   2320   <div class="content">
  2325         -<pre><tt>struct c8 {
         2321  +<pre><code>struct c8 {
  2326   2322       SubtypeCode R9__code ;
  2327   2323       union {
  2328   2324           struct cs1 R9_cs1 ;
  2329   2325           struct cs2 R9_cs2 ;
  2330   2326           struct cs3 R9_cs3 ;
  2331   2327       } R9 ;
  2332         -} ;</tt></pre>
         2328  +} ;</code></pre>
  2333   2329   </div></div>
  2334   2330   <div class="paragraph"><p>Keeping subtypes in a union data structure contained within a member
  2335   2331   of the supertype can make managing dynamic instances easier,
  2336   2332   especially in the case of dynamic migration of one subtype into another.
  2337   2333   As long as the size of the subtype classes is similar,
  2338   2334   there is no waste of memory and there may be some savings.
  2339   2335   However, complex hierarchies, such as those where one supertype class
................................................................................
  2362   2358   In practice the full power of polymorphic events is rarely needed.
  2363   2359   <strong>Pycca</strong> includes checks to insure that the polymorphism is properly
  2364   2360   defined.
  2365   2361   The following example shows a situation with a two level generalization
  2366   2362   hierachy.</p></div>
  2367   2363   <div class="listingblock">
  2368   2364   <div class="content">
  2369         -<pre><tt>class super1
         2365  +<pre><code>class super1
  2370   2366       subtype R1 reference
  2371   2367           sub_1_A
  2372   2368           sub_1_B
  2373   2369       end
  2374   2370       polymorphic event
  2375   2371           e1
  2376   2372           e2
................................................................................
  2429   2425       machine
  2430   2426           transition s1 - e2 -&gt; s1
  2431   2427           state s1()
  2432   2428           {
  2433   2429               puts("Consume e2 at this level") ;
  2434   2430           }
  2435   2431       end
  2436         -end</tt></pre>
         2432  +end</code></pre>
  2437   2433   </div></div>
  2438   2434   <div class="paragraph"><p>In this example, the supertype class, <strong>super1</strong>, has a
  2439   2435   generalization relationship, <strong>R1</strong>, with two subtypes,
  2440   2436   <strong>sub_1_A</strong> and <strong>sub_1_B</strong>.
  2441   2437   The <strong>super1</strong> class defines two polymorphic events, <strong>e1</strong> and <strong>e2</strong>.
  2442   2438   This means that the subtypes of <strong>super1</strong> must either consume the
  2443   2439   polymorphic events directly or they must be consumed by
................................................................................
  2461   2457   For example, header files needed by the "C" code in actions
  2462   2458   needs to be put into the generated file at a location dictated by the
  2463   2459   compiler.
  2464   2460   <strong>Pycca</strong> allows both <strong>prolog</strong> and <strong>epilog</strong> code to be inserted in
  2465   2461   both the <strong>interface</strong> and <strong>implementation</strong> files.</p></div>
  2466   2462   <div class="listingblock">
  2467   2463   <div class="content">
  2468         -<pre><tt>implementation prolog {
         2464  +<pre><code>implementation prolog {
  2469   2465   #include &lt;stddef.h&gt;
  2470   2466   #include "myHeader.h"
  2471         -}</tt></pre>
         2467  +}</code></pre>
  2472   2468   </div></div>
  2473   2469   <div class="paragraph"><p>Prolog code is placed in the generated "C" file before any of the
  2474   2470   passed through code.
  2475   2471   Similarly for the <strong>interface</strong> prolog.
  2476   2472   It is placed before the domain function prototypes.
  2477   2473   Epilog code is placed at the end.
  2478   2474   Note also that prolog and epilog code is cumulative in that there
................................................................................
  2545   2541   </p>
  2546   2542   </dd>
  2547   2543   <dt class="hdlist1">
  2548   2544   s
  2549   2545   </dt>
  2550   2546   <dd>
  2551   2547   <p>
  2552         -A pointer to the instance that is sending the event. This may be <tt>NULL</tt>
         2548  +A pointer to the instance that is sending the event. This may be <code>NULL</code>
  2553   2549   if the event originates from a <em>domain operation</em>.
  2554   2550   </p>
  2555   2551   </dd>
  2556   2552   </dl></div>
  2557   2553   <div class="paragraph"><div class="title">PYCCA_generateSelf(e, c)</div><p>Generate an event to self.</p></div>
  2558   2554   <div class="dlist"><dl>
  2559   2555   <dt class="hdlist1">
................................................................................
  2565   2561   </p>
  2566   2562   </dd>
  2567   2563   <dt class="hdlist1">
  2568   2564   c
  2569   2565   </dt>
  2570   2566   <dd>
  2571   2567   <p>
  2572         -The name of the class of <tt>self</tt>.
         2568  +The name of the class of <code>self</code>.
  2573   2569   </p>
  2574   2570   </dd>
  2575   2571   </dl></div>
  2576   2572   <div class="paragraph"><div class="title">PYCCA_generateToSelf(e)</div><p>Generate an event to self.
  2577   2573   This macro will use the current class context.</p></div>
  2578   2574   <div class="dlist"><dl>
  2579   2575   <dt class="hdlist1">
................................................................................
  2612   2608   </p>
  2613   2609   </dd>
  2614   2610   <dt class="hdlist1">
  2615   2611   s
  2616   2612   </dt>
  2617   2613   <dd>
  2618   2614   <p>
  2619         -A pointer to the instance that is sending the event. This may be <tt>NULL</tt>
         2615  +A pointer to the instance that is sending the event. This may be <code>NULL</code>
  2620   2616       if the event originates from a <em>domain operation</em>.
  2621   2617   </p>
  2622   2618   </dd>
  2623   2619   </dl></div>
  2624   2620   <div class="paragraph"><div class="title">PYCCA_generateCreation(e, c, s)</div><p>Generate a creation event.</p></div>
  2625   2621   <div class="dlist"><dl>
  2626   2622   <dt class="hdlist1">
................................................................................
  2676   2672   </p>
  2677   2673   </dd>
  2678   2674   <dt class="hdlist1">
  2679   2675   s
  2680   2676   </dt>
  2681   2677   <dd>
  2682   2678   <p>
  2683         -A pointer to the instance that is sending the event. This may be <tt>NULL</tt>
         2679  +A pointer to the instance that is sending the event. This may be <code>NULL</code>
  2684   2680       if the event originates from a <em>domain operation</em>.
  2685   2681   </p>
  2686   2682   </dd>
  2687   2683   <dt class="hdlist1">
  2688   2684   d
  2689   2685   </dt>
  2690   2686   <dd>
  2691   2687   <p>
  2692   2688   The delay time, in milliseconds.
  2693   2689   </p>
  2694   2690   </dd>
  2695   2691   </dl></div>
  2696         -<div class="paragraph"><div class="title">PYCCA_generateDelayedSelf(e, c, d)</div><p>Generate a delayed event to <tt>self</tt>.</p></div>
         2692  +<div class="paragraph"><div class="title">PYCCA_generateDelayedSelf(e, c, d)</div><p>Generate a delayed event to <code>self</code>.</p></div>
  2697   2693   <div class="dlist"><dl>
  2698   2694   <dt class="hdlist1">
  2699   2695   e
  2700   2696   </dt>
  2701   2697   <dd>
  2702   2698   <p>
  2703   2699   The name of the event to generate.
................................................................................
  2704   2700   </p>
  2705   2701   </dd>
  2706   2702   <dt class="hdlist1">
  2707   2703   c
  2708   2704   </dt>
  2709   2705   <dd>
  2710   2706   <p>
  2711         -The name of the class of <tt>self</tt>.
         2707  +The name of the class of <code>self</code>.
  2712   2708   </p>
  2713   2709   </dd>
  2714   2710   <dt class="hdlist1">
  2715   2711   d
  2716   2712   </dt>
  2717   2713   <dd>
  2718   2714   <p>
  2719   2715   The delay time, in milliseconds.
  2720   2716   </p>
  2721   2717   </dd>
  2722   2718   </dl></div>
  2723         -<div class="paragraph"><div class="title">PYCCA_generateDelayedToSelf(e, d)</div><p>Generate a delayed event to <tt>self</tt>.
         2719  +<div class="paragraph"><div class="title">PYCCA_generateDelayedToSelf(e, d)</div><p>Generate a delayed event to <code>self</code>.
  2724   2720   This macro will use the current class context.</p></div>
  2725   2721   <div class="dlist"><dl>
  2726   2722   <dt class="hdlist1">
  2727   2723   e
  2728   2724   </dt>
  2729   2725   <dd>
  2730   2726   <p>
................................................................................
  2767   2763   </p>
  2768   2764   </dd>
  2769   2765   <dt class="hdlist1">
  2770   2766   s
  2771   2767   </dt>
  2772   2768   <dd>
  2773   2769   <p>
  2774         -A pointer to the instance that is sending the event. This may be <tt>NULL</tt>
         2770  +A pointer to the instance that is sending the event. This may be <code>NULL</code>
  2775   2771       if the event originates from a <em>domain operation</em>.
  2776   2772   </p>
  2777   2773   </dd>
  2778   2774   </dl></div>
  2779         -<div class="paragraph"><div class="title">PYCCA_cancelDelayedSelf(e, c)</div><p>Cancel a delayed event that was sent to <tt>self</tt>.</p></div>
  2780         -<div class="dlist"><dl>
  2781         -<dt class="hdlist1">
  2782         -e
  2783         -</dt>
  2784         -<dd>
  2785         -<p>
  2786         -The name of the event to generate.
  2787         -</p>
  2788         -</dd>
  2789         -<dt class="hdlist1">
  2790         -c
  2791         -</dt>
  2792         -<dd>
  2793         -<p>
  2794         -The name of the class of <tt>self</tt>.
  2795         -</p>
  2796         -</dd>
  2797         -</dl></div>
  2798         -<div class="paragraph"><div class="title">PYCCA_cancelDelayedToSelf(e)</div><p>Cancel a delayed event that was sent to <tt>self</tt>.
         2775  +<div class="paragraph"><div class="title">PYCCA_cancelDelayedSelf(e, c)</div><p>Cancel a delayed event that was sent to <code>self</code>.</p></div>
         2776  +<div class="dlist"><dl>
         2777  +<dt class="hdlist1">
         2778  +e
         2779  +</dt>
         2780  +<dd>
         2781  +<p>
         2782  +The name of the event to generate.
         2783  +</p>
         2784  +</dd>
         2785  +<dt class="hdlist1">
         2786  +c
         2787  +</dt>
         2788  +<dd>
         2789  +<p>
         2790  +The name of the class of <code>self</code>.
         2791  +</p>
         2792  +</dd>
         2793  +</dl></div>
         2794  +<div class="paragraph"><div class="title">PYCCA_cancelDelayedToSelf(e)</div><p>Cancel a delayed event that was sent to <code>self</code>.
  2799   2795   This macro will use the current class context.</p></div>
  2800   2796   <div class="dlist"><dl>
  2801   2797   <dt class="hdlist1">
  2802   2798   e
  2803   2799   </dt>
  2804   2800   <dd>
  2805   2801   <p>
................................................................................
  2834   2830   </p>
  2835   2831   </dd>
  2836   2832   <dt class="hdlist1">
  2837   2833   s
  2838   2834   </dt>
  2839   2835   <dd>
  2840   2836   <p>
  2841         -A pointer to the instance that is sending the event. This may be <tt>NULL</tt>
         2837  +A pointer to the instance that is sending the event. This may be <code>NULL</code>
  2842   2838       if the event originates from a <em>domain operation</em>.
  2843   2839   </p>
  2844   2840   </dd>
  2845   2841   </dl></div>
  2846   2842   <div class="paragraph"><div class="title">PYCCA_remainDelayedSelf(e, c)</div><p>Retrive the time remaining on a self-directed delayed event.</p></div>
  2847   2843   <div class="dlist"><dl>
  2848   2844   <dt class="hdlist1">
................................................................................
  2854   2850   </p>
  2855   2851   </dd>
  2856   2852   <dt class="hdlist1">
  2857   2853   c
  2858   2854   </dt>
  2859   2855   <dd>
  2860   2856   <p>
  2861         -The name of the class of <tt>self</tt>.
         2857  +The name of the class of <code>self</code>.
  2862   2858   </p>
  2863   2859   </dd>
  2864   2860   </dl></div>
  2865   2861   <div class="paragraph"><div class="title">PYCCA_remainDelayedToSelf(e)</div><p>Retrive the time remaining on a self-directed delayed event.
  2866   2862   This macro will use the current class context.</p></div>
  2867   2863   <div class="dlist"><dl>
  2868   2864   <dt class="hdlist1">
................................................................................
  2898   2894   </li>
  2899   2895   </ol></div>
  2900   2896   <div class="paragraph"><div class="title">Sending a <em>Bark</em> Event</div><p>Assuming that <em>dog</em> is an instance of class <em>Dog</em> and that the <em>Bark</em>
  2901   2897   event takes a single parameter, <em>howLoud</em>, then the following will send
  2902   2898   the <em>Bark</em> event to the <em>dog</em> instance of <em>Dog</em>.</p></div>
  2903   2899   <div class="listingblock">
  2904   2900   <div class="content">
  2905         -<pre><tt>MechEcb bark = PYCCA_newEvent(Bark, Dog, dog, self) ;
         2901  +<pre><code>MechEcb bark = PYCCA_newEvent(Bark, Dog, dog, self) ;
  2906   2902   PYCCA_eventParam(bark, Dog, Bark, howLoud) = 20 ;
  2907         -PYCCA_postEvent(bark) ;</tt></pre>
         2903  +PYCCA_postEvent(bark) ;</code></pre>
  2908   2904   </div></div>
  2909   2905   <div class="paragraph"><div class="title">PYCCA_newEvent(e, c, i, s)</div><p>Returns a <em>MechEcb</em> for an ordinary event.</p></div>
  2910   2906   <div class="dlist"><dl>
  2911   2907   <dt class="hdlist1">
  2912   2908   e
  2913   2909   </dt>
  2914   2910   <dd>
................................................................................
  2933   2929   </p>
  2934   2930   </dd>
  2935   2931   <dt class="hdlist1">
  2936   2932   s
  2937   2933   </dt>
  2938   2934   <dd>
  2939   2935   <p>
  2940         -A pointer to the instance that is sending the event. This may be <tt>NULL</tt>
         2936  +A pointer to the instance that is sending the event. This may be <code>NULL</code>
  2941   2937       if the event originates from a <em>domain operation</em>.
  2942   2938   </p>
  2943   2939   </dd>
  2944   2940   </dl></div>
  2945   2941   <div class="paragraph"><div class="title">PYCCA_newSelfEvent(e, c)</div><p>Returns a <em>MechEcb</em> for an ordinary event where the target instance
  2946         -and the sending instance are <tt>self</tt>.</p></div>
         2942  +and the sending instance are <code>self</code>.</p></div>
  2947   2943   <div class="dlist"><dl>
  2948   2944   <dt class="hdlist1">
  2949   2945   e
  2950   2946   </dt>
  2951   2947   <dd>
  2952   2948   <p>
  2953   2949   The name of the event to generate.
................................................................................
  2959   2955   <dd>
  2960   2956   <p>
  2961   2957   The name of the class of the instance receiving the event.
  2962   2958   </p>
  2963   2959   </dd>
  2964   2960   </dl></div>
  2965   2961   <div class="paragraph"><div class="title">PYCCA_newEventToSelf(e)</div><p>Returns a <em>MechEcb</em> for an ordinary event where the target instance
  2966         -and the sending instance are <tt>self</tt>.
         2962  +and the sending instance are <code>self</code>.
  2967   2963   This macro will use the current class context.</p></div>
  2968   2964   <div class="dlist"><dl>
  2969   2965   <dt class="hdlist1">
  2970   2966   e
  2971   2967   </dt>
  2972   2968   <dd>
  2973   2969   <p>
................................................................................
  3002   2998   </p>
  3003   2999   </dd>
  3004   3000   <dt class="hdlist1">
  3005   3001   s
  3006   3002   </dt>
  3007   3003   <dd>
  3008   3004   <p>
  3009         -A pointer to the instance that is sending the event. This may be <tt>NULL</tt>
         3005  +A pointer to the instance that is sending the event. This may be <code>NULL</code>
  3010   3006       if the event originates from a <em>domain operation</em>.
  3011   3007   </p>
  3012   3008   </dd>
  3013   3009   </dl></div>
  3014   3010   <div class="paragraph"><div class="title">PYCCA_newCreationEvent(e, c, s)</div><p>Returns a <em>MechEcb</em> for a creation event.</p></div>
  3015   3011   <div class="dlist"><dl>
  3016   3012   <dt class="hdlist1">
................................................................................
  3030   3026   </p>
  3031   3027   </dd>
  3032   3028   <dt class="hdlist1">
  3033   3029   s
  3034   3030   </dt>
  3035   3031   <dd>
  3036   3032   <p>
  3037         -A pointer to the instance that is sending the event. This may be <tt>NULL</tt>
         3033  +A pointer to the instance that is sending the event. This may be <code>NULL</code>
  3038   3034       if the event originates from a <em>domain operation</em>.
  3039   3035   </p>
  3040   3036   </dd>
  3041   3037   </dl></div>
  3042   3038   <div class="paragraph"><div class="title">PYCCA_newCreationEventForThisClass(e, s)</div><p>Returns a <em>MechEcb</em> for a creation event for creating an instance of
  3043   3039   the current class context.</p></div>
  3044   3040   <div class="dlist"><dl>
................................................................................
  3051   3047   </p>
  3052   3048   </dd>
  3053   3049   <dt class="hdlist1">
  3054   3050   s
  3055   3051   </dt>
  3056   3052   <dd>
  3057   3053   <p>
  3058         -A pointer to the instance that is sending the event. This may be <tt>NULL</tt>
         3054  +A pointer to the instance that is sending the event. This may be <code>NULL</code>
  3059   3055       if the event originates from a <em>domain operation</em>.
  3060   3056   </p>
  3061   3057   </dd>
  3062   3058   </dl></div>
  3063   3059   <div class="paragraph"><div class="title">PYCCA_eventParam(ecb, c, e, p)</div><p>Retrieve the value of an event parameter.</p></div>
  3064   3060   <div class="dlist"><dl>
  3065   3061   <dt class="hdlist1">
................................................................................
  3190   3186   The initial state that the class is to be placed in.
  3191   3187       This argument is the actual numeric code for the state and should
  3192   3188       be specified by a macro.
  3193   3189       This is usually specified as <em>InitialStateNumber(c)</em>,
  3194   3190       to create the instance in its default initial state
  3195   3191       but a class may be created in any of its states as
  3196   3192       specified by the <em>StateNumber(c, s)</em> macro.
  3197         -    For classes that do not have an associated state machine use <tt>0</tt>.
         3193  +    For classes that do not have an associated state machine use <code>0</code>.
  3198   3194       <em>N.B.</em> that the action of the initial state is <strong>not</strong> executed when
  3199   3195       an instance is synchronously created in this manner.
  3200   3196       To both create an instance and execute an action, you must create
  3201   3197       the instance asynchronously using a creation event.
  3202   3198   </p>
  3203   3199   </dd>
  3204   3200   </dl></div>
................................................................................
  3254   3250   </dt>
  3255   3251   <dd>
  3256   3252   <p>
  3257   3253   A pointer to the instance that is to have its state changed.
  3258   3254   </p>
  3259   3255   </dd>
  3260   3256   </dl></div>
  3261         -<div class="paragraph"><div class="title">PYCCA_selectOneInstWhere(i, c, expr)</div><p>This macro expands to a linear search of class named, <tt>c</tt>, for the first
  3262         -instance where <tt>expr</tt> is true.
  3263         -The <tt>i</tt> argument is the name of a
  3264         -variable which is of type pointer to <tt>c</tt> structure.
  3265         -The expanded code searches the storage pool for <tt>c</tt>
         3257  +<div class="paragraph"><div class="title">PYCCA_selectOneInstWhere(i, c, expr)</div><p>This macro expands to a linear search of class named, <code>c</code>, for the first
         3258  +instance where <code>expr</code> is true.
         3259  +The <code>i</code> argument is the name of a
         3260  +variable which is of type pointer to <code>c</code> structure.
         3261  +The expanded code searches the storage pool for <code>c</code>
  3266   3262   stopping at the first instance that is in use and that satisfies
  3267         -<tt>expr</tt>.
  3268         -<tt>Expr</tt> is presumed to contain accesses to the attributes of <tt>c</tt>
  3269         -in the form of <tt>i&#8594;a</tt>.
  3270         -The value of <tt>i</tt> variable is modified and at the end of the loop will either
  3271         -point to the first instance of <tt>c</tt> where <tt>expr</tt> evaluates to non-zero
         3263  +<code>expr</code>.
         3264  +<code>Expr</code> is presumed to contain accesses to the attributes of <code>c</code>
         3265  +in the form of <code>i&#8594;a</code>.
         3266  +The value of <code>i</code> variable is modified and at the end of the loop will either
         3267  +point to the first instance of <code>c</code> where <code>expr</code> evaluates to non-zero
  3272   3268   or will point past the end of
  3273         -the storage pool for the class (as given by the <tt>EndStorage(c)</tt> macro,
  3274         -<strong>i.e.</strong> if <tt>i</tt> &gt;= EndStorage(c) then the search failed).
         3269  +the storage pool for the class (as given by the <code>EndStorage(c)</code> macro,
         3270  +<strong>i.e.</strong> if <code>i</code> &gt;= EndStorage(c) then the search failed).
  3275   3271   Note that this macro tests for whether or not the instance is
  3276   3272   currently allocated and therefore is only useful for classes that are
  3277   3273   either dynamically allocated or have a state machine.</p></div>
  3278   3274   <div class="dlist"><dl>
  3279   3275   <dt class="hdlist1">
  3280   3276   i
  3281   3277   </dt>
................................................................................
  3297   3293   </dt>
  3298   3294   <dd>
  3299   3295   <p>
  3300   3296   A "C" expression that will be intepreted as a boolean.
  3301   3297   </p>
  3302   3298   </dd>
  3303   3299   </dl></div>
  3304         -<div class="paragraph"><div class="title">PYCCA_selectOneInstOfThisClassWhere(i, expr)</div><p>This macro operates the same as <tt>PYCCA_selectOneInstWhere</tt> except that
         3300  +<div class="paragraph"><div class="title">PYCCA_selectOneInstOfThisClassWhere(i, expr)</div><p>This macro operates the same as <code>PYCCA_selectOneInstWhere</code> except that
  3305   3301   the current class context is used to supply the class name.</p></div>
  3306   3302   <div class="dlist"><dl>
  3307   3303   <dt class="hdlist1">
  3308   3304   i
  3309   3305   </dt>
  3310   3306   <dd>
  3311   3307   <p>
................................................................................
  3317   3313   </dt>
  3318   3314   <dd>
  3319   3315   <p>
  3320   3316   A "C" expression that will be intepreted as a boolean.
  3321   3317   </p>
  3322   3318   </dd>
  3323   3319   </dl></div>
  3324         -<div class="paragraph"><div class="title">PYCCA_selectOneStaticInstWhere(i, c, expr)</div><p>This macro is like <tt>PYCCA_selectOneInstWhere</tt> except that it does not
  3325         -assume that <tt>c</tt> is has a dynamic pool associated with it.
         3320  +<div class="paragraph"><div class="title">PYCCA_selectOneStaticInstWhere(i, c, expr)</div><p>This macro is like <code>PYCCA_selectOneInstWhere</code> except that it does not
         3321  +assume that <code>c</code> is has a dynamic pool associated with it.
  3326   3322   For static and constant populations, there may not be an
  3327   3323   instance allocation block created and this macro does not include
  3328   3324   the test that the instance in the storage pool is actually in use.</p></div>
  3329         -<div class="paragraph"><div class="title">PYCCA_selectOneStaticInstOfThisClassWhere(i, expr)</div><p>This macro is like <tt>PYCCA_selectOneInstWhere</tt> except that it uses the
         3325  +<div class="paragraph"><div class="title">PYCCA_selectOneStaticInstOfThisClassWhere(i, expr)</div><p>This macro is like <code>PYCCA_selectOneInstWhere</code> except that it uses the
  3330   3326   current class context to supply the class name.</p></div>
  3331   3327   <div class="paragraph"><div class="title">PYCCA_forAllInst(i, c)</div><p>This macro is a convenience macro that sets up a loop such that iterates
  3332   3328   across all instances of a class.
  3333   3329   The macro should be followed by a statement (possibly compound and
  3334   3330   enclosed in braces (<strong>{}</strong>).
  3335   3331   In the statement, <strong>i</strong> will iteratively take on the value of every
  3336   3332   instance defined for the class, <strong>c</strong>.</p></div>
................................................................................
  3348   3344   </dt>
  3349   3345   <dd>
  3350   3346   <p>
  3351   3347   The name of the class of the instance corresponding to <em>i</em>.
  3352   3348   </p>
  3353   3349   </dd>
  3354   3350   </dl></div>
  3355         -<div class="paragraph"><div class="title">PYCCA_forAllInstOfThisClass(i)</div><p>This macro is like <tt>PYCCA_forAllInst</tt> except that it uses the
         3351  +<div class="paragraph"><div class="title">PYCCA_forAllInstOfThisClass(i)</div><p>This macro is like <code>PYCCA_forAllInst</code> except that it uses the
  3356   3352   current class context to supply the class name.</p></div>
  3357   3353   <div class="paragraph"><div class="title">PYCCA_forAllRelated(v, i, r)</div><p>This macro is a convenience macro that sets up a loop such that iterates
  3358   3354   across the instances that are related to the class.
  3359   3355   This macro assumes that the related instances were declared using the
  3360         -<tt>&#8594;&gt;c</tt>, syntax, <em>i.e.</em> the related instances are of the counted type.
         3356  +<code>&#8594;&gt;c</code>, syntax, <em>i.e.</em> the related instances are of the counted type.
  3361   3357   The macro should be followed by a statement (possibly compound and
  3362   3358   enclosed in braces (<strong>{}</strong>).
  3363         -In the macro, <strong>v</strong> should be declared as <tt>ClassRefSetVar</tt> or a
  3364         -<tt>ClassRefConstSetVar</tt>. Then <strong>v</strong> is iterated over the set of related instances.</p></div>
         3359  +In the macro, <strong>v</strong> should be declared as <code>ClassRefSetVar</code> or a
         3360  +<code>ClassRefConstSetVar</code>. Then <strong>v</strong> is iterated over the set of related instances.</p></div>
  3365   3361   <div class="dlist"><dl>
  3366   3362   <dt class="hdlist1">
  3367   3363   v
  3368   3364   </dt>
  3369   3365   <dd>
  3370   3366   <p>
  3371   3367   The name of a reference set variable.
................................................................................
  3384   3380   </dt>
  3385   3381   <dd>
  3386   3382   <p>
  3387   3383   The name of the relationship across which the iteration occurs.
  3388   3384   </p>
  3389   3385   </dd>
  3390   3386   </dl></div>
  3391         -<div class="paragraph"><div class="title">PYCCA_forAllRelatedTerm(v, i, r)</div><p>This macro is the same as <tt>PYCCA_forAllRelated()</tt> except that the relationship
  3392         -must have been declared using the <tt>&#8594;&gt;n</tt> syntax, <em>i.e.</em> the relationship
  3393         -storage consists of a <tt>NULL</tt> terminated array of instance pointers.</p></div>
         3387  +<div class="paragraph"><div class="title">PYCCA_forAllRelatedTerm(v, i, r)</div><p>This macro is the same as <code>PYCCA_forAllRelated()</code> except that the relationship
         3388  +must have been declared using the <code>&#8594;&gt;n</code> syntax, <em>i.e.</em> the relationship
         3389  +storage consists of a <code>NULL</code> terminated array of instance pointers.</p></div>
  3394   3390   </div>
  3395   3391   <div class="sect2">
  3396   3392   <h3 id="_generalization_navigation">GENERALIZATION NAVIGATION</h3>
  3397   3393   <div class="paragraph"><p>When a generalization relationship is implemented as a union
  3398   3394   data type, the instances of the subtypes do not use a pointer to
  3399   3395   navigate to the supertype.
  3400   3396   Rather it is only necessary to <em>up cast</em> the self pointer to
................................................................................
  3403   3399   <div class="paragraph"><div class="title">PYCCA_unionSupertype(sub, supc, r)</div><p>Navigate to the supertype for instances contained in a union.</p></div>
  3404   3400   <div class="dlist"><dl>
  3405   3401   <dt class="hdlist1">
  3406   3402   sub
  3407   3403   </dt>
  3408   3404   <dd>
  3409   3405   <p>
  3410         -A pointer to the subtype instance. This is frequently <tt>self</tt>.
         3406  +A pointer to the subtype instance. This is frequently <code>self</code>.
  3411   3407   </p>
  3412   3408   </dd>
  3413   3409   <dt class="hdlist1">
  3414   3410   supc
  3415   3411   </dt>
  3416   3412   <dd>
  3417   3413   <p>
................................................................................
  3445   3441   <div class="paragraph"><div class="title">PYCCA_unionSubtype(sup, r, subc)</div><p>Navigate to the subtype instance contained in a union.</p></div>
  3446   3442   <div class="dlist"><dl>
  3447   3443   <dt class="hdlist1">
  3448   3444   sup
  3449   3445   </dt>
  3450   3446   <dd>
  3451   3447   <p>
  3452         -A pointer to the supertype instance. This is frequently <tt>self</tt>.
         3448  +A pointer to the supertype instance. This is frequently <code>self</code>.
  3453   3449   </p>
  3454   3450   </dd>
  3455   3451   <dt class="hdlist1">
  3456   3452   r
  3457   3453   </dt>
  3458   3454   <dd>
  3459   3455   <p>
................................................................................
  3472   3468   <div class="paragraph"><div class="title">PYCCA_referenceSubtype(sup, r, subc)</div><p>Navigate to the subtype instance by pointer reference.</p></div>
  3473   3469   <div class="dlist"><dl>
  3474   3470   <dt class="hdlist1">
  3475   3471   sup
  3476   3472   </dt>
  3477   3473   <dd>
  3478   3474   <p>
  3479         -A pointer to the supertype instance. This is frequently <tt>self</tt>.
         3475  +A pointer to the supertype instance. This is frequently <code>self</code>.
  3480   3476   </p>
  3481   3477   </dd>
  3482   3478   <dt class="hdlist1">
  3483   3479   r
  3484   3480   </dt>
  3485   3481   <dd>
  3486   3482   <p>
................................................................................
  3502   3498   the subtype class, <em>subc</em> across the relationship, <em>r</em>.</p></div>
  3503   3499   <div class="dlist"><dl>
  3504   3500   <dt class="hdlist1">
  3505   3501   sup
  3506   3502   </dt>
  3507   3503   <dd>
  3508   3504   <p>
  3509         -A pointer to the supertype instance. This is frequently <tt>self</tt>.
         3505  +A pointer to the supertype instance. This is frequently <code>self</code>.
  3510   3506   </p>
  3511   3507   </dd>
  3512   3508   <dt class="hdlist1">
  3513   3509   supc
  3514   3510   </dt>
  3515   3511   <dd>
  3516   3512   <p>
................................................................................
  3585   3581   For subtypes that have a constructor, an explicit call is required.</p></div>
  3586   3582   <div class="dlist"><dl>
  3587   3583   <dt class="hdlist1">
  3588   3584   sup
  3589   3585   </dt>
  3590   3586   <dd>
  3591   3587   <p>
  3592         -A pointer to the supertype instance. This is frequently <tt>self</tt>.
         3588  +A pointer to the supertype instance. This is frequently <code>self</code>.
  3593   3589   </p>
  3594   3590   </dd>
  3595   3591   <dt class="hdlist1">
  3596   3592   r
  3597   3593   </dt>
  3598   3594   <dd>
  3599   3595   <p>
................................................................................
  3607   3603   <p>
  3608   3604   The name of the subtype class.
  3609   3605   </p>
  3610   3606   </dd>
  3611   3607   </dl></div>
  3612   3608   <div class="paragraph"><div class="title">PYCCA_initUnionInstanceToState(sup, r, subc, st)</div><p>Initialize a subtype instance that is contained in a union based
  3613   3609   supertype specifying a particular state.
  3614         -This macro is like the <tt>PYCCA_initUnionInstance</tt> macro but also
         3610  +This macro is like the <code>PYCCA_initUnionInstance</code> macro but also
  3615   3611   allows you to specify the state into which the instance is placed.</p></div>
  3616   3612   <div class="dlist"><dl>
  3617   3613   <dt class="hdlist1">
  3618   3614   sup
  3619   3615   </dt>
  3620   3616   <dd>
  3621   3617   <p>
  3622         -A pointer to the supertype instance. This is frequently <tt>self</tt>.
         3618  +A pointer to the supertype instance. This is frequently <code>self</code>.
  3623   3619   </p>
  3624   3620   </dd>
  3625   3621   <dt class="hdlist1">
  3626   3622   r
  3627   3623   </dt>
  3628   3624   <dd>
  3629   3625   <p>
................................................................................
  3639   3635   </p>
  3640   3636   </dd>
  3641   3637   <dt class="hdlist1">
  3642   3638   st
  3643   3639   </dt>
  3644   3640   <dd>
  3645   3641   <p>
  3646         -The state name of a <tt>subc</tt> class state.
         3642  +The state name of a <code>subc</code> class state.
  3647   3643   </p>
  3648   3644   </dd>
  3649   3645   </dl></div>
  3650   3646   <div class="paragraph"><div class="title">PYCCA_relateSubtypeByRef(s, supc, r, t, subc)</div><p>Relate a supertype instance to a subtype instance when the relationship
  3651   3647   is being stored by reference.</p></div>
  3652   3648   <div class="dlist"><dl>
  3653   3649   <dt class="hdlist1">
  3654   3650   s
  3655   3651   </dt>
  3656   3652   <dd>
  3657   3653   <p>
  3658         -A pointer to the supertype instance. This is frequently <tt>self</tt>.
         3654  +A pointer to the supertype instance. This is frequently <code>self</code>.
  3659   3655   </p>
  3660   3656   </dd>
  3661   3657   <dt class="hdlist1">
  3662   3658   supc
  3663   3659   </dt>
  3664   3660   <dd>
  3665   3661   <p>
................................................................................
  3693   3689   </dl></div>
  3694   3690   </div>
  3695   3691   <div class="sect2">
  3696   3692   <h3 id="_dynamic_relationship_management">DYNAMIC RELATIONSHIP MANAGEMENT</h3>
  3697   3693   <div class="paragraph"><p>These macro aid in managing the references associated with dynamic
  3698   3694   relationships.
  3699   3695   In particular, one-to-many relationships implemented by a counted pointer
  3700         -array (<em>i.e.</em> those using the <tt>-ddd&gt;&gt;</tt> syntax)
  3701         -require you to find a slot whose value is <tt>NULL</tt> and store the reference there.
         3696  +array (<em>i.e.</em> those using the <code>-ddd&gt;&gt;</code> syntax)
         3697  +require you to find a slot whose value is <code>NULL</code> and store the reference there.
  3702   3698   Unrelating instances is similar.</p></div>
  3703   3699   <div class="paragraph"><div class="title">PYCCA_relateToMany(n, o, r, m)</div><p>Relate two instances in an one-to-many relationship that is implemented
  3704   3700   using a counted pointer array.</p></div>
  3705   3701   <div class="dlist"><dl>
  3706   3702   <dt class="hdlist1">
  3707   3703   n
  3708   3704   </dt>
................................................................................
  3734   3730   </dt>
  3735   3731   <dd>
  3736   3732   <p>
  3737   3733   A pointer to an instance on the many side of the relationship.
  3738   3734   </p>
  3739   3735   </dd>
  3740   3736   </dl></div>
  3741         -<div class="paragraph"><p>The <tt>n</tt> variable is ranged over the counted pointer array where instances
  3742         -of <tt>r</tt> are stored
  3743         -until an empty slot is found (as indicated by a <tt>NULL</tt> value) and then many
         3737  +<div class="paragraph"><p>The <code>n</code> variable is ranged over the counted pointer array where instances
         3738  +of <code>r</code> are stored
         3739  +until an empty slot is found (as indicated by a <code>NULL</code> value) and then many
  3744   3740   side instance is then assigned to that slot.
  3745         -If no slot is found, then the expression <tt>n &gt;= o&#8594;r + COUNTOF(o&#8594;r)</tt>
         3741  +If no slot is found, then the expression <code>n &gt;= o&#8594;r + COUNTOF(o&#8594;r)</code>
  3746   3742   is true.</p></div>
  3747   3743   <div class="paragraph"><div class="title">PYCCA_unrelateFromMany(n, o, r, m)</div><p>Unrelate two instances from a one-to-many relationship that is implemented
  3748   3744   by a counted pointer array.</p></div>
  3749   3745   <div class="dlist"><dl>
  3750   3746   <dt class="hdlist1">
  3751   3747   n
  3752   3748   </dt>
................................................................................
  3778   3774   </dt>
  3779   3775   <dd>
  3780   3776   <p>
  3781   3777   A pointer to an instance on the many side of the relationship.
  3782   3778   </p>
  3783   3779   </dd>
  3784   3780   </dl></div>
  3785         -<div class="paragraph"><p>The <tt>n</tt> variable is ranged over the counted pointer array where instances
  3786         -of <tt>r</tt> are stored a slot containing the value of <tt>m</tt> is found
  3787         -and then that slot is assigned <tt>NULL</tt>.
  3788         -If no matching slot is found, then the expression <tt>n &gt;= o&#8594;r + COUNTOF(o&#8594;r)</tt>
         3781  +<div class="paragraph"><p>The <code>n</code> variable is ranged over the counted pointer array where instances
         3782  +of <code>r</code> are stored a slot containing the value of <code>m</code> is found
         3783  +and then that slot is assigned <code>NULL</code>.
         3784  +If no matching slot is found, then the expression <code>n &gt;= o&#8594;r + COUNTOF(o&#8594;r)</code>
  3789   3785   is true.</p></div>
  3790   3786   <div class="paragraph"><p>For one-to-many relationships implemented by linked lists (<em>i.e.</em> those
  3791         -using the <tt>-&gt;&gt;l</tt> syntax), the following macros are useful.</p></div>
         3787  +using the <code>-&gt;&gt;l</code> syntax), the following macros are useful.</p></div>
  3792   3788   <div class="paragraph"><div class="title">PYCCA_linkToMany(o, r, m)</div><p>Relate two instances in an one-to-many relationship that is implemented
  3793   3789   using linked lists.</p></div>
  3794   3790   <div class="dlist"><dl>
  3795   3791   <dt class="hdlist1">
  3796   3792   o
  3797   3793   </dt>
  3798   3794   <dd>
................................................................................
  3813   3809   </dt>
  3814   3810   <dd>
  3815   3811   <p>
  3816   3812   A pointer to an instance on the many side of the relationship.
  3817   3813   </p>
  3818   3814   </dd>
  3819   3815   </dl></div>
  3820         -<div class="paragraph"><p>The <tt>m</tt> instance is added to the linked list of instances that are related
  3821         -to the <tt>o</tt> instance across relationship <tt>r</tt>.</p></div>
         3816  +<div class="paragraph"><p>The <code>m</code> instance is added to the linked list of instances that are related
         3817  +to the <code>o</code> instance across relationship <code>r</code>.</p></div>
  3822   3818   <div class="paragraph"><div class="title">PYCCA_unlinkFromMany(m, r)</div><p>Unrelate an instance in a one-to-many relationship that is implemented
  3823   3819   using linked lists.</p></div>
  3824   3820   <div class="dlist"><dl>
  3825   3821   <dt class="hdlist1">
  3826   3822   m
  3827   3823   </dt>
  3828   3824   <dd>
................................................................................
  3831   3827   </p>
  3832   3828   </dd>
  3833   3829   <dt class="hdlist1">
  3834   3830   r
  3835   3831   </dt>
  3836   3832   <dd>
  3837   3833   <p>
  3838         -The name of the relationship in which <tt>m</tt> participates.
         3834  +The name of the relationship in which <code>m</code> participates.
  3839   3835   </p>
  3840   3836   </dd>
  3841   3837   </dl></div>
  3842         -<div class="paragraph"><p>The <tt>m</tt> instance is unlinked from the list associated with relationship <tt>r</tt>.</p></div>
         3838  +<div class="paragraph"><p>The <code>m</code> instance is unlinked from the list associated with relationship <code>r</code>.</p></div>
  3843   3839   <div class="paragraph"><div class="title">PYCCA_isLinkEmpty(o, r)</div><p>Test if there are any instance in a one-to-many relationship implemented
  3844   3840   using linked lists.</p></div>
  3845   3841   <div class="dlist"><dl>
  3846   3842   <dt class="hdlist1">
  3847   3843   o
  3848   3844   </dt>
  3849   3845   <dd>
................................................................................
  3857   3853   <dd>
  3858   3854   <p>
  3859   3855   The name of the relationship.
  3860   3856   </p>
  3861   3857   </dd>
  3862   3858   </dl></div>
  3863   3859   <div class="paragraph"><p>This macro evaluates to a boolean that is true if there are no instances
  3864         -linked from <tt>o</tt> across the relationship, <tt>r</tt>, and false otherwise.</p></div>
         3860  +linked from <code>o</code> across the relationship, <code>r</code>, and false otherwise.</p></div>
  3865   3861   <div class="paragraph"><div class="title">PYCCA_isLinkNotEmpty(o, r)</div><p>Test if there are no instances in a one-to-many relationship implemented
  3866   3862   using linked lists.</p></div>
  3867   3863   <div class="dlist"><dl>
  3868   3864   <dt class="hdlist1">
  3869   3865   o
  3870   3866   </dt>
  3871   3867   <dd>
................................................................................
  3879   3875   <dd>
  3880   3876   <p>
  3881   3877   The name of the relationship.
  3882   3878   </p>
  3883   3879   </dd>
  3884   3880   </dl></div>
  3885   3881   <div class="paragraph"><p>This macro evaluates to a boolean that is true if there is at least one
  3886         -instance linked from <tt>o</tt> across the relationship, <tt>r</tt>, and false otherwise.</p></div>
         3882  +instance linked from <code>o</code> across the relationship, <code>r</code>, and false otherwise.</p></div>
  3887   3883   <div class="paragraph"><div class="title">PYCCA_forAllLinkedInst(o, r, l)</div><p>Iterate over the instances of a one-to-many relationship implemented using
  3888   3884   linked lists.</p></div>
  3889   3885   <div class="dlist"><dl>
  3890   3886   <dt class="hdlist1">
  3891   3887   o
  3892   3888   </dt>
  3893   3889   <dd>
................................................................................
  3904   3900   </p>
  3905   3901   </dd>
  3906   3902   <dt class="hdlist1">
  3907   3903   l
  3908   3904   </dt>
  3909   3905   <dd>
  3910   3906   <p>
  3911         -The name of a variable of type <tt>rlink_t *</tt>
         3907  +The name of a variable of type <code>rlink_t *</code>
  3912   3908   </p>
  3913   3909   </dd>
  3914   3910   </dl></div>
  3915         -<div class="paragraph"><p>This macro expands to a <tt>for</tt> loop construct where all the instances related
  3916         -to <tt>o</tt> across <tt>r</tt> are visited.
  3917         -The link variable, <tt>l</tt>, is successively assigned values of the links
  3918         -related on the many side to <tt>o</tt>.
  3919         -The value of the link variable, <tt>l</tt>, is <em>not</em> a pointer to an instance.
         3911  +<div class="paragraph"><p>This macro expands to a <code>for</code> loop construct where all the instances related
         3912  +to <code>o</code> across <code>r</code> are visited.
         3913  +The link variable, <code>l</code>, is successively assigned values of the links
         3914  +related on the many side to <code>o</code>.
         3915  +The value of the link variable, <code>l</code>, is <em>not</em> a pointer to an instance.
  3920   3916   The instance pointer must be recovered by using the
  3921         -<tt>PYCCA_linkToInstRef()</tt> or <tt>PYCCA_linkToInstRefOfThisClass()</tt>
         3917  +<code>PYCCA_linkToInstRef()</code> or <code>PYCCA_linkToInstRefOfThisClass()</code>
  3922   3918   macros described below.</p></div>
  3923   3919   <div class="dlist"><div class="title">PYCCA_linkToInstRef(l, c, r)</div><dl>
  3924   3920   <dt class="hdlist1">
  3925   3921   l
  3926   3922   </dt>
  3927   3923   <dd>
  3928   3924   <p>
  3929         -The name of a variable of type <tt>rlink_t *</tt>
         3925  +The name of a variable of type <code>rlink_t *</code>
  3930   3926   </p>
  3931   3927   </dd>
  3932   3928   <dt class="hdlist1">
  3933   3929   c
  3934   3930   </dt>
  3935   3931   <dd>
  3936   3932   <p>
  3937   3933   The name of the class on the many side of the relationship
  3938         -to which <tt>l</tt> refers.
         3934  +to which <code>l</code> refers.
  3939   3935   </p>
  3940   3936   </dd>
  3941   3937   <dt class="hdlist1">
  3942   3938   r
  3943   3939   </dt>
  3944   3940   <dd>
  3945   3941   <p>
  3946   3942   The name of the relationship.
  3947   3943   </p>
  3948   3944   </dd>
  3949   3945   </dl></div>
  3950         -<div class="paragraph"><p>This macro converts a link pointer of type <tt>rlink_t *</tt> that is a link
  3951         -in relationship, <tt>r</tt>, to pointer to an instance of class, <tt>c</tt>.</p></div>
         3946  +<div class="paragraph"><p>This macro converts a link pointer of type <code>rlink_t *</code> that is a link
         3947  +in relationship, <code>r</code>, to pointer to an instance of class, <code>c</code>.</p></div>
  3952   3948   <div class="dlist"><div class="title">PYCCA_linkToInstRefOfThisClass()</div><dl>
  3953   3949   <dt class="hdlist1">
  3954   3950   l
  3955   3951   </dt>
  3956   3952   <dd>
  3957   3953   <p>
  3958         -The name of a variable of type <tt>rlink_t *</tt>
         3954  +The name of a variable of type <code>rlink_t *</code>
  3959   3955   </p>
  3960   3956   </dd>
  3961   3957   <dt class="hdlist1">
  3962   3958   r
  3963   3959   </dt>
  3964   3960   <dd>
  3965   3961   <p>
  3966   3962   The name of the relationship.
  3967   3963   </p>
  3968   3964   </dd>
  3969   3965   </dl></div>
  3970         -<div class="paragraph"><p>This macro is like <tt>PYCCA_linkToInstRef()</tt> except that it uses the
         3966  +<div class="paragraph"><p>This macro is like <code>PYCCA_linkToInstRef()</code> except that it uses the
  3971   3967   current class context to determine the class of the referenced instance.</p></div>
  3972   3968   </div>
  3973   3969   <div class="sect2">
  3974   3970   <h3 id="_instance_identifiers">Instance Identifiers</h3>
  3975   3971   <div class="paragraph"><p>It is sometimes useful to use have an means to identify an instance of
  3976   3972   a particular class outside of a domain.
  3977   3973   The pointer value of the instance is <strong>not</strong> suitable for this purpose,
  3978   3974   but the array index of the instance in its storage pool is satisfactory.
  3979   3975   The macros in this group provide a means of generating a small integer value
  3980   3976   for a instance that can be used as an identifier external to the domain
  3981   3977   or to translate an instance identifier into a pointer reference to the instance.</p></div>
  3982         -<div class="paragraph"><div class="title">PYCCA_idOfSelf</div><p>This macro generates an integer identifier for the <tt>self</tt> reference.</p></div>
         3978  +<div class="paragraph"><div class="title">PYCCA_idOfSelf</div><p>This macro generates an integer identifier for the <code>self</code> reference.</p></div>
  3983   3979   <div class="dlist"><div class="title">PYCCA_idOfRef(c, r)</div><dl>
  3984   3980   <dt class="hdlist1">
  3985   3981   c
  3986   3982   </dt>
  3987   3983   <dd>
  3988   3984   <p>
  3989   3985   The name of the class.
................................................................................
  3990   3986   </p>
  3991   3987   </dd>
  3992   3988   <dt class="hdlist1">
  3993   3989   r
  3994   3990   </dt>
  3995   3991   <dd>
  3996   3992   <p>
  3997         -The reference value for a member of class, <tt>c</tt>.
         3993  +The reference value for a member of class, <code>c</code>.
  3998   3994   </p>
  3999   3995   </dd>
  4000   3996   </dl></div>
  4001         -<div class="paragraph"><p>This macro generates an integer identifier for a reference, <tt>r</tt> of class, <tt>c</tt>.</p></div>
         3997  +<div class="paragraph"><p>This macro generates an integer identifier for a reference, <code>r</code> of class, <code>c</code>.</p></div>
  4002   3998   <div class="dlist"><div class="title">PYCCA_idOfInst(c, n)</div><dl>
  4003   3999   <dt class="hdlist1">
  4004   4000   c
  4005   4001   </dt>
  4006   4002   <dd>
  4007   4003   <p>
  4008   4004   The name of the class.
................................................................................
  4013   4009   </dt>
  4014   4010   <dd>
  4015   4011   <p>
  4016   4012   The name of a named instance.
  4017   4013   </p>
  4018   4014   </dd>
  4019   4015   </dl></div>
  4020         -<div class="paragraph"><p>This macro generates an integer identifier for the named instance, <tt>n</tt> of
  4021         -class, <tt>c</tt>.</p></div>
         4016  +<div class="paragraph"><p>This macro generates an integer identifier for the named instance, <code>n</code> of
         4017  +class, <code>c</code>.</p></div>
  4022   4018   <div class="dlist"><div class="title">PYCCA_refOfId(c, i)</div><dl>
  4023   4019   <dt class="hdlist1">
  4024   4020   c
  4025   4021   </dt>
  4026   4022   <dd>
  4027   4023   <p>
  4028   4024   The name of the class.
................................................................................
  4033   4029   </dt>
  4034   4030   <dd>
  4035   4031   <p>
  4036   4032   An integer identifier for an instance of the class.
  4037   4033   </p>
  4038   4034   </dd>
  4039   4035   </dl></div>
  4040         -<div class="paragraph"><p>This macro returns an instance reference to an instance of class, <tt>c</tt>, that
  4041         -is identifed by the integer identifier, <tt>i</tt>.</p></div>
         4036  +<div class="paragraph"><p>This macro returns an instance reference to an instance of class, <code>c</code>, that
         4037  +is identifed by the integer identifier, <code>i</code>.</p></div>
  4042   4038   <div class="dlist"><div class="title">PYCCA_refOfThisClassId(i)</div><dl>
  4043   4039   <dt class="hdlist1">
  4044   4040   i
  4045   4041   </dt>
  4046   4042   <dd>
  4047   4043   <p>
  4048   4044   An integer identifier for an instance of the class.
  4049   4045   </p>
  4050   4046   </dd>
  4051   4047   </dl></div>
  4052         -<div class="paragraph"><p>This macro is like <tt>PYCCA_refOfId()</tt> except that it uses the current
         4048  +<div class="paragraph"><p>This macro is like <code>PYCCA_refOfId()</code> except that it uses the current
  4053   4049   class context to determine the class of the instance identifier.</p></div>
  4054   4050   <div class="dlist"><div class="title">PYCCA_checkId(c, i)</div><dl>
  4055   4051   <dt class="hdlist1">
  4056   4052   c
  4057   4053   </dt>
  4058   4054   <dd>
  4059   4055   <p>
................................................................................
  4065   4061   </dt>
  4066   4062   <dd>
  4067   4063   <p>
  4068   4064   An integer identifier for an instance of the class.
  4069   4065   </p>
  4070   4066   </dd>
  4071   4067   </dl></div>
  4072         -<div class="paragraph"><p>This macro generates an invocation of the <tt>assert()</tt> macro to test
  4073         -that the identifier, <tt>i</tt> is valid for class, <tt>c</tt>.
         4068  +<div class="paragraph"><p>This macro generates an invocation of the <code>assert()</code> macro to test
         4069  +that the identifier, <code>i</code> is valid for class, <code>c</code>.
  4074   4070   This is useful if a domain operation accepts an integer identifier for
  4075   4071   an instance and wants to assert its validity.</p></div>
  4076   4072   <div class="dlist"><div class="title">PYCCA_checkThisClassId(i)</div><dl>
  4077   4073   <dt class="hdlist1">
  4078   4074   i
  4079   4075   </dt>
  4080   4076   <dd>
  4081   4077   <p>
  4082   4078   An integer identifier for an instance of the class.
  4083   4079   </p>
  4084   4080   </dd>
  4085   4081   </dl></div>
  4086         -<div class="paragraph"><p>This macro is like <tt>PYCCA_checkId()</tt> except that it uses the current
         4082  +<div class="paragraph"><p>This macro is like <code>PYCCA_checkId()</code> except that it uses the current
  4087   4083   class context to determine the class of the instance identifier.</p></div>
  4088   4084   </div>
  4089   4085   <div class="sect2">
  4090   4086   <h3 id="_encoding_macros">ENCODING MACROS</h3>
  4091   4087   <div class="paragraph"><p>This set of macros gives access to the various encodings and
  4092   4088   naming conventions used by <strong>pycca</strong> in the generated code.
  4093   4089   These macros are used by the <em>PYCCA_</em> macros and are sometimes useful
  4094   4090   in normal state action code.
  4095   4091   As of version 2.6, new macros were added that can use the class context
  4096   4092   that <strong>pycca</strong> generates.</p></div>
  4097         -<div class="paragraph"><div class="title">ClassRefType(c)</div><p>Expands to the type of a reference to an instance of class named, <tt>c</tt>.</p></div>
         4093  +<div class="paragraph"><div class="title">ClassRefType(c)</div><p>Expands to the type of a reference to an instance of class named, <code>c</code>.</p></div>
  4098   4094   <div class="paragraph"><div class="title">ThisClassRefType</div><p>Expands to the type of a reference to an instance of the current class
  4099   4095   context.</p></div>
  4100         -<div class="paragraph"><div class="title">ClassRefVar(c, v)</div><p>Declare a variable named <tt>v</tt> that refers to the class named, <tt>c</tt>.</p></div>
  4101         -<div class="paragraph"><div class="title">ThisClassRefVar(v)</div><p>Declare a variable named <tt>v</tt> that refers to the current class.</p></div>
  4102         -<div class="paragraph"><div class="title">ClassConstRefVar(c, v)</div><p>Declare a variable named <tt>v</tt> that refers to the class name <tt>c</tt>.
         4096  +<div class="paragraph"><div class="title">ClassRefVar(c, v)</div><p>Declare a variable named <code>v</code> that refers to the class named, <code>c</code>.</p></div>
         4097  +<div class="paragraph"><div class="title">ThisClassRefVar(v)</div><p>Declare a variable named <code>v</code> that refers to the current class.</p></div>
         4098  +<div class="paragraph"><div class="title">ClassConstRefVar(c, v)</div><p>Declare a variable named <code>v</code> that refers to the class name <code>c</code>.
  4103   4099   This macro is used for references to classes that have constant populations.</p></div>
  4104         -<div class="paragraph"><div class="title">ThisClassConstRefVar(v)</div><p>Declare a variable named <tt>v</tt> that refers to a constant instance of the
         4100  +<div class="paragraph"><div class="title">ThisClassConstRefVar(v)</div><p>Declare a variable named <code>v</code> that refers to a constant instance of the
  4105   4101   current class.</p></div>
  4106         -<div class="paragraph"><div class="title">ClassRefSetVar(c, v)</div><p>Declare a variable named <tt>v</tt> that refers to a set of instances of the
  4107         -class named <tt>c</tt>.</p></div>
  4108         -<div class="paragraph"><div class="title">ThisClassRefSetVar(v)</div><p>Declare a variable named <tt>v</tt> that refers to a set of instances of the
         4102  +<div class="paragraph"><div class="title">ClassRefSetVar(c, v)</div><p>Declare a variable named <code>v</code> that refers to a set of instances of the
         4103  +class named <code>c</code>.</p></div>
         4104  +<div class="paragraph"><div class="title">ThisClassRefSetVar(v)</div><p>Declare a variable named <code>v</code> that refers to a set of instances of the
  4109   4105   current class.</p></div>
  4110         -<div class="paragraph"><div class="title">ClassConstRefSetVar(c, v)</div><p>Declare a variable named <tt>v</tt> that revers to a set of constant instances of the
  4111         -class named <tt>c</tt>.</p></div>
  4112         -<div class="paragraph"><div class="title">ThisClassConstRefSetVar(c, v)</div><p>Declare a variable named <tt>v</tt> that revers to a set of constant instances of the
         4106  +<div class="paragraph"><div class="title">ClassConstRefSetVar(c, v)</div><p>Declare a variable named <code>v</code> that revers to a set of constant instances of the
         4107  +class named <code>c</code>.</p></div>
         4108  +<div class="paragraph"><div class="title">ThisClassConstRefSetVar(c, v)</div><p>Declare a variable named <code>v</code> that revers to a set of constant instances of the
  4113   4109   current class.</p></div>
  4114   4110   <div class="paragraph"><div class="title">SubCodeMember(r)</div><p>For generalization relationships, the super type holds an encoded values
  4115   4111   that signifies the type of the sub type to which it is currently related.
  4116   4112   This macro gives the structure member name in the super type instance
  4117   4113   for relationship, <em>r</em>.</p></div>
  4118   4114   <div class="paragraph"><div class="title">SubCodeValue(c, r, s)</div><p>For generalization relationships, the super type holds an encoded values
  4119   4115   that signifies the type of the sub type to which it is currently related.
  4120   4116   This macro gives the subtype code number for class, <em>c</em>, relationship, <em>r</em>
  4121   4117   and subtype name, <em>s</em>.</p></div>
  4122   4118   <div class="paragraph"><div class="title">SubTypesMember(r, s)</div><p>For subtypes held in a union, this macro gives the name of the union
  4123   4119   member for subtype, <em>s</em>, in relationship, <em>r</em>.
  4124   4120   Use the <em>PYCCA_unionSubtype()</em> macro to simply obtain the address
  4125   4121   of the union subtype member.</p></div>
  4126         -<div class="paragraph"><div class="title">RefCountMember(r)</div><p>For multiple references defined with the <tt>-&gt;&gt;c</tt> construct,
         4122  +<div class="paragraph"><div class="title">RefCountMember(r)</div><p>For multiple references defined with the <code>-&gt;&gt;c</code> construct,
  4127   4123   this macro gives the name of the class structure member that
  4128   4124   holds the count of class references along the relationship given
  4129   4125   by the <em>r</em> argument.</p></div>
  4130   4126   <div class="paragraph"><div class="title">EventNumber(c, e)</div><p>The number of the ordinary event for the event named, <em>e</em>, in class, <em>c</em>.</p></div>
  4131   4127   <div class="paragraph"><div class="title">ThisClassEventNumber(e)</div><p>The number of the ordinary event for the event named, <em>e</em>, in the current class.</p></div>
  4132   4128   <div class="paragraph"><div class="title">PolyEventNumber(c, e)</div><p>The number of the polymorphic event for the event named, <em>e</em>, in class, <em>c</em>.</p></div>
  4133   4129   <div class="paragraph"><div class="title">InitialStateNumber(c)</div><p>The number of the default initial state for instances of class, <em>c</em>.</p></div>
................................................................................
  4135   4131   <div class="paragraph"><div class="title">ThisClassStateNumber(s)</div><p>The number encoding the state, <em>s</em>, for the current class.</p></div>
  4136   4132   <div class="paragraph"><div class="title">SelfStateNumber</div><p>The number encoding the state for the current state of the <em>self</em> instance.</p></div>
  4137   4133   <div class="paragraph"><div class="title">EventParamType(c, e)</div><p>The type name of the data structure for event, <em>e</em>, in class, <em>c</em>.
  4138   4134   This macro is now <strong>deprecated</strong> as it interfers with a type name
  4139   4135   used in the architecture mechanisms.
  4140   4136   It is retained for backwards compatiblity but
  4141   4137   will be removed in a future release.
  4142         -Use the <tt>EventParamDecl()</tt> macro instead.</p></div>
         4138  +Use the <code>EventParamDecl()</code> macro instead.</p></div>
  4143   4139   <div class="paragraph"><div class="title">EventParamDecl(c, e)</div><p>The type name of the data structure for event, <em>e</em>, in class, <em>c</em>.</p></div>
  4144   4140   <div class="paragraph"><div class="title">ThisClassEventParamDecl(e)</div><p>The type name of the data structure for event, <em>e</em>, in the current class.</p></div>
  4145   4141   <div class="paragraph"><div class="title">ClassData(c)</div><p>A pointer to the class data structure for <em>c</em>.</p></div>
  4146   4142   <div class="paragraph"><div class="title">ThisClassData</div><p>A pointer to the class data structure for the current class.</p></div>
  4147   4143   <div class="paragraph"><div class="title">RefCountMember(r)</div><p>The name of the structure member that holds the reference count
  4148   4144   for a muli-reference relationship.</p></div>
  4149   4145   <div class="paragraph"><div class="title">BeginStorage(c)</div><p>The address of the beginning of instance storage for class, <em>c</em>.</p></div>
................................................................................
  4171   4167   <div class="paragraph"><div class="title">ThisClassInstOp(c, o)</div><p>The name of instance operation, <em>o</em>, in the current class.</p></div>
  4172   4168   </div>
  4173   4169   </div>
  4174   4170   </div>
  4175   4171   <div class="sect1">
  4176   4172   <h2 id="instrument">INSTRUMENTATION</h2>
  4177   4173   <div class="sectionbody">
  4178         -<div class="paragraph"><p>If the <tt>-instrument</tt> option is used, <strong>pycca</strong> will emit instrumentation
         4174  +<div class="paragraph"><p>If the <code>-instrument</code> option is used, <strong>pycca</strong> will emit instrumentation
  4179   4175   code at the beginning of each function associated with matching classes.
  4180   4176   When <strong>pycca</strong> includes instrumentation code, the preprocessor symbol,
  4181         -<tt>INSTRUMENT</tt> will be defined.
         4177  +<code>INSTRUMENT</code> will be defined.
  4182   4178   The actual instrumentation is delegated to a macro,
  4183         -<tt>INSTR_FUNC(s)</tt>, where <tt>s</tt> is a string indicating the specific
         4179  +<code>INSTR_FUNC(s)</code>, where <code>s</code> is a string indicating the specific
  4184   4180   function being invoked.
  4185         -Users may define the <tt>INSTR_FUNC(s)</tt> macro
         4181  +Users may define the <code>INSTR_FUNC(s)</code> macro
  4186   4182   (<em>e.g.</em> in the implementation prolog code) to override the default
  4187   4183   supplied by <strong>pycca</strong>.
  4188         -As of version 4.1, <strong>pycca</strong> supplies a default version of <tt>INSTR_FUNC</tt>
         4184  +As of version 4.1, <strong>pycca</strong> supplies a default version of <code>INSTR_FUNC</code>
  4189   4185   as well as one that is intended to work with a <strong>tack</strong> generated
  4190   4186   test harness.
  4191   4187   The default definition supplied by <strong>pycca</strong> is:</p></div>
  4192   4188   <div class="listingblock">
  4193   4189   <div class="content">
  4194         -<pre><tt>#ifdef INSTRUMENT
         4190  +<pre><code>#ifdef INSTRUMENT
  4195   4191   #   ifndef INSTR_FUNC
  4196   4192   #       ifdef TACK
  4197   4193   #           include "harness.h"
  4198   4194   #           define INSTR_FUNC(s) harness_stub_printf("instrument",\
  4199   4195                   "func %s file %s line %u", (s), __FILE__, __LINE__)
  4200   4196   #       else
  4201   4197   #           define INSTR_FUNC(s) printf("%s: %s %d\n", (s), __FILE__, __LINE__)
  4202   4198   #       endif /* TACK */
  4203   4199   #   endif /* INSTR_FUNC */
  4204         -#endif /* INSTRUMENT */</tt></pre>
         4200  +#endif /* INSTRUMENT */</code></pre>
  4205   4201   </div></div>
  4206   4202   <div class="paragraph"><p><strong>N.B.</strong> because the instrumentation macro is inserted into the output
  4207   4203   before any passed
  4208   4204   along "C" code, old compilers that do not allow variable declarations
  4209   4205   in a block after code statements will most likely produce compiler
  4210   4206   errors if any local variables are declared in the instrumented function.
  4211   4207   Such is the limitation of a program like <strong>pycca</strong> that does not
  4212   4208   examine the "C" code passed along.</p></div>
  4213   4209   </div>
  4214   4210   </div>
  4215   4211   <div class="sect1">
  4216   4212   <h2 id="data-portal">DATA PORTAL</h2>
  4217   4213   <div class="sectionbody">
  4218         -<div class="paragraph"><p>When the <tt>-dataportal</tt> option is given, <strong>pycca</strong> will generate a
         4214  +<div class="paragraph"><p>When the <code>-dataportal</code> option is given, <strong>pycca</strong> will generate a
  4219   4215   set of data structures that allow access to the attributes of class
  4220   4216   instances from outside of the domain.
  4221   4217   This facility is provided for the following purposes:</p></div>
  4222   4218   <div class="olist arabic"><ol class="arabic">
  4223   4219   <li>
  4224   4220   <p>
  4225   4221   Bridging data values into and out of the domain for use by
................................................................................
  4244   4240   </li>
  4245   4241   <li>
  4246   4242   <p>
  4247   4243   Testing, where generated events are used to force execution paths.
  4248   4244   </p>
  4249   4245   </li>
  4250   4246   </ol></div>
  4251         -<div class="paragraph"><p>The only values available through this interface are declared <tt>attribute</tt>
         4247  +<div class="paragraph"><p>The only values available through this interface are declared <code>attribute</code>
  4252   4248   values and the type code of a subtype that is related to a supertype.
  4253   4249   The internal pointer references used for relationship navigation
  4254   4250   are not accessible.</p></div>
  4255         -<div class="paragraph"><p>The files <tt>pycca_portal.h</tt> or <tt>pycca_portal.c</tt> contain the code and
         4251  +<div class="paragraph"><p>The files <code>pycca_portal.h</code> or <code>pycca_portal.c</code> contain the code and
  4256   4252   declarations needed to use the portal facility.
  4257         -These files may be obtained by invoking <strong>pycca</strong> with the <tt>-portalcode</tt> option.
         4253  +These files may be obtained by invoking <strong>pycca</strong> with the <code>-portalcode</code> option.
  4258   4254   These files contain the common code that can be used to read
  4259   4255   and update the class attributes within the domain
  4260   4256   and generate events to the instances of the domain.
  4261   4257   The functions require a parameter which is a pointer to the
  4262   4258   data structure that <strong>pycca</strong> generates.
  4263         -This variable is named <tt>&lt;domain name&gt;_portal</tt>, where <tt>&lt;domain name&gt;</tt>
         4259  +This variable is named <code>&lt;domain name&gt;_portal</code>, where <code>&lt;domain name&gt;</code>
  4264   4260   is replaced with the name of the domain.
  4265   4261   An external declaration of the variable is inserted into the generated
  4266   4262   header file.
  4267   4263   Classes and attributes are encoded as small integers and these definitions
  4268   4264   are also placed in the generated header file.
  4269   4265   A macro definition giving the total number of instances is also placed
  4270   4266   in the generated header file.
  4271   4267   This is the same numeric encoding that is placed in the generated
  4272         -header file when the <tt>-ids</tt> option is given.</p></div>
         4268  +header file when the <code>-ids</code> option is given.</p></div>
  4273   4269   <div class="paragraph"><p>Some care must be taken when accessing class attributes for classes
  4274         -that are subtypes of a generalization that is implemented via a <tt>union</tt>.
         4270  +that are subtypes of a generalization that is implemented via a <code>union</code>.
  4275   4271   In the case of a union, there are as many instances of each of the
  4276   4272   subtypes as there are of the ultimate supertype of the generalization.
  4277   4273   However, how the storage space of the subtype is being interpreted is
  4278   4274   determined by a type code that is stored in the supertype.
  4279   4275   Accessing a union subtype that is a different type than that currently
  4280   4276   related to the supertype will not yield the correct value.
  4281   4277   So for supertype classes,
................................................................................
  4332   4328   terms specified in this license.</p></div>
  4333   4329   </div>
  4334   4330   </div>
  4335   4331   </div>
  4336   4332   <div id="footnotes"><hr /></div>
  4337   4333   <div id="footer">
  4338   4334   <div id="footer-text">
  4339         -Version 4.3<br />
  4340         -Last updated 2013-08-21 17:28:18 PDT
         4335  +Version 4.5<br />
         4336  +Last updated
         4337  + 2015-05-26 09:40:07 PDT
  4341   4338   </div>
  4342   4339   </div>
  4343   4340   </body>
  4344   4341   </html>

Changes to pycca/doc/pycca.txt.

    42     42   //  pycca.txt - documentation for pycca
    43     43   // ABSTRACT:
    44     44   //  This file contains asciidoc(1) source for the pycca documentation.
    45     45   //*--
    46     46   PYCCA(1)
    47     47   ========
    48     48   Andrew Mangogna <mangoa01@users.sourceforge.net>
    49         -:Revision: 4.3
    50         -:Date: Wed Aug 21 17:19:49 PDT 2013
           49  +:Revision: 4.5
           50  +:Date: Thu Jan 15 07:25:10 PST 2015
    51     51   
    52     52   NAME
    53     53   ----
    54     54   pycca - Pass Your C Code Along
    55     55   
    56     56   SYNOPSIS
    57     57   --------

Changes to pycca/src/pycca.tcl.

    41     41   
    42     42   package require Tcl 8.6
    43     43   package require cmdline
    44     44   
    45     45   set iswrapped [expr {[lindex [file system [info script]] 0] ne "native"}]
    46     46   if {$iswrapped} {
    47     47       set top [file join $::starkit::topdir lib application]
           48  +    if {$::tcl_platform(os) eq "Linux"} {
           49  +        set libs [glob -nocomplain\
           50  +            -directory [file join $::starkit::topdir lib]\
           51  +            P-linux-*]
           52  +        foreach lib $libs {
           53  +            lappend ::auto_path $lib
           54  +        }
           55  +    }
    48     56   } else {
    49     57       set top [file dirname [info script]]
    50     58   }
    51     59   
    52     60   set cmdOpts {
    53     61       {version {Print out version information and exit}}
    54     62       {noline {No #line directives in the output}}
................................................................................
    71     79   array set options [cmdline::getoptions argv $cmdOpts $usage]
    72     80   # Generating the data bridge implies that we will also put out
    73     81   # the class and attribute identifiers.
    74     82   if {$options(dataportal)} {
    75     83       set options(ids) true
    76     84   }
    77     85   
    78         -set ::pycca_version 4.3.1
           86  +set ::pycca_version 4.5
    79     87   
    80     88   if {$options(version)} {
    81     89       chan puts "pycca: version $::pycca_version"
    82     90       chan puts {
    83         -This software is copyrighted 2007 - 2013 by G. Andrew Mangogna.
           91  +This software is copyrighted 2007 - 2015 by G. Andrew Mangogna.
    84     92   The following terms apply to all files associated with the software unless
    85     93   explicitly disclaimed in individual files.
    86     94   
    87     95   The authors hereby grant permission to use, copy, modify, distribute,
    88     96   and license this software and its documentation for any purpose, provided
    89     97   that existing copyright notices are retained in all copies and that this
    90     98   notice is included verbatim in any distributions. No written agreement,

Changes to tack/build/linux/tack.

cannot compute difference between binary files

Changes to tack/build/linux/tack.tpj.

     1      1   format  {TclDevKit Project File}
     2      2   fmtver  2.0
     3      3   fmttool {TclDevKit TclApp} 5.3
     4      4   
     5         -##  Saved at : Sun Oct 27 16:25:13 PDT 2013
     6         -##  By       : andrewm@zabox
            5  +##  Saved at : Thu Sep 15 16:31:39 PDT 2016
            6  +##  By       : andrewm@Office-NUC
     7      7   
     8      8   ########
     9      9   #####
    10     10   ###
    11     11   ##
    12     12   #
    13     13   
................................................................................
    26     26   Path                   {File /home/andrewm/working/tcl-cm3/tack/libtack/mechs.c}
    27     27   Path                   {File /home/andrewm/working/tcl-cm3/tack/libtack/mechs.h}
    28     28   Path                   {File /home/andrewm/working/tcl-cm3/tack/libtack/mechsIO.c}
    29     29   Path                   {File /home/andrewm/working/tcl-cm3/tack/libtack/mechsIO.h}
    30     30   Path                   {File /home/andrewm/working/tcl-cm3/tack/libtack/pycca_portal.h}
    31     31   Path                   {File /home/andrewm/working/tcl-cm3/tack/package-harness-2.1-tcl.tm}
    32     32   Path                   {File /home/andrewm/working/tcl-cm3/tack/libtack/pycca_portal.c}
    33         -Pkg/Architecture       linux-glibc2.3-ix86
           33  +Pkg/Architecture       linux-glibc2.19-x86_64
           34  +Pkg/Architecture       linux-glibc2.3-x86_64
    34     35   Pkg/Reference          Mk4tcl
    35     36   Pkg/Reference          {Tcl 8.6}
    36     37   Pkg/Reference          cmdline
    37     38   Pkg/Reference          csv
    38     39   Pkg/Reference          logger
    39     40   Pkg/Reference          msgcat
    40     41   Pkg/Reference          ral
................................................................................
    54     55   System/TempDir         {}
    55     56   System/Verbose         0
    56     57   Wrap/Compile/NoTbcload 0
    57     58   Wrap/Compile/Tcl       0
    58     59   Wrap/Compile/Version   {}
    59     60   Wrap/FSMode            {}
    60     61   Wrap/Icon              {}
    61         -Wrap/InputPrefix       /opt/ActiveTcl-8.6/bin/base-tcl8.6-thread-linux-ix86
           62  +Wrap/InputPrefix       /home/andrewm/opt/ActiveTcl-8.6/bin/base-tcl8.6-thread-linux-x86_64
    62     63   Wrap/Interpreter       {}
    63     64   Wrap/Merge             0
    64     65   Wrap/NoProvided        0
    65     66   Wrap/NoSpecials        0
    66     67   Wrap/Output            /home/andrewm/working/tcl-cm3/tack/build/linux/tack
    67     68   Wrap/Output/OSXApp     0
    68     69   
    69     70   #
    70     71   ##
    71     72   ###
    72     73   #####
    73     74   ########

Changes to tack/doc/tack.html.

     1      1   <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
     2      2       "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
     3      3   <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
     4      4   <head>
     5      5   <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
     6         -<meta name="generator" content="AsciiDoc 8.6.3" />
            6  +<meta name="generator" content="AsciiDoc 8.6.9" />
     7      7   <title>TACK(1)</title>
     8      8   <style type="text/css">
     9         -/* Sans-serif font. */
            9  +/* Shared CSS for AsciiDoc xhtml11 and html5 backends */
           10  +
           11  +/* Default font. */
           12  +body {
           13  +  font-family: Georgia,serif;
           14  +}
           15  +
           16  +/* Title font. */
    10     17   h1, h2, h3, h4, h5, h6,
    11     18   div.title, caption.title,
    12     19   thead, p.table.header,
    13         -div#toctitle,
    14         -span#author, span#revnumber, span#revdate, span#revremark,
    15         -div#footer {
           20  +#toctitle,
           21  +#author, #revnumber, #revdate, #revremark,
           22  +#footer {
    16     23     font-family: Arial,Helvetica,sans-serif;
    17     24   }
    18     25   
    19         -/* Serif font. */
    20         -div.sectionbody {
    21         -  font-family: Georgia,"Times New Roman",Times,serif;
    22         -}
    23         -
    24         -/* Monospace font. */
    25         -tt {
    26         -  font-size: inherit;
    27         -}
    28         -
    29     26   body {
    30     27     margin: 1em 5% 1em 5%;
    31     28   }
    32     29   
    33     30   a {
    34     31     color: blue;
    35     32     text-decoration: underline;
................................................................................
    44     41   }
    45     42   
    46     43   strong {
    47     44     font-weight: bold;
    48     45     color: #083194;
    49     46   }
    50     47   
    51         -tt {
    52         -  font-size: inherit;
    53         -  color: navy;
    54         -}
    55         -
    56     48   h1, h2, h3, h4, h5, h6 {
    57     49     color: #527bbd;
    58     50     margin-top: 1.2em;
    59     51     margin-bottom: 0.5em;
    60     52     line-height: 1.3;
    61     53   }
    62     54   
................................................................................
    68     60   }
    69     61   h3 {
    70     62     float: left;
    71     63   }
    72     64   h3 + * {
    73     65     clear: left;
    74     66   }
           67  +h5 {
           68  +  font-size: 1.0em;
           69  +}
    75     70   
    76     71   div.sectionbody {
    77     72     margin-left: 0;
    78     73   }
    79     74   
    80     75   hr {
    81     76     border: 1px solid silver;
................................................................................
    88     83   
    89     84   ul, ol, li > p {
    90     85     margin-top: 0;
    91     86   }
    92     87   ul > li     { color: #aaa; }
    93     88   ul > li > * { color: black; }
    94     89   
    95         -pre {
           90  +.monospaced, code, pre {
           91  +  font-family: "Courier New", Courier, monospace;
           92  +  font-size: inherit;
           93  +  color: navy;
    96     94     padding: 0;
    97     95     margin: 0;
    98     96   }
           97  +pre {
           98  +  white-space: pre-wrap;
           99  +}
    99    100   
   100         -span#author {
          101  +#author {
   101    102     color: #527bbd;
   102    103     font-weight: bold;
   103    104     font-size: 1.1em;
   104    105   }
   105         -span#email {
          106  +#email {
   106    107   }
   107         -span#revnumber, span#revdate, span#revremark {
          108  +#revnumber, #revdate, #revremark {
   108    109   }
   109    110   
   110         -div#footer {
          111  +#footer {
   111    112     font-size: small;
   112    113     border-top: 2px solid silver;
   113    114     padding-top: 0.5em;
   114    115     margin-top: 4.0em;
   115    116   }
   116         -div#footer-text {
          117  +#footer-text {
   117    118     float: left;
   118    119     padding-bottom: 0.5em;
   119    120   }
   120         -div#footer-badges {
          121  +#footer-badges {
   121    122     float: right;
   122    123     padding-bottom: 0.5em;
   123    124   }
   124    125   
   125         -div#preamble {
          126  +#preamble {
   126    127     margin-top: 1.5em;
   127    128     margin-bottom: 1.5em;
   128    129   }
   129         -div.tableblock, div.imageblock, div.exampleblock, div.verseblock,
          130  +div.imageblock, div.exampleblock, div.verseblock,
   130    131   div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
   131    132   div.admonitionblock {
   132    133     margin-top: 1.0em;
   133    134     margin-bottom: 1.5em;
   134    135   }
   135    136   div.admonitionblock {
   136    137     margin-top: 2.0em;
................................................................................
   180    181   }
   181    182   
   182    183   div.quoteblock, div.verseblock {
   183    184     padding-left: 1.0em;
   184    185     margin-left: 1.0em;
   185    186     margin-right: 10%;
   186    187     border-left: 5px solid #f0f0f0;
   187         -  color: #777777;
          188  +  color: #888;
   188    189   }
   189    190   
   190    191   div.quoteblock > div.attribution {
   191    192     padding-top: 0.5em;
   192    193     text-align: right;
   193    194   }
   194    195   
................................................................................
   220    221   
   221    222   div.exampleblock > div.content {
   222    223     border-left: 3px solid #dddddd;
   223    224     padding-left: 0.5em;
   224    225   }
   225    226   
   226    227   div.imageblock div.content { padding-left: 0; }
   227         -span.image img { border-style: none; }
          228  +span.image img { border-style: none; vertical-align: text-bottom; }
   228    229   a.image:visited { color: white; }
   229    230   
   230    231   dl {
   231    232     margin-top: 0.8em;
   232    233     margin-bottom: 0.8em;
   233    234   }
   234    235   dt {
................................................................................
   263    264   div.compact ul, div.compact ol,
   264    265   div.compact p, div.compact p,
   265    266   div.compact div, div.compact div {
   266    267     margin-top: 0.1em;
   267    268     margin-bottom: 0.1em;
   268    269   }
   269    270   
   270         -div.tableblock > table {
   271         -  border: 3px solid #527bbd;
   272         -}
   273         -thead, p.table.header {
   274         -  font-weight: bold;
   275         -  color: #527bbd;
   276         -}
   277    271   tfoot {
   278    272     font-weight: bold;
   279    273   }
   280    274   td > div.verse {
   281    275     white-space: pre;
   282    276   }
   283         -p.table {
   284         -  margin-top: 0;
   285         -}
   286         -/* Because the table frame attribute is overriden by CSS in most browsers. */
   287         -div.tableblock > table[frame="void"] {
   288         -  border-style: none;
   289         -}
   290         -div.tableblock > table[frame="hsides"] {
   291         -  border-left-style: none;
   292         -  border-right-style: none;
   293         -}
   294         -div.tableblock > table[frame="vsides"] {
   295         -  border-top-style: none;
   296         -  border-bottom-style: none;
   297         -}
   298         -
   299    277   
   300    278   div.hdlist {
   301    279     margin-top: 0.8em;
   302    280     margin-bottom: 0.8em;
   303    281   }
   304    282   div.hdlist tr {
   305    283     padding-bottom: 15px;
................................................................................
   358    336     vertical-align: top;
   359    337   }
   360    338   div.colist td img {
   361    339     margin-top: 0.3em;
   362    340   }
   363    341   
   364    342   @media print {
   365         -  div#footer-badges { display: none; }
          343  +  #footer-badges { display: none; }
   366    344   }
   367    345   
   368         -div#toc {
          346  +#toc {
   369    347     margin-bottom: 2.5em;
   370    348   }
   371    349   
   372         -div#toctitle {
          350  +#toctitle {
   373    351     color: #527bbd;
   374    352     font-size: 1.1em;
   375    353     font-weight: bold;
   376    354     margin-top: 1.0em;
   377    355     margin-bottom: 0.1em;
   378    356   }
   379    357   
   380         -div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
          358  +div.toclevel0, div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
   381    359     margin-top: 0;
   382    360     margin-bottom: 0;
   383    361   }
   384    362   div.toclevel2 {
   385    363     margin-left: 2em;
   386    364     font-size: 0.9em;
   387    365   }
................................................................................
   390    368     font-size: 0.9em;
   391    369   }
   392    370   div.toclevel4 {
   393    371     margin-left: 6em;
   394    372     font-size: 0.9em;
   395    373   }
   396    374   
   397         -/* Overrides for manpage documents */
   398         -h1 {
          375  +span.aqua { color: aqua; }
          376  +span.black { color: black; }
          377  +span.blue { color: blue; }
          378  +span.fuchsia { color: fuchsia; }
          379  +span.gray { color: gray; }
          380  +span.green { color: green; }
          381  +span.lime { color: lime; }
          382  +span.maroon { color: maroon; }
          383  +span.navy { color: navy; }
          384  +span.olive { color: olive; }
          385  +span.purple { color: purple; }
          386  +span.red { color: red; }
          387  +span.silver { color: silver; }
          388  +span.teal { color: teal; }
          389  +span.white { color: white; }
          390  +span.yellow { color: yellow; }
          391  +
          392  +span.aqua-background { background: aqua; }
          393  +span.black-background { background: black; }
          394  +span.blue-background { background: blue; }
          395  +span.fuchsia-background { background: fuchsia; }
          396  +span.gray-background { background: gray; }
          397  +span.green-background { background: green; }
          398  +span.lime-background { background: lime; }
          399  +span.maroon-background { background: maroon; }
          400  +span.navy-background { background: navy; }
          401  +span.olive-background { background: olive; }
          402  +span.purple-background { background: purple; }
          403  +span.red-background { background: red; }
          404  +span.silver-background { background: silver; }
          405  +span.teal-background { background: teal; }
          406  +span.white-background { background: white; }
          407  +span.yellow-background { background: yellow; }
          408  +
          409  +span.big { font-size: 2em; }
          410  +span.small { font-size: 0.6em; }
          411  +
          412  +span.underline { text-decoration: underline; }
          413  +span.overline { text-decoration: overline; }
          414  +span.line-through { text-decoration: line-through; }
          415  +
          416  +div.unbreakable { page-break-inside: avoid; }
          417  +
          418  +
          419  +/*
          420  + * xhtml11 specific
          421  + *
          422  + * */
          423  +
          424  +div.tableblock {
          425  +  margin-top: 1.0em;
          426  +  margin-bottom: 1.5em;
          427  +}
          428  +div.tableblock > table {
          429  +  border: 3px solid #527bbd;
          430  +}
          431  +thead, p.table.header {
          432  +  font-weight: bold;
          433  +  color: #527bbd;
          434  +}
          435  +p.table {
          436  +  margin-top: 0;
          437  +}
          438  +/* Because the table frame attribute is overriden by CSS in most browsers. */
          439  +div.tableblock > table[frame="void"] {
          440  +  border-style: none;
          441  +}
          442  +div.tableblock > table[frame="hsides"] {
          443  +  border-left-style: none;
          444  +  border-right-style: none;
          445  +}
          446  +div.tableblock > table[frame="vsides"] {
          447  +  border-top-style: none;
          448  +  border-bottom-style: none;
          449  +}
          450  +
          451  +
          452  +/*
          453  + * html5 specific
          454  + *
          455  + * */
          456  +
          457  +table.tableblock {
          458  +  margin-top: 1.0em;
          459  +  margin-bottom: 1.5em;
          460  +}
          461  +thead, p.tableblock.header {
          462  +  font-weight: bold;
          463  +  color: #527bbd;
          464  +}
          465  +p.tableblock {
          466  +  margin-top: 0;
          467  +}
          468  +table.tableblock {
          469  +  border-width: 3px;
          470  +  border-spacing: 0px;
          471  +  border-style: solid;
          472  +  border-color: #527bbd;
          473  +  border-collapse: collapse;
          474  +}
          475  +th.tableblock, td.tableblock {
          476  +  border-width: 1px;
          477  +  padding: 4px;
          478  +  border-style: solid;
          479  +  border-color: #527bbd;
          480  +}
          481  +
          482  +table.tableblock.frame-topbot {
          483  +  border-left-style: hidden;
          484  +  border-right-style: hidden;
          485  +}
          486  +table.tableblock.frame-sides {
          487  +  border-top-style: hidden;
          488  +  border-bottom-style: hidden;
          489  +}
          490  +table.tableblock.frame-none {
          491  +  border-style: hidden;
          492  +}
          493  +
          494  +th.tableblock.halign-left, td.tableblock.halign-left {
          495  +  text-align: left;
          496  +}
          497  +th.tableblock.halign-center, td.tableblock.halign-center {
          498  +  text-align: center;
          499  +}
          500  +th.tableblock.halign-right, td.tableblock.halign-right {
          501  +  text-align: right;
          502  +}
          503  +
          504  +th.tableblock.valign-top, td.tableblock.valign-top {
          505  +  vertical-align: top;
          506  +}
          507  +th.tableblock.valign-middle, td.tableblock.valign-middle {
          508  +  vertical-align: middle;
          509  +}
          510  +th.tableblock.valign-bottom, td.tableblock.valign-bottom {
          511  +  vertical-align: bottom;
          512  +}
          513  +
          514  +
          515  +/*
          516  + * manpage specific
          517  + *
          518  + * */
          519  +
          520  +body.manpage h1 {
   399    521     padding-top: 0.5em;
   400    522     padding-bottom: 0.5em;
   401    523     border-top: 2px solid silver;
   402    524     border-bottom: 2px solid silver;
   403    525   }
   404         -h2 {
          526  +body.manpage h2 {
   405    527     border-style: none;
   406    528   }
   407         -div.sectionbody {
   408         -  margin-left: 5%;
          529  +body.manpage div.sectionbody {
          530  +  margin-left: 3em;
   409    531   }
   410    532   
   411    533   @media print {
   412         -  div#toc { display: none; }
          534  +  body.manpage div#toc { display: none; }
   413    535   }
          536  +
   414    537   
   415    538   </style>
   416    539   <script type="text/javascript">
   417    540   /*<![CDATA[*/
   418         -window.onload = function(){asciidoc.footnotes();}
   419    541   var asciidoc = {  // Namespace.
   420    542   
   421    543   /////////////////////////////////////////////////////////////////////
   422    544   // Table Of Contents generator
   423    545   /////////////////////////////////////////////////////////////////////
   424    546   
   425    547   /* Author: Mihai Bazon, September 2002
................................................................................
   453    575       this.element = el;
   454    576       this.text = text;
   455    577       this.toclevel = toclevel;
   456    578     }
   457    579   
   458    580     function tocEntries(el, toclevels) {
   459    581       var result = new Array;
   460         -    var re = new RegExp('[hH]([2-'+(toclevels+1)+'])');
          582  +    var re = new RegExp('[hH]([1-'+(toclevels+1)+'])');
   461    583       // Function that scans the DOM tree for header elements (the DOM2
   462    584       // nodeIterator API would be a better technique but not supported by all
   463    585       // browsers).
   464    586       var iterate = function (el) {
   465    587         for (var i = el.firstChild; i != null; i = i.nextSibling) {
   466    588           if (i.nodeType == 1 /* Node.ELEMENT_NODE */) {
   467    589             var mo = re.exec(i.tagName);
................................................................................
   473    595         }
   474    596       }
   475    597       iterate(el);
   476    598       return result;
   477    599     }
   478    600   
   479    601     var toc = document.getElementById("toc");
          602  +  if (!toc) {
          603  +    return;
          604  +  }
          605  +
          606  +  // Delete existing TOC entries in case we're reloading the TOC.
          607  +  var tocEntriesToRemove = [];
          608  +  var i;
          609  +  for (i = 0; i < toc.childNodes.length; i++) {
          610  +    var entry = toc.childNodes[i];
          611  +    if (entry.nodeName.toLowerCase() == 'div'
          612  +     && entry.getAttribute("class")
          613  +     && entry.getAttribute("class").match(/^toclevel/))
          614  +      tocEntriesToRemove.push(entry);
          615  +  }
          616  +  for (i = 0; i < tocEntriesToRemove.length; i++) {
          617  +    toc.removeChild(tocEntriesToRemove[i]);
          618  +  }
          619  +
          620  +  // Rebuild TOC entries.
   480    621     var entries = tocEntries(document.getElementById("content"), toclevels);
   481    622     for (var i = 0; i < entries.length; ++i) {
   482    623       var entry = entries[i];
   483    624       if (entry.element.id == "")
   484    625         entry.element.id = "_toc_" + i;
   485    626       var a = document.createElement("a");
   486    627       a.href = "#" + entry.element.id;
................................................................................
   500    641   /////////////////////////////////////////////////////////////////////
   501    642   
   502    643   /* Based on footnote generation code from:
   503    644    * http://www.brandspankingnew.net/archive/2005/07/format_footnote.html
   504    645    */
   505    646   
   506    647   footnotes: function () {
   507         -  var cont = document.getElementById("content");
          648  +  // Delete existing footnote entries in case we're reloading the footnodes.
          649  +  var i;
   508    650     var noteholder = document.getElementById("footnotes");
          651  +  if (!noteholder) {
          652  +    return;
          653  +  }
          654  +  var entriesToRemove = [];
          655  +  for (i = 0; i < noteholder.childNodes.length; i++) {
          656  +    var entry = noteholder.childNodes[i];
          657  +    if (entry.nodeName.toLowerCase() == 'div' && entry.getAttribute("class") == "footnote")
          658  +      entriesToRemove.push(entry);
          659  +  }
          660  +  for (i = 0; i < entriesToRemove.length; i++) {
          661  +    noteholder.removeChild(entriesToRemove[i]);
          662  +  }
          663  +
          664  +  // Rebuild footnote entries.
          665  +  var cont = document.getElementById("content");
   509    666     var spans = cont.getElementsByTagName("span");
   510    667     var refs = {};
   511    668     var n = 0;
   512    669     for (i=0; i<spans.length; i++) {
   513    670       if (spans[i].className == "footnote") {
   514    671         n++;
   515         -      // Use [\s\S] in place of . so multi-line matches work.
   516         -      // Because JavaScript has no s (dotall) regex flag.
   517         -      note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1];
          672  +      var note = spans[i].getAttribute("data-note");
          673  +      if (!note) {
          674  +        // Use [\s\S] in place of . so multi-line matches work.
          675  +        // Because JavaScript has no s (dotall) regex flag.
          676  +        note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1];
          677  +        spans[i].innerHTML =
          678  +          "[<a id='_footnoteref_" + n + "' href='#_footnote_" + n +
          679  +          "' title='View footnote' class='footnote'>" + n + "</a>]";
          680  +        spans[i].setAttribute("data-note", note);
          681  +      }
   518    682         noteholder.innerHTML +=
   519    683           "<div class='footnote' id='_footnote_" + n + "'>" +
   520    684           "<a href='#_footnoteref_" + n + "' title='Return to text'>" +
   521    685           n + "</a>. " + note + "</div>";
   522         -      spans[i].innerHTML =
   523         -        "[<a id='_footnoteref_" + n + "' href='#_footnote_" + n +
   524         -        "' title='View footnote' class='footnote'>" + n + "</a>]";
   525    686         var id =spans[i].getAttribute("id");
   526    687         if (id != null) refs["#"+id] = n;
   527    688       }
   528    689     }
   529    690     if (n == 0)
   530    691       noteholder.parentNode.removeChild(noteholder);
   531    692     else {
................................................................................
   537    698           n = refs[href];
   538    699           spans[i].innerHTML =
   539    700             "[<a href='#_footnote_" + n +
   540    701             "' title='View footnote' class='footnote'>" + n + "</a>]";
   541    702         }
   542    703       }
   543    704     }
          705  +},
          706  +
          707  +install: function(toclevels) {
          708  +  var timerId;
          709  +
          710  +  function reinstall() {
          711  +    asciidoc.footnotes();
          712  +    if (toclevels) {
          713  +      asciidoc.toc(toclevels);
          714  +    }
          715  +  }
          716  +
          717  +  function reinstallAndRemoveTimer() {
          718  +    clearInterval(timerId);
          719  +    reinstall();
          720  +  }
          721  +
          722  +  timerId = setInterval(reinstall, 500);
          723  +  if (document.addEventListener)
          724  +    document.addEventListener("DOMContentLoaded", reinstallAndRemoveTimer, false);
          725  +  else
          726  +    window.onload = reinstallAndRemoveTimer;
   544    727   }
   545    728   
   546    729   }
          730  +asciidoc.install();
   547    731   /*]]>*/
   548    732   </script>
   549    733   </head>
   550    734   <body class="manpage">
   551    735   <div id="header">
   552    736   <h1>
   553    737   TACK(1) Manual Page
................................................................................
   601    785   <div class="paragraph"><p>One use case for a tack generated test harness is to build an
   602    786   executable where the domain source file has been compiled with code coverage.
   603    787   A test script may then send commands to the domain running in the
   604    788   harness and the executed
   605    789   code statements of the domain can be recorded and examined.
   606    790   This is typically done by compiling the domain code to include
   607    791   code coverage tracking and analyzing the results of test runs
   608         -(<strong>e.g.</strong> when using <tt>gcc</tt>, compiling with <tt>--coverage</tt> and using <tt><strong>gcov</strong></tt>(1)
          792  +(<strong>e.g.</strong> when using <code>gcc</code>, compiling with <code>--coverage</code> and using <code><strong>gcov</strong></code>(1)
   609    793   to analyze the result).</p></div>
   610    794   </div>
   611    795   </div>
   612    796   <div class="sect1">
   613    797   <h2 id="_options">OPTIONS</h2>
   614    798   <div class="sectionbody">
   615    799   <div class="dlist"><dl>
................................................................................
   630    814   </p>
   631    815   </dd>
   632    816   <dt class="hdlist1">
   633    817   -libtack
   634    818   </dt>
   635    819   <dd>
   636    820   <p>
   637         -    Create a directory named <tt>libtack</tt> in the current working directory and
          821  +    Create a directory named <code>libtack</code> in the current working directory and
   638    822       copy the <strong>tack</strong> library files into that directory. The library that
   639    823       <strong>tack</strong> requires is distributed as part of the <strong>tack</strong> program itself
   640    824       to insure consistency. This option should be used to obtain a copy of
   641    825       the library source files that correspond to the version of <strong>tack</strong> in use.
   642    826       After copying the files, <strong>tack</strong> exits successfully.
   643    827   </p>
   644    828   </dd>
................................................................................
   658    842   <dt class="hdlist1">
   659    843   -output <em>file</em>
   660    844   </dt>
   661    845   <dd>
   662    846   <p>
   663    847       Specify the directory or file where the generated output is placed.
   664    848       If <em>file</em> is a directory, then output is placed in the given directory
   665         -    and the base file name is the same as <em>FILE</em> with <tt>.c</tt> and <tt>.h</tt> suffixes.
   666         -    The default value for <em>file</em> is <tt>.</tt> (<em>i.e.</em> the current directory).
          849  +    and the base file name is the same as <em>FILE</em> with <code>.c</code> and <code>.h</code> suffixes.
          850  +    The default value for <em>file</em> is <code>.</code> (<em>i.e.</em> the current directory).
   667    851       If <em>file</em> is not a directory, then it is used as the basename for
   668    852       the generated files.
   669    853   </p>
   670    854   </dd>
   671    855   <dt class="hdlist1">
   672    856   -save
   673    857   </dt>
   674    858   <dd>
   675    859   <p>
   676    860       Output a file that contains a serialization of the internal data structures
   677    861       that <strong>tack</strong> accumulated when reading the harness specification file.
   678    862       The file is named the same as the specification file or the output
   679         -    file with a <tt>.ral</tt> suffix.
          863  +    file with a <code>.ral</code> suffix.
   680    864       This file contains all the information in the harness specification file in
   681    865       a parsed form.  The contents are useful for <strong>tack</strong> companion programs that
   682    866       need to know the characteristics of the generated test harness.
   683    867   </p>
   684    868   </dd>
   685    869   <dt class="hdlist1">
   686    870   -level <em>debuglevel</em>
................................................................................
   715    899   extent possible.
   716    900   Care should be taken to insure that a correct invocation of <strong>pycca</strong>
   717    901   has occurred before invoking <strong>tack</strong>.
   718    902   </p>
   719    903   </dd>
   720    904   </dl></div>
   721    905   <div class="listingblock">
   722         -<div class="content"><!-- Generator: GNU source-highlight 3.1.7
          906  +<div class="content"><!-- Generator: GNU source-highlight 3.1.8
   723    907   by Lorenzo Bettini
   724    908   http://www.lorenzobettini.it
   725    909   http://www.gnu.org/software/src-highlite -->
   726    910   <pre><tt>Pycca <span style="color: #990000">./</span>mydomain<span style="color: #990000">.</span>ral</tt></pre></div></div>
   727    911   <div class="dlist"><dl>
   728    912   <dt class="hdlist1">
   729    913   Domain <em>name</em> <em>configuration</em>
................................................................................
   735    919   The <em>configuration</em> argument is in turn a Tcl script that is evaluated
   736    920   in a context where the Domain Commands, described below, are available to define
   737    921   the test harness configuration.
   738    922   </p>
   739    923   </dd>
   740    924   </dl></div>
   741    925   <div class="listingblock">
   742         -<div class="content"><!-- Generator: GNU source-highlight 3.1.7
          926  +<div class="content"><!-- Generator: GNU source-highlight 3.1.8
   743    927   by Lorenzo Bettini
   744    928   http://www.lorenzobettini.it
   745    929   http://www.gnu.org/software/src-highlite -->
   746    930   <pre><tt>Domain mydomain <span style="color: #FF0000">{</span>
   747    931       Driver init
   748    932       Stub samplePoint
   749    933   <span style="color: #FF0000">}</span></tt></pre></div></div>
................................................................................
   767    951   The <strong>Driver</strong> command defines the characteristics of a domain operation.
   768    952   The <em>name</em> argument must match the name of a domain operation of the
   769    953   enclosing domain.
   770    954   The <em>configuration</em> argument is a script that is evaluated in a context
   771    955   where the data types of the parameters and return value can
   772    956   be described.
   773    957   The <em>configuration</em> argument is optional if the corresponding domain
   774         -operation accepts no arguments and has a <tt>void</tt> return type.
          958  +operation accepts no arguments and has a <code>void</code> return type.
   775    959   </p>
   776    960   </dd>
   777    961   <dt class="hdlist1">
   778    962   Stub <em>name</em> ?<em>configuration</em>?
   779    963   </dt>
   780    964   <dd>
   781    965   <p>
................................................................................
  1019   1203   <li>
  1020   1204   <p>
  1021   1205   int64_t
  1022   1206   </p>
  1023   1207   </li>
  1024   1208   </ul></div>
  1025   1209   <div class="listingblock">
  1026         -<div class="content"><!-- Generator: GNU source-highlight 3.1.7
         1210  +<div class="content"><!-- Generator: GNU source-highlight 3.1.8
  1027   1211   by Lorenzo Bettini
  1028   1212   http://www.lorenzobettini.it
  1029   1213   http://www.gnu.org/software/src-highlite -->
  1030   1214   <pre><tt>Driver startRobot <span style="color: #FF0000">{</span>
  1031   1215       Param robotId <span style="color: #990000">-&gt;</span> unsigned
  1032   1216       Param speed <span style="color: #990000">-&gt;</span> <span style="color: #FF0000">{</span>unsigned long<span style="color: #FF0000">}</span>
  1033   1217       RetType bool <span style="color: #990000">-&gt;</span> bool
................................................................................
  1043   1227   <p>
  1044   1228   The <strong>Param</strong> command defines the data type associated with the stub
  1045   1229   input parameter called, <em>name</em>.
  1046   1230   </p>
  1047   1231   </dd>
  1048   1232   </dl></div>
  1049   1233   <div class="listingblock">
  1050         -<div class="content"><!-- Generator: GNU source-highlight 3.1.7
         1234  +<div class="content"><!-- Generator: GNU source-highlight 3.1.8
  1051   1235   by Lorenzo Bettini
  1052   1236   http://www.lorenzobettini.it
  1053   1237   http://www.gnu.org/software/src-highlite -->
  1054   1238   <pre><tt>Stub readPoint <span style="color: #FF0000">{</span>
  1055   1239       Param pointId <span style="color: #990000">-&gt;</span> unsigned
  1056   1240       Param pointSet <span style="color: #990000">-&gt;</span> unsigned
  1057   1241   <span style="color: #FF0000">}</span></tt></pre></div></div>
................................................................................
  1108   1292   <p>
  1109   1293   The <strong>Param</strong> command defines the data type associated with the event
  1110   1294   parameter called, <em>name</em>.
  1111   1295   </p>
  1112   1296   </dd>
  1113   1297   </dl></div>
  1114   1298   <div class="listingblock">
  1115         -<div class="content"><!-- Generator: GNU source-highlight 3.1.7
         1299  +<div class="content"><!-- Generator: GNU source-highlight 3.1.8
  1116   1300   by Lorenzo Bettini
  1117   1301   http://www.lorenzobettini.it
  1118   1302   http://www.gnu.org/software/src-highlite -->
  1119   1303   <pre><tt>Class RobotArm <span style="color: #FF0000">{</span>
  1120   1304       Attribute Length <span style="color: #990000">-&gt;</span> unsigned
  1121   1305       Attribute Speed <span style="color: #990000">-&gt;</span> unsigned
  1122   1306       Event Start <span style="color: #FF0000">{</span>
................................................................................
  1137   1321   <p>
  1138   1322   A <strong>pycca</strong> generated domain.
  1139   1323   </p>
  1140   1324   <div class="ulist"><ul>
  1141   1325   <li>
  1142   1326   <p>
  1143   1327   The <strong>pycca</strong> must be generated with at least
  1144         -the <tt>-save</tt> and <tt>-dataportal</tt> options
         1328  +the <code>-save</code> and <code>-dataportal</code> options
  1145   1329   </p>
  1146   1330   </li>
  1147   1331   <li>
  1148   1332   <p>
  1149         -Using the <tt>-instrument</tt> option is also useful to compile in action
         1333  +Using the <code>-instrument</code> option is also useful to compile in action
  1150   1334   instrumentation.
  1151   1335   </p>
  1152   1336   </li>
  1153   1337   <li>
  1154   1338   <p>
  1155   1339   <strong>pycca</strong> generates both "C" source and header files.
  1156   1340   </p>
  1157   1341   </li>
  1158   1342   <li>
  1159   1343   <p>
  1160   1344   It is often desirable to compile the "C" source with the
  1161         -<tt>--coverage</tt> GNU C compiler option.
         1345  +<code>--coverage</code> GNU C compiler option.
  1162   1346   </p>
  1163   1347   </li>
  1164   1348   </ul></div>
  1165   1349   </li>
  1166   1350   <li>
  1167   1351   <p>
  1168   1352   A <strong>tack</strong> configuration file.
................................................................................
  1184   1368   <li>
  1185   1369   <p>
  1186   1370   The <strong>tack</strong> library of common code.
  1187   1371   </p>
  1188   1372   <div class="ulist"><ul>
  1189   1373   <li>
  1190   1374   <p>
  1191         -Running <strong>tack</strong> with the <tt>-libtack</tt> option will create a copy of the
         1375  +Running <strong>tack</strong> with the <code>-libtack</code> option will create a copy of the
  1192   1376   library code and an example Makefile.
  1193   1377   </p>
  1194   1378   </li>
  1195   1379   <li>
  1196   1380   <p>
  1197   1381   <strong>libtack</strong> is "C" source that includes the common test harness code
  1198   1382   along with a copy of the Single Threaded Software Architecture (STSA) that is
  1199   1383   suitable for compiling under a POSIX environment.
  1200   1384   </p>
  1201   1385   </li>
  1202   1386   <li>
  1203   1387   <p>
  1204         -<strong>libtack</strong> must be compiled with the <tt>-DMECH_SM_TRACE</tt> pre-processor option.
         1388  +<strong>libtack</strong> must be compiled with the <code>-DMECH_SM_TRACE</code> pre-processor option.
  1205   1389   This option enable state machine event dispatch tracing and
  1206   1390   <strong>libtack</strong> can be used to obtain the trace data.
  1207   1391   </p>
  1208   1392   </li>
  1209   1393   <li>
  1210   1394   <p>
  1211   1395   The test harness executable must be linked against <strong>libtack</strong>.
................................................................................
  1221   1405   <li>
  1222   1406   <p>
  1223   1407   The STSA requires that the application supply two functions:
  1224   1408   </p>
  1225   1409   <div class="ulist"><ul>
  1226   1410   <li>
  1227   1411   <p>
  1228         -<tt>void sysDeviceInit(void);</tt>
         1412  +<code>void sysDeviceInit(void);</code>
  1229   1413   </p>
  1230   1414   </li>
  1231   1415   <li>
  1232   1416   <p>
  1233         -<tt>void sysDomainInit(void);</tt>
         1417  +<code>void sysDomainInit(void);</code>
  1234   1418   </p>
  1235   1419   </li>
  1236   1420   </ul></div>
  1237   1421   </li>
  1238   1422   <li>
  1239   1423   <p>
  1240         -It is necessary to arrange for the function <tt>void harness_init();</tt> to be
         1424  +It is necessary to arrange for the function <code>void harness_init();</code> to be
  1241   1425   invoked before any other test harness initialization occurs.
  1242   1426   </p>
  1243   1427   </li>
  1244   1428   <li>
  1245   1429   <p>
  1246   1430   For each domain in the test harness, it is necessary to invoke
  1247         -<tt>&lt;domain name&gt;_harness_init();</tt>, where &lt;domain name&gt; is replaced by the
         1431  +<code>&lt;domain name&gt;_harness_init();</code>, where &lt;domain name&gt; is replaced by the
  1248   1432   actual name of the domain.
  1249   1433   </p>
  1250   1434   </li>
  1251   1435   <li>
  1252   1436   <p>
  1253   1437   Any initialization needed by a domain can then be invoked.
  1254   1438   This is shown in the example below for a domain called, <strong>myDomain</strong>, and
................................................................................
  1255   1439   a <strong>tack</strong> specification file called, <strong>myHarness</strong>.
  1256   1440   </p>
  1257   1441   </li>
  1258   1442   </ul></div>
  1259   1443   </li>
  1260   1444   </ul></div>
  1261   1445   <div class="listingblock">
  1262         -<div class="content"><!-- Generator: GNU source-highlight 3.1.7
         1446  +<div class="content"><!-- Generator: GNU source-highlight 3.1.8
  1263   1447   by Lorenzo Bettini
  1264   1448   http://www.lorenzobettini.it
  1265   1449   http://www.gnu.org/software/src-highlite -->
  1266   1450   <pre><tt><span style="font-weight: bold"><span style="color: #000080">#include</span></span> <span style="color: #FF0000">"mechs.h"</span>
  1267   1451   <span style="font-weight: bold"><span style="color: #000080">#include</span></span> <span style="color: #FF0000">"harness.h"</span>
  1268   1452   <span style="font-weight: bold"><span style="color: #000080">#include</span></span> <span style="color: #FF0000">"myHarness.h"</span>
  1269   1453   <span style="font-weight: bold"><span style="color: #000080">#include</span></span> <span style="color: #FF0000">"myDomain.h"</span>
................................................................................
  1292   1476   </div>
  1293   1477   <div class="sect1">
  1294   1478   <h2 id="_interacting_with_a_test_harness">INTERACTING WITH A TEST HARNESS</h2>
  1295   1479   <div class="sectionbody">
  1296   1480   <div class="paragraph"><p>When the code described above have been compiled and linked together to
  1297   1481   form an executable,
  1298   1482   running the resulting executable causes two TCP network services to be
  1299         -available on <tt>localhost</tt> that are used to interact with the domain(s)
         1483  +available on <code>localhost</code> that are used to interact with the domain(s)
  1300   1484   that are controlled by the harness.</p></div>
  1301   1485   <div class="ulist"><ul>
  1302   1486   <li>
  1303   1487   <p>
  1304         -The <tt>DRIVER_PORT</tt> (number 3902 by default) can be used to invoke domain
         1488  +The <code>DRIVER_PORT</code> (number 3902 by default) can be used to invoke domain
  1305   1489   operation, access instance attribute values, send events to instances
  1306   1490   and create and delete instances.
  1307         -Commands are sent to the <tt>DRIVER_PORT</tt> and responses received as
         1491  +Commands are sent to the <code>DRIVER_PORT</code> and responses received as
  1308   1492   described below
  1309   1493   </p>
  1310   1494   </li>
  1311   1495   <li>
  1312   1496   <p>
  1313         -The <tt>STUB_PORT</tt> (number 3903 by default) is carries the output of
         1497  +The <code>STUB_PORT</code> (number 3903 by default) is carries the output of
  1314   1498   from invoking a <strong>tack</strong> generated stub function.
  1315   1499   The output indicates which stub function was invoked and the
  1316   1500   argument values passed to it.
  1317   1501   </p>
  1318   1502   </li>
  1319   1503   </ul></div>
  1320   1504   <div class="paragraph"><p>Both port numbers can be changed by redefining the pre-processor symbols
  1321   1505   to different TCP port numbers.
  1322         -A TCP connection to the <tt>DRIVER_PORT</tt> can be used to control the
         1506  +A TCP connection to the <code>DRIVER_PORT</code> can be used to control the
  1323   1507   test harness by sending command requests
  1324         -and a TCP connection to the <tt>STUB_PORT</tt> can be used to monitor the
         1508  +and a TCP connection to the <code>STUB_PORT</code> can be used to monitor the
  1325   1509   invocation of external operations of domains via the generated stub functions.
  1326   1510   <strong>Tack</strong> is supplied with a Tcl package named, <strong>harness</strong>, that hides the
  1327   1511   details of the command protocol.</p></div>
  1328   1512   <div class="sect2">
  1329   1513   <h3 id="_driver_command_protocol">DRIVER COMMAND PROTOCOL</h3>
  1330   1514   <div class="paragraph"><p>Driver port commands are ASCII string terminated by both carriage return
  1331   1515   and linefeed characters (CR LF terminated in the same way as HTTP).
................................................................................
  1334   1518   The enclosing braces are removed from the word.
  1335   1519   To include a brace or a backslash in a word,
  1336   1520   precede it by a backslash (\) character
  1337   1521   (The quoting conventions are modeled after Tcl).
  1338   1522   Commands are of the form:</p></div>
  1339   1523   <div class="literalblock">
  1340   1524   <div class="content">
  1341         -<pre><tt>&lt;category&gt; &lt;domain&gt; ....</tt></pre>
         1525  +<pre><code>&lt;category&gt; &lt;domain&gt; ....</code></pre>
  1342   1526   </div></div>
  1343   1527   <div class="paragraph"><p>where &lt;category&gt; is one of the following string literals:</p></div>
  1344   1528   <div class="ulist"><ul>
  1345   1529   <li>
  1346   1530   <p>
  1347   1531   dop
  1348   1532   </p>
................................................................................
  1429   1613   <div class="paragraph"><p>Response to driver commands consist of a single ASCII string record,
  1430   1614   terminated by CR/LF.
  1431   1615   The record consists of pairs whitespace separated words.
  1432   1616   The word pairs are of the form of a keyword / value pair.
  1433   1617   Every response is at least:</p></div>
  1434   1618   <div class="literalblock">
  1435   1619   <div class="content">
  1436         -<pre><tt>code &lt;completion code&gt; result &lt;result value&gt;</tt></pre>
         1620  +<pre><code>code &lt;completion code&gt; result &lt;result value&gt;</code></pre>
  1437   1621   </div></div>
  1438   1622   <div class="paragraph"><p>Completion codes are either <strong>success</strong> or <strong>error</strong>.
  1439   1623   Result values are string representing the result of the command,
  1440   1624   or, in the case where the completion code is <strong>error</strong>, a human
  1441   1625   readable error message.
  1442   1626   The remainder of the response consists of the components of the command
  1443   1627   except for any arguments or parameters.
................................................................................
  1581   1765   is a significant challenge.</p></div>
  1582   1766   </div>
  1583   1767   </div>
  1584   1768   </div>
  1585   1769   <div class="sect1">
  1586   1770   <h2 id="_copyright">COPYRIGHT</h2>
  1587   1771   <div class="sectionbody">
  1588         -<div class="paragraph"><p>&#169; Copyright 2011-2013 by G. Andrew Mangogna.</p></div>
         1772  +<div class="paragraph"><p>&#169; Copyright 2011-2016 by G. Andrew Mangogna.</p></div>
  1589   1773   <div class="paragraph"><p>The following terms apply to all files associated with the software unless
  1590   1774   explicitly disclaimed in individual files.</p></div>
  1591   1775   <div class="paragraph"><p>The authors hereby grant permission to use, copy, modify, distribute,
  1592   1776   and license this software and its documentation for any purpose, provided
  1593   1777   that existing copyright notices are retained in all copies and that this
  1594   1778   notice is included verbatim in any distributions. No written agreement,
  1595   1779   license, or royalty fee is required for any of the authorized uses.
................................................................................
  1621   1805   terms specified in this license.</p></div>
  1622   1806   </div>
  1623   1807   </div>
  1624   1808   </div>
  1625   1809   <div id="footnotes"><hr /></div>
  1626   1810   <div id="footer">
  1627   1811   <div id="footer-text">
  1628         -Version 3.6<br />
  1629         -Last updated 2013-10-23 13:41:13 PDT
         1812  +Version 3.7<br />
         1813  +Last updated
         1814  + 2016-09-15 16:30:22 PDT
  1630   1815   </div>
  1631   1816   </div>
  1632   1817   </body>
  1633   1818   </html>

Changes to tack/doc/tack.txt.

     1         -// This software is copyrighted 2011 - 2013 by G. Andrew Mangogna.
            1  +// This software is copyrighted 2011 - 2016 by G. Andrew Mangogna.
     2      2   // The following terms apply to all files associated with the software unless
     3      3   // explicitly disclaimed in individual files.
     4      4   // 
     5      5   // The author hereby grants permission to use, copy, modify, distribute,
     6      6   // and license this software and its documentation for any purpose, provided
     7      7   // that existing copyright notices are retained in all copies and that this
     8      8   // notice is included verbatim in any distributions. No written agreement,
................................................................................
    42     42   //  tack.txt - documentation for tack
    43     43   // ABSTRACT:
    44     44   //  This file contains asciidoc(1) source for the tack documentation.
    45     45   //*--
    46     46   TACK(1)
    47     47   ========
    48     48   Andrew Mangogna <mangoa01@users.sourceforge.net>
    49         -:Revision: 3.6
    50         -:Date: Wed Oct 23, 2013  1:40:50 PM
           49  +:Revision: 3.7
           50  +:Date: Thu Sep 15 16:27:47 PDT 2016
    51     51   
    52     52   NAME
    53     53   ----
    54     54   tack - Test Harness Generation
    55     55   
    56     56   SYNOPSIS
    57     57   --------
................................................................................
   566    566   *_N.B._* that the event dispatch data is all numerically encoded as
   567    567   *pycca* does not place string data into generated domains.
   568    568   Thus programatically decoding the numerical data back to human readable strings
   569    569   is a significant challenge.
   570    570   
   571    571   COPYRIGHT
   572    572   ---------
   573         -(C) Copyright 2011-2013 by G. Andrew Mangogna.
          573  +(C) Copyright 2011-2016 by G. Andrew Mangogna.
   574    574   
   575    575   The following terms apply to all files associated with the software unless
   576    576   explicitly disclaimed in individual files.
   577    577   
   578    578   The authors hereby grant permission to use, copy, modify, distribute,
   579    579   and license this software and its documentation for any purpose, provided
   580    580   that existing copyright notices are retained in all copies and that this

Changes to tack/libtack/mechs.c.

     1      1   /*
     2      2    * THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT IT.
     3         - * This file corresponds to Version 1.6 of the STSA literate
            3  + * This file corresponds to Version 1.7 of the STSA literate
     4      4    * program.
     5      5    */
     6      6   /*
     7         - * This software is copyrighted 2007 - 2013 by G. Andrew
            7  + * This software is copyrighted 2007 - 2014 by G. Andrew
     8      8    * Mangogna.  The following terms apply to all files associated
     9      9    * with the software unless explicitly disclaimed in individual
    10     10    * files.
    11     11    *
    12     12    * The authors hereby grant permission to use, copy, modify,
    13     13    * distribute, and license this software and its documentation
    14     14    * for any purpose, provided that existing copyright notices
................................................................................
    92     92   void
    93     93   endCriticalSection(void)
    94     94   {
    95     95       if (sigprocmask(SIG_UNBLOCK, &mechSigMask, NULL) != 0) {
    96     96           mechFatalError(mechSignalOpFailed, strerror(errno)) ;
    97     97       }
    98     98   }
    99         -static MechFatalErrHandler errHandler ;
   100         -
   101         -MechFatalErrHandler
   102         -mechSetFatalErrHandler(
   103         -    MechFatalErrHandler newHandler)
   104         -{
   105         -    MechFatalErrHandler prevHandler = errHandler ;
   106         -    errHandler = newHandler ;
   107         -    return prevHandler ;
   108         -}
   109     99   static char const * const errMsgs[] = {
   110    100       "no error",     /* place holder */
   111    101       "can't happen transition: %p: %u - %u -> CH\n",
   112    102       "event in flight error: %p -> %p %u\n",
   113    103       "no available Event Control Blocks\n",
   114    104       "no available instance slots: %p\n",
   115    105       "synchronization queue overflow\n",
   116    106       #ifdef __unix__
   117    107       "interval timer operation failed: %s\n",
   118    108       "signal operation failed: %s\n",
   119    109       "blocking on pselect() failed: %s\n",
   120    110       #endif /* __unix__ */
   121    111   } ;
   122         -
          112  +static void
          113  +MechDefaultFatalErrorHandler(
          114  +    MechErrorCode errNum,
          115  +    char const *fmt,
          116  +    va_list ap)
          117  +{
          118  +#   ifndef MECH_NINCL_STDIO
          119  +    vfprintf(stderr, errMsgs[errNum], ap) ;
          120  +#   endif /* MECH_NINCL_STDIO */
          121  +}
          122  +static MechFatalErrHandler errHandler = MechDefaultFatalErrorHandler ;
          123  +MechFatalErrHandler
          124  +mechSetFatalErrHandler(
          125  +    MechFatalErrHandler newHandler)
          126  +{
          127  +    MechFatalErrHandler prevHandler = errHandler ;
          128  +    if (newHandler) {
          129  +        errHandler = newHandler ;
          130  +    }
          131  +    return prevHandler ;
          132  +}
   123    133   static void
   124    134   mechFatalError(
   125    135       MechErrorCode errNum,
   126    136       ...)
   127    137   {
   128    138       va_list ap ;
   129    139       /*
   130    140        * All hope is lost here. Make sure we don't
   131    141        * execute any asynchronous code.
   132    142        */
   133    143       beginCriticalSection() ;
          144  +
          145  +    assert(errHandler != NULL) ;
          146  +    assert(errNum < (sizeof(errMsgs) / sizeof(errMsgs[0]))) ;
          147  +
   134    148       va_start(ap, errNum) ;
   135         -    if (errHandler) {
   136         -        errHandler(errMsgs[errNum], ap) ;
   137         -    }
   138         -#   ifndef MECH_NINCL_STDIO
   139         -    else {
   140         -        vfprintf(stderr, errMsgs[errNum], ap) ;
   141         -    }
   142         -#   endif /* MECH_NINCL_STDIO */
   143         -
          149  +    errHandler(errNum, errMsgs[errNum], ap) ;
          150  +    /*
          151  +     *  If the handler does return, we insist that all errors
          152  +     *  are fatal. So we abort() unless we are testing.
          153  +     */
   144    154   #   ifndef MECH_TEST
   145         -    exit(errNum) ;
          155  +    abort() ;
   146    156   #   endif /* MECH_TEST */
   147    157   }
   148    158   static inline 
   149    159   void *
   150    160   mechInstNext(
   151    161       InstAllocBlock iab,
   152    162       void *ptr)
................................................................................
   475    485                   iter->instOrClass.targetInst == targetInst &&
   476    486                   iter->eventNumber == event) {
   477    487               return iter ;
   478    488           }
   479    489       }
   480    490       return NULL ;
   481    491   }
   482         -static
   483         -void
          492  +static void
   484    493   insertIntoDelayedQueue(
   485    494       MechEcb ecb)
   486    495   {
   487    496       /*
   488    497        * We walk down the queue to find the correct slot.
   489    498        * That slot is the first place in the queue where our
   490    499        * delay value is less than the delay value at that
................................................................................
   547    556       eventQueueRemove(ecb) ;
   548    557       /*
   549    558        * Return the ECB back to the pool.
   550    559        */
   551    560       mechEventDelete(ecb) ;
   552    561   }
   553    562   #define MECH_DELAY_EXPIRED  UINT32_MAX
   554         -#define MECH_DELAY_EXPIRED  UINT32_MAX
          563  +static MechEcb
          564  +expireDelayedEvents(void)
          565  +{
          566  +    /*
          567  +     * Iterate along the delayed event queue.
          568  +     */
          569  +    for (MechEcb iter = eventQueueBegin(&delayedEventQueue) ;
          570  +            iter != eventQueueEnd(&delayedEventQueue) ;
          571  +            iter = iter->next) {
          572  +        if (iter->delay == 0) {
          573  +            /*
          574  +             * Mark all the events that have zero delay time
          575  +             * as expired.
          576  +             */
          577  +            iter->delay = MECH_DELAY_EXPIRED ;
          578  +        } else if (iter->delay != MECH_DELAY_EXPIRED) {
          579  +            /*
          580  +             * Stop at the first non-zero delay time.  This
          581  +             * marks the boundary of events that need
          582  +             * additional delay time.  The first such event
          583  +             * is the next amount of time to delay.
          584  +             */
          585  +            return iter ;
          586  +        }
          587  +        /*
          588  +         * else ... Skip any events that might already be
          589  +         * expired.
          590  +         */
          591  +    }
          592  +    /*
          593  +     * We have run the queue without finding an unexpired
          594  +     * event.
          595  +     */
          596  +    return NULL ;
          597  +}
   555    598   static void
   556    599   transferExpiredEvents(void)
   557    600   {
   558    601       /*
   559    602        * Iterate through the delayed event queue looking for
   560    603        * those entries that have been marked as expired.
   561    604        */
   562    605       for (MechEcb iter = eventQueueBegin(&delayedEventQueue) ;
   563    606               iter != eventQueueEnd(&delayedEventQueue) &&
   564    607               iter->delay == MECH_DELAY_EXPIRED ; ) {
   565    608           /*
   566    609            * Advance the iterator, because we are about to
   567         -         * invalidate it by removing the entry from the queue.
          610  +         * invalidate it by removing the entry from the
          611  +         * queue.
   568    612            */
   569    613           MechEcb ecb = iter ;
   570    614           iter = iter->next ;
   571    615   
   572    616           /*
   573         -         * Remove the delayed and insert onto the normal event queue.
          617  +         * Remove the ECB from the delayed queue and insert
          618  +         * it into event queue for dispatch.
   574    619            */
   575    620           eventQueueRemove(ecb) ;
   576    621           eventQueueInsert(ecb, &eventQueue) ;
   577    622           assert(ecb->referenceCount != 0) ;
   578    623       }
   579    624   }
   580    625   static void
................................................................................
   583    628       if (!eventQueueEmpty(&delayedEventQueue)) {
   584    629           MechEcb ecb = eventQueueBegin(&delayedEventQueue) ;
   585    630           assert(ecb->delay != 0) ;
   586    631           sysTimerStart(ecb->delay) ;
   587    632           ecb->delay = 0 ;
   588    633       }
   589    634   }
   590         -static inline
   591         -void
          635  +static void
   592    636   stopDelayedQueueTiming(void)
   593    637   {
   594    638       /*
   595         -     * Avoid the whole thing if there is nothing in the delayed
   596         -     * event queue.
          639  +     * Avoid the whole thing if there is nothing in the
          640  +     * delayed event queue.
   597    641        */
   598    642       if (!eventQueueEmpty(&delayedEventQueue)) {
   599    643           /*
   600    644            * Stop the timer, obtaining the residual time.
   601    645            */
   602    646           MechDelayTime remain = sysTimerStop() ;
   603    647           /*
   604         -         * It is possible that some events expired before
   605         -         * we could get the timer stopped.
   606         -         */
   607         -        transferExpiredEvents() ;
   608         -        /*
   609         -         * If any events expired, the delayed event queue might
   610         -         * now be empty.
   611         -         */
   612         -        if (!eventQueueEmpty(&delayedEventQueue)) {
   613         -            MechEcb ecb = eventQueueBegin(&delayedEventQueue) ;
   614         -            assert(ecb->delay == 0) ;
   615         -            ecb->delay = remain ;
          648  +         * There are two cases here. It is possible for the
          649  +         * remaining time returned from sysTimerStop() to be
          650  +         * zero. This can happen if the physical timing
          651  +         * resource (which might be running asynchronously
          652  +         * to the processor) happens to expire within a
          653  +         * single tick as we are stopping it.
          654  +         */
          655  +        if (remain == 0) {
          656  +            /*
          657  +             * Since the timer has expired we must mark any
          658  +             * events with a zero delay time value as
          659  +             * expired and, since we are running in the
          660  +             * background here, transfer the expired events
          661  +             * to be dispatched.
          662  +             */
          663  +            expireDelayedEvents() ;
          664  +            transferExpiredEvents() ;
          665  +            /*
          666  +             * At this point, either the delayed event queue
          667  +             * is empty, or the event at the head of the
          668  +             * queue has a non-zero delay time.
          669  +             */
          670  +        } else {
          671  +            /*
          672  +             * It is possible that the timing resource
          673  +             * expired and its interrupt service ran just
          674  +             * before we could get the timer stopped. That
          675  +             * would mean that there are expired events on
          676  +             * the delayed queue at this point and we need
          677  +             * to transfer them off the delayed queue to be
          678  +             * dispatched.
          679  +             */
          680  +            transferExpiredEvents() ;
          681  +            /*
          682  +             * If any events expired, the delayed event
          683  +             * queue might now be empty. However, if the
          684  +             * queue is not empty, we must make sure the
          685  +             * entry at the head preserves the remaining
          686  +             * amount of time that needs to elapse.
          687  +             */
          688  +            if (!eventQueueEmpty(&delayedEventQueue)) {
          689  +                MechEcb ecb = eventQueueBegin(&delayedEventQueue) ;
          690  +                assert(ecb->delay == 0) ;
          691  +                ecb->delay = remain ;
          692  +            }
   616    693           }
   617    694       }
   618    695   }
   619    696   static inline
   620    697   MechDelayTime
   621    698   mechMsecToTicks(
   622    699       MechDelayTime msec)
................................................................................
   741    818           }
   742    819       }
   743    820       startDelayedQueueTiming() ;
   744    821       /*
   745    822        * Return the amount of time remaining for the event.
   746    823        * If we didn't find the event, the just return 0.
   747    824        */
   748         -    if (iter == eventQueueEnd(&delayedEventQueue)) {
   749         -        remain = 0 ;
   750         -    }
   751         -    return mechTicksToMsec(remain) ;
          825  +    return iter == eventQueueEnd(&delayedEventQueue) ?
          826  +            0 : mechTicksToMsec(remain) ;
   752    827   }
   753    828   static void
   754    829   sysTimerMask(void)
   755    830   {
   756    831       /*
   757    832        * Make sure SIGALRM does not go off.
   758    833        */
................................................................................
   846    921       sysTimerMask() ;
   847    922       transferExpiredEvents() ;
   848    923       sysTimerUnmask() ;
   849    924   }
   850    925   MechDelayTime
   851    926   mechTimerExpireService(void)
   852    927   {
   853         -    MechDelayTime nextTime = 0 ;
          928  +    MechEcb unexpired ;
          929  +    MechDelayTime nextTime ;
   854    930       /*
   855         -     * Iterate along the delayed event queue.
   856         -     */
   857         -    for (MechEcb iter = eventQueueBegin(&delayedEventQueue) ;
   858         -            iter != eventQueueEnd(&delayedEventQueue) ;
   859         -            iter = iter->next) {
   860         -        if (iter->delay == 0) {
   861         -            /*
   862         -             * Mark all the events that have zero delay time
   863         -             * as expired.
   864         -             */
   865         -            iter->delay = MECH_DELAY_EXPIRED ;
   866         -        } else if (iter->delay != MECH_DELAY_EXPIRED) {
   867         -            /*
   868         -             * Stop at the first unexpired, non-zero delay time.
   869         -             * This is the next time increment for delay.
   870         -             */
   871         -            nextTime = iter->delay ;
   872         -            iter->delay = 0 ;
   873         -            break ;
   874         -        }
   875         -        /*
   876         -         * else ... Skip any events that are already expired.
   877         -         */
   878         -    }
   879         -    /*
   880         -     * Sync to the background to request the expired events be
   881         -     * transferred to the event queue.
          931  +     * Sync to the background to request the expired events
          932  +     * be transferred to the event queue.
   882    933        */
   883    934       mechSyncRequest(mechExpiredEventService) ;
          935  +    /*
          936  +     * Mark the delayed events as expired, returning a
          937  +     * pointer to the first unexpired event.
          938  +     */
          939  +    unexpired = expireDelayedEvents() ;
          940  +    if (unexpired) {
          941  +        /*
          942  +         * If there is an unexpired event, then its delay
          943  +         * time is the next time to expire. We return that
          944  +         * time and zero out the delay time.
          945  +         */
          946  +        assert(unexpired->delay != 0) ;
          947  +        nextTime = unexpired->delay ;
          948  +        unexpired->delay = 0 ;
          949  +    } else {
          950  +        /*
          951  +         * Otherwise, there is nothing else to time.
          952  +         */
          953  +        nextTime = 0 ;
          954  +    }
   884    955   
   885    956       return nextTime ;
   886    957   }
   887    958   #ifdef MECH_SM_TRACE
   888    959   static MechTraceCallback traceCallback ;
   889    960   
   890    961   MechTraceCallback
................................................................................
  1488   1559            * synchronization queue.
  1489   1560            */
  1490   1561           while (mechInvokeOneSyncFunc()) {
  1491   1562               ; /* empty */
  1492   1563           }
  1493   1564           #endif /* __ARM_ARCH_7M__ */
  1494   1565           /*
  1495         -         * Dispatch one event off of the event queue.
         1566  +         * Dispatch one event from the event queue.
  1496   1567            */
  1497   1568           if (!mechDispatchOneEvent()) {
  1498   1569               /*
  1499   1570                * Check if this thread of control is complete
  1500   1571                * and wait if there is no additional work to
  1501   1572                * be done.
  1502   1573                */
  1503   1574               mechWait() ;
  1504   1575           }
  1505   1576       }
  1506   1577   }

Changes to tack/libtack/mechs.h.

     1      1   /*
     2      2    * THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT IT.
     3         - * This file corresponds to Version 1.5 of the STSA literate
            3  + * This file corresponds to Version 1.7 of the STSA literate
     4      4    * program.
     5      5    */
     6      6   /*
     7         - * This software is copyrighted 2007 - 2011 by G. Andrew
            7  + * This software is copyrighted 2007 - 2014 by G. Andrew
     8      8    * Mangogna.  The following terms apply to all files associated
     9      9    * with the software unless explicitly disclaimed in individual
    10     10    * files.
    11     11    *
    12     12    * The authors hereby grant permission to use, copy, modify,
    13     13    * distribute, and license this software and its documentation
    14     14    * for any purpose, provided that existing copyright notices
................................................................................
    97     97   typedef unsigned short int AttributeOffset ;
    98     98   typedef enum {
    99     99       mechCantHappen = 1,
   100    100       mechEventInFlight,
   101    101       mechNoECB,
   102    102       mechNoInstSlot,
   103    103       mechSyncOverflow,
   104         -    #if defined(__unix__) || defined(__APPLE_CC__)
          104  +    #ifdef __unix__
   105    105       mechTimerOpFailed,
   106    106       mechSignalOpFailed,
   107    107       mechSelectWaitFailed,
   108         -    #endif /* __unix__ || __APPLE_CC__ */
          108  +    #endif /* __unix__ */
   109    109   } MechErrorCode ;
   110    110   typedef struct mechinstance {
   111    111       AllocCount alloc ;
   112    112       StateCode currentState ;
   113    113       struct mechclass const *instClass ;
   114    114   } *MechInstance ;
   115    115   typedef void (*InstCtor)(MechInstance) ;
................................................................................
   159    159       HierarchyDispatch hierarchy ;
   160    160   } const *PolyDispatchBlock ;
   161    161   typedef struct mechclass {
   162    162       InstAllocBlock iab ;
   163    163       ObjectDispatchBlock odb ;
   164    164       PolyDispatchBlock pdb ;
   165    165   } const *MechClass ;
   166         -typedef void (*MechFatalErrHandler)(char const *, va_list) ;
          166  +typedef void (*MechFatalErrHandler)(MechErrorCode, char const *, va_list) ;
   167    167   typedef EventParamType SyncParamType ;
   168    168   typedef SyncParamType *SyncParamRef ;
   169    169   typedef void (*SyncFunc)(SyncParamRef) ;
   170    170   typedef void (*FDServiceFunc)(int) ;
   171    171   typedef struct mechecb {
   172    172       struct mechecb *next ;
   173    173       struct mechecb *prev ;

Changes to tack/main.tcl.

     1         -# This software is copyrighted 2011 - 2013 by G. Andrew Mangogna.
            1  +# This software is copyrighted 2011 - 2016 by G. Andrew Mangogna.
     2      2   # The following terms apply to all files associated with the software unless
     3      3   # explicitly disclaimed in individual files.
     4      4   # 
     5      5   # The authors hereby grant permission to use, copy, modify, distribute,
     6      6   # and license this software and its documentation for any purpose, provided
     7      7   # that existing copyright notices are retained in all copies and that this
     8      8   # notice is included verbatim in any distributions. No written agreement,
................................................................................
    32     32   # are acquiring the software on behalf of the Department of Defense,
    33     33   # the software shall be classified as "Commercial Computer Software"
    34     34   # and the Government shall have only "Restricted Rights" as defined in
    35     35   # Clause 252.227-7013 (c) (1) of DFARs.  Notwithstanding the foregoing,
    36     36   # the authors grant the U.S. Government and others acting in its behalf
    37     37   # permission to use and distribute the software in accordance with the
    38     38   # terms specified in this license.
           39  +
           40  +set iswrapped [expr {[lindex [file system [info script]] 0] ne "native"}]
           41  +if {$iswrapped} {
           42  +    set top [file join $::starkit::topdir lib application]
           43  +    if {$::tcl_platform(os) eq "Linux"} {
           44  +        set libs [glob -nocomplain\
           45  +            -directory [file join $::starkit::topdir lib]\
           46  +            P-linux-*]
           47  +        foreach lib $libs {
           48  +            lappend ::auto_path $lib
           49  +        }
           50  +    }
           51  +} else {
           52  +    set top [file dirname [info script]]
           53  +}
    39     54   
    40     55   package require Tcl 8.6
    41     56   package require cmdline
    42     57   package require logger
    43     58   package require ral
    44     59   
    45         -set iswrapped [expr {[lindex [file system [info script]] 0] ne "native"}]
    46         -if {$iswrapped} {
    47         -    set top [file join $::starkit::topdir lib application]
    48         -} else {
    49         -    set top [file dirname [info script]]
    50         -}
    51     60   source [file join $top tack.tcl]
    52     61   
    53     62   set opts {
    54     63       {version {Print out version information and exit}}
    55     64       {libtack {Output a copy of the tack runtime library}}
    56     65       {harness {Output a copy of the Tcl harness package}}
    57     66       {save {Save internal data structures}}
................................................................................
    58     67       {output.arg {.} {Directory or file where output is placed}}
    59     68       {level.arg warn {Logging level}}
    60     69   }
    61     70   
    62     71   set usage "\[options] configfile\noptions:"
    63     72   array set options [::cmdline::getoptions argv $opts $usage]
    64     73   
    65         -set version 3.6
           74  +set version 3.7
    66     75   
    67     76   if {$options(version)} {
    68     77       chan puts "tack: version $::version"
    69     78       chan puts {
    70         -This software is copyrighted 2011 - 2013 by G. Andrew Mangogna.
           79  +This software is copyrighted 2011 - 2016 by G. Andrew Mangogna.
    71     80   The following terms apply to all files associated with the software unless
    72     81   explicitly disclaimed in individual files.
    73     82   
    74     83   The authors hereby grant permission to use, copy, modify, distribute,
    75     84   and license this software and its documentation for any purpose, provided
    76     85   that existing copyright notices are retained in all copies and that this
    77     86   notice is included verbatim in any distributions. No written agreement,