mirror of
https://github.com/ProgramSnail/pass_strategy_synthesis.git
synced 2026-03-12 02:57:09 +00:00
test experiments, list_assoco simplification
This commit is contained in:
parent
118834c9b7
commit
30f052b1b1
3 changed files with 52 additions and 13 deletions
|
|
@ -349,13 +349,14 @@ struct
|
|||
(eval_fun_empty_args state prog main_decl state')
|
||||
|
||||
(* TODO: fix *)
|
||||
let eval_prog_fwd all_prog =
|
||||
Stream.hd @@
|
||||
run q (fun q -> eval_prog (inj all_prog) q)
|
||||
(fun qs -> qs#reify prj_exn)
|
||||
(* let eval_prog_fwd all_prog = *)
|
||||
(* Stream.hd @@ *)
|
||||
(* run q (fun q -> eval_prog (inj all_prog) q) *)
|
||||
(* (fun qs -> qs#reify prj_exn) *)
|
||||
|
||||
(* TODO: fix *)
|
||||
(* let empty_prog = (Prog.T (List.Nil, FunDecl.T (List.Nil, Body.T List.Nil))) *)
|
||||
(* let empty_prog = Prog.make (Std.nil ()) (FunDecl.make (Std.nil ()) (Body.make (Std.nil ()))) *)
|
||||
|
||||
(* TODO: fix *)
|
||||
(* let%expect_test "empty" = *)
|
||||
|
|
@ -363,4 +364,15 @@ struct
|
|||
(* Printf.printf "done!"; *)
|
||||
(* [%expect {| done! |}] *)
|
||||
|
||||
let eval_test =
|
||||
Stream.hd @@
|
||||
run q (fun q -> ocanren { List.assoco 0 [(0, 0)] q })
|
||||
(fun qs -> qs#reify Nat.prj_exn)
|
||||
|
||||
(* ((show (GT.list) (show Nat.ground)) x *)
|
||||
let%expect_test "empty" =
|
||||
let x = eval_test in
|
||||
Printf.printf "done! %s" ((show (Nat.ground)) x);
|
||||
[%expect {| done! 0 |}]
|
||||
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue