Note.html 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <html lang="en">
  2. <head>
  3. <title>Note - avram - a virtual machine code interpreter</title>
  4. <meta http-equiv="Content-Type" content="text/html">
  5. <meta name="description" content="avram - a virtual machine code interpreter">
  6. <meta name="generator" content="makeinfo 4.13">
  7. <link title="Top" rel="start" href="index.html#Top">
  8. <link rel="up" href="Metrics-and-Maintenance.html#Metrics-and-Maintenance" title="Metrics and Maintenance">
  9. <link rel="prev" href="Version.html#Version" title="Version">
  10. <link rel="next" href="Profile.html#Profile" title="Profile">
  11. <link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
  12. <meta http-equiv="Content-Style-Type" content="text/css">
  13. <style type="text/css"><!--
  14. pre.display { font-family:inherit }
  15. pre.format { font-family:inherit }
  16. pre.smalldisplay { font-family:inherit; font-size:smaller }
  17. pre.smallformat { font-family:inherit; font-size:smaller }
  18. pre.smallexample { font-size:smaller }
  19. pre.smalllisp { font-size:smaller }
  20. span.sc { font-variant:small-caps }
  21. span.roman { font-family:serif; font-weight:normal; }
  22. span.sansserif { font-family:sans-serif; font-weight:normal; }
  23. --></style>
  24. </head>
  25. <body>
  26. <div class="node">
  27. <a name="Note"></a>
  28. <p>
  29. Next:&nbsp;<a rel="next" accesskey="n" href="Profile.html#Profile">Profile</a>,
  30. Previous:&nbsp;<a rel="previous" accesskey="p" href="Version.html#Version">Version</a>,
  31. Up:&nbsp;<a rel="up" accesskey="u" href="Metrics-and-Maintenance.html#Metrics-and-Maintenance">Metrics and Maintenance</a>
  32. <hr>
  33. </div>
  34. <h5 class="subsubsection">2.7.7.2 Note</h5>
  35. <p>This operation allows arbitrary information or comments to be embedded
  36. in a virtual code application in such a way that it will be ignored by
  37. <code>avram</code> when executing it. For the <code>silly</code> language, a
  38. <code>note</code> function is defined in the standard prelude so as to imply
  39. the following theorem.
  40. <a name="index-g_t_0040code_007bnote_007d-281"></a><a name="index-annotations-282"></a>
  41. <dl>
  42. <dt><em>T11</em><dd>[[<code>note</code>]] <code>(</code><var>f</var><code>,</code><var>c</var><code>)</code> = <code>((nil,nil),((nil,nil),(nil,(nil,(</code><var>f</var><code>,</code><var>c</var><code>)))))</code>
  43. </dl>
  44. <p class="noindent">Intuitively, the argument <var>f</var> represents a function, and the
  45. argument <code>c</code> represents the comment, annotation, or whatever, that
  46. will be embedded but ignored in the virtual code.
  47. <p>Semantically, a function with a note attached is the same as the
  48. function by itself, as the following property stipulates for
  49. any non-<code>nil</code> <var>f</var>.
  50. <dl>
  51. <dt><em>P8</em><dd>([[<code>note</code>]] <code>(</code><var>f</var><code>,</code><var>c</var><code>)</code>) <var>x</var> = <var>f</var> <var>x</var>
  52. </dl>
  53. <p>A possible reason for using this feature might be to support a language
  54. that performs run-time type checking by hanging type tags on
  55. <a name="index-type-tags-283"></a>everything. Another possible use would be to include symbolic
  56. information needed by a debugger.
  57. </body></html>