Kappa_site_graphs.Signature
Store definitions of agents
type 'links site_sig = {
internal_state : unit Kappa_data_structures.NamedDecls.t;
links : 'links option;
counter_info : counter_info option;
If relevant: counter CEQ value * counter delta
*)}
type t = bool array array site_sig Kappa_data_structures.NamedDecls.t
Store of one agent signature
val num_of_site :
?agent_name:string ->
string Kappa_data_structures.Loc.annoted ->
t ->
int
val site_of_num : int -> t -> string
val fold : (int -> string -> 'a -> 'a) -> 'a -> t -> 'a
val num_of_internal_state :
int ->
string Kappa_data_structures.Loc.annoted ->
t ->
int
num_of_internal_state site_id state_name signature
val internal_state_of_site_id : int -> int -> t -> string
internal_state_of_site_id site_id value_id signature
val counter_of_site_id : int -> t -> counter_info option
val has_counter : t -> bool
val create :
counters_per_agent:
(string Kappa_data_structures.Loc.annoted
* string Kappa_data_structures.Loc.annoted list)
list ->
t Kappa_data_structures.NamedDecls.t ->
s
val size : s -> int
val arity : s -> int -> int
arity sigs agent_id
val max_arity : s -> int
max_arity sigs
returns max aritiessigsi
val num_of_agent : string Kappa_data_structures.Loc.annoted -> s -> int
val agent_of_num : int -> s -> string
val id_of_site :
string Kappa_data_structures.Loc.annoted ->
string Kappa_data_structures.Loc.annoted ->
s ->
int
id_of_site agent_type site_name sigs
val id_of_internal_state :
string Kappa_data_structures.Loc.annoted ->
string Kappa_data_structures.Loc.annoted ->
string Kappa_data_structures.Loc.annoted ->
s ->
int
id_of_internal_state agent_type site_name state_name sigs
val internal_states_number : int -> int -> s -> int
internal_state_number agent_id site_id sigs
val default_internal_state : int -> int -> s -> int option
val allowed_link : int -> int -> int -> int -> s -> bool
allowed_link ag1 s1 ag2 s2 sigs
evaluates to true if and only if it is allowed to create a link between site s1
of agent ag1
and site s2
of agent ag2
If there are counters in the signature, we define a single agent as the * _counter agent_, which will be used as _dummies_ to keep track of the counter value
val is_counter_agent : s -> int -> bool
val ports_if_counter_agent : s -> int -> (int * int) option
val site_is_counter : s -> int -> int -> bool
val get_counter_agent_info : s -> counter_agent_info
counter_agent agent_sigs
Suffix added to counter names to make an inverted counter name when needed for a <= test
Tests if a counter is a inverted counter, and should be hidden from the user
val print_agent : s -> Stdlib.Format.formatter -> int -> unit
val print_site : s -> int -> Stdlib.Format.formatter -> int -> unit
val print_internal_state :
s ->
int ->
int ->
Stdlib.Format.formatter ->
int ->
unit
val print_site_internal_state :
s ->
int ->
int ->
Stdlib.Format.formatter ->
int option ->
unit
print_site_internal_state sigs agent_type site_id f state_id
prints both the site and its internal state if it is not None
.
val print_counter : s -> int -> Stdlib.Format.formatter -> int -> unit
val print : Stdlib.Format.formatter -> s -> unit
val to_json : s -> Yojson.Basic.t
val of_json : Yojson.Basic.t -> s