LogicGem has the ability to compile a decision table into human-readable text and application source code. For documentation purposes, LogicGem can generate text to describe the rules defined in the table. Software developers can use LogicGem to generate source code that is compatible with their programming language of choice.
LogicGem has the ability to generate text which describes the rules defined in the decision table and describe those how rules are applied in plain text. The following natural languages are supported:
It is important to note that selecting a natural language option in LogicGem only determines what words are used to describe how the conditions and actions are connected. LogicGem will not perform a full translation of the rules you define from one language to another. For example, if you enter your conditions and actions using English phrases and describe the rules in English, then you should select English as the output language.
All natural language output is saved in the same folder as the LogicGem decision table with a .txt extension.
LogicGem supports a wide variety of programming languages and will generate source code that matches their syntax and coding conventions. The source code is saved in the same folder as the LogicGem decision table, with an extension that matches what is commonly used for that language. The following programming languages are supported:
|MatLab / Octave
|Visual Basic 6.0 (Classic)
When you have LogicGem compile your decision table to source code, you have three choices as to how you want that code structured:
- Nested If/Else
This structure corresponds to the common nested if-then-else 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.
This structure is used in many contemporary programming languages such as C#. With this option, each isolated rule is assigned a control variable generated by LogicGem, which then directs program execution to an appropriate switch statement corresponding to the actions specified in the source logic table. If the language you choose does not support case/switch statements, a warning message will be displayed.
- Rule List
This structure uses if-then-else statements, but instead of being nested they are presented as a flat list of conditions and actions, with all if-then comparisons done on a single level. This format is commonly used with natural language output because it can describe the rules in a list that is easier to read. However, for source code, it’s generally recommended you use nested if-then-else statements for greater readability.
When you generate your source code, you also have the option to include the rule numbers, rule names and statistics that describe how the code was generated. This information is included as comments and will not affect the source code itself.