Aladino semantics
Aladino supports five types of values: booleans
, numbers
, strings
, arrays
and a special type _action_
.
Since the language is quite simple, it is also straightforward to perform type inference.
There are two requirements when it comes to typing:
- The type of the expression in a rule
spec
is bool. For example, the following rule is invalid:
- name: doesnt-type-check-to-bool
kind: patch
description: Rule that does not type check to bool
spec: "hello" # type error
- The type of each action to be effect. For example, the following
workflow
is invalid because of its actions:
- name: invalid-workflow
description: Invalid workflow because of action
if:
- rule: rule_1
then:
- "hello" # type error
Since, by design, you cannot define functions or variables, the usefulness of the language comes down to the set of built-in variables and functions that are provided.