File: tcons1.mli

package info (click to toggle)
apron 0.9.10-9
  • links: PTS, VCS
  • area: main
  • in suites: buster, stretch
  • size: 7,268 kB
  • sloc: ansic: 63,105; cpp: 15,898; ml: 9,184; makefile: 2,136; sh: 10
file content (105 lines) | stat: -rw-r--r-- 3,571 bytes parent folder | download | duplicates (2)
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
(* File generated from tcons1.idl *)

(* This file is part of the APRON Library, released under LGPL license.
   Please read the COPYING file packaged in the distribution  *)

type t = {
  mutable tcons0: Tcons0.t;
  mutable env: Environment.t;
}
and earray = {
  mutable tcons0_array: Tcons0.t array;
  mutable array_env: Environment.t;
}

(** APRON tree constraints and array of tree constraints of level 1 *)

type typ = Lincons0.typ =
| EQ
| SUPEQ
| SUP
| DISEQ
| EQMOD of Scalar.t


(** Make a tree expression constraint. Modifying later the linear expression ({e not
advisable}) modifies correspondingly the tree expression constraint and conversely,
except for changes of environments *)
val make: Texpr1.t -> typ -> t

(** Copy (deep copy) *)
val copy: t -> t

(** Convert a constraint type to a string ([=],[>=], or [>]) *)
val string_of_typ : typ -> string

(** Print the tree expression constraint *)
val print : Format.formatter -> t -> unit

(** Get the constraint type *)
val get_typ: t -> typ

(** Set the constraint type *)
val set_typ: t -> typ -> unit


(** Change the environment of the constraint for a super-environment. Raise [Failure] if it is not the case *)
external extend_environment : t -> Environment.t -> t
	= "camlidl_tcons1_ap_tcons1_extend_environment"

(** Side-effect version of the previous function *)
external extend_environment_with : t -> Environment.t -> unit
	= "camlidl_tcons1_ap_tcons1_extend_environment_with"


(** Get the environment of the tree expression constraint *)
val get_env: t -> Environment.t

(** Get the underlying linear expression. Modifying the linear expression ({e
not advisable}) modifies correspondingly the tree expression constraint and
conversely, except for changes of environments *)
val get_texpr1: t -> Texpr1.t

(** Get the underlying tree expression constraint of level 0. Modifying the constraint
of level 0 ({e not advisable}) modifies correspondingly the tree expression constraint
and conversely, except for changes of environments*)
val get_tcons0: t -> Tcons0.t


(* ====================================================================== *)
(** {2 Type array} *)
(* ====================================================================== *)

(** Make an array of tree expression constraints with the given size and defined on the
given environment. The elements are initialized with the constraint 0=0. *)
val array_make : Environment.t -> int -> earray

(** Print an array of constraints *)
val array_print :
?first:(unit, Format.formatter, unit) format ->
?sep:(unit, Format.formatter, unit) format ->
?last:(unit, Format.formatter, unit) format ->
Format.formatter -> earray -> unit

(** Get the size of the array *)
val array_length : earray -> int

(** Get the environment of the array *)
val array_get_env : earray -> Environment.t

(** Get the element of the given index (which is not a copy) *)
val array_get : earray -> int -> t

(** Set the element of the given index (without any copy). The array and the
constraint should be defined on the same environment; otherwise a [Failure]
exception is raised.*)
val array_set : earray -> int -> t -> unit

(** Change the environment of the array of constraints for a super-environment. Raise [Failure] if it is not the case*)
external array_extend_environment : earray -> Environment.t -> earray
	= "camlidl_tcons1_ap_tcons1_array_extend_environment"

(** Side-effect version of the previous function *)
external array_extend_environment_with : earray -> Environment.t -> unit
	= "camlidl_tcons1_ap_tcons1_array_extend_environment_with"