HiveBrain v1.2.0
Get Started
← Back to all entries
patternMinor

Instruction Translation

Submitted by: @import:stackexchange-cs··
0
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.

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.