swh:1:snp:1160b607213f14ec0f922dad3284705c8e588b30
Tip revision: ab1b99cf7ee4613f08a94210658a4784f40ac75c authored by Christian Doczkal on 13 December 2021, 16:38:14 UTC
document rerandomization / remove O_i_O
document rerandomization / remove O_i_O
Tip revision: ab1b99c
ecGState.mli
(* --------------------------------------------------------------------
* Copyright (c) - 2012--2016 - IMDEA Software Institute
* Copyright (c) - 2012--2021 - Inria
* Copyright (c) - 2012--2021 - Ecole Polytechnique
*
* Distributed under the terms of the CeCILL-C-V1 license
* -------------------------------------------------------------------- *)
(* -------------------------------------------------------------------- *)
(* Global / mutable EasyCrypt state that can be attached to an
* environment - and shared by all the decendant of such an
* environment. This state can be used to register notification
* functions or global flags (e.g. profiling / tracing) *)
type gstate
(* -------------------------------------------------------------------- *)
val create : unit -> gstate
val copy : gstate -> gstate
val from_flags : (string * bool) list -> gstate
(* -------------------------------------------------------------------- *)
type value = [ `Int of int ]
val asint : default:int -> value option -> int
val getvalue : string -> gstate -> value option
val setvalue : string -> value -> gstate -> unit
(* -------------------------------------------------------------------- *)
val getflag : ?default:bool -> string -> gstate -> bool
val setflag : string -> bool -> gstate -> unit
(* --------------------------------------------------------------------- *)
type nid_t
type loglevel = [`Debug | `Info | `Warning | `Critical]
val string_of_loglevel : loglevel -> string
val max_loglevel : loglevel -> loglevel -> loglevel
val accept_log : level:loglevel -> wanted:loglevel -> bool
val add_notifier : (loglevel -> string Lazy.t -> unit) -> gstate -> nid_t
val rem_notifier : nid_t -> gstate -> unit
val loglevel : gstate-> loglevel
val set_loglevel : loglevel -> gstate -> unit
val notify : loglevel -> string Lazy.t -> gstate -> unit