Wed May 7 20:20:36 CEST 2008

base machine: real or virtual

there's no need to do work twice, so what machine should be used for
the old interaction mode? the 3-instruction forth?

the problem is primitives: currently, the primitives are the machine
instructions. so accurate simulation means simulation of those. on the
other hand, it might be more flexible to allow a higher level
simulator to test algorithms.

the thing that gets in the way is premature optimization: part of the
problem to solve is manual machine mapping: currently, purrr18 is more
PIC18 than Forth. maybe something intermediate can be constructed: a
VM that implements a subset of instructions without optimizer?

so problem: find an intermediate language that is easier to simulate
than target (too complex / target specific) or language (too language
specific, underspecified)


this is a serious problem. 2 stances:

  * forget about target simulator: concentrate on programming
    language, and make it clean. that way simulation is easy because
    the primitives can be simple.

  * forget about the language simulator: what you want is a tiny layer
    on top of the real machine, and possibly use multiple languages
    and binary code.

if i have to choose, the 2nd one is really the only practical
solution. the only disadvantage is that it's target specific.. is
there some trick to be able to have both?