mirror of
https://github.com/ProgramSnail/pass_strategy_synthesis.git
synced 2026-03-12 02:57:09 +00:00
test extension, types moved to ocanren_inject
This commit is contained in:
parent
e2dcf6c2a1
commit
bea18df70e
2 changed files with 133 additions and 98 deletions
15
lib/test.ml
15
lib/test.ml
|
|
@ -6,7 +6,6 @@ module Tag = struct
|
|||
ocanren type tag = Ref | Value
|
||||
|
||||
module Test = struct
|
||||
|
||||
@type answer = logic GT.list with show
|
||||
|
||||
let _ =
|
||||
|
|
@ -14,3 +13,17 @@ module Tag = struct
|
|||
(fun q -> q#reify reify)))
|
||||
end
|
||||
end
|
||||
|
||||
module Stmt = struct
|
||||
ocanren type ('d, 'dl) stmt = Call of 'd * 'dl | Read of 'd | Write of 'd
|
||||
|
||||
module Test = struct
|
||||
@type answer1 = Nat.ground List.ground GT.list with show
|
||||
@type answer = (Nat.ground, Nat.ground List.ground) ground GT.list with show
|
||||
let _ = Printf.printf "%s\n" @@ show(answer1) (Stream.take (run q (fun q -> ocanren {Call (1, [2]) === Call (1, q)})
|
||||
(fun q -> q#reify (List.prj_exn Nat.prj_exn))))
|
||||
|
||||
let _ = Printf.printf "%s\n" @@ show(answer) (Stream.take (run q (fun q -> ocanren {Call (1, [2]) === q})
|
||||
(fun q -> q#reify (prj_exn Nat.prj_exn (List.prj_exn Nat.prj_exn)))))
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue