patternMinor
Instruction Translation
Viewed 0 times
translationinstructionstackoverflow
Problem
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.
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.
Solution
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).
Context
StackExchange Computer Science Q#6284, answer score: 4
Revisions (0)
No revisions yet.