Lectures 32 & 33 homework
Lecture 32 homework (reversible languages)
-
[7 points] Short paper suggestion. Read up on the existing
reversible high-level languages Janus, PsiLisp, and R. Write a short
paper to compare and contrast them.
-
[10+ points] Small programming projects. Write a program in
the R programming language to do one of the reversible algorithms mentioned
during lec. 33 - sorting, searching, division, factoring, matrix multiplication
or inversion, all-pairs shortest-path, etc. You could extend
the Schroedinger simulator to 2-D. You can also make up other problems
to solve - anything of interest to you. Try to make your algorithm
as spacetime-efficient as you can. Use the latest version of RCOMP
(the R compiler), which is at http://www.cise.ufl.edu/research/revcomp/users/cclark/rcomp-fall2001/
(see the readme files in there). It runs under a common lisp such
as clisp or gcl (the latter may require some porting).
Compile the programs and run them under PendVM; the latest version of which
is at http://www.cise.ufl.edu/research/revcomp/users/cclark/pendvm-fall2001/.
You can get an additional 5 points for each program you write after the
first, as long as each program is substantially different from the previous
ones. Turn in a report with printouts of your source code, compiled
code, and sample inputs & outputs or a trace of an interactive session.
Your report should also say what is the order of growth of space, time,
and spacetime costs in each of your algorithms.
-
[20 points] Medium programming project. Extend the R compiler
to implement some new language features. You could add additional
types of control-flow constructs, like the ones in Janus. Or, you
could add language support for more sophisticated data types such as structures
and classes. Or, you could add support for a new floating-point data
type (with an associated arithmetic library).
-
[100 points] Large programming project. Design & implement
your own high-level reversible programming language. It should be
at least as expressive as the existing reversible languages Janus, PsiLisp,
and R. Implement an interpreter or compiler for the language.
Turn in the source code and a report documenting the language and tool
in detail.
Lecture 33 homework (reversible algorithms)
Note: Lecture 32 exercise #2 can be viewed as an algorithms assignment.
-
[3 points ea.] Algorithm design & analysis. Invent and
write out in reversible pseudo-code a reversible algorithm for some problem(s)
of interest. This may include any of the reversible algorithms mentioned
in lec. 33 where the algorithm was not already written out for you in detail
- sorting, searching, division, factoring, matrix multiplication or inversion,
all-pairs shortest-path, etc. You can also make up other problems
to solve - anything of interest to you. Say what is the order of
growth of space, time, and spacetime costs in each of your algorithms,
as a function of input size. If the algorithm is only partially
reversible, also specify the order of growth of entropy produced (# of
irreversible erasures) as a function of input size. Be very careful
to make sure that you do not accidentally use a step that is irreversible
without realizing it! To help you make sure of this, you may want
to stick with the language constructs that are available in the existing
reversible languages such as Janus, Psi-Lisp, and R.