module Evaluable: sig
.. end
Arithmetic evaluation.
Arithmetic operations correspond to those of ISO-Prolog.
(For now only a few exemplary operations are implemented.)
val init_evaluables : Term.symbol_table -> unit
Initialize the association of between evaluable functions and
symbols for the given symbol_table. This function has to be called
on a symbol table, before arithmetic evaluation can be used.
val clear_evaluables : Term.symbol_table -> unit
Remove the association of between evaluable functions and
symbols for the given symbol_table.
val eval : Term.term -> Term.context -> Term.term
eval term context
returns the result of evaluating the given
term in the given context.
Extending the System with Evaluable Functions
val register_evaluable : Term.symbol_table -> string -> int -> Term.f -> unit
register_evaluable symbol_table name arity implementation
effects that
the function name
/arity
becomes available as evaluable function.
See module term for more information.