Commit b4e59cbd authored by POTTIER Francois's avatar POTTIER Francois

Removed [print_fact].

A little cleanup.
Added [LRijkstra.mli].
parent 8e32dbcd
...@@ -165,14 +165,6 @@ let source fact = ...@@ -165,14 +165,6 @@ let source fact =
let target fact = let target fact =
fact.future.Trie.target fact.future.Trie.target
let print_fact fact =
Printf.fprintf stderr
"from state %d to state %d via %s . %s\n%!"
(Lr1.number (source fact))
(Lr1.number (target fact))
(W.print fact.word)
(Terminal.print fact.lookahead)
let extensible fact sym = let extensible fact sym =
Trie.has_derivative sym fact.future Trie.has_derivative sym fact.future
...@@ -452,33 +444,27 @@ let consequences fact = ...@@ -452,33 +444,27 @@ let consequences fact =
let level = ref 0 let level = ref 0
let done_with_level () =
Printf.fprintf stderr "Done with level %d.\n" !level;
T.stats();
E.stats();
Printf.fprintf stderr "Q stores %d facts.\n%!" (Q.cardinal q)
let discover fact = let discover fact =
if T.register fact then begin if T.register fact then begin
if W.length fact.word > ! level then begin if W.length fact.word > ! level then begin
Printf.fprintf stderr "Done with level %d.\n" !level; done_with_level();
level := W.length fact.word; level := W.length fact.word;
T.stats();
E.stats();
Printf.fprintf stderr "Q stores %d facts.\n%!" (Q.cardinal q)
end; end;
(*
incr facts;
Printf.fprintf stderr "Facts = %d, current length = %d\n%!"
!facts ();
Printf.fprintf stderr "New fact:\n";
print_fact fact;
*)
consequences fact consequences fact
end end
let main = let () =
Lr1.iter init; Lr1.iter init;
Printf.fprintf stderr "Cumulated star size: %d\n%!" !stars; Printf.fprintf stderr "Cumulated star size: %d\n%!" !stars;
Q.repeat q discover; Q.repeat q discover;
Time.tick "Running LRijkstra"; Time.tick "Running LRijkstra";
T.stats(); done_with_level()
E.stats()
(* ------------------------------------------------------------------------ *) (* ------------------------------------------------------------------------ *)
......
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