Statements
TestOr
TestAnd
TestNor
TestNand
General
Matrix relational operators:
== - Equal To
!= - Not Equal To
>> - Greater Than
<< - Less Than
>= - Greater Than Or Equal To
<= - Less Than Or Equal To
The "..." symbol below equates to a single test, for example:
Integer_data == <<IntegerZero>>
Test statements should always appear after Boolean Test statements but before Context Test Statements. This is not currently enforced by the Model Compiler but will be at some point in the future.
Permitted Data Field Formats
Left hand side:
State_data
process_data
Entity.Attribute_data
Right hand side:
<<FixedOne>>
<<FixedZero>>
<<FloatOne>>
<<FloatZero>>
<<IntegerOne>>
<<IntegerZero>>
State_data
process_data
Enumeration'LITERAL
Entity.Attribute_data
Comparison data items must be compatible.
Yoda style comparisons in conditions are not allowed.
TestOr Statement
TestOr
Entity.Integer_attribute <= <<IntegerOne>>
Integer_data != <<IntegerZero>>
Entity.Integer_attribute >> Integer_data
day_of_the_week == Weekday'MONDAY
ANSI C Code Generation:
| (... || ... || ...)
|
\TestOr (
... ...
| ||
... ...
| ||
... ...
/TestOr )
TestAnd Statement
TestAnd
Entity.Integer_attribute <= <<IntegerOne>>
Integer_data != <<IntegerZero>>
Entity.Integer_attribute >> Integer_data
day_of_the_week == Weekday'MONDAY
ANSI C Code Generation:
| (... && ... && ...)
|
\TestAnd (
... ...
| &&
... ...
| &&
... ...
/TestAnd )
TestNor Statement
TestNor
Entity.Integer_attribute <= <<IntegerOne>>
Integer_data != <<IntegerZero>>
Entity.Integer_attribute >> Integer_data
day_of_the_week == Weekday'MONDAY
ANSI C Code Generation:
| !(... || ... || ...)
|
\TestNor !(
... ...
| ||
... ...
| ||
... ...
/TestNor )
TestNand Statement
TestNand
Entity.Integer_attribute <= <<IntegerOne>>
Integer_data != <<IntegerZero>>
Entity.Integer_attribute >> Integer_data
day_of_the_week == Weekday'MONDAY
ANSI C Code Generation:
| !(... && ... && ...)
|
\TestNand !(
... ...
| &&
... ...
| &&
... ...
/TestNand )
Example
| (
| (Aaaa == Bbbb or Cccc == Dddd) and
| (Mmmm == Nnnn or Wxxx == Xxxx) and
| (
| (Rrrr == Ssss) and
| (Eeee == Ffff or Gggg == Hhhh)
| ) and
| (
| (Oooo == Pppp) or
| not (Yyyy == Zzzz or Uuuu == Vvvv)
| )
| )
|
\ConditionAnd (
\TestOr (
Aaaa == Bbbb Aaaa == Bbbb
| ||
Cccc == Dddd Cccc == Dddd
/TestOr )
| &&
\TestOr (
Mmmm == Nnnn Mmmm == Nnnn
| ||
Wxxx == Xxxx Wxxx == Xxxx
/TestOr )
| &&
\ConditionAnd (
\TestAnd (
Rrrr == Ssss Rrrr == Ssss
/TestAnd )
| &&
\TestOr (
Eeee == Ffff Eeee == Ffff
| ||
Gggg == Hhhh Gggg == Hhhh
/TestOr )
/ConditionAnd )
| &&
\ConditionOr (
\TestOr (
Oooo == Pppp Oooo == Pppp
/TestOr )
| ||
\ConditionNand !(
\TestOr (
Yyyy == Zzzz Yyyy == Zzzz
| ||
Uuuu == Vvvv Uuuu == Vvvv
/TestOr )
/ConditionNand )
/ConditionOr )
/ConditionAnd )
|