- left recursion, where the recursive atom is the left-most;
- right recursion, where the recursive atom is the right-most.
Expressions
Recursion
Recursive rules and graph traversal in Vadalog.
A Vadalog program or ontology is recursive if the dependency graph implied by the rules is cyclical. The simplest form of recursion is that in which the head of a rule also appears in the body (self-recursive rules).
Recursion is particularly powerful as it allows for inference based on previously inferred results.
In self-recursive rules, in case of bodies with two atoms, we distinguish between:
The expected results are:
The examples above show reachability in graphs with left recursion. For more complex examples, see Recursion patterns and Graph Analytics.

