Skip to main content
Version: 6.x

Logical operators (AND, OR, NOT, XOR)

Logical operators create properties that consider their arguments as logical values of class BOOLEAN and whose return value is also a value of class BOOLEAN. If the value of an argument of an logical operator is not NULL, then the argument is treated as the value TRUE of class BOOLEAN, otherwise as NULL.

The platform currently supports the following logical operators:

OperatorNameDescriptionExampleResult
ANDConjunctionTakes two operands and returns TRUE if both operands are non-NULLTRUE AND TRUETRUE
ORDisjunctionTakes two operands and returns TRUE if either operand is non-NULLNULL OR TRUETRUE
NOTNegationTakes one operand and returns TRUE if the operands is NULLNOT TRUENULL
XORExceptionTakes two operands and returns TRUE if exactly one operand is non-NULLTRUE XOR TRUENULL

Language

Description of logical operator syntax.

Examples

likes = DATA BOOLEAN (Person, Person);
likes(Person a, Person b, Person c) = likes(a, b) AND likes(a, c);
outOfInterval1(value, left, right) = value < left OR value > right;
outOfInterval2(value, left, right) = NOT (value >= left AND value <= right);