aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/explore.ml
diff options
context:
space:
mode:
authorGravatar glondu <glondu@85f007b7-540e-0410-9357-904b9bb8a0f7>2009-09-17 15:58:14 +0000
committerGravatar glondu <glondu@85f007b7-540e-0410-9357-904b9bb8a0f7>2009-09-17 15:58:14 +0000
commit61ccbc81a2f3b4662ed4a2bad9d07d2003dda3a2 (patch)
tree961cc88c714aa91a0276ea9fbf8bc53b2b9d5c28 /lib/explore.ml
parent6d3fbdf36c6a47b49c2a4b16f498972c93c07574 (diff)
Delete trailing whitespaces in all *.{v,ml*} files
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@12337 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'lib/explore.ml')
-rw-r--r--lib/explore.ml18
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/explore.ml b/lib/explore.ml
index 51ff79e32..760495099 100644
--- a/lib/explore.ml
+++ b/lib/explore.ml
@@ -23,7 +23,7 @@ module Make = functor(S : SearchProblem) -> struct
type position = int list
- let pp_position p =
+ let pp_position p =
let rec pp_rec = function
| [] -> ()
| [i] -> printf "%d" i
@@ -33,21 +33,21 @@ module Make = functor(S : SearchProblem) -> struct
(*s Depth first search. *)
- let rec depth_first s =
+ let rec depth_first s =
if S.success s then s else depth_first_many (S.branching s)
and depth_first_many = function
| [] -> raise Not_found
| [s] -> depth_first s
| s :: l -> try depth_first s with Not_found -> depth_first_many l
- let debug_depth_first s =
+ let debug_depth_first s =
let rec explore p s =
pp_position p; S.pp s;
if S.success s then s else explore_many 1 p (S.branching s)
and explore_many i p = function
| [] -> raise Not_found
| [s] -> explore (i::p) s
- | s :: l ->
+ | s :: l ->
try explore (i::p) s with Not_found -> explore_many (succ i) p l
in
explore [1] s
@@ -66,7 +66,7 @@ module Make = functor(S : SearchProblem) -> struct
| h, x::t -> x, (h,t)
| h, [] -> match List.rev h with x::t -> x, ([],t) | [] -> raise Empty
- let breadth_first s =
+ let breadth_first s =
let rec explore q =
let (s, q') = try pop q with Empty -> raise Not_found in
enqueue q' (S.branching s)
@@ -76,15 +76,15 @@ module Make = functor(S : SearchProblem) -> struct
in
enqueue empty [s]
- let debug_breadth_first s =
+ let debug_breadth_first s =
let rec explore q =
- let ((p,s), q') = try pop q with Empty -> raise Not_found in
+ let ((p,s), q') = try pop q with Empty -> raise Not_found in
enqueue 1 p q' (S.branching s)
and enqueue i p q = function
- | [] ->
+ | [] ->
explore q
| s :: l ->
- let ps = i::p in
+ let ps = i::p in
pp_position ps; S.pp s;
if S.success s then s else enqueue (succ i) p (push (ps,s) q) l
in