2.1.8. Check Condition

[Tip]Description

A check condition is part of a pattern body.

It defines a boolean condition as an ASM term that must evaluate to true for a successful match of the pattern.

[Important]Syntax
CheckConditionAST ::= check ( LogicalTermAST )	
	

A check condition is composed of the keyword and an ASM logical term in braces. The ASM logical terms is composed of pattern variables, as well as constants and ASM function locations, etc.

[Note]Semantics

The matching of the container pattern succeeds only if this check condition evaluates to true.

From a semantic point of view, this check is carried out after matching the container pattern itself, i.e. we assume that all pattern variables are successfully bound to model elements (otherwise the pattern matching process should already fail).

Defined In:  pattern body