Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
The subject of this exercise is to specialize a bytecode interpreter.
Make sure to have read "Static and Dynamic Program Compilation by
Interpreter Specialization" before you start.
The interpreter can be found in this directory. It consists of three
files, a main file, a file containing the interpreter, and an include
file.
The problem with specializing bytecode interpreters is that branching
instructions inspect the values that are being computed by the program
being interpreted. These values are dynamic since they are not
considered part of the static input - otherwise we would specialize
everything away.
(1) Get a simple version of the interpreter to specialize.
Remove the branching instruction, and make it specialize. You should
be able to specialize for the 'minimal' program and get a sequence of
C statements.
(2) Rewrite the full interpreter to make it specializable.
Use the techniques from the paper (use a recursive helper function).
(3) Try optimizing it further by turning on function inlining.
You can use "post_inlining:=true" in the config.sml file - you can
also take a look at the other variables controlling inlining.
(4) Benchmarks.
Compare the speed of the unspecialized interpreter to each of the
interpreters obtained from (1), (2), and (3), feeding appropriate
programs to the interpreter.