sig
type mode = [ `Bool_Backward | `Bool_Forward | `Tree ]
module type Cfg =
sig
module S : Sigs.Sigma
module Node :
sig
type t
module Map :
sig
type key = t
type 'a t
val is_empty : 'a t -> bool
val empty : 'a t
val add : key -> 'a -> 'a t -> 'a t
val mem : key -> 'a t -> bool
val find : key -> 'a t -> 'a
val remove : key -> 'a t -> 'a t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val iter : (key -> 'a -> unit) -> 'a t -> unit
val map : (key -> 'a -> 'b) -> 'a t -> 'b t
val mapf : (key -> 'a -> 'b option) -> 'a t -> 'b t
val mapq : (key -> 'a -> 'a option) -> 'a t -> 'a t
val filter : (key -> 'a -> bool) -> 'a t -> 'a t
val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t
val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
val union : (key -> 'a -> 'a -> 'a) -> 'a t -> 'a t -> 'a t
val inter : (key -> 'a -> 'b -> 'c) -> 'a t -> 'b t -> 'c t
val interf :
(key -> 'a -> 'b -> 'c option) -> 'a t -> 'b t -> 'c t
val interq :
(key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t
val diffq :
(key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t
val merge :
(key -> 'a option -> 'b option -> 'c option) ->
'a t -> 'b t -> 'c t
val iter2 :
(key -> 'a option -> 'b option -> unit) ->
'a t -> 'b t -> unit
val subset : (key -> 'a -> 'b -> bool) -> 'a t -> 'b t -> bool
val insert :
(key -> 'a -> 'a -> 'a) -> key -> 'a -> 'a t -> 'a t
val change :
(key -> 'b -> 'a option -> 'a option) ->
key -> 'b -> 'a t -> 'a t
end
module Set :
sig
type elt = t
type t
val empty : t
val is_empty : t -> bool
val mem : elt -> t -> bool
val find : elt -> t -> elt
val add : elt -> t -> t
val singleton : elt -> t
val remove : elt -> t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val compare : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val iter : (elt -> unit) -> t -> unit
val fold : (elt -> 'a -> 'a) -> t -> 'a -> 'a
val for_all : (elt -> bool) -> t -> bool
val exists : (elt -> bool) -> t -> bool
val filter : (elt -> bool) -> t -> t
val partition : (elt -> bool) -> t -> t * t
val cardinal : t -> int
val elements : t -> elt list
val map : (elt -> elt) -> t -> t
val mapf : (elt -> elt option) -> t -> t
val intersect : t -> t -> bool
end
module Hashtbl :
sig
type key = t
type 'a t
val create : int -> 'a t
val clear : 'a t -> unit
val reset : 'a t -> unit
val copy : 'a t -> 'a t
val add : 'a t -> key -> 'a -> unit
val remove : 'a t -> key -> unit
val find : 'a t -> key -> 'a
val find_opt : 'a t -> key -> 'a option
val find_all : 'a t -> key -> 'a list
val replace : 'a t -> key -> 'a -> unit
val mem : 'a t -> key -> bool
val iter : (key -> 'a -> unit) -> 'a t -> unit
val filter_map_inplace :
(key -> 'a -> 'a option) -> 'a t -> unit
val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
val length : 'a t -> int
val stats : 'a t -> Hashtbl.statistics
val to_seq : 'a t -> (key * 'a) Seq.t
val to_seq_keys : 'a t -> key Seq.t
val to_seq_values : 'a t -> 'a Seq.t
val add_seq : 'a t -> (key * 'a) Seq.t -> unit
val replace_seq : 'a t -> (key * 'a) Seq.t -> unit
val of_seq : (key * 'a) Seq.t -> 'a t
end
val pp :
Stdlib.Format.formatter -> Wp.CfgCompiler.Cfg.Node.t -> unit
val create : unit -> Wp.CfgCompiler.Cfg.Node.t
val equal :
Wp.CfgCompiler.Cfg.Node.t -> Wp.CfgCompiler.Cfg.Node.t -> bool
end
type node = Wp.CfgCompiler.Cfg.Node.t
val node : unit -> Wp.CfgCompiler.Cfg.node
module C :
sig
type t
val equal :
Wp.CfgCompiler.Cfg.C.t -> Wp.CfgCompiler.Cfg.C.t -> bool
val create : S.t -> Wp.Lang.F.pred -> Wp.CfgCompiler.Cfg.C.t
val get : Wp.CfgCompiler.Cfg.C.t -> Wp.Lang.F.pred
val reads : Wp.CfgCompiler.Cfg.C.t -> S.domain
val relocate :
S.t -> Wp.CfgCompiler.Cfg.C.t -> Wp.CfgCompiler.Cfg.C.t
end
module P :
sig
type t
val pretty :
Stdlib.Format.formatter -> Wp.CfgCompiler.Cfg.P.t -> unit
val create :
S.t Wp.CfgCompiler.Cfg.Node.Map.t ->
Wp.Lang.F.pred -> Wp.CfgCompiler.Cfg.P.t
val get : Wp.CfgCompiler.Cfg.P.t -> Wp.Lang.F.pred
val reads :
Wp.CfgCompiler.Cfg.P.t -> S.domain Wp.CfgCompiler.Cfg.Node.Map.t
val nodes : Wp.CfgCompiler.Cfg.P.t -> Wp.CfgCompiler.Cfg.Node.Set.t
val relocate :
S.t Wp.CfgCompiler.Cfg.Node.Map.t ->
Wp.CfgCompiler.Cfg.P.t -> Wp.CfgCompiler.Cfg.P.t
val to_condition :
Wp.CfgCompiler.Cfg.P.t ->
(Wp.CfgCompiler.Cfg.C.t * Wp.CfgCompiler.Cfg.Node.t option)
option
end
module T :
sig
type t
val pretty :
Stdlib.Format.formatter -> Wp.CfgCompiler.Cfg.T.t -> unit
val create :
S.t Wp.CfgCompiler.Cfg.Node.Map.t ->
Wp.Lang.F.term -> Wp.CfgCompiler.Cfg.T.t
val get : Wp.CfgCompiler.Cfg.T.t -> Wp.Lang.F.term
val reads :
Wp.CfgCompiler.Cfg.T.t -> S.domain Wp.CfgCompiler.Cfg.Node.Map.t
val relocate :
S.t Wp.CfgCompiler.Cfg.Node.Map.t ->
Wp.CfgCompiler.Cfg.T.t -> Wp.CfgCompiler.Cfg.T.t
val init :
Wp.CfgCompiler.Cfg.Node.Set.t ->
(S.t Wp.CfgCompiler.Cfg.Node.Map.t -> Wp.Lang.F.term) ->
Wp.CfgCompiler.Cfg.T.t
val init' :
Wp.CfgCompiler.Cfg.Node.t ->
(S.t -> Wp.Lang.F.term) -> Wp.CfgCompiler.Cfg.T.t
end
module E :
sig
type t
val pretty :
Stdlib.Format.formatter -> Wp.CfgCompiler.Cfg.E.t -> unit
val create :
S.t Wp.Sigs.sequence -> Wp.Lang.F.pred -> Wp.CfgCompiler.Cfg.E.t
val get : Wp.CfgCompiler.Cfg.E.t -> Wp.Lang.F.pred
val reads : Wp.CfgCompiler.Cfg.E.t -> S.domain
val writes : Wp.CfgCompiler.Cfg.E.t -> S.domain
val relocate :
S.t Wp.Sigs.sequence ->
Wp.CfgCompiler.Cfg.E.t -> Wp.CfgCompiler.Cfg.E.t
end
type cfg
val dump_env : name:string -> Wp.CfgCompiler.Cfg.cfg -> unit
val output_dot :
Stdlib.out_channel ->
?checks:Wp.CfgCompiler.Cfg.P.t Bag.t ->
Wp.CfgCompiler.Cfg.cfg -> unit
val nop : Wp.CfgCompiler.Cfg.cfg
val add_tmpnode : Wp.CfgCompiler.Cfg.node -> Wp.CfgCompiler.Cfg.cfg
val concat :
Wp.CfgCompiler.Cfg.cfg ->
Wp.CfgCompiler.Cfg.cfg -> Wp.CfgCompiler.Cfg.cfg
val meta :
?stmt:Cil_types.stmt ->
?descr:string -> Wp.CfgCompiler.Cfg.node -> Wp.CfgCompiler.Cfg.cfg
val goto :
Wp.CfgCompiler.Cfg.node ->
Wp.CfgCompiler.Cfg.node -> Wp.CfgCompiler.Cfg.cfg
val branch :
Wp.CfgCompiler.Cfg.node ->
Wp.CfgCompiler.Cfg.C.t ->
Wp.CfgCompiler.Cfg.node ->
Wp.CfgCompiler.Cfg.node -> Wp.CfgCompiler.Cfg.cfg
val guard :
Wp.CfgCompiler.Cfg.node ->
Wp.CfgCompiler.Cfg.C.t ->
Wp.CfgCompiler.Cfg.node -> Wp.CfgCompiler.Cfg.cfg
val guard' :
Wp.CfgCompiler.Cfg.node ->
Wp.CfgCompiler.Cfg.C.t ->
Wp.CfgCompiler.Cfg.node -> Wp.CfgCompiler.Cfg.cfg
val either :
Wp.CfgCompiler.Cfg.node ->
Wp.CfgCompiler.Cfg.node list -> Wp.CfgCompiler.Cfg.cfg
val implies :
Wp.CfgCompiler.Cfg.node ->
(Wp.CfgCompiler.Cfg.C.t * Wp.CfgCompiler.Cfg.node) list ->
Wp.CfgCompiler.Cfg.cfg
val effect :
Wp.CfgCompiler.Cfg.node ->
Wp.CfgCompiler.Cfg.E.t ->
Wp.CfgCompiler.Cfg.node -> Wp.CfgCompiler.Cfg.cfg
val assume : Wp.CfgCompiler.Cfg.P.t -> Wp.CfgCompiler.Cfg.cfg
val havoc :
Wp.CfgCompiler.Cfg.node ->
effects:Wp.CfgCompiler.Cfg.node Wp.Sigs.sequence ->
Wp.CfgCompiler.Cfg.node -> Wp.CfgCompiler.Cfg.cfg
val compile :
?name:string ->
?mode:Wp.CfgCompiler.mode ->
Wp.CfgCompiler.Cfg.node ->
Wp.CfgCompiler.Cfg.Node.Set.t ->
S.domain Wp.CfgCompiler.Cfg.Node.Map.t ->
Wp.CfgCompiler.Cfg.cfg ->
Wp.Lang.F.pred Wp.CfgCompiler.Cfg.Node.Map.t *
S.t Wp.CfgCompiler.Cfg.Node.Map.t * Wp.Conditions.sequence
end
module Cfg :
functor (S : Sigs.Sigma) ->
sig
module S :
sig
type chunk = S.chunk
module Chunk :
sig
type t = chunk
type set = S.Chunk.set
type 'a map = 'a S.Chunk.map
val hash : t -> int
val equal : t -> t -> bool
val compare : t -> t -> int
module Map :
sig
type key = t
type 'a t = 'a map
val empty : 'a t
val add : key -> 'a -> 'a t -> 'a t
val mem : key -> 'a t -> bool
val find : key -> 'a t -> 'a
val findk : key -> 'a t -> key * 'a
val size : 'a t -> int
val is_empty : 'a t -> bool
val insert :
(key -> 'a -> 'a -> 'a) -> key -> 'a -> 'a t -> 'a t
val change :
(key -> 'b -> 'a option -> 'a option) ->
key -> 'b -> 'a t -> 'a t
val map : ('a -> 'b) -> 'a t -> 'b t
val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t
val mapf : (key -> 'a -> 'b option) -> 'a t -> 'b t
val mapq : (key -> 'a -> 'a option) -> 'a t -> 'a t
val filter : (key -> 'a -> bool) -> 'a t -> 'a t
val partition :
(key -> 'a -> bool) -> 'a t -> 'a t * 'a t
val iter : (key -> 'a -> unit) -> 'a t -> unit
val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
val iter_sorted : (key -> 'a -> unit) -> 'a t -> unit
val fold_sorted :
(key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
val union :
(key -> 'a -> 'a -> 'a) -> 'a t -> 'a t -> 'a t
val inter :
(key -> 'a -> 'b -> 'c) -> 'a t -> 'b t -> 'c t
val interf :
(key -> 'a -> 'b -> 'c option) -> 'a t -> 'b t -> 'c t
val interq :
(key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t
val diffq :
(key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t
val subset :
(key -> 'a -> 'b -> bool) -> 'a t -> 'b t -> bool
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val iterk :
(key -> 'a -> 'b -> unit) -> 'a t -> 'b t -> unit
val iter2 :
(key -> 'a option -> 'b option -> unit) ->
'a t -> 'b t -> unit
val merge :
(key -> 'a option -> 'b option -> 'c option) ->
'a t -> 'b t -> 'c t
type domain = set
val domain : 'a t -> domain
end
module Set :
sig
type elt = t
type t = set
val empty : t
val add : elt -> t -> t
val singleton : elt -> t
val elements : t -> elt list
val is_empty : t -> bool
val mem : elt -> t -> bool
val iter : (elt -> unit) -> t -> unit
val fold : (elt -> 'a -> 'a) -> t -> 'a -> 'a
val filter : (elt -> bool) -> t -> t
val partition : (elt -> bool) -> t -> t * t
val for_all : (elt -> bool) -> t -> bool
val exists : (elt -> bool) -> t -> bool
val iter_sorted : (elt -> unit) -> t -> unit
val fold_sorted : (elt -> 'a -> 'a) -> t -> 'a -> 'a
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val subset : t -> t -> bool
val intersect : t -> t -> bool
val of_list : elt list -> t
type 'a mapping = 'a map
val mapping : (elt -> 'a) -> t -> 'a mapping
end
end
type domain = Chunk.Set.t
type t = S.t
val pretty : Format.formatter -> t -> unit
val create : unit -> t
val mem : t -> chunk -> bool
val get : t -> chunk -> Lang.F.var
val value : t -> chunk -> Lang.F.term
val copy : t -> t
val join : t -> t -> Passive.t
val assigned : pre:t -> post:t -> domain -> Lang.F.pred Bag.t
val choose : t -> t -> t
val merge : t -> t -> t * Passive.t * Passive.t
val merge_list : t list -> t * Passive.t list
val iter : (chunk -> Lang.F.var -> unit) -> t -> unit
val iter2 :
(chunk -> Lang.F.var option -> Lang.F.var option -> unit) ->
t -> t -> unit
val havoc_chunk : t -> chunk -> t
val havoc : t -> domain -> t
val havoc_any : call:bool -> t -> t
val remove_chunks : t -> domain -> t
val domain : t -> domain
val union : domain -> domain -> domain
val empty : domain
val writes : t Sigs.sequence -> domain
end
module Node :
sig
type t
module Map :
sig
type key = t
type 'a t
val is_empty : 'a t -> bool
val empty : 'a t
val add : key -> 'a -> 'a t -> 'a t
val mem : key -> 'a t -> bool
val find : key -> 'a t -> 'a
val remove : key -> 'a t -> 'a t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val iter : (key -> 'a -> unit) -> 'a t -> unit
val map : (key -> 'a -> 'b) -> 'a t -> 'b t
val mapf : (key -> 'a -> 'b option) -> 'a t -> 'b t
val mapq : (key -> 'a -> 'a option) -> 'a t -> 'a t
val filter : (key -> 'a -> bool) -> 'a t -> 'a t
val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t
val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
val union : (key -> 'a -> 'a -> 'a) -> 'a t -> 'a t -> 'a t
val inter : (key -> 'a -> 'b -> 'c) -> 'a t -> 'b t -> 'c t
val interf :
(key -> 'a -> 'b -> 'c option) -> 'a t -> 'b t -> 'c t
val interq :
(key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t
val diffq :
(key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t
val merge :
(key -> 'a option -> 'b option -> 'c option) ->
'a t -> 'b t -> 'c t
val iter2 :
(key -> 'a option -> 'b option -> unit) ->
'a t -> 'b t -> unit
val subset :
(key -> 'a -> 'b -> bool) -> 'a t -> 'b t -> bool
val insert :
(key -> 'a -> 'a -> 'a) -> key -> 'a -> 'a t -> 'a t
val change :
(key -> 'b -> 'a option -> 'a option) ->
key -> 'b -> 'a t -> 'a t
end
module Set :
sig
type elt = t
type t
val empty : t
val is_empty : t -> bool
val mem : elt -> t -> bool
val find : elt -> t -> elt
val add : elt -> t -> t
val singleton : elt -> t
val remove : elt -> t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val compare : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val iter : (elt -> unit) -> t -> unit
val fold : (elt -> 'a -> 'a) -> t -> 'a -> 'a
val for_all : (elt -> bool) -> t -> bool
val exists : (elt -> bool) -> t -> bool
val filter : (elt -> bool) -> t -> t
val partition : (elt -> bool) -> t -> t * t
val cardinal : t -> int
val elements : t -> elt list
val map : (elt -> elt) -> t -> t
val mapf : (elt -> elt option) -> t -> t
val intersect : t -> t -> bool
end
module Hashtbl :
sig
type key = t
type 'a t
val create : int -> 'a t
val clear : 'a t -> unit
val reset : 'a t -> unit
val copy : 'a t -> 'a t
val add : 'a t -> key -> 'a -> unit
val remove : 'a t -> key -> unit
val find : 'a t -> key -> 'a
val find_opt : 'a t -> key -> 'a option
val find_all : 'a t -> key -> 'a list
val replace : 'a t -> key -> 'a -> unit
val mem : 'a t -> key -> bool
val iter : (key -> 'a -> unit) -> 'a t -> unit
val filter_map_inplace :
(key -> 'a -> 'a option) -> 'a t -> unit
val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
val length : 'a t -> int
val stats : 'a t -> Hashtbl.statistics
val to_seq : 'a t -> (key * 'a) Seq.t
val to_seq_keys : 'a t -> key Seq.t
val to_seq_values : 'a t -> 'a Seq.t
val add_seq : 'a t -> (key * 'a) Seq.t -> unit
val replace_seq : 'a t -> (key * 'a) Seq.t -> unit
val of_seq : (key * 'a) Seq.t -> 'a t
end
val pp : Format.formatter -> t -> unit
val create : unit -> t
val equal : t -> t -> bool
end
type node = Node.t
val node : unit -> node
module C :
sig
type t
val equal : t -> t -> bool
val create : S.t -> Lang.F.pred -> t
val get : t -> Lang.F.pred
val reads : t -> S.domain
val relocate : S.t -> t -> t
end
module P :
sig
type t
val pretty : Format.formatter -> t -> unit
val create : S.t Node.Map.t -> Lang.F.pred -> t
val get : t -> Lang.F.pred
val reads : t -> S.domain Node.Map.t
val nodes : t -> Node.Set.t
val relocate : S.t Node.Map.t -> t -> t
val to_condition : t -> (C.t * Node.t option) option
end
module T :
sig
type t
val pretty : Format.formatter -> t -> unit
val create : S.t Node.Map.t -> Lang.F.term -> t
val get : t -> Lang.F.term
val reads : t -> S.domain Node.Map.t
val relocate : S.t Node.Map.t -> t -> t
val init : Node.Set.t -> (S.t Node.Map.t -> Lang.F.term) -> t
val init' : Node.t -> (S.t -> Lang.F.term) -> t
end
module E :
sig
type t
val pretty : Format.formatter -> t -> unit
val create : S.t Sigs.sequence -> Lang.F.pred -> t
val get : t -> Lang.F.pred
val reads : t -> S.domain
val writes : t -> S.domain
val relocate : S.t Sigs.sequence -> t -> t
end
type cfg
val dump_env : name:string -> cfg -> unit
val output_dot : out_channel -> ?checks:P.t Bag.t -> cfg -> unit
val nop : cfg
val add_tmpnode : node -> cfg
val concat : cfg -> cfg -> cfg
val meta : ?stmt:Cil_types.stmt -> ?descr:string -> node -> cfg
val goto : node -> node -> cfg
val branch : node -> C.t -> node -> node -> cfg
val guard : node -> C.t -> node -> cfg
val guard' : node -> C.t -> node -> cfg
val either : node -> node list -> cfg
val implies : node -> (C.t * node) list -> cfg
val effect : node -> E.t -> node -> cfg
val assume : P.t -> cfg
val havoc : node -> effects:node Sigs.sequence -> node -> cfg
val compile :
?name:string ->
?mode:mode ->
node ->
Node.Set.t ->
S.domain Node.Map.t ->
cfg ->
Lang.F.pred Node.Map.t * S.t Node.Map.t * Conditions.sequence
end
end