avram FAQ
---------

This question was asked when avram used to be on sourceforge.

Q1: 

What is the purpose of avram and how does it differ from other virtual
machines that exist?

A1:

There's quite a bit of documentation about avram on the home page but
the short answer to your question is that its purpose is to make it
easy to write compilers for functional programming languages by
eliminating most of the code generation phase.

Functional languages are more difficult than most other languages to
translate into native code because the kinds of operations commonly
used at the source level involve things like list processing, which
are very far removed from the kinds of operations that are convenient
to express in assembly language. Usually they also have no concept of
assignment statements, use recursion or combinators instead of loops
and branches, and may have functions taking functions as arguments and
returning functions as results.

The way avram differs from other virtual machines is a consequence of
the support for functional programming operations. Other virtual
machines are (to my knowledge) based on the traditional von Neumann
model of a central processor with registers, an instruction set, and a
writable memory, or at best an ensemble of thereof. In this model, a
computation is defined by the cumulative effect of many instructions
operating on individual words of memory. By contrast, avram has none
of these characteristics. A program is described by a tree-like
structure specifying a transformation from inputs to outputs, which is
the computation itself. The essence of the virtual machine is the way
it defines how larger programs are built from smaller ones.
