Fixed common.ml/Syntax.ml

This commit is contained in:
Dmitry Boulytchev 2018-02-26 08:41:06 +03:00
parent 3c0884cfa5
commit 2f6169cdbd
2 changed files with 15 additions and 1 deletions

View file

@ -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 orig = Expr.eval s e in
let stmt = List.fold_right (fun p s -> p |> s) p (Stmt.Write e) in
let [s_orig] = Stmt.eval [] stmt in
let [s_orig] = eval [] stmt in
let [sm_orig] = SM.run [] (SM.compile stmt) in
if conj (orig = s_orig) (orig = sm_orig)
then Printf.printf "%d\n" orig