From: acondolu Date: Wed, 7 Mar 2018 10:56:45 +0000 (+0100) Subject: Refactoring X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=commitdiff_plain;h=38a57ad044d886ee8e6c4f8deae1bdc7cea93600;p=fireball-separation.git Refactoring --- diff --git a/ocaml/andrea9.ml b/ocaml/andrea9.ml index 788cc49..044ad9a 100644 --- a/ocaml/andrea9.ml +++ b/ocaml/andrea9.ml @@ -322,9 +322,14 @@ let interactive div conv cmds = ) with Done _ -> () ;; +let rec conv_join = function + | [] -> "@" + | x::xs -> conv_join xs ^ " ("^ x ^")" +;; + let _ = exec "x x" - "@ (x y) (y y) (y x)" + (conv_join["x y"; "y y"; "y x"]) [ step 0 0; eat ] ;; @@ -337,17 +342,6 @@ interactive "x y" auto (problem_of "x (y. x y y)" "x (y. x y x)");; -let rec conv_join = function - | [] -> "@" - | x::xs -> conv_join xs ^ " ("^ x ^")" -;; - -(* auto (problem_of "x a a a" (conv_join[ - "x b a a"; - "x a b a"; - "x a a b"; -]));; *) - auto (problem_of "x a a a a" (conv_join[ "x b a a a"; "x a b a a"; @@ -361,23 +355,6 @@ auto (problem_of "x a a a a (x (x. x x) @ @ (_._.x. x x) x) b b b" (conv_join[ "x a a a a (_. _. _. _. x. y. x y)"; ])); -(* let _ = exec - "x y" - [ "x x"; "y z"; "y x" ] - [ step 0 0 0; step 1 0 1; eat 5; ] -;; - -let _ = exec - "a b c" - [ "a b @"; "a @ c"; "a a a" ] - [ step 0 0 0; step 1 1 0; eat 2; ] -;; - -let _ = exec - "a (a b c) (a d e)" - [ "a (a b @) (a @ e)"; "a a a" ] - [ step 0 0 0; step 1 1 0; eat 2] -;; *) print_hline(); print_endline "ALL DONE. "