sig
type 'a stream = ('a * float list) list
type 'a rule = { lhs : string; vars : string list; rhs : 'a list; }
type 'a lsystem = {
name : string;
axiom : (string * string Calc.t list) list;
rules : (string * string Calc.t list) Lilis.rule list;
post_rules : 'a Lilis.rule list;
}
module SymbEnv :
sig
type t
val extract :
string Lilis.stream ->
(string * 'b) Lilis.rule list ->
'c Lilis.rule list -> Lilis.SymbEnv.t
val add_rule :
Lilis.SymbEnv.t -> (string * 'a) Lilis.rule -> Lilis.SymbEnv.t
val add_post_rule : Lilis.SymbEnv.t -> 'a Lilis.rule -> Lilis.SymbEnv.t
val add_axiom :
Lilis.SymbEnv.t -> string Lilis.stream -> Lilis.SymbEnv.t
end
module type S =
sig
type 'a t
type 'a stored
val singleton : 'a -> 'a Lilis.S.t
val map : ('a -> 'b) -> 'a Lilis.S.t -> 'b Lilis.S.t
val expand : ('a -> 'b Lilis.S.t) -> 'a Lilis.S.t -> 'b Lilis.S.t
val iter : ('a -> unit) -> 'a Lilis.S.t -> unit
val fold : ('b -> 'a -> 'b) -> 'b -> 'a Lilis.S.t -> 'b
val of_list : 'a list -> 'a Lilis.S.stored
val to_list : 'a Lilis.S.t -> 'a list
val empty : 'a Lilis.S.stored
val store : 'a Lilis.S.t -> 'a Lilis.S.stored
val gennew : 'a Lilis.S.stored -> 'a Lilis.S.t
end
module Make :
functor (Lstream : S) ->
sig
val eval_lsys :
int ->
('a * string Calc.t list) Lilis.lsystem ->
('a * float array) Lstream.t
type 'a lstream = ('a * float array) Lstream.t
type 'a crules
val compress_rules :
Lilis.SymbEnv.t ->
(string * string Calc.t list) Lilis.rule list ->
int Lilis.Make.crules
val compress_post_rules :
Lilis.SymbEnv.t ->
('a * string Calc.t list) Lilis.rule list -> 'a Lilis.Make.crules
val compress_lslist :
Lilis.SymbEnv.t ->
string Lilis.stream -> (int * float array) Lstream.stored
val compress_lsys :
('a * string Calc.t list) Lilis.lsystem ->
Lilis.SymbEnv.t * (int * float array) Lstream.stored *
int Lilis.Make.crules * 'a Lilis.Make.crules
val compress_lstream :
Lilis.SymbEnv.t ->
string Lilis.Make.lstream -> int Lilis.Make.lstream
val uncompress_lstream :
Lilis.SymbEnv.t ->
int Lilis.Make.lstream -> string Lilis.Make.lstream
val map_crules :
('a -> 'b) -> 'a Lilis.Make.crules -> 'b Lilis.Make.crules
val apply :
?n:int ->
int Lilis.Make.crules ->
int Lilis.Make.lstream -> int Lilis.Make.lstream
val apply_complete :
'a Lilis.Make.crules ->
int Lilis.Make.lstream -> 'a Lilis.Make.lstream
val eval_lsys_uncompress :
int ->
('a * string Calc.t list) Lilis.lsystem ->
(string * float array) Lstream.t
val iter_complete :
((float array -> float) array -> float array -> unit)
Lilis.Make.crules -> int Lilis.Make.lstream -> unit
val eval_iter_lsys :
int ->
('a * string Calc.t list) Lilis.lsystem ->
store:bool ->
('a -> (float array -> float) array -> float array -> unit) ->
unit -> unit
val eval_fold_lsys :
int ->
('a * string Calc.t list) Lilis.lsystem ->
store:bool ->
('a -> (float array -> float) array -> 'b -> float array -> 'b) ->
'b -> 'b
end
end