Files
MP-SPDZ/Scripts/decompile.py
Marcel Keller e07d9bf2a3 Maintenance.
2022-01-11 16:05:26 +11:00

17 lines
441 B
Python
Executable File

#!/usr/bin/env python3
import sys, os
sys.path.append('.')
from Compiler.instructions_base import Instruction
from Compiler.program import *
if len(sys.argv) <= 1:
print('Usage: %s <program>' % sys.argv[0])
for tapename in Program.read_tapes(sys.argv[1]):
with open('Programs/Bytecode/%s.asm' % tapename, 'w') as out:
for i, inst in enumerate(Tape.read_instructions(tapename)):
print(inst, '#', i, file=out)