Class RuleToFunction

All Implemented Interfaces:
ArithFunction, Serializable

public class RuleToFunction extends DefaultArithFunction
Wraps a rule into a function. For example the rule sum(X,Y,Z) :- Z = X+Y. is wrapped in a function sum(X,Y).

To define sum as a function the user should register it using a directive in the ASL code: { register_function("myf.sum",2,"sum") } where myf.sum is the name of the function, sum is the name of the rule (or literal, or internal action) and 2 is the function's arity.

See Also: