FAQ 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. avram FAQ
  2. ---------
  3. This question was asked when avram used to be on sourceforge.
  4. Q1:
  5. What is the purpose of avram and how does it differ from other virtual
  6. machines that exist?
  7. A1:
  8. There's quite a bit of documentation about avram on the home page but
  9. the short answer to your question is that its purpose is to make it
  10. easy to write compilers for functional programming languages by
  11. eliminating most of the code generation phase.
  12. Functional languages are more difficult than most other languages to
  13. translate into native code because the kinds of operations commonly
  14. used at the source level involve things like list processing, which
  15. are very far removed from the kinds of operations that are convenient
  16. to express in assembly language. Usually they also have no concept of
  17. assignment statements, use recursion or combinators instead of loops
  18. and branches, and may have functions taking functions as arguments and
  19. returning functions as results.
  20. The way avram differs from other virtual machines is a consequence of
  21. the support for functional programming operations. Other virtual
  22. machines are (to my knowledge) based on the traditional von Neumann
  23. model of a central processor with registers, an instruction set, and a
  24. writable memory, or at best an ensemble of thereof. In this model, a
  25. computation is defined by the cumulative effect of many instructions
  26. operating on individual words of memory. By contrast, avram has none
  27. of these characteristics. A program is described by a tree-like
  28. structure specifying a transformation from inputs to outputs, which is
  29. the computation itself. The essence of the virtual machine is the way
  30. it defines how larger programs are built from smaller ones.