Function calls
You can use Alloy function calls to create richer expressions.
Functions take zero or more arguments as input and always return a single value as output. You can’t construct functions. You can call functions from the standard library or export them from a component.
If a function fails, the expression isn’t evaluated, and the system reports an error.
Standard library functions
The Alloy configuration syntax includes a standard library of functions. Some functions interact with the host system, for example, reading from an environment variable. Other functions enable more complex expressions, for example, concatenating arrays or decoding JSON strings into objects.
sys.env("HOME")
encoding.from_json(local.file.cfg.content)["namespace"]