readme
MUIS:
The comments written in the code, as well as the documentation that is
derived from it (using pydoc) provide information about the code
implementation and workings. This document gives an overview of the
modules and what their responsibility is.
aliasdb Saves aliases used in the code. These textual aliases
can be used instead of addresses in the code.
convenience Convenience module. Contains helper functions with no
specific use. Mainly used for debugging.
muis The main module. It parses the command line arguments
and starts the optimisation process.
options Registers options set. Mainly used for command line
arguments.
regex_support Contains functions and strings which aid the creation of
regular expressions.
test_aliasdb tests the 'aliasdb'
test_optimize test the optimizer
test_writer tests the writer
basic_block Contains the structure for a basic block and integrity
checks
instruction Implements the instruction set of the MIPS processor. If
the program needs to be used for different processors;
this, and the 'registers' module, should be the only one
to change
optimize Does the actual optimization
reader Parses the basic block structure from assembler
code
registers Contains information about register behaviour
and list of 'all' registers
test_instruction test the instruction set
test_reader rests the reader
writer writes basic block structures to assembler code
ETCETERA:
Floating point operations are done using python's built-in floating
point system. On most systems this is Python floats to IEEE-754 "double
precision". In order to correctly (in an assembly sense) compute the
numbers, a floating point calculator has to be created.
Due to the flaws of floating point numbers in computers, it is unsafe to
rely on exact result in programming. So it is relatively safe to use an
alternate floating point algorithm in the optimisation for the single
precision operations.
Should a program respond incorrectly in response, this can correctly be
considered a program bug rather then an optimisation bug, given that
programs should not rely on hardware-level floating point
specifications. Especially given the fact double precision floating
point numbers are mathematically more correct than single precision
ones.
BUGS:
A bug has been found with this program in relation to the dhrystone
test. The strangeness of this result was that the problem
manifested itself without optimising. The details of this problem
include that the program does not seem to follow the code as given. Its
behaviour changes when in the original C code changes are made to code
which is not (supposed to be) executed. After following the runtime
characteristics, at one point, it finds a jump expression, but does not
continue the code from the corresponding label.