MinML
language with references. There are three new
constructs: ref e
which allocates a new reference whose
contents is the value of e
; deref e
which
returns the contents of e
(which must evaluate to a
reference); and setref e1 e2
which updates the contents
of the reference e1
with the value of
e2
. Our references are rather close to Java's references
and the Jbook treatment of Java objects should be helpful for this
assignment.
Your extension should include the additional type rules, semantics, and AsmGofer implementation which extends minML.gs. Extra credit for also adding an exception handler to catch the division by zero exception. Extra extra credit for a proof of type safety for the new language.
The main purpose of this assignment is to get you more familiar with Haskell and the AsmGofer style used by the Jbook. It is much easier than directly extending the files that come with the Jbook (which most of you will be doing for your projects), and yet it has the same flavor and hence should be a good stepping stone.
MinML
. The notes define the language in detail.
.class
file to a
.j
file and vice versa and that you can step through the
evaluation of sample Java programs using the machines provided with
the book.
How can one establish that a [computer] model is faithful to reality? The approach is to construct an evolving algebra A that reflects the given computer system so closely that the correctness can be established by observation and experimentation. (There are tools for running evolving algebras.) A can then be refined or coarsened and used for numerous purposes. [p.1, Evolving Algebras 1993: Lipari Guide]Debate this statement in a paper. This is an individual (not group) project!