aboutsummaryrefslogtreecommitdiffhomepage
path: root/contrib/cc/ccalgo.mli
blob: 582df715fa134fa385e58b3533f2ea49c5a15685 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
(***********************************************************************)
(*  v      *   The Coq Proof Assistant  /  The Coq Development Team    *)
(* <O___,, *        INRIA-Rocquencourt  &  LRI-CNRS-Orsay              *)
(*   \VV/  *************************************************************)
(*    //   *      This file is distributed under the terms of the      *)
(*         *       GNU Lesser General Public License Version 2.1       *)
(***********************************************************************)

(* $Id$ *)

val init_size : int

type term = 
    Symb of Term.constr 
  | Appli of term * term 

type rule = 
    Congruence 
  | Axiom of Names.identifier      

type valid =
    {lhs : int; 
     rhs : int; 
     rule : rule}

module UF :
sig
  type t 
  val empty : unit -> t
  val add_lst : int -> int -> t -> unit
  val find : t -> int -> int
  val list : t -> int -> int list
  val size : t -> int -> int
  val term : t -> int -> term    
  val subterms : t -> int -> int * int
  val signature : t -> int -> int * int
  val nodes : t -> int list
  val add : term -> t -> int
  val union : t -> int -> int -> valid -> unit
  val join_path : t -> int -> int -> 
    ((int*int)*valid) list*
    ((int*int)*valid) list
end

  
module ST :
sig
  type t
  val empty : unit -> t
  val enter : int -> int * int -> t -> unit
  val query : int * int -> t -> int
  val delete : int -> t -> unit
  val delete_list : int list -> t -> unit
end


val cc : UF.t -> unit

val make_uf :
  (Names.identifier * (term * term)) list -> UF.t