AreOrderComparable🔗

Type: Transpilable verification function
Check that left and right can be compared by order.

The operands need to be comparable for (in)equality (see are_equality_comparable), but booleans can not be ordered.

See: https://industrialdigitaltwin.io/aas-specifications/IDTA-01002/v3.2/query-language.html#_json_schema

left🔗
First operand of the comparison
right🔗
Second operand of the comparison
Return🔗
True if the operands can be compared by order

Code

return (
    are_equality_comparable(left, right)
    and not isinstance(left, (Boolean_literal, Boolean_cast))
    and not isinstance(right, (Boolean_literal, Boolean_cast))
)