Commit ad4a88bc authored by Frontull Samuel's avatar Frontull Samuel
Browse files

error found in eq_str

parent 2b632c9b
......@@ -31,7 +31,8 @@ let s_af = "(/x./x y.y)"
let s_concat = "(/y z x a b.y (z x a b) a b)"
let t_concat = tree_of_string s_concat
let t_isempty = tree_of_string "(/s.(s (/x y.x)) (/x./x y.y) (/x./x y.y))"
let s_isempty = "(/s.(s (/x y.x)) (/x./x y.y) (/x./x y.y))"
let t_isempty = tree_of_string s_isempty
let t_prepa = tree_of_string "(/s x a b.a (s x a b))"
let t_prepb = tree_of_string "(/s x a b.b (s x a b))"
let t_nexta = tree_of_string "(/x.(/a b c.c a b) ((/s x a b.a (s x a b)) ((/p.p (/x y.x)) x)) ((/p.p (/x y.x)) x))"
......@@ -41,10 +42,13 @@ let t_hd = tree_of_string "(/s x a b.s x (/y.a x) (/y.b x))"
let t_hd_a = tree_of_string "(/s.s (/x y.y) (/x./x y.x) (/x./x y.y))"
let t_hd_b = tree_of_string "(/s.s (/x y.y) (/x./x y.x) (/x./x y.x))"
let t_is_e = tree_of_string "(/s.s (/x y.x) (/x./x y.y) (/x./x y.y))"
let t_and = tree_of_string "(/x y.x y x)"
let s_and = "(/x y.x y x)"
let t_and = tree_of_string s_and
let s_or = "(/x y.x x y)"
let t_or = tree_of_string s_or
(* let tmp = tree_of_string (s_or ^ " (/x y.x) (/x y.y)") *)
(* let tmp = tree_of_string ("(/x y.x y x) (" ^ s_isempty ^ " (/x a b.x)) (" ^ s_isempty ^ " (/x a b.a x))") *)
let t_hd_eq = tree_of_string "(/x y.(/x y.x x y) ((/x y.x y x) ((/s.s (/x y.y) (/x./x y.x) (/x./x y.y)) x) ((/s.s (/x y.y) (/x./x y.x) (/x./x y.y)) y)) ((/x y.x y x) ((/s.s (/x y.y) (/x./x y.x) (/x./x y.x)) x) ((/s.s (/x y.y) (/x./x y.x) (/x./x y.x)) y)))"
let s_ycomb = "(/f.(/x.f (x x)) (/x.f (x x)))"
......@@ -57,6 +61,8 @@ let _eq_str = "(/rec x y.(/c a b.c a b) ((/x y.x x y) ((/s.(s (/x y.x)) (/x./x y
let s_eq_str = ("(/a b.(/f.(/x.f (x x)) (/x.f (x x))) " ^_eq_str ^ " a b)");;
let eq_str = tree_of_string s_eq_str;;
(* let tmp = tree_of_string (s_eq_str ^ " ((/x a b.a (b x))) ((/x a b.a (b x)))") *)
(* LISTS *)
let s_cons = "(/x y.(/a b c.c a b) (/x y.y) ((/a b c.c a b) x y))"
let t_cons = tree_of_string s_cons
......@@ -111,13 +117,42 @@ let t_tiles = tree_of_string s_tiles
(* find if for (t1,t2), t1 = t2 in list of tuples *)
(* "/r x.ite (isnil x) (false) (or (eq_str (fst (lhd x)) (snd (lhd x))) (r (tl x)))" *)
let s__find_eq = "(/r x."^s_ite^" ("^s_isnil^" x) "^s_false^" ("^s_or^" ("^s_eq_str^" ("^s_first^" ("^s_lhd^" x)) ("^s_second^" ("^s_lhd^" x))) (r ("^s_ltl^" x))))"
let s_find_eq = "(/x."^s_ycomb^" "^s__find_eq^" x)"
let s__find_eq = "(/r xs."^s_ite^" ("^s_isnil^" xs) "^s_false^" ("^s_or^" ("^s_eq_str^" ("^s_first^" ("^s_lhd^" xs)) ("^s_second^" ("^s_lhd^" xs))) (r ("^s_ltl^" xs))))"
let s_find_eq = "(/xs."^s_ycomb^" "^s__find_eq^" xs)"
let t_find_eq = tree_of_string s_find_eq
(* let tmp = Core.AApp(t_find_eq, t_tiles, UnT) *)
let ttt = "/c.(c (/x./y.y))
(/c.(c (/c.(c (/x./a./b.b (b x)))
(/x./a./b.a (b (a (b x)))))) (/c.(c (/x./y.y))
(/c.(c (/c.(c (/x./a./b.a (b x)))
(/x./a./b.b (b (b (a (b x))))))) (/c.(c (/x./y.y))
(/c.(c (/c.(c (/x./a./b.b (b (a (b x)))))
(/x./a./b.b (a (b x))))) (/c.(c (/x./y.y))
(/c.(c (/c.(c (/x./a./b.b (a x)))
(/x./a./b.a (b (b (b (b x))))))) (/c.(c (/x./y.y))
(/c.(c (/c.(c (/x./a./b.a (a x)))
(/x./a./b.b (b (b (b (b (b x)))))))) (/c.(c (/x./y.y))
let s_concat_pairs = "(/p s."^s_mkpair^" ("^s_concat^" ("^s_first^" p) ("^s_first^" s)) ("^s_concat^" ("^s_second^" p) ("^s_second^" s)))"
(/c.(c (/c.(c (/x./a./b.b (b (a (a x)))))
(/x./a./b.b (b (b (b x)))))) (/c.(c (/x./y.y))
(/c.(c (/c.(c (/x./a./b.b (b (b (a x)))))
(/x./a./b.a (b (b x))))) (/c.(c (/x./y.y))
(/c.(c (/c.(c (/x./a./b.a (b (b (a x)))))
(/x./a./b.b (b (b (b x)))))) (/c.(c (/x./y.y))
(/c.(c (/c.(c (/x./a./b.b (b (a (b (b (a x)))))))
(/x./a./b.b (b x)))) (/x.x))))))))))))))))))
"
let tmp = Core.AApp(Core.AApp(eq_str,(tree_of_string "(/x./a./b.b (b (a (a x))))"),UnT),(tree_of_string "(/x./a./b.b (b (b (b x))))"),UnT)
(* let tmp = Core.AApp(t_find_eq, (tree_of_string ttt), UnT) *)
let s_concat_pairs = "(/s p."^s_mkpair^" ("^s_concat^" ("^s_first^" p) ("^s_first^" s)) ("^s_concat^" ("^s_second^" p) ("^s_second^" s)))"
let t_concat_pairs = tree_of_string s_concat_pairs
(* let tmp = Core.AApp(Core.AApp(t_concat_pairs, t_tile1, UnT), t_tile2, UnT) *)
......@@ -139,6 +174,10 @@ let t_cross_append = tree_of_string s_cross_append
(* let tmp = Core.AApp(Core.AApp(t_cross_append, Core.AApp(Core.AApp(t_cross_append, t_tiles, UnT), t_listtuple_ee, UnT), UnT),t_listtuple_ee,UnT) *)
(* let tmp = Core.AApp(Core.AApp(t_cross_append, Core.AApp(Core.AApp(t_cross_append, Core.AApp(Core.AApp(t_cross_append, t_tiles, UnT), t_listtuple_ee, UnT), UnT), t_listtuple_ee, UnT), UnT), t_listtuple_ee, UnT) *)
(* let tmp = t_tiles *)
(* let tmp = Core.AApp(t_first, Core.AApp(t_lhd, Core.AApp(Core.AApp(t_cross_append, t_tiles, UnT), t_tiles, UnT), UnT), UnT) *)
(* let tmp = Core.AApp(t_second, Core.AApp(t_lhd, Core.AApp(Core.AApp(t_cross_append, t_tiles, UnT), t_tiles, UnT), UnT), UnT) *)
(* let tmp = Core.AApp(t_lhd,Core.AApp(t_ltl,Core.AApp(t_ltl,Core.AApp(t_ltl,Core.AApp(t_ltl,Core.AApp(t_ltl,Core.AApp(t_ltl,Core.AApp(t_ltl,Core.AApp(t_ltl,Core.AApp(t_ltl,Core.AApp(Core.AApp(t_cross_append, t_tiles, UnT), t_tiles, UnT), UnT), UnT), UnT), UnT), UnT), UnT), UnT), UnT), UnT), UnT) *)
(* let tmp = Core.AApp(t_find_eq,Core.AApp(Core.AApp(t_cross_append, t_tiles, UnT), t_tiles, UnT),UnT) *)
(* let tmp = t_tiles *)
(* let tmp = Core.AApp(Core.AApp(t_mkpair,t_a,UnT),(Core.AApp(Core.AApp(t_concat,t_a,UnT),t_a,UnT)),UnT) *)
......@@ -148,7 +187,7 @@ let s__pcp = "(/r xs tiles."^s_ite^" ("^s_find_eq^" ("^s__cross_append^" xs tile
let s_pcp = "(/tiles."^s_ycomb^" "^s__pcp^" "^s_listtuple_ee^" tiles)"
let t_pcp = tree_of_string s_pcp
let tmp = Core.AApp(t_pcp, t_tiles, UnT)
(* let tmp = Core.AApp(t_pcp, t_tiles, UnT) *)
(* let tmp = Core.AApp(t_find_eq, Core.AApp(Core.AApp(t_cross_append, Core.AApp(Core.AApp(t_cross_append, t_listtuple_ee, UnT), t_tiles, UnT), UnT), t_tiles, UnT), UnT) *)
(* let _all_a = tree_of_string "(/f x.(/c a b.c a b) ((/s.(s (/x y.x)) (/x./x y.y) (/x./x y.y)) x) (/x y.x) ((/x y.x y x) ((/s.s (/x y.y) (/x./x y.x) (/x./x y.y)) x) (f ((/s.(/p.p (/x y.y)) (s ((/a b c.c a b) (/x a b.x) (/x a b.x)) (/x.(/a b c.c a b) ((/s x a b.a (s x a b)) ((/p.p (/x y.x)) x)) ((/p.p (/x y.x)) x)) (/x.(/a b c.c a b) ((/s x a b.b (s x a b)) ((/p.p (/x y.x)) x)) ((/p.p (/x y.x)) x)))) x))))"
let all_a = tree_of_string "(/a.(/f.(/x.f (x x)) (/x.f (x x))) (/f x.(/c a b.c a b) ((/s.(s (/x y.x)) (/x./x y.y) (/x./x y.y)) x) (/x y.x) ((/x y.x y x) ((/s.s (/x y.y) (/x./x y.x) (/x./x y.y)) x) (f ((/s.(/p.p (/x y.y)) (s ((/a b c.c a b) (/x a b.x) (/x a b.x)) (/x.(/a b c.c a b) ((/s x a b.a (s x a b)) ((/p.p (/x y.x)) x)) ((/p.p (/x y.x)) x)) (/x.(/a b c.c a b) ((/s x a b.b (s x a b)) ((/p.p (/x y.x)) x)) ((/p.p (/x y.x)) x)))) x)))) a)"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment