Preface.html 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html401/loose.dtd">
  2. <html>
  3. <!-- Created on November 8, 2012 by texi2html 1.82
  4. texi2html was written by:
  5. Lionel Cons <[email protected]> (original author)
  6. Karl Berry <[email protected]>
  7. Olaf Bachmann <[email protected]>
  8. and many others.
  9. Maintained by: Many creative people.
  10. Send bugs and suggestions to <[email protected]>
  11. -->
  12. <head>
  13. <title>avram - a virtual machine code interpreter: Preface</title>
  14. <meta name="description" content="avram - a virtual machine code interpreter: Preface">
  15. <meta name="keywords" content="avram - a virtual machine code interpreter: Preface">
  16. <meta name="resource-type" content="document">
  17. <meta name="distribution" content="global">
  18. <meta name="Generator" content="texi2html 1.82">
  19. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  20. <style type="text/css">
  21. <!--
  22. a.summary-letter {text-decoration: none}
  23. blockquote.smallquotation {font-size: smaller}
  24. pre.display {font-family: serif}
  25. pre.format {font-family: serif}
  26. pre.menu-comment {font-family: serif}
  27. pre.menu-preformatted {font-family: serif}
  28. pre.smalldisplay {font-family: serif; font-size: smaller}
  29. pre.smallexample {font-size: smaller}
  30. pre.smallformat {font-family: serif; font-size: smaller}
  31. pre.smalllisp {font-size: smaller}
  32. span.roman {font-family:serif; font-weight:normal;}
  33. span.sansserif {font-family:sans-serif; font-weight:normal;}
  34. ul.toc {list-style: none}
  35. -->
  36. </style>
  37. </head>
  38. <body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
  39. <a name="Preface"></a>
  40. <table cellpadding="1" cellspacing="1" border="0">
  41. <tr><td valign="middle" align="left">[<a href="avram.html#Top" title="Previous section in reading order"> &lt; </a>]</td>
  42. <td valign="middle" align="left">[<a href="User-Manual.html#User-Manual" title="Next section in reading order"> &gt; </a>]</td>
  43. <td valign="middle" align="left"> &nbsp; </td>
  44. <td valign="middle" align="left">[ &lt;&lt; ]</td>
  45. <td valign="middle" align="left">[<a href="avram.html#Top" title="Up section"> Up </a>]</td>
  46. <td valign="middle" align="left">[<a href="User-Manual.html#User-Manual" title="Next chapter"> &gt;&gt; </a>]</td>
  47. <td valign="middle" align="left"> &nbsp; </td>
  48. <td valign="middle" align="left"> &nbsp; </td>
  49. <td valign="middle" align="left"> &nbsp; </td>
  50. <td valign="middle" align="left"> &nbsp; </td>
  51. <td valign="middle" align="left">[<a href="avram.html#Top" title="Cover (top) of document">Top</a>]</td>
  52. <td valign="middle" align="left">[<a href="avram_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
  53. <td valign="middle" align="left">[<a href="Function-Index.html#Function-Index" title="Index">Index</a>]</td>
  54. <td valign="middle" align="left">[<a href="avram_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
  55. </tr></table>
  56. <hr size="1">
  57. <a name="Preface-1"></a>
  58. <h1 class="unnumbered">Preface</h1>
  59. <p><code>avram</code> is a virtual machine code interpreter. It reads an input
  60. file containing a user-supplied application expressed in virtual machine
  61. code, and executes it on the host machine. The name is a quasi-acronym
  62. for &ldquo;Applicative ViRtuAl Machine&rdquo;. Notable features are
  63. </p>
  64. <a name="index-functional-programming"></a>
  65. <a name="index-environment"></a>
  66. <a name="index-Unix"></a>
  67. <ul>
  68. <li> strong
  69. support for functional programming operations (e.g., list processing)
  70. </li><li>
  71. interfaces to selected functions from mathematical libraries, such as
  72. <ul>
  73. <li>
  74. <code>gsl</code> (numerical integration, differentiation, and series acceleration)
  75. <p><a href="http://www.gnu.org/software/gsl/">http://www.gnu.org/software/gsl/</a>
  76. </p></li><li>
  77. <code>mpfr</code> (arbitrary precision arithmetic)
  78. <p><a href="http://www.mpfr.org">http://www.mpfr.org</a>
  79. </p></li><li>
  80. <code>minpack</code> (non-linear optimization)
  81. <p><a href="http://www.netlib.org/minpack">http://www.netlib.org/minpack</a>
  82. </p></li><li>
  83. <code>lapack</code> (linear algebra)
  84. <p><a href="http://www.netlib.org/lapack">http://www.netlib.org/lapack</a>
  85. </p></li><li>
  86. <code>fftw</code> (fast fourier transforms)
  87. <p><a href="http://www.fftw.org">http://www.fftw.org</a>
  88. </p></li><li>
  89. <code>Rmath</code> (statistical and transcendental functions)
  90. <p><a href="http://www.r-project.org">http://www.r-project.org</a>
  91. </p></li><li>
  92. <code>ufsparse</code> (sparse matrices)
  93. <p><a href="http://www.cise.ufl.edu/research/sparse/SuiteSparse/current/SuiteSparse/">http://www.cise.ufl.edu/research/sparse/SuiteSparse/current/SuiteSparse/</a>
  94. </p></li><li>
  95. <code>glpk</code> (linear programming by the simplex method)
  96. <p><a href="http://www.gnu.org/software/glpk">http://www.gnu.org/software/glpk</a>
  97. </p></li><li>
  98. <code>lpsolve</code> (mixed integer linear programming)
  99. <p><a href="http://sourceforge.net/projects/lpsolve/">http://sourceforge.net/projects/lpsolve/</a>
  100. </p></li><li>
  101. <code>kinsol</code> (constrained non-linear optimization)
  102. <p><a href="http://www.llnl.gov/CASC/sundials/">http://www.llnl.gov/CASC/sundials/</a>
  103. </p></li></ul>
  104. </li><li> interoperability of virtual code applications with other console
  105. applications or shells through the <code>expect</code> library
  106. </li><li> a simple high-level
  107. interface to files, environment variables and command line parameters
  108. </li><li> support for various styles of stateless or persistent stream
  109. processors (a.k.a. Unix filters)
  110. </li></ul>
  111. <p>The reason for writing <code>avram</code> was that I wanted to do some work
  112. using a functional programming language, didn&rsquo;t like any functional
  113. programming languages that already existed, and felt that it would be
  114. less trouble to write a virtual machine emulator than the back end of
  115. a compiler. As of version 0.1.0, the first public release of
  116. <code>avram</code> as such in 2000, most of the code base had been in heavy
  117. use by me for about four years, running very reliably. At this writing
  118. some six years later, it has seen even more use with rarely any
  119. reliability issues, in some cases attacking large combinatorial
  120. problems for weeks or months at a time. These problems have involved
  121. both long running continuous execution, and batches of thousands of
  122. shorter jobs.
  123. </p>
  124. <p>Although the virtual machine is biased toward functional programming,
  125. it is officially language agnostic, so <code>avram</code> may be useful to
  126. anyone involved in the development of compilers for other programming,
  127. scripting, or special purpose languages. The crucial advantage of
  128. using it in your own project is that rather than troubling over
  129. address modes, register allocation, and other hassles inherent in
  130. generating native code, your compiler can just dump a fairly high
  131. level intermediate code representation of the source text to a file,
  132. and let the virtual machine emulator deal with the details. The
  133. tradeoff for using a presumably higher level interpreted language is that the
  134. performance is unlikely to be competitive with native code, but this
  135. issue is mitigated in the case of numerical applications whose heavy
  136. lifting is done by the external libraries mentioned above.
  137. </p>
  138. <p>Portability is an added bonus. The virtual code is binary compatible
  139. across all platforms. Versions of <code>avram</code> as of 0.1.0 and later are
  140. packaged using GNU autotools and should be possible to build on any
  141. platform supporting them. In particular, the package is known to have
  142. built successfully on MacOS, FreeBSD, Solaris (thanks to the compile
  143. farm at Sourceforge.net) Digital Unix, and Debian GNU/Linux for i386 and
  144. Alpha platforms, although it has not been extensively tested on all of
  145. them. Earlier versions were compiled and run successfully on Irix and
  146. even Windows-NT (with <code>gcc</code>).
  147. </p>
  148. <p>This document is divided into three main parts, with possibly three
  149. different audiences, but they all depend on a basic familiarity with
  150. <a name="index-Unix-1"></a>
  151. Unix or GNU/Linux systems.
  152. </p>
  153. <dl compact="compact">
  154. <dt> <a href="User-Manual.html#User-Manual">User Manual</a></dt>
  155. <dd><p>essentially reproduces the information found in
  156. the manpage that is distributed with <code>avram</code> with a few extra
  157. examples and longer explanations. Properly deployed,
  158. <code>avram</code> should be almost entirely hidden from end users by wrapper
  159. scripts, so the &ldquo;users&rdquo; to whom this part is relevant would be
  160. those involved in preparing these scripts (a matter of choosing the right
  161. command line options). Depending on the extent to which this task is
  162. automated by a compiler, that may include the compiler writer or the
  163. developers of applications.
  164. </p></dd>
  165. <dt> <a href="Virtual-Machine-Specification.html#Virtual-Machine-Specification">Virtual Machine Specification</a></dt>
  166. <dd><p>documents much of what one would need to know in order to write a
  167. compiler that generates code executable by <code>avram</code>. That includes
  168. the complete virtual machine code semantics and file formats. It would
  169. also be possible to implement a compatible replacement for <code>avram</code>
  170. from scratch based on the information in this chapter, in case anyone
  171. has anything against C, my coding style, or the GPL. (A few patches to
  172. make it <code>lint</code> cleanly or a new implementation in good
  173. pedagogical Java without pointers would both be instructive
  174. exercises. ;-))
  175. <a name="index-pointers"></a>
  176. <a name="index-Java"></a>
  177. </p></dd>
  178. <dt> <a href="Library-Reference.html#Library-Reference">Library Reference</a></dt>
  179. <dd><p>includes documentation on the application program interface and
  180. recommended entry points for the C library distributed with
  181. <code>avram</code>. This information would be of use to those wishing to
  182. develop applications incorporating similar features, or to reuse the
  183. code for unrelated purposes. It might also be useful to anyone wishing
  184. to develop C or C++ applications that read or write data files in the
  185. format used by <code>avram</code>.
  186. </p></dd>
  187. </dl>
  188. <hr size="1">
  189. <table cellpadding="1" cellspacing="1" border="0">
  190. <tr><td valign="middle" align="left">[<a href="avram.html#Top" title="Previous section in reading order"> &lt; </a>]</td>
  191. <td valign="middle" align="left">[<a href="User-Manual.html#User-Manual" title="Next section in reading order"> &gt; </a>]</td>
  192. <td valign="middle" align="left"> &nbsp; </td>
  193. <td valign="middle" align="left">[ &lt;&lt; ]</td>
  194. <td valign="middle" align="left">[<a href="avram.html#Top" title="Up section"> Up </a>]</td>
  195. <td valign="middle" align="left">[<a href="User-Manual.html#User-Manual" title="Next chapter"> &gt;&gt; </a>]</td>
  196. <td valign="middle" align="left"> &nbsp; </td>
  197. <td valign="middle" align="left"> &nbsp; </td>
  198. <td valign="middle" align="left"> &nbsp; </td>
  199. <td valign="middle" align="left"> &nbsp; </td>
  200. <td valign="middle" align="left">[<a href="avram.html#Top" title="Cover (top) of document">Top</a>]</td>
  201. <td valign="middle" align="left">[<a href="avram_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
  202. <td valign="middle" align="left">[<a href="Function-Index.html#Function-Index" title="Index">Index</a>]</td>
  203. <td valign="middle" align="left">[<a href="avram_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
  204. </tr></table>
  205. <p>
  206. <font size="-1">
  207. This document was generated on <i>November 8, 2012</i> using <a href="http://www.nongnu.org/texi2html/"><i>texi2html 1.82</i></a>.
  208. </font>
  209. <br>
  210. </p>
  211. </body>
  212. </html>