A function can be defined by calling Kure_FunctionNew.
A typical call would be:
Kure_FunctionNew (relManager,
"equaltrans(Rel1, Rel2)=eq(Rel1, Rel2^)");
Here, a function was defined, which uses two relations as parameters
and returns a relation with one row and one column, which is empty if
the second relation is not identical to the transposed first relation,
and which is otherwise filled.
In the same way the function Kure_ProgramNew inserts a new
program into the manager.
It is also possible to read functions and programs out of files.
Such a file can be read by a call of the function
Kure_ProgramFileRead, which will return 0 if an error occured
during the reading, and 1 otherwise.
The base functions of KURE and all new functions and programs could
be used in relational terms in order to calculate with relations.
Such a calculation is started by the function Kure_EvaluateTerm,
which returns 0 if an error occured, and 1 otherwise.
A typical call would be:
Kure_EvaluateTerm (relManager, "epsi(O(P)^)", "E");
In this case, the result of the term epsi(O(P)^) will be
assigned to the relation E.
If the relation E was not contained in relManager, than
a new relation gets allocated. Otherwise, the relation E will
be overwritten by the result of the evaluation.