123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199 |
- <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html401/loose.dtd">
- <html>
- <!-- Created on December 10, 2012 by texi2html 1.82
- texi2html was written by:
- Lionel Cons <[email protected]> (original author)
- Karl Berry <[email protected]>
- Olaf Bachmann <[email protected]>
- and many others.
- Maintained by: Many creative people.
- Send bugs and suggestions to <[email protected]>
- -->
- <head>
- <title>avram - a virtual machine code interpreter: 2.7.17 Vacant Address Space</title>
- <meta name="description" content="avram - a virtual machine code interpreter: 2.7.17 Vacant Address Space">
- <meta name="keywords" content="avram - a virtual machine code interpreter: 2.7.17 Vacant Address Space">
- <meta name="resource-type" content="document">
- <meta name="distribution" content="global">
- <meta name="Generator" content="texi2html 1.82">
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
- <style type="text/css">
- <!--
- a.summary-letter {text-decoration: none}
- blockquote.smallquotation {font-size: smaller}
- pre.display {font-family: serif}
- pre.format {font-family: serif}
- pre.menu-comment {font-family: serif}
- pre.menu-preformatted {font-family: serif}
- pre.smalldisplay {font-family: serif; font-size: smaller}
- pre.smallexample {font-size: smaller}
- pre.smallformat {font-family: serif; font-size: smaller}
- pre.smalllisp {font-size: smaller}
- span.roman {font-family:serif; font-weight:normal;}
- span.sansserif {font-family:sans-serif; font-weight:normal;}
- ul.toc {list-style: none}
- -->
- </style>
- </head>
- <body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
- <a name="Vacant-Address-Space"></a>
- <table cellpadding="1" cellspacing="1" border="0">
- <tr><td valign="middle" align="left">[<a href="Interaction-combinator.html#Interaction-combinator" title="Previous section in reading order"> < </a>]</td>
- <td valign="middle" align="left">[<a href="Library-Reference.html#Library-Reference" title="Next section in reading order"> > </a>]</td>
- <td valign="middle" align="left"> </td>
- <td valign="middle" align="left">[<a href="Virtual-Machine-Specification.html#Virtual-Machine-Specification" title="Beginning of this chapter or previous chapter"> << </a>]</td>
- <td valign="middle" align="left">[<a href="Virtual-Code-Semantics.html#Virtual-Code-Semantics" title="Up section"> Up </a>]</td>
- <td valign="middle" align="left">[<a href="Library-Reference.html#Library-Reference" title="Next chapter"> >> </a>]</td>
- <td valign="middle" align="left"> </td>
- <td valign="middle" align="left"> </td>
- <td valign="middle" align="left"> </td>
- <td valign="middle" align="left"> </td>
- <td valign="middle" align="left">[<a href="avram.html#Top" title="Cover (top) of document">Top</a>]</td>
- <td valign="middle" align="left">[<a href="avram_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
- <td valign="middle" align="left">[<a href="Function-Index.html#Function-Index" title="Index">Index</a>]</td>
- <td valign="middle" align="left">[<a href="avram_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
- </tr></table>
- <hr size="1">
- <a name="Vacant-Address-Space-1"></a>
- <h3 class="subsection">2.7.17 Vacant Address Space</h3>
- <p>Not every possible pattern has been used by the virtual machine as a way
- of encoding a function. The following patterns, where <code><var>a</var></code>,
- <code><var>b</var></code>, and <code><var>c</var></code> are non-<code>nil</code> trees, do not
- represent anything useful.
- </p>
- <dl compact="compact">
- <dt> unary forms</dt>
- <dd><p><code>((nil,nil),((nil,nil),(nil,((nil,<var>a</var>),nil))))</code><br>
- <code>((nil,nil),((nil,nil),(nil,(nil,(nil,<var>a</var>)))))</code>
- </p></dd>
- <dt> binary forms</dt>
- <dd><p><code>((nil,nil),((nil,nil),(<var>a</var>,<var>b</var>)))</code><br>
- <code>((nil,nil),((<var>a</var>,nil),(<var>b</var>,nil)))</code><br>
- <code>((nil,nil),((<var>a</var>,nil),(nil,<var>b</var>)))</code>
- </p></dd>
- <dt> ternary forms</dt>
- <dd><p><code>((nil,nil),((<var>a</var>,<var>b</var>),(<var>c</var>,nil)))</code><br>
- <code>((nil,nil),((<var>a</var>,<var>b</var>),(nil,<var>c</var>)))</code><br>
- <code>((nil,nil),((<var>a</var>,nil),(<var>b</var>,<var>c</var>)))</code><br>
- <code>((nil,nil),((nil,<var>a</var>),(<var>b</var>,<var>c</var>)))</code>
- </p></dd>
- </dl>
- <p>These patterns are detected by the virtual machine simply to avoid blowing
- it up, but they always cause an error message to be reported.
- <a name="index-unsupported-hook-2"></a>
- <a name="index-unrecognized-combinator-1"></a>
- </p>
- <dl compact="compact">
- <dt> <em>P55</em></dt>
- <dd><p>For <code><var>f</var></code> matching any of the first three trees in the above list,<br>
- <code><var>f</var>_<var>n</var> <var>x</var>_<var>n</var></code> =
- [[<code>('unsupported hook',nil)</code>]]<code>_(<var>n</var>+1)</code>
- </p></dd>
- <dt> <em>P56</em></dt>
- <dd><p>For the remaining trees <code><var>f</var></code> in the above list,<br>
- <code><var>f</var>_<var>n</var> <var>x</var>_<var>n</var></code> =
- [[<code>('unrecognized combinator (code <var>m</var>)',nil)</code>]]<code>_(<var>n</var>+1)</code>
- </p></dd>
- </dl>
- <p>Here, <code><var>m</var></code> is a numeric constant dependent on which tree
- <code><var>f</var></code> was used. The unsupported hook message is meant to be
- more informative than the unrecognized combinator message, suggesting
- that a feature intended for future use is not yet available.
- </p>
- <p>This list has been assembled for the benefit of readers considering the
- addition of backward compatible extensions to the virtual code
- semantics, who are undeterred by the facts that
- </p><ul>
- <li>
- the computational model
- <a name="index-universality-1"></a>
- is already universal
- </li><li>
- virtual code applications are already
- interoperable with all kinds of high performance software having a text
- based or console interface by way of the <code>interact</code> combinator
- </li><li>
- an unlimited number of built in library functions can be added
- by way of the <code>library</code> combinator as described in
- <a href="Implementing-new-library-functions.html#Implementing-new-library-functions">Implementing new library functions</a>
- </li><li>
- the C code in <code>avram</code> makes fairly
- <a name="index-pointers-2"></a>
- intricate use of pointers with a careful policy of reference counting
- and storage reclamation
- </li><li>
- there is also a performance penalty incurred by
- <a name="index-reference-count"></a>
- further extensions to the semantics, even for applications that don’t
- use them, because a pattern recognition algorithm in the interpreter has
- more cases to consider.
- </li></ul>
- <p>Nevertheless, a new functional form combining a pair of functions to be
- interpreted in a new way by the virtual machine could be defined using
- any of the binary forms above, for example, with <code><var>a</var></code> as the
- virtual code for one of the functions and <code><var>b</var></code> as that of the
- other. Such a form would not conflict with any existing applications,
- provided that both <code><var>a</var></code> and <code><var>b</var></code> are not <code>nil</code>,
- which is true of any valid representation for a function.
- </p>
- <p>Virtual machine architects, take note. There are infinitely many trees
- <a name="index-trees-4"></a>
- fitting these patterns, but it would be possible to use them up by
- assigning them without adequate foresight. For example, if
- interpretations were assigned to the four ternary forms, the three binary
- forms, and one of the remaining unary forms, then the only
- unassigned pattern could be of the form
- </p>
- <table><tr><td> </td><td><pre class="display"><code>((nil,nil),((nil,nil),(nil,(nil,(nil,<var>a</var>)))))</code>
- </pre></td></tr></table>
- <p>Assigning an interpretation to it would leave no further room for
- backward compatible expansion. On the other hand, any tree of the
- following form also fits the above pattern,
- </p>
- <table><tr><td> </td><td><pre class="display"><code>((nil,nil),((nil,nil),(nil,(nil,(nil,(<var>b</var>,<var>c</var>))))))</code>
- </pre></td></tr></table>
- <p>with any values for <code><var>b</var></code> and <code><var>c</var></code>. Different
- meanings could be chosen for the case where both are <code>nil</code>, both
- are non-<code>nil</code>, or one is <code>nil</code> and the other non-<code>nil</code>,
- allowing two unary forms, one binary, and one constant. If at least one
- of these patterns is reserved for future enhancements, then a
- potentially inexhaustible supply of address space remains and there will
- be no need for incompatible changes later.
- </p>
- <hr size="1">
- <table cellpadding="1" cellspacing="1" border="0">
- <tr><td valign="middle" align="left">[<a href="Interaction-combinator.html#Interaction-combinator" title="Previous section in reading order"> < </a>]</td>
- <td valign="middle" align="left">[<a href="Library-Reference.html#Library-Reference" title="Next section in reading order"> > </a>]</td>
- <td valign="middle" align="left"> </td>
- <td valign="middle" align="left">[<a href="Virtual-Machine-Specification.html#Virtual-Machine-Specification" title="Beginning of this chapter or previous chapter"> << </a>]</td>
- <td valign="middle" align="left">[<a href="Virtual-Code-Semantics.html#Virtual-Code-Semantics" title="Up section"> Up </a>]</td>
- <td valign="middle" align="left">[<a href="Library-Reference.html#Library-Reference" title="Next chapter"> >> </a>]</td>
- <td valign="middle" align="left"> </td>
- <td valign="middle" align="left"> </td>
- <td valign="middle" align="left"> </td>
- <td valign="middle" align="left"> </td>
- <td valign="middle" align="left">[<a href="avram.html#Top" title="Cover (top) of document">Top</a>]</td>
- <td valign="middle" align="left">[<a href="avram_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
- <td valign="middle" align="left">[<a href="Function-Index.html#Function-Index" title="Index">Index</a>]</td>
- <td valign="middle" align="left">[<a href="avram_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
- </tr></table>
- <p>
- <font size="-1">
- This document was generated on <i>December 10, 2012</i> using <a href="http://www.nongnu.org/texi2html/"><i>texi2html 1.82</i></a>.
- </font>
- <br>
- </p>
- </body>
- </html>
|