Remove the timestamp header in source files. This information is
[tatoo.git] / src / ata.mli
1 (***********************************************************************)
2 (*                                                                     *)
3 (*                               TAToo                                 *)
4 (*                                                                     *)
5 (*                     Kim Nguyen, LRI UMR8623                         *)
6 (*                   Université Paris-Sud & CNRS                       *)
7 (*                                                                     *)
8 (*  Copyright 2010-2013 Université Paris-Sud and Centre National de la *)
9 (*  Recherche Scientifique. All rights reserved.  This file is         *)
10 (*  distributed under the terms of the GNU Lesser General Public       *)
11 (*  License, with the special exception on linking described in file   *)
12 (*  ../LICENSE.                                                        *)
13 (*                                                                     *)
14 (***********************************************************************)
15
16 type predicate =
17     First_child
18   | Next_sibling
19   | Parent
20   | Previous_sibling
21   | Stay
22   | Is_first_child
23   | Is_next_sibling
24   | Is of Tree.NodeKind.t
25   | Has_first_child
26   | Has_next_sibling
27
28 val is_move : predicate -> bool
29
30 type atom = predicate * bool * State.t
31
32 module Atom : Formula.ATOM with type data = atom
33
34 module SFormula :
35   sig
36     include module type of Formula.Make(Atom)
37     val mk_atom : predicate -> bool -> State.t -> t
38     val mk_kind : Tree.NodeKind.t -> t
39     val has_first_child : t
40     val has_next_sibling : t
41     val is_first_child : t
42     val is_next_sibling : t
43     val is_attribute : t
44     val is_element : t
45     val is_processing_instruction : t
46     val is_comment : t
47     val first_child : State.t -> t
48     val next_sibling : State.t -> t
49     val parent : State.t -> t
50     val previous_sibling : State.t -> t
51     val stay : State.t -> t
52     val get_states : t -> StateSet.t
53   end
54
55
56 module Transition : Hcons.S with
57             type data = State.t * QNameSet.t * SFormula.t
58
59 module TransList : sig
60   include Hlist.S with type elt = Transition.t
61   val print : Format.formatter -> ?sep:string -> t -> unit
62 end
63
64
65 type node_summary = private int
66 val node_summary : bool -> bool -> bool -> bool -> Tree.NodeKind.t -> node_summary
67 val dummy_summary : node_summary
68 type config = {
69   sat : StateSet.t;
70   unsat : StateSet.t;
71   todo : TransList.t;
72   summary : node_summary;
73 }
74
75 module Config : Hcons.S with type data = config
76 val dummy_config : Config.t
77
78 type t = private {
79   id : Uid.t;
80   mutable states : StateSet.t;
81   mutable selection_states: StateSet.t;
82   transitions: (State.t, (QNameSet.t*SFormula.t) list) Hashtbl.t;
83   mutable cache2 : TransList.t Cache.N2.t;
84   mutable cache4 : Config.t Cache.N4.t;
85 }
86
87
88
89 val create : StateSet.t -> StateSet.t -> t
90 val reset : t -> unit
91 val full_reset : t -> unit
92 val get_trans : t -> QNameSet.elt -> StateSet.t -> TransList.t
93
94
95 val eval_trans : t -> Config.t -> Config.t -> Config.t -> Config.t -> Config.t
96
97 val add_trans : t -> State.t -> QNameSet.t -> SFormula.t -> unit
98 val print : Format.formatter -> t -> unit
99 val complete_transitions : t -> unit
100 val cleanup_states : t -> unit
101 val normalize_negations : t -> unit