sig
type t
val valid : (Acml.t -> unit) -> unit
val set_dimension : Acml.t -> int -> unit
val set_moore_neighborhood : Acml.t -> int -> unit
val set_moore_neighbourhood : Acml.t -> int -> unit
val set_vonneumann_neighborhood : Acml.t -> int -> unit
val set_vonneumann_neighbourhood : Acml.t -> int -> unit
val set_cross_neighborhood : Acml.t -> int -> unit
val set_cross_neighbourhood : Acml.t -> int -> unit
val centercell : Acml.t -> int
val relativecell : Acml.t -> int -> int -> int
val neighbors : Acml.t -> (int * int) list
val set_cardinality : Acml.t -> int -> unit
val set_rule :
Acml.t ->
?cache:((int array -> int) -> int array -> int) ->
?no_table:bool -> (int array -> int) -> unit
val set_rule_fun : Acml.t -> ((int -> int -> int) -> int) -> unit
val set_multiset_rule :
Acml.t ->
?cache:((int -> int array -> int) -> int -> int array -> int) ->
?no_table:bool -> (int -> int array -> int) -> unit
val set_multiset_rule_fun : Acml.t -> (int -> (int -> int) -> int) -> unit
val active_only : Acml.t -> (int -> bool) -> unit
type 'a alphabet = AlphaArray of 'a array | AlphaFun of (int * (int -> 'a))
val poly_set_rule :
Acml.t ->
?active:('a -> bool) ->
?printer:('a -> string) ->
alphabet:'a Acml.alphabet -> ('a array -> 'a) -> unit
val poly_set_rule_fun :
Acml.t ->
?active:('a -> bool) ->
?printer:('a -> string) ->
alphabet:'a Acml.alphabet -> ((int -> int -> 'a) -> 'a) -> unit
val poly_set_multiset_rule :
Acml.t ->
?active:('a -> bool) ->
?printer:('a -> string) ->
alphabet:'a Acml.alphabet -> ('a -> ('a -> int) -> 'a) -> unit
val declare_stochastic : Acml.t -> unit
val declare_deterministic : Acml.t -> unit
val ensure_determinism : Acml.t -> unit
val ca_random : int -> int
val ca_random_float : float -> float
val conf_random : int -> int
val conf_random_float : float -> float
val set_universe_size : Acml.t -> int -> int -> unit
val get_universe_size : Acml.t -> int * int
type 'a initconf =
General of (int -> int -> 'a)
| GenArray of (unit -> 'a array array)
| Bernoulli of ('a -> float)
| RandomBernoulli of 'a array
| RandomUniform
| Uniform of 'a
| Mask of (int -> int -> bool) * 'a Acml.initconf
| FixedSize of int * int * 'a Acml.initconf
| MultiLayer of 'a Acml.initconf list
val add_init_conf :
Acml.t -> ?set:bool -> string -> int Acml.initconf -> unit
val poly_add_init_conf :
Acml.t ->
?set:bool ->
string -> alphabet:'a Acml.alphabet -> 'a Acml.initconf -> unit
val radius : Acml.t -> int
val arity : Acml.t -> int
val cardinality : Acml.t -> int
val dimension : Acml.t -> int
val set_name : Acml.t -> string -> unit
val get_name : Acml.t -> string
val set_object_name : Acml.t -> string -> unit
val get_object_name : Acml.t -> string
val set_state_name : Acml.t -> int -> string -> unit
val get_state_name : Acml.t -> int -> string
val poly_set_state_name :
Acml.t -> alphabet:'a Acml.alphabet -> 'a -> string -> unit
val poly_get_state_name :
Acml.t -> alphabet:'a Acml.alphabet -> 'a -> string
val add_description : Acml.t -> string -> string -> unit
val get_stop_time : unit -> int
val set_stop_time : int -> unit
val param : Acml.t -> string -> int -> int -> int -> int
val bool_param : Acml.t -> string -> bool -> bool
val float_param : Acml.t -> string -> float -> float -> float -> float
val string_param : Acml.t -> string -> string -> string
val text_param : Acml.t -> string -> string -> string
val file_param : Acml.t -> string -> string -> string
val choice_param :
Acml.t -> ?choice:string -> string -> string list -> string
val choice_array_param :
Acml.t -> ?choice:int -> string -> string array -> int
val doc_param : Acml.t -> string -> string -> unit
val group_param : Acml.t -> string -> string list -> unit
val std_params :
?dimension:int ->
?dimension_fixed:bool ->
?states:int ->
?states_fixed:bool ->
?radius:int ->
?radius_fixed:bool ->
?neighborhood:string ->
?neighborhood_fixed:bool -> Acml.t -> int * int * int * string
type representation =
Unicolor of int * int * int
| Transparent
| NorthArrow
| SouthArrow
| EastArrow
| WestArrow
| Bordercolor of int * int * int
| Multiple of Acml.representation list
val color_gradient :
Acml.t -> (int * int * int) array -> int -> Acml.representation
val add_colormap :
Acml.t -> ?set:bool -> string -> (int -> Acml.representation) -> unit
val add_view :
Acml.t ->
?set:bool ->
string ->
(int -> int -> (int -> int -> int) -> Acml.representation) -> unit
val poly_add_colormap :
Acml.t ->
?set:bool ->
string ->
alphabet:'a Acml.alphabet -> ('a -> Acml.representation) -> unit
val poly_add_view :
Acml.t ->
?set:bool ->
string ->
alphabet:'a Acml.alphabet ->
(int -> int -> (int -> int -> 'a) -> Acml.representation) -> unit
val get_representation :
Acml.t -> (int -> int -> int) -> int -> int -> Acml.representation
val poly_get_representation :
Acml.t ->
alphabet:'a Acml.alphabet ->
(int -> int -> 'a) -> int -> int -> Acml.representation
type 'a modifier =
Forced of 'a
| Map of ('a -> 'a)
| GeneralZone of ('a -> int * int * int * int -> int -> int -> 'a)
| SimpleZone of ('a -> int -> int -> 'a)
| FreeZone of
(int * int * int * int ->
(int -> int -> 'a) -> (int -> int -> 'a -> unit) -> unit)
val add_modif :
Acml.t ->
?key:string ->
?set:bool ->
?left:bool -> ?oriented:bool -> string -> int Acml.modifier -> unit
val poly_add_modif :
Acml.t ->
?key:string ->
?set:bool ->
?left:bool ->
?oriented:bool ->
string -> alphabet:'a Acml.alphabet -> 'a Acml.modifier -> unit
val add_snapshot :
Acml.t ->
?set:bool ->
string -> (int -> int -> (int -> int -> int) -> unit) -> unit
val poly_add_snapshot :
Acml.t ->
?set:bool ->
string ->
alphabet:'a Acml.alphabet ->
(int -> int -> (int -> int -> 'a) -> unit) -> unit
val add_measurement :
Acml.t ->
?trigger:bool ->
?set:bool ->
string ->
(int ->
int -> int -> (int -> int -> int) -> (int -> int -> int -> unit) -> unit) ->
unit
val poly_add_measurement :
Acml.t ->
?trigger:bool ->
?set:bool ->
string ->
alphabet:'a Acml.alphabet ->
(int ->
int -> int -> (int -> int -> 'a) -> (int -> int -> 'a -> unit) -> unit) ->
unit
val doc_action : Acml.t -> string -> string -> unit
type action = Save | Shoot | New | Stop
val clear_scenario : unit -> unit
val addto_scenario : Acml.action -> unit
type gui_t
val gui_window :
?height:int -> ?width:int -> string -> Acml.gui_t -> unit -> unit
val gui_vbox : Acml.gui_t list -> Acml.gui_t
val gui_hbox : Acml.gui_t list -> Acml.gui_t
val gui_label : string -> Acml.gui_t
val gui_full_label : string -> Acml.gui_t * (string -> unit)
val gui_textbox : string -> Acml.gui_t
val gui_textbuffer : string -> Acml.gui_t * (string -> unit)
val gui_button : string -> (unit -> unit) -> Acml.gui_t
type draw_context
val size : Acml.draw_context -> int * int
val point :
Acml.draw_context -> ?color:int * int * int -> int -> int -> unit
val rectangle :
Acml.draw_context ->
?color:int * int * int -> int -> int -> int -> int -> unit
val gui_drawing_area :
?height:int ->
?width:int ->
?background:int * int * int -> unit -> Acml.gui_t * Acml.draw_context
val clear : Acml.draw_context -> unit
val add_mem_info : int -> unit
val infomsg : string -> unit
val add_shortcut : string -> (string -> (string * string) list) -> unit
val declare_object : ?family:string -> string -> unit
val declare_file_type :
?transform:(string -> string) -> string -> string list -> unit
val neednewac : Acml.t -> bool
val neednewconf : Acml.t -> bool
type execution =
EachStep
| EachNewObject_after
| EachNewObject_before
| ProgramStartup
| UserDemand
val valid_plugin :
?name:string ->
?description:string ->
?activate:bool ->
?executed_at:Acml.execution ->
?start:(unit -> unit) ->
?finish:(unit -> unit) -> (Acml.t -> unit) -> unit
type regenerate = Automaton | Configuration | Both | Nothing | Skip
val valid_hook_plugin :
?activate:bool ->
?name:string ->
pattern:string ->
?description:string ->
?start:(unit -> unit) ->
?finish:(unit -> unit) ->
(string ->
Acml.t ->
int * int ->
(int -> int -> int) ->
(int -> int -> int -> unit) -> Acml.regenerate * string list) ->
unit
val initial : Acml.t -> bool
val initialize : Acml.t -> unit
val apply : string -> Acml.t -> unit
val get_builtin_names : unit -> string list
val get_external_names : unit -> string list
val clean_decorations : Acml.t -> unit
val remove_param : Acml.t -> string -> unit
val filter_params : Acml.t -> (string -> bool) -> unit
val set_param : Acml.t -> string -> int -> unit
val set_bool_param : Acml.t -> string -> bool -> unit
val set_float_param : Acml.t -> string -> float -> unit
val set_string_param : Acml.t -> string -> string -> unit
val set_choice_param : Acml.t -> string -> string -> unit
val get_param : Acml.t -> string -> int
val get_bool_param : Acml.t -> string -> bool
val get_float_param : Acml.t -> string -> float
val get_string_param : Acml.t -> string -> string
val get_choice_param : Acml.t -> string -> string
val kernel_cast : Acml.t -> Kernel.actype
val get_views : Acml.t -> string list
val get_view : Acml.t -> string
val set_view : Acml.t -> string -> unit
end