Project

General

Profile

Download (1.2 KB) Statistics
| Branch: | Tag: | Revision:
1
open Utils
2

    
3
type t = {
4
  mutable dim_desc : dim_desc;
5
  dim_loc : Location.t;
6
  dim_id : int;
7
}
8

    
9
and dim_desc =
10
  | Dbool of bool
11
  | Dint of int
12
  | Dident of ident
13
  | Dappl of ident * t list
14
  | Dite of t * t * t
15
  | Dlink of t
16
  | Dvar
17
  | Dunivar
18

    
19
exception Unify of t * t
20
exception InvalidDimension
21

    
22
val mkdim: Location.t -> dim_desc -> t
23
val mkdim_ident: Location.t -> ident -> t
24
val mkdim_int: Location.t -> int -> t
25
val mkdim_bool: Location.t -> bool -> t
26
val mkdim_var: unit -> t
27
val mkdim_appl: Location.t -> ident -> t list -> t
28
val mkdim_ite: Location.t -> t -> t -> t -> t
29

    
30
val pp: Format.formatter -> t -> unit
31

    
32
val is_const: t -> bool
33
val is_polymorphic: t -> bool
34
val generalize: t -> unit
35
val instantiate: (int * t) list ref -> t -> t
36
val copy: (int * t) list ref -> t -> t
37
val equal: t -> t -> bool
38
val eval: (dim_desc list -> dim_desc) Env.t -> (ident -> t option) -> t -> unit
39
val unify: ?semi:bool -> t -> t -> unit
40
val uneval: ident -> t -> unit
41

    
42
val expr_replace_expr: (ident -> t) -> t -> t
43

    
44
val rename: (ident -> ident) -> (ident -> ident) -> t -> t
45

    
46
val size_const: t -> int
47

    
48
val check_bound: Location.t -> t -> t
49
val check_access: Location.t -> t -> t -> t
50

    
51
val multi_product: Location.t -> t list -> t
(2-2/11)