Fix the build script.
[tatoo.git] / src / auto / state.ml
1 (***********************************************************************)
2 (*                                                                     *)
3 (*                               TAToo                                 *)
4 (*                                                                     *)
5 (*                     Kim Nguyen, LRI UMR8623                         *)
6 (*                   Université Paris-Sud & CNRS                       *)
7 (*                                                                     *)
8 (*  Copyright 2010-2012 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 (*
17   Time-stamp: <Last modified on 2013-02-07 10:03:52 CET by Kim Nguyen>
18 *)
19
20 open Format
21 open Utils
22
23 type t = int
24 let make =
25   let id = ref ~-1 in
26     fun () -> incr id; !id
27
28 let compare = (-)
29
30 let equal = (==)
31
32 external hash : t -> int =  "%identity"
33
34 let print fmt x = fprintf fmt "q%a" Pretty.pp_subscript x
35
36 let dump fmt x = print fmt x
37
38 let check x =
39   if x < 0 then failwith (Printf.sprintf "State: Assertion %i < 0 failed" x)
40
41 let dummy = max_int