2 ms·
You could train a model to do that. However, it'd probably be more practical to have an intermediate step like a text representation or some sort of script that
by petercooper 2y ago
You could train a model to do that. However, it'd probably be more practical to have an intermediate step like a text representation or some sort of script that then generates the final machine code (not necessarily assembly).
I just asked o3-mini "Can you write a Python script that outputs the bytecode to a file for a very basic JVM application that prints hello world?" and it actually did it, complete with bytecode, and it ran. (One benefit of this approach is it leaves comments next to each block of bytecode, which probably helps it contextually with generating the next ones.)