Business knowledge is domain-specific information about rules, processes, and requirements. In a car-rental system, it determines price from rental period, car type, contract type, holidays, mileage, and campaigns. section 1.1
It commonly appears as business logic: conditions trigger consequences, rules interact to calculate price components, and developers implement the resulting specification. section 1.1
Typical car-rental rules include:
- Apply a 10% surcharge when the rental period contains a national holiday. section 1.1
- Apply a 5% discount to the per-day rate when the rental exceeds a whole week. section 1.1
- Apply an additional $10-per-day environmental fee when the car is a genuine gas guzzler. section 1.1
A DSL-based approach represents this knowledge as precise, machine-processable content that domain experts can write and maintain. A generator stores the content, checks it, and produces code for the Runtime. section 1.2.2 section 1.3.3 section 1.2
Table 1.1 Natural language expressing car rental business knowledge
|
If the rental period contains a national holiday, then a surcharge rate of 10% is applied to the rental price for that holiday.
|
|
If the length of the rental period exceeds a whole week, then a discount rate of 5% is applied to the per-day rate.
|
|
If the car is a genuine gas guzzler, then an additional environmental fee of $10/day is applied.
|
Inspect representative natural-language rules for car-rental pricing. section 1.1
