Expressions
An expression is inductively defined as follows:
- a constant is an expression
- a variable is an expression
- a proper combination of expressions (by means of operators) is an expression
Expressions appear in specific parts of a Vadalog program, namely in operators, conditions and assignments.
Topics in this Section
This section covers all aspects of working with expressions in Vadalog:
- Operators - Comparison, arithmetic, boolean, logical, and string operators
- Negation - Negating truth values and safe usage patterns
- Conditions & Assignments - Constraining values and generating new ones
- Recursion - Recursive rules and graph traversal
- Aggregations - Monotonic aggregations for computing sums, counts, min/max
- Collections - Working with arrays, lists, and sets
- Specialized Functions - Math, hash, date/time, type casting, and interval functions
- AI Functions - Embeddings and LLM integration
Each topic includes comprehensive examples showing practical usage in Vadalog programs.