boolean-expression-result-type

Available in: KerML, SysML

This checks that boolean expression results are boolean valued.

Boolean expressions implicitly inherit boolean return parameters so they are ignored.

Specification

Per KerML 7.4.8.5:

The requirements on, and default for, the result parameter of a boolean expression are the same as for a predicate (see 7.4.8.4 ).

Example

bool {
    "string" // error: Boolean expression result must be boolean evaluable
}

Boolean expressions must return boolean values:

bool {
    true // ok
}

All validation rules