mirror of
https://github.com/ProgramSnail/Lama.git
synced 2025-12-10 16:58:46 +00:00
Fixed common.mlyet again
This commit is contained in:
parent
d1dd9384ac
commit
3c0884cfa5
1 changed files with 1 additions and 1 deletions
|
|
@ -9,7 +9,7 @@ let state ps = List.fold_right (fun (x, v) (s, p) -> Expr.update x v s, (x =:= !
|
||||||
let eval (s, p) e =
|
let eval (s, p) e =
|
||||||
let orig = Expr.eval s e in
|
let orig = Expr.eval s e in
|
||||||
let stmt = List.fold_right (fun p s -> p |> s) p (Stmt.Write e) in
|
let stmt = List.fold_right (fun p s -> p |> s) p (Stmt.Write e) in
|
||||||
let [s_orig] = eval [] stmt in
|
let [s_orig] = Stmt.eval [] stmt in
|
||||||
let [sm_orig] = SM.run [] (SM.compile stmt) in
|
let [sm_orig] = SM.run [] (SM.compile stmt) in
|
||||||
if conj (orig = s_orig) (orig = sm_orig)
|
if conj (orig = s_orig) (orig = sm_orig)
|
||||||
then Printf.printf "%d\n" orig
|
then Printf.printf "%d\n" orig
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue