Conditions
Rules can be enriched with conditions in order to constrain specific values for variables of the body. Syntactically, the conditions follow the body of the rule. A condition is the comparison (>, <, ==, >=, <=, <>) of a variable (the LHS of the comparison) of the body and an expression (the RHS of the comparison).
Notice that although the comparison symbols used in conditions are partially overlapped with the symbols for comparison operators, they have different semantics. While comparison operators calculate Boolean results, comparison symbols in conditions only specify a filter.
Each rule can have multiple comma-separated conditions.
Y>=20 and classify the respective employee as rich. The expected result is:
Assignment
Rules can be enriched with assignments in order to generate specific values for existentially quantified variables of the head. Syntactically, the assignments follow the body of the rule. An assignment is the equation (=) of a variable (the LHS of the equation) of the body and an expression (the RHS of the equation).
Each rule can have multiple comma-separated assignments.
I1=="loans" and I2=="deposits" are conditions to select the balanceItems (as I1 and I2 appear in the body), whereas Z=X+Y and A=(X+Y)/2 are assignments (as Z and A do not appear in the body).
The expected result is:

