package kappa-library

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Kappa_site_graphs.SignatureSource

Store definitions of agents

Sourcetype counter_info = {
  1. counter_info_min : int option;
  2. counter_info_max : int option;
  3. counter_default_value : int;
}
Sourcetype 'links site_sig = {
  1. internal_state : unit Kappa_data_structures.NamedDecls.t;
  2. counter_info : counter_info option;
    (*

    If relevant: counter CEQ value * counter delta

    *)
}

Store of one agent signature

Sourceval num_of_site : ?agent_name:string -> string Kappa_data_structures.Loc.annoted -> t -> int
Sourceval site_of_num : int -> t -> string
Sourceval fold : (int -> string -> 'a -> 'a) -> 'a -> t -> 'a
Sourceval num_of_internal_state : int -> string Kappa_data_structures.Loc.annoted -> t -> int

num_of_internal_state site_id state_name signature

Sourceval internal_state_of_site_id : int -> int -> t -> string

internal_state_of_site_id site_id value_id signature

Sourceval counter_of_site_id : int -> t -> counter_info option
Sourceval has_counter : t -> bool
Sourcetype s

Store of all the agents, s as a plural

Sourceval size : s -> int
Sourceval get : s -> int -> t

get sigs agent_id

Sourceval arity : s -> int -> int

arity sigs agent_id

Sourceval max_arity : s -> int

max_arity sigs returns max aritiessigsi

Sourceval num_of_agent : string Kappa_data_structures.Loc.annoted -> s -> int
Sourceval agent_of_num : int -> s -> string

id_of_site agent_type site_name sigs

id_of_internal_state agent_type site_name state_name sigs

Sourceval internal_states_number : int -> int -> s -> int

internal_state_number agent_id site_id sigs

Sourceval default_internal_state : int -> int -> s -> int option

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

Counter specific

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

Sourceval is_counter_agent : s -> int -> bool
Sourceval ports_if_counter_agent : s -> int -> (int * int) option
Sourceval site_is_counter : s -> int -> int -> bool
Sourcetype counter_agent_info = {
  1. id : int;
  2. arity : int;
  3. ports : int * int;
}
Sourceval get_counter_agent_info : s -> counter_agent_info

counter_agent agent_sigs

Sourceval inverted_counter_suffix : string

Suffix added to counter names to make an inverted counter name when needed for a <= test

Sourceval is_inverted_counter : string -> bool

Tests if a counter is a inverted counter, and should be hidden from the user

I/O

Sourceval print_agent : s -> Format.formatter -> int -> unit
Sourceval print_site : s -> int -> Format.formatter -> int -> unit
Sourceval print_internal_state : s -> int -> int -> Format.formatter -> int -> unit
Sourceval print_site_internal_state : s -> int -> int -> 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.

Sourceval print_counter : s -> int -> Format.formatter -> int -> unit
Sourceval print : Format.formatter -> s -> unit
Sourceval to_json : s -> Yojson.Basic.t
Sourceval of_json : Yojson.Basic.t -> s
OCaml

Innovation. Community. Security.