Skip to content
Snippets Groups Projects
Commit 273c39d6 authored by Cécile Ruet-Cros's avatar Cécile Ruet-Cros Committed by Loïc Correnson
Browse files

[wp] API access

parent c5584737
No related branches found
No related tags found
No related merge requests found
...@@ -66,4 +66,21 @@ let pp_region fmt region : unit = Memory.pp_region fmt region ...@@ -66,4 +66,21 @@ let pp_region fmt region : unit = Memory.pp_region fmt region
let accesses (map:map) (region:region) : Access.acs list = []
type acs = {
acs_read : typ list;
acs_write : typ list;
acs_shift : typ list;
}
let empty_acs = {
acs_read = [];
acs_write = [];
acs_shift = [];
}
let accesses (region:region) : acs =
{
acs_read = List.map Access.typeof region.Memory.reads ;
acs_write = List.map Access.typeof region.Memory.writes ;
acs_shift = List.map Access.typeof region.Memory.shifts ;
}
...@@ -26,24 +26,35 @@ ...@@ -26,24 +26,35 @@
open Cil_types open Cil_types
(* General type *)
type region type region
module R : Qed.Collection.S with type t = region module R : Qed.Collection.S with type t = region
type map type map
val get_map : kernel_function -> map
(* API GETTERS *)
val get_map : kernel_function -> map
val cvar : map -> varinfo -> region val cvar : map -> varinfo -> region
val field : map -> region -> fieldinfo -> region val field : map -> region -> fieldinfo -> region
val index : map -> region -> typ -> region val index : map -> region -> typ -> region
(* API POINTERS *)
val points_to : map -> region -> region option val points_to : map -> region -> region option
val pointed_by : map -> region -> region list val pointed_by : map -> region -> region list
(* API ITERATOR *)
val iter : map -> (region -> unit) -> unit val iter : map -> (region -> unit) -> unit
(* API PRINTER *)
val pp_region : Format.formatter -> region -> unit val pp_region : Format.formatter -> region -> unit
val accesses : map -> region -> Access.acs list
(* API ACCESS *)
type acs = {
acs_read : typ list;
acs_write : typ list;
acs_shift : typ list;
}
val empty_acs : acs
val accesses : region -> acs
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment