MCPcopy Create free account
hub / github.com/QuipNetwork/xquad / run_program

Function run_program

xqvm_py/program.py:85–92  ·  view source on GitHub ↗

Build and execute a program, returning executor for state inspection.

(instructions: list[Instruction], input_data: dict[int, Any] | None = None)

Source from the content-addressed store, hash-verified

83
84
85def run_program(instructions: list[Instruction], input_data: dict[int, Any] | None = None):
86 """Build and execute a program, returning executor for state inspection."""
87 from .executor import Executor
88
89 prog = make_program(instructions)
90 ex = Executor()
91 ex.execute(prog, input_data)
92 return ex
93
94
95_XQBC_MAGIC = b"XQBC"

Callers 15

test_nopMethod · 0.90
test_haltMethod · 0.90
test_target_and_jumpMethod · 0.90
test_forward_jumpMethod · 0.90
test_forward_jumpiMethod · 0.90
test_jumpi_takenMethod · 0.90
test_jumpi_not_takenMethod · 0.90
test_range_loopMethod · 0.90

Calls 3

executeMethod · 0.95
make_programFunction · 0.85
ExecutorClass · 0.85

Tested by 15

test_nopMethod · 0.72
test_haltMethod · 0.72
test_target_and_jumpMethod · 0.72
test_forward_jumpMethod · 0.72
test_forward_jumpiMethod · 0.72
test_jumpi_takenMethod · 0.72
test_jumpi_not_takenMethod · 0.72
test_range_loopMethod · 0.72