An increment effect is a business-rule consequence that increases an affected attribute by a numeric operand. Its operand must be numeric, and the referenced attribute must have the same type. The attribute reference remains an explicit child AST object, allowing the effect to reuse Attribute Reference projection logic. section 14.1.3
Implement an increment effect by:
- Representing the consequence with an Increment Effect AST object containing a value and an Attribute Reference. section 14.1.3
Applying a rental discount
A rule triggered by a Saturday rental period can translate to an if statement that adds 10 to the local discount value. A second rule can add 5 when the rental starts in December; discount therefore aggregates multiple increment effects.
