Ast.run_compiled
This commit is contained in:
parent
191c09ace7
commit
9eabd7da37
1 changed files with 5 additions and 0 deletions
|
|
@ -78,3 +78,8 @@ theorem Ast.compile_eq_push_interpret (ast : Ast)
|
|||
theorem Ast.compile_sound (ast : Ast)
|
||||
: ast.compile.run = ast.interpret := by
|
||||
simp [M.run, compile_eq_push_interpret, M.push_pop, pure, OptionT.pure, StateT.pure]
|
||||
|
||||
def Ast.run_compiled (ast : Ast) : Rat :=
|
||||
ast.compile.run.get (by simp [Ast.compile_sound])
|
||||
|
||||
#eval Ast.run_compiled (3/2 + 0.5)
|
||||
|
|
|
|||
Loading…
Reference in a new issue