Transition.html 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. <html lang="en">
  2. <head>
  3. <title>Transition - 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="Reference-Implementations.html#Reference-Implementations" title="Reference Implementations">
  9. <link rel="prev" href="Replace.html#Replace" title="Replace">
  10. <link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
  11. <meta http-equiv="Content-Style-Type" content="text/css">
  12. <style type="text/css"><!--
  13. pre.display { font-family:inherit }
  14. pre.format { font-family:inherit }
  15. pre.smalldisplay { font-family:inherit; font-size:smaller }
  16. pre.smallformat { font-family:inherit; font-size:smaller }
  17. pre.smallexample { font-size:smaller }
  18. pre.smalllisp { font-size:smaller }
  19. span.sc { font-variant:small-caps }
  20. span.roman { font-family:serif; font-weight:normal; }
  21. span.sansserif { font-family:sans-serif; font-weight:normal; }
  22. --></style>
  23. </head>
  24. <body>
  25. <div class="node">
  26. <a name="Transition"></a>
  27. <p>
  28. Previous:&nbsp;<a rel="previous" accesskey="p" href="Replace.html#Replace">Replace</a>,
  29. Up:&nbsp;<a rel="up" accesskey="u" href="Reference-Implementations.html#Reference-Implementations">Reference Implementations</a>
  30. <hr>
  31. </div>
  32. <h3 class="section">B.4 Transition</h3>
  33. <p>This code is relevant to the discussion of <code>transfer</code> in <a href="Transfer.html#Transfer">Transfer</a>,
  34. where its specification is described in detail. When this code
  35. is evaluated on a virtual code application <var>f</var>, the result is
  36. the code for a transition function that takes one configuration to the
  37. next in the course of evaluating a transfer function, as specified in
  38. equations <em>E7</em> to <em>E9</em>.
  39. <a name="index-g_t_0040code_007btransition_007d-702"></a>
  40. <pre class="example">
  41. output_buffer = compose(left,argument)
  42. input_buffer = compose(right,compose(right,argument))
  43. active = compose(left,compose(right,argument))
  44. state = compose(left,active)
  45. output = compose(right,active)
  46. transition =
  47. bu(compose,refer) (hired bu(conditional,active))(
  48. (hired conditional)(
  49. constant input_buffer,
  50. bu(compose,(fan bu(hired meta,self))) (hired apply)(
  51. constant fan bu(couple,couple(output,output_buffer)),
  52. couple (fan bu(compose,couple))(
  53. couple(
  54. (hired apply)(
  55. hired,
  56. constant (state,compose(head,input_buffer))),
  57. constant compose(tail,input_buffer)),
  58. couple(
  59. (hired apply)(hired,constant(state,constant nil)),
  60. constant constant nil)))),
  61. constant compose(flat,compose(reverse,output_buffer)))
  62. </pre>
  63. </body></html>