From 55ec3b1290f0de467c51d163fef22fd68bb0823e Mon Sep 17 00:00:00 2001 From: natile Date: Wed, 9 Oct 2002 15:43:19 +0000 Subject: [PATCH] Debugging better Sub and Meet. --- helm/ocaml/mathql_interpreter/meet.ml | 4 ++-- helm/ocaml/mathql_interpreter/mqint.ml | 1 - helm/ocaml/mathql_interpreter/sub.ml | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/helm/ocaml/mathql_interpreter/meet.ml b/helm/ocaml/mathql_interpreter/meet.ml index 2482ea02e..c5921aaf9 100644 --- a/helm/ocaml/mathql_interpreter/meet.ml +++ b/helm/ocaml/mathql_interpreter/meet.ml @@ -28,7 +28,7 @@ let rec meet_ex v1 v2 = match v1,v2 with [],_ | _,[] -> false - | s1::tl1, s2::_ when s1 < s2 -> sub_ex tl1 v2 + | s1::tl1, s2::_ when s1 < s2 -> meet_ex tl1 v2 | s1::_, s2::tl2 when s2 < s1 -> false - | s1::_, s2::_ when s1 = s2 -> true + | _, _-> true ;; diff --git a/helm/ocaml/mathql_interpreter/mqint.ml b/helm/ocaml/mathql_interpreter/mqint.ml index a9d18940b..f3888c996 100644 --- a/helm/ocaml/mathql_interpreter/mqint.ml +++ b/helm/ocaml/mathql_interpreter/mqint.ml @@ -141,7 +141,6 @@ and exec_boole_exp c = function in if res then (print_endline"TRUE"; flush stdout) else (print_endline"FALSE"; flush stdout); res - | _ -> assert false (* valuta una MathQL.val_exp e ritorna un MathQL.value *) diff --git a/helm/ocaml/mathql_interpreter/sub.ml b/helm/ocaml/mathql_interpreter/sub.ml index b4c65d207..5bc3d5b92 100644 --- a/helm/ocaml/mathql_interpreter/sub.ml +++ b/helm/ocaml/mathql_interpreter/sub.ml @@ -30,5 +30,5 @@ let rec sub_ex v1 v2 = | _,[] -> false | s1::tl1, s2::_ when s1 < s2 -> sub_ex tl1 v2 | s1::_, s2::_ when s2 < s1 -> false - | s1::tl1, s2::tl2 -> (tl1,tl2) + | s1::tl1, s2::tl2 -> sub_ex tl1 tl2 ;; -- 2.39.2