Logic Structure
The logic engineer can specify the Compiler generated code to be in one of several structures: Nested If/Else, Case/Switch, and Rule List. A checkmark in the Structure sub-menu indicates which structure to generate. Only one structure may be specified at a time. The specific syntax of the various structures supported by LogicGem depends on the target programming language, e.g. the Nested If/Else syntax for Visual Basic differs from Java.
You may select the desired structure using the following method:
Click on the Compiler menu function.
Click on the Structure sub-menu to display the list of available structures.
Click on the desired structure. The Compiler menu disappears after a selection is made. The next time you select the Structure sub-menu, the structure you selected will have a check mark.
The "Nested If/Else" structure corresponds to the common nested if-then-else format of nested if-networks. Rules are not nested however in the "Rule List" format. All the necessary conditional values leading to a single rule are collectively grouped together and this rule-branch is presented separately from all the other rules. This is extremely useful to instantly verify all the required conditional inputs associated with a particular rule.
The "Case/Switch" structure corresponds to the common case-switch format used in many contemporary programming languages such as C. Under this option each isolated rule is assigned a control variable (determined by LogicGem), which then directs program execution to an appropriate switch statement corresponding to the action(s) specified in the source logic table. The Case/Switch structure is often used for performance concerns.
The "Rule List" format is commonly used with natural language compilation for business rule documentation purposes, since rules are easier to read in a list.