module Signature:sig
..end
Signature
a mapping between keys that represent either a
function input or output, and some information.type
in_key =
| |
InCtrl |
(* |
input control point
| *) |
| |
InNum of |
(* |
parameters numbered from 1
| *) |
| |
InImpl of |
(* |
key for implicit inputs.
Used in function signatures only
| *) |
type
out_key =
| |
OutRet |
(* |
key for the output corresponding to the
return | *) |
| |
OutLoc of |
(* |
key for output locations.
used in call signatures only
| *) |
type
key =
| |
In of |
| |
Out of |
type 'info
t = {
|
in_ctrl : |
|||
|
in_params : |
(* |
implicit inputs :
Maybe we should use
Lmap_bitwise.Make_bitwise ?
but that would make things a lot more complicated... :-? | *) |
|
in_implicits : |
|||
|
out_ret : |
|||
|
outputs : |
'a
is the type of the information that we *
want to store for each input/output.module Str_descr:sig
..end
val empty : 'a t
val in_key : int -> key
val in_impl_key : Locations.Zone.t -> key
val in_top_key : key
val in_ctrl_key : key
val out_ret_key : key
val out_key : Locations.Zone.t -> key
val mk_undef_in_key : Locations.Zone.t -> in_key
val copy : 'a -> 'a
val cmp_in_key : in_key -> in_key -> int
val cmp_out_key : out_key -> out_key -> int
val equal_out_key : out_key -> out_key -> bool
val add_in_list : ('a * 'b) list -> 'a -> 'b -> ('b -> 'b -> 'b) -> ('a * 'b) list
num
and info
in lst
.
if we already have something for num
, use function merge
val add_loc : (Locations.Zone.t * 'a) list ->
Locations.Zone.t -> 'a -> ('a -> 'a -> 'a) -> (Locations.Zone.t * 'a) list
val add_replace : bool -> 'a -> 'b -> 'b
val add_input : 'a t ->
int -> 'a -> replace:bool -> 'a t
val add_impl_input : 'a t ->
Locations.Zone.t -> 'a -> replace:bool -> 'a t
val add_output : 'a t ->
Locations.Zone.t -> 'a -> replace:bool -> 'a t
val add_in_ctrl : 'a t -> 'a -> replace:bool -> 'a t
val add_out_ret : 'a t -> 'a -> replace:bool -> 'a t
val add_info : 'a t ->
key -> 'a -> replace:bool -> 'a t
val find_input : 'a t -> int -> 'a
val find_output : 'a t -> Locations.Zone.t -> 'a
val find_out_ret : 'a t -> 'a
val find_in_ctrl : 'a t -> 'a
val find_implicit_input : 'a t -> Locations.Zone.t -> 'a
val find_in_top : 'a t -> 'a
val find_in_info : 'a t -> in_key -> 'a
val find_out_info : 'a t -> out_key -> 'a
val find_info : 'a t -> key -> 'a
val fold_outputs : ('a -> Locations.Zone.t * 'b -> 'a) -> 'a -> 'b t -> 'a
val fold_all_outputs : ('a -> out_key * 'b -> 'a) ->
'a -> 'b t -> 'a
val fold_num_inputs : ('a -> int * 'b -> 'a) -> 'a -> 'b t -> 'a
val fold_impl_inputs : ('a -> Locations.Zone.t * 'b -> 'a) -> 'a -> 'b t -> 'a
val fold_matching_impl_inputs : Locations.Zone.t ->
('a -> Locations.Zone.t * 'b -> 'a) -> 'a -> 'b t -> 'a
val fold_all_inputs : ('a -> in_key * 'b -> 'a) ->
'a -> 'b t -> 'a
val fold : ('a -> key * 'b -> 'a) ->
'a -> 'b t -> 'a
val iter : (key * 'a -> unit) -> 'a t -> unit
val merge : 'a t ->
'a t -> ('a -> 'a -> 'a) -> 'a t
val pretty_in_key : Format.formatter -> in_key -> unit
val pretty_out_key : Format.formatter -> out_key -> unit
val pretty_key : Format.formatter -> key -> unit
val pretty : (Format.formatter -> 'a -> unit) ->
Format.formatter -> 'a t -> unit