flâneur — a map of the web's best reading

Operators and Values — Learn TLA+

learntla.com · 3,160 words · saved by 1 readers

TLA+ Examples Reference Operators are what you’d think of as a function in a programming language. They take arguments and evaluate to expressions. Troubleshooting If you see an error like Was expecting “=====” or more Module Body, encountered "$Operator" at line $n… It’s likely because you used a single = instead of a double == when defining the operator. Operators can take any number of arguments. There are no default values, overloaded definitions, or optional arguments. If an operator has two parameters, it must always take two values. If an operator takes no values, you can write it without the parens. In this case, it’s effectively a constant. Note There are a few special forms of operators, like higher-order operators, recursive operators, and lambdas, which we will cover later. The right-hand side of an operator is called an expression. We have three keywords for structuring expressions. These are LET statements, case statements, and conditionals. We’ll be introducing the first

Operators and Values — Learn TLA+ Intro FAQ What’s New Conceptual Overview TLA+ Core Setup Operators and Values Writing Specifications Writing an Invariant Parameterizing Specs Structured Data Nondeterminism Concurrency Temporal Properties More Operators Action Properties TLA+ Modules Next Steps Topics Examples Operators PlusCal Specs Reference Glossary Standard Modules Other Resources Index Operators and Values ¶ Operators ¶ Operators are what you’d think of as a function in a programming language. They take arguments and evaluate to expressions. EXTENDS Integers MinutesToSeconds ( m )

Explore this link on the map →

related reading