QBQ® Logic Engine Essentials
1. QBQ® is a logic engine that:
a. Applies rules to one or more supplied values;
b. To derive further values;
c. That may be used to derive further values.
2. The input and derived values may be of any data type.
3. A rule used within the QBQ® rule engine is of the form:
If a condition is true then action a determinant to derive or constrain a value.
4. Conditions may be combined to provide increasing levels of complexity.
5. There is no limit to the level of complexity of conditions that QBQ® can handle.
6. When a new value is input or an existing value is amended the truth of all conditions that use that value are re-evaluated and the rules adjusted as required.
QBQ® Logic Engine Operation
7. The QBQ® logic engine may be considered as a component that may be introduced into any software structure.
8. The basic concept of the logic engine is shown in simplistic form in figure 1.

Figure 1. A simplistic flow through the QBQ® logic engine
9. Output values may be used in the conditions of further rules. This is shown in
Figure 2.

Figure 2. Showing the use of derived values within the QBQ® logic engine conditions
10. Rules are read by the QBQ® logic engine from a rule library as shown in figure 3.

Figure 3. Rules are read from a rule library by the QBQ® logic engine
QBQ® Logic Engine Used Interactively
11. The concept is of a question and answer dialogue where the QBQ® logic engine not only derives the final output but also selects the questions that need to be answered. This is shown in Figure 4.

Figure 4. Rules are used by the QBQ® logic engine to control the dialogue and derive output values
QBQ® Logic Engine Embedded in Application code
12. The QBQ® logic engine is embedded in application code that feeds data to the logic engine. The QBQ® logic engine processes the rules relevant to the input data and returns the output value to the application code. This is shown in Figure 5.

Figure 5. The application code invokes the QBQ® logic engine as required
QBQ® Logic Engine and the World Wide Web
13. The QBQ® logic engine is embedded in the www server and controls the output of data to the client and whatever derivation of values is required. This is shown in Figure 6.

Figure 6. The QBQ® logic engine supporting world wide web applications
Defining Rules for the QBQ® Logic Engine
14. The rules for the QBQ® logic engine are defined interactively. This is shown in
Figure 7.

Figure 7. Defining rules for the QBQ® logic engine
15. The rules may be defined in English, French or any natural or other language.
16. Within a set of rules QBQ® ensures that the rules defined are logically consistent; that is if a defined rule is inconsistent with another defined rule these rules will not be run until the inconsistency is resolved. This has the effect of debugging the rules as they are input.
Benefits of using the QBQ® Logic Engine
17. Use of natural language enables those who understand the relevant business rules to define the rules the software will follow.
18. New rules may be implemented and existing rules changed without modifying the underlying software.
19. The behaviour of the software is in the control of the business user. Bringing IT closer to the users.