struct
module SymbMap = Map.Make(B)
+ module Pp = Pp.Pp(B)
let rec occ_nbr t acc = function
| Terms.Leaf u when B.eq t u -> 1+acc
match l with
| [] -> acc
| (_,nlit,plit,_,_)::tl ->
- match nlit,plit with
- | [],[Terms.Equation (l,r,_,_),_] ->
- parse_symbols (aux (aux acc l) r) tl
- | _ -> assert false;
+ let acc = List.fold_left (fun acc t ->
+ match t with
+ | Terms.Equation (l,r,_,_),_ ->
+ (aux (aux acc l) r)
+ | _ -> assert false) acc (nlit@plit)
+ in
+ parse_symbols acc tl
;;
let goal_pos t goal =
else
dependencies op tl acc
| _ -> dependencies op tl acc)
- | _ -> assert false
+ | _ -> [] (* TODO : compute dependencies for clauses *)
;;
let dependencies op clauses = HExtlib.list_uniq (List.sort Pervasives.compare (dependencies op clauses []));;