Preface.html 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. <html lang="en">
  2. <head>
  3. <title>Preface - 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="prev" href="index.html#Top" title="Top">
  9. <link rel="next" href="User-Manual.html#User-Manual" title="User Manual">
  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="Preface"></a>
  27. <p>
  28. Next:&nbsp;<a rel="next" accesskey="n" href="User-Manual.html#User-Manual">User Manual</a>,
  29. Previous:&nbsp;<a rel="previous" accesskey="p" href="index.html#Top">Top</a>,
  30. Up:&nbsp;<a rel="up" accesskey="u" href="index.html#Top">Top</a>
  31. <hr>
  32. </div>
  33. <h2 class="unnumbered">Preface</h2>
  34. <p><code>avram</code> is a virtual machine code interpreter. It reads an input
  35. file containing a user-supplied application expressed in virtual machine
  36. code, and executes it on the host machine. The name is a quasi-acronym
  37. for &ldquo;Applicative ViRtuAl Machine&rdquo;. Notable features are
  38. <p><a name="index-functional-programming-1"></a><a name="index-environment-2"></a><a name="index-Unix-3"></a>
  39. <ul>
  40. <li>strong
  41. support for functional programming operations (e.g., list processing)
  42. <li>interfaces to selected functions from mathematical libraries, such as
  43. <ul>
  44. <li><code>gsl</code> (numerical integration, differentiation, and series acceleration)
  45. <p><a href="http://www.gnu.org/software/gsl/">http://www.gnu.org/software/gsl/</a>
  46. <li><code>mpfr</code> (arbitrary precision arithmetic)
  47. <p><a href="http://www.mpfr.org">http://www.mpfr.org</a>
  48. <li><code>minpack</code> (non-linear optimization)
  49. <p><a href="http://ftp.netlib.org/minpack">http://ftp.netlib.org/minpack</a>
  50. <li><code>lapack</code> (linear algebra)
  51. <p><a href="http://ftp.netlib.org/lapack">http://ftp.netlib.org/lapack</a>
  52. <li><code>fftw</code> (fast fourier transforms)
  53. <p><a href="http://www.fftw.org">http://www.fftw.org</a>
  54. <li><code>Rmath</code> (statistical and transcendental functions)
  55. <p><a href="http://www.r-project.org">http://www.r-project.org</a>
  56. <li><code>ufsparse</code> (sparse matrices)
  57. <p><a href="http://www.cise.ufl.edu/research/sparse/SuiteSparse/current/SuiteSparse/">http://www.cise.ufl.edu/research/sparse/SuiteSparse/current/SuiteSparse/</a>
  58. <li><code>glpk</code> (linear programming by the simplex method)
  59. <p><a href="http://tech.groups.yahoo.com/group/lp_solve/">http://tech.groups.yahoo.com/group/lp_solve/</a>
  60. <li><code>lpsolve</code> (mixed integer linear programming)
  61. <p><a href="http://www.llnl.gov/CASC/sundials/">http://www.llnl.gov/CASC/sundials/</a>
  62. <li><code>kinsol</code> (constrained non-linear optimization)
  63. <p><a href="http://www.llnl.gov/CASC/sundials/">http://www.llnl.gov/CASC/sundials/</a>
  64. </ul>
  65. <li>interoperability of virtual code applications with other console
  66. applications or shells through the <code>expect</code> library
  67. <li>a simple high-level
  68. interface to files, environment variables and command line parameters
  69. <li>support for various styles of stateless or persistent stream
  70. processors (a.k.a. Unix filters)
  71. </ul>
  72. <p>The reason for writing <code>avram</code> was that I wanted to do some work
  73. using a functional programming language, didn't like any functional
  74. programming languages that already existed, and felt that it would be
  75. less trouble to write a virtual machine emulator than the back end of
  76. a compiler. As of version 0.1.0, the first public release of
  77. <code>avram</code> as such in 2000, most of the code base had been in heavy
  78. use by me for about four years, running very reliably. At this writing
  79. some six years later, it has seen even more use with rarely any
  80. reliability issues, in some cases attacking large combinatorial
  81. problems for weeks or months at a time. These problems have involved
  82. both long running continuous execution, and batches of thousands of
  83. shorter jobs.
  84. <p>Although the virtual machine is biased toward functional programming,
  85. it is officially language agnostic, so <code>avram</code> may be useful to
  86. anyone involved in the development of compilers for other programming,
  87. scripting, or special purpose languages. The crucial advantage of
  88. using it in your own project is that rather than troubling over
  89. address modes, register allocation, and other hassles inherent in
  90. generating native code, your compiler can just dump a fairly high
  91. level intermediate code representation of the source text to a file,
  92. and let the virtual machine emulator deal with the details. The
  93. tradeoff for using a presumably higher level interpreted language is that the
  94. performance is unlikely to be competitive with native code, but this
  95. issue is mitigated in the case of numerical applications whose heavy
  96. lifting is done by the external libraries mentioned above.
  97. <p>Portability is an added bonus. The virtual code is binary compatible
  98. across all platforms. Versions of <code>avram</code> as of 0.1.0 and later are
  99. packaged using GNU autotools and should be possible to build on any
  100. platform supporting them. In particular, the package is known to have
  101. built successfully on MacOS, FreeBSD, Solaris (thanks to the compile
  102. farm at Sourceforge.net) Digital Unix, and Debian GNU/Linux for i386 and
  103. Alpha platforms, although it has not been extensively tested on all of
  104. them. Earlier versions were compiled and run successfully on Irix and
  105. even Windows-NT (with <samp><span class="command">gcc</span></samp>).
  106. <p>This document is divided into three main parts, with possibly three
  107. different audiences, but they all depend on a basic familiarity with
  108. <a name="index-Unix-4"></a>Unix or GNU/Linux systems.
  109. <dl>
  110. <dt><a href="User-Manual.html#User-Manual">User Manual</a><dd>essentially reproduces the information found in
  111. the manpage that is distributed with <code>avram</code> with a few extra
  112. examples and longer explanations. Properly deployed,
  113. <code>avram</code> should be almost entirely hidden from end users by wrapper
  114. scripts, so the &ldquo;users&rdquo; to whom this part is relevant would be
  115. those involved in preparing these scripts (a matter of choosing the right
  116. command line options). Depending on the extent to which this task is
  117. automated by a compiler, that may include the compiler writer or the
  118. developers of applications.
  119. <br><dt><a href="Virtual-Machine-Specification.html#Virtual-Machine-Specification">Virtual Machine Specification</a><dd>documents much of what one would need to know in order to write a
  120. compiler that generates code executable by <code>avram</code>. That includes
  121. the complete virtual machine code semantics and file formats. It would
  122. also be possible to implement a compatible replacement for <code>avram</code>
  123. from scratch based on the information in this chapter, in case anyone
  124. has anything against C, my coding style, or the GPL. (A few patches to
  125. make it <samp><span class="command">lint</span></samp> cleanly or a new implementation in good
  126. pedagogical Java without pointers would both be instructive
  127. exercises. ;-))
  128. <a name="index-pointers-5"></a><a name="index-Java-6"></a><br><dt><a href="Library-Reference.html#Library-Reference">Library Reference</a><dd>includes documentation on the application program interface and
  129. recommended entry points for the C library distributed with
  130. <code>avram</code>. This information would be of use to those wishing to
  131. develop applications incorporating similar features, or to reuse the
  132. code for unrelated purposes. It might also be useful to anyone wishing
  133. to develop C or C++ applications that read or write data files in the
  134. format used by <code>avram</code>.
  135. </dl>
  136. </body></html>