Found two bugs by rewriting the compilation in the thesis.
[tatoo.git] / src / compil.ml
index 99e87b5..720bb98 100644 (file)
@@ -39,6 +39,7 @@ let trans query =
     Asta.add_quer asta top_st;
     Asta.init_top asta;
     Asta.add_top asta top_st;
+    Asta.add_bot asta top_st;  (* for trees which are leaves *)
     Asta.add_tr asta (top_st, Asta.any_label, or_top) true
       
   and trans_last (ax,test,pred) =      (* a selecting state is needed *)
@@ -49,8 +50,7 @@ let trans query =
     Asta.add_quer asta q';
     Asta.add_top asta q;
     Asta.add_top asta q';
-    Asta.add_bot asta q;
-    Asta.add_bot asta q';
+    Asta.add_bot asta q;               (* q' \notin B !! *)
     let Simple lab = test in
     let tr_selec = (q', lab, fo_p)
     and tr_q = (q, Asta.any_label, form_propa_selec q q' ax) in
@@ -75,7 +75,7 @@ let trans query =
     Asta.add_top asta q
       
   and trans_pr  = function             (* either we apply De Morgan rules
-                                          in xPath:parse or here *)
+                                          in xPath.parse or here *)
     | Expr True -> Formula.true_
     | Expr False -> Formula.false_
     | Or (p_1,p_2) -> trans_pr(p_1) +| trans_pr(p_2)