5.1.1. ASM Term

[Tip]Description

ASM terms are untyped expressions constructed from ASM constants, variables and functions using traditional operators.

[Important]Syntax

ASM expressions are constructed in the traditional way from constants, variables and ASM functions. Currently, only constants have types (string, boolean, integer, double or model element) that are evaluated at compile-time, while the type of variables and ASM functions are determined dynamically at run-time.

Operators for different types are defined as follows:

  • String operators: +, ==, !=

  • Integer and float operators: <, >, +, -, ==, !=, *, /, %, <=, >=

  • Boolean operators: ||, &&, xor, !, ==, !=

  • Multiplicity operators: ==, !=

  • Name operators ==, !=

An ASM expression, i.e. a term is either a logical term or an arithmetic term.

Remark.  If an expression is evaluated to a type where a used operator is not supported (e.g. "str1" || "str2" is invalid), a run-time exception is thrown.

Used By:  actual parameter, check condition, location, update rule, print rule, log rule, let rule, choose rule, forall rule, if rule, create rule, delete rule, copy rule, move rule, element update rule