Difference between Interpreter and DR

Stephen J Bevan <stephenb@harlequin.co.uk>
18 Oct 1996 00:06:23 -0400

          From comp.compilers

Related articles
Difference between Interpreter and DR grs124@psu.edu (Greg Simon) (1996-10-16)
Difference between Interpreter and DR stephenb@harlequin.co.uk (Stephen J Bevan) (1996-10-18)
Re: Difference between Interpreter and DR christians@rcp.co.uk (Christian Smith) (1996-10-18)
Re: Difference between Interpreter and DR pardo@cs.washington.edu (1996-10-20)
Re: Difference between Interpreter and DR ejdiamo@vnet.ibm.com (1996-10-25)
| List of all articles for this month |

From: Stephen J Bevan <stephenb@harlequin.co.uk>
Newsgroups: comp.compilers
Date: 18 Oct 1996 00:06:23 -0400
Organization: Compilers Central
Keywords: interpreter, bibliography

      I'm confused about the difference between an interpreter and a DR
      (dynamic recompiler). ...

The following may help :-

{ May:iait:1987
, author= "Cathy May"
, title= "Mimic: A Fast System/370 Simulator"
, crossref= "iait:1987"
, pages= "1--13"
, refs= 26
, checked= 19940516
, keywords= "simulation"
, abstract= "Software simulation of one computer on another tends to
be slow. Traditional simulators typically execute about 100
instructions on the host machine per instruction simulated. Newer
simulators reduce the expansion factor to about 10, by saving and
reusing translations of individual instructions. This paper describes
an experimental simulator which takes the progression one step
further, translating groups of instructions as a unit. This approach,
combined with flow analysis, reduces the expansion factor to about 4.
The new simulator simulates System/370 on a RISC, namely the IBM RT
, sjb= "Categorises simulators into three types or generations.
The first generation simulators decode and execute each instruction in
turn. Second generation simulators cache dynamically created code
that simulates an instruction -- this reduces the decode overhead. A
third generation simulator translates a group of instructions
(typically a basic block) as one unit and caches that for future use.
Mimic is a third-generation simulator -- arguably it is a 3+ since it
deals with more than basic blocks. Mimic attempts to translate jumps!
It does this by performing flow analysis on the S/370 instructions
taking into account register values where known. This often allows it
to translate local jumps such that are used to implement loops thereby
translating the whole of an inner loop into the RT code.

Each S/370 register is stored in a RT register. This is simplified by
the fact that the S/370 and RT have the same size and number of
registers. To deal with the need for scratch registers in certain
routines, the least used registers (or perhaps ones not even used at
all) are flushed to memory for the duration of the routine and then
reloaded on exit.

Memory address translation is dealt with by aligning the S/370 image
on a 16Mb boundary so that only the top byte of the address needs to
be changed.

A facility is included that allows critical parts of the S/370 program
to be hand translated and have this included in the simulator, though
the interface is awkward. This facility can prove beneficial for
certain loops that defy the flow analysis.

Mimic can save translations across executions of a program to further
reduce execution time on subsequent executions.

Mimic does not support decimal (presumably BCD?) or floating-point

Exceptions, self-modifying code and misaligned loads are not supported.

It is reported that the expansion factor for two large programs is
about 4 -- considerably better than first and second generation

{ iait:1987
, title= "Proceedings SIGPLAN '87 Symposium on Interpreters and
Interpretive Techniques"
, booktitle= "Proceedings SIGPLAN '87 Symposium on Interpreters and
Interpretive Techniques"
, publisher= "ACM"
, organization= "ACM"
, month= jun
, year= 1987
, note= "Also available as SIGPLAN Notices 22(7) July 1987."

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.