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: doesntTypeCheckToBool
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 gate is invalid because of its actions:
- name: invalidGate
description: Invalid gate because of action
patchRules:
- rule: rule_1
actions:
- "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.
Updated 2 months ago
Did this page help you?