-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsharingAnalyser.mli
56 lines (37 loc) · 1.73 KB
/
sharingAnalyser.mli
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
(************************************************************************)
(* * The Rocq Prover / The Rocq Development Team *)
(* v * Copyright INRIA, CNRS and contributors *)
(* <O___,, * (see version control and CREDITS file for authors & dates) *)
(* \VV/ **************************************************************)
(* // * This file is distributed under the terms of the *)
(* * GNU Lesser General Public License Version 2.1 *)
(* * (see LICENSE file for the text of the license) *)
(************************************************************************)
type type_descr
val remember : type_descr -> type_descr
(** Remember values at this position.
The argument should be not be a [remember]. *)
val ignore : type_descr
val array : type_descr -> type_descr
val sum : type_descr array array -> type_descr
(** The array is for the non constant constructors.
Constant constructors are ignored. *)
val tuple : type_descr array -> type_descr
val pair : type_descr -> type_descr -> type_descr
val list : type_descr -> type_descr
val cofix : (type_descr -> type_descr) -> type_descr
(** Must be productive. [remember] counts as the identity for productivity analysis. *)
type analysis
val raw_length : analysis -> int
(** for debug printing *)
val analysis_equal : analysis -> analysis -> bool
val analyse : type_descr -> Obj.t -> analysis
type sharing_info =
| Fresh of int
| Seen of int
val step : analysis -> analysis * sharing_info
val is_done : analysis -> bool
val max_index : analysis -> int
(** The max [Fresh] in the analysis. [-1] if [is_done]. *)
val to_list : analysis -> sharing_info list
val raw : analysis -> string