module Structure:sig
..end
module IntMap:Map.S
with type key = int
module StringMap:Map.S
with type key = string
module Elems:Set.S
with type elt = int
val add_elems : int list -> Elems.t -> Elems.t
val elems_of_list : int list -> Elems.t
module Tuples:Set.S
with type elt = int array
val add_tuples : int array list -> Tuples.t -> Tuples.t
val tuples_of_list : int array list -> Tuples.t
type
structure
names
are assumed to be named
by their decimal numeral.val compare_elems : int -> int -> int
Comparison function for structures.
val compare : structure -> structure -> int
val equal : structure -> structure -> bool
val elements : structure -> int list
val elems : structure -> Elems.t
val constants : structure -> (string * int) list
val nbr_elems : structure -> int
val relations : structure -> Tuples.t StringMap.t
val functions : structure -> float IntMap.t StringMap.t
val elem_nbr : structure -> string -> int
val elem_name : structure -> int -> string
val names : structure -> int StringMap.t
val inv_names : structure -> string IntMap.t
val replace_names : structure ->
int StringMap.t -> string IntMap.t -> structure
val rel_size : structure -> string -> int
val rev_string_to_int_map : int StringMap.t -> string IntMap.t
val rev_int_to_string_map : string IntMap.t -> int StringMap.t
val empty_structure : unit -> structure
val default_circle_structure : unit -> structure
val empty_with_signat : (string * int) list -> structure
val incident : structure -> int -> (string * int array list) list
e
in struc
.val check_rel : structure -> string -> int array -> bool
val rel_graph : string -> structure -> Tuples.t
val rel_incidence : string -> structure -> Tuples.t array
val fun_val : structure -> string -> int -> float
f
on e
in struc
.val elems_with_val : structure -> string -> float -> int list
f
has value x
in struc
.val model_val : structure -> string -> int -> structure
f
to e
in struc
.val add_models : structure ->
string -> (int * structure) list -> structure
f
in struc
, replacing previous.val f_signature : structure -> string list
val rel_signature : structure -> (string * int) list
val rel_sizes : structure -> (string * int) list
val elem_str : structure -> int -> string
e
as string.val rel_str : ?print_arity:bool ->
structure -> string -> Tuples.t -> string
rel_name
with tuples ts
as string.
Unless print_arity
is false, print the arity if ts
is empty.val ext_str : ?show_empty:bool -> structure -> string
struc
as string, in extensive form (not using
condensed representations like boards). If show_empty
is false,
do not print the signatures of empty relations.val str : ?show_empty:bool -> ?show_models:bool -> structure -> string
struc
as string.val fprint_rel : ?print_arity:bool ->
structure ->
Format.formatter -> string * Tuples.t -> unit
ts
.
Unless print_arity
is false, print the arity if ts
is empty.val fprint_fun : structure ->
Format.formatter -> string * float IntMap.t -> unit
val fprint_ext_structure : show_empty:bool -> Format.formatter -> structure -> unit
val fprint : show_empty:bool -> Format.formatter -> structure -> unit
val print : ?show_empty:bool -> structure -> unit
val sprint : ?show_empty:bool -> structure -> string
val board_elem_coords : string -> int * int
Not_found
if the name is not of proper format.val board_coords_name : int * int -> string
Not_found
if the coordinates are out of bounds.val compare_diff : ?cmp_funs:(float -> float -> bool) ->
structure -> structure -> bool * string
val diff_elems : structure -> structure -> (int * string list) list
val add_constant : structure -> string -> int -> structure
exception Structure_mismatch of string
val add_elem : structure -> ?name:string -> int -> structure
e
to struc
if it is not yet there. Return new structure.val add_new_elem : structure -> ?name:string -> unit -> structure * int
struc
, return the updated structure and the
element.val find_elem : structure -> string -> int
val find_or_new_elem : structure -> string -> structure * int
val add_rel_name : string -> int -> structure -> structure
rn
exists in struc
, add if needed.val add_rel : structure -> string -> int array -> structure
tp
to relation rn
in structure struc
.val add_rel_named_elems : structure -> string -> string array -> structure
tp
to relation rn
in structure struc
.val unsafe_add_rel : structure -> string -> int array -> structure
tp
to relation rn
in structure struc
without
checking whether it and its elements already exist in the structure
and without checking arity.val add_rels : structure -> string -> int array list -> structure
tps
to relation rn
in structure struc
.val unsafe_add_rels : structure -> string -> int array list -> structure
tps
to relation rn
in structure struc
without
checking for elements existence and arity matching.val free_for_rel : string -> int -> structure
val add_fun : structure -> string -> int * float -> structure
e
-> x
to function fn
in structure struc
.val add_funs : structure -> string -> (int * float) list -> structure
assgns
to fn
in structure struc
.val change_fun : structure -> string -> string -> float -> structure
fn
assignment for element e
to x
in struc
.val change_fun_int : structure -> string -> int -> float -> structure
val create_from_lists : ?struc:structure ->
string list ->
(string * int option * string array list, string * string) Aux.choice list ->
(string * (string * float) list) list -> structure
val create_from_lists_position : ?struc:structure ->
string list ->
(string * int option * string array list, string * string) Aux.choice list ->
structure
val create_from_lists_range : float ->
?struc:structure ->
string list ->
(string * int option * string array list, string * string) Aux.choice list ->
structure
val del_rel : structure -> string -> int array -> structure
tp
from relation rn
in structure struc
.val del_rels : structure -> string -> int array list -> structure
tps
from relation rn
in structure struc
.val clear_rels : ?remove_from_sig:bool ->
structure -> (string -> bool) -> structure
val clear_fun : structure -> string -> structure
struc
.val clear_names : structure -> structure
val del_elem : structure -> int -> structure
e
and all incident relation tuples from struc
.val del_elems : structure ->
int list -> structure * (string * int array list) list
es
and all incident relation tuples from
struc
. Return the resulting structure and deleted relation tuples.val gc_elems : ?ignore_funs:bool -> structure -> structure
ignore_funs
is given).val diffrels_struc : structure -> structure -> string list option
val trs_set_struc : structure -> string * Term.term * Term.term -> structure
val struc_from_trs : string -> string * structure
exception Board_parse_error of string
val parse_board : ?row_col_rels:string * string ->
?pos_initial:float * float ->
?pos_increment:float * float ->
?struc:structure -> string -> structure