X-Git-Url: http://git.nguyen.vg/gitweb/?a=blobdiff_plain;f=src%2Fruntime.ml;h=d74c26aefcbf93c8338a2af6f03a3702691b7a5f;hb=63db110485e97e189313abd1a6ce1bedf941d76d;hp=c355f5e35edbec206adfd2fa0c76aafe0735b5b3;hpb=4b52da1a20a4fe031930bb96d2ca46bec06dc529;p=SXSI%2Fxpathcomp.git diff --git a/src/runtime.ml b/src/runtime.ml index c355f5e..d74c26a 100644 --- a/src/runtime.ml +++ b/src/runtime.ml @@ -1,4 +1,5 @@ INCLUDE "debug.ml" +INCLUDE "trace.ml" INCLUDE "utils.ml" open Format @@ -24,6 +25,7 @@ module Make (U : ResJIT.S) : S with type result_set = U.NS.t = | Formula.Atom (`Right, b, q) -> Formula.of_bool(b == (StateSet.mem q s2)), if b && StateSet.mem q auto.topdown_marking_states then [ResJIT.RIGHT q] else [] + | Formula.Atom (`Epsilon, _, _) -> assert false | Formula.Or(f1, f2) -> let b1, i1 = loop f1 in @@ -188,6 +190,12 @@ module Make (U : ResJIT.S) : S with type result_set = U.NS.t = DEFINE LOOP (t, states, ctx) = ( let _t = (t) in + TRACE("top-down-run", 3, + __ "Entering node %i (tag %s, context %i) with states %a\n%!" + (Node.to_int _t) + (Tag.to_string (Tree.tag tree _t)) + (Node.to_int (ctx)) + (StateSet.print) (states)); if _t == Tree.nil then nil_res else let tag = Tree.tag tree _t in