-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathutils.mli
40 lines (34 loc) · 2.24 KB
/
utils.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
(**************************************************************************)
(* *)
(* ldrgen, a generator of random C programs *)
(* Copyright (C) 2017-2024, Gergö Barany <[email protected]> *)
(* *)
(* This program is free software: you can redistribute it and/or modify *)
(* it under the terms of the GNU General Public License as published by *)
(* the Free Software Foundation, either version 3 of the License, or *)
(* (at your option) any later version. *)
(* *)
(* This program is distributed in the hope that it will be useful, *)
(* but WITHOUT ANY WARRANTY; without even the implied warranty of *)
(* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *)
(* GNU General Public License for more details. *)
(* *)
(* You should have received a copy of the GNU General Public License *)
(* along with this program. If not, see <http://www.gnu.org/licenses/>. *)
(* *)
(**************************************************************************)
open Cil_datatype
(** Select a random member of the list. *)
val random_select: 'a list -> 'a
(** Select a random element of the [lval] set.
@raises [Not_found] if the set is empty. *)
val random_select_from_set: LvalStructEq.Set.t -> Cil_types.lval
(** Compute the set of all free variables in the expression. We define "free
variables" as non-global, non-parameter variables. Return the set of
variables in a list of lvalues without repetitions. *)
val free_vars: Cil_types.exp -> Cil_types.lval list
(** Print the ldrgen-specific arguments that were set on the command line.
They are printed separated by spaces, with an initial space. *)
val print_command_line_args: Format.formatter -> unit -> unit
(** Return [true] iff the expression is an infinite constant. *)
val is_infinity: Cil_types.exp -> bool