Imagine two machines of different architecture which produce output of a standard format.If you have a program for one machine and can observe it's operation and output, what techniques exist to automatically produce an equivalent program for the alternate architecture?By equivalent I mean produces equal output (by some equality relation) for equivalent input.
Instruction Translation
programming languages;compilers
A simple way of solving this problem is to write an emulator for the first machine's instruction set on the second machine. Then set the first program as input to this emulator. One could also apply partial evaluation techniques to optimise things a little, which would result in an emulator that runs only the first program (and nothing else).