Rules employ builtins to do all tests and actions other than simple triple matches and triple creation.
Builtins can be invoked in two contexts. In the head of forward rules they perform some action based on the variable bindings generated by the body and additional context (the graph being reasoned over, the set of triples bound by the body). In the body of rules they perform tests, and additional variable bindings.
The mapping from the rule definition (which uses functors to hold the parsed call) to the java implementation of the builtin is done via the {@link BuiltinRegistry BuiltinRegistry} which canbe user extended.