Compile Table

Selecting the Compile option on the Compiler menu invokes the LogicGem language compiler which translates the logic table into a desired natural or programming language. Source code is generated immediately for the active Worksheet and displayed in a Compile window. The generated code file is automatically saved into your table directory with an appropriate file extension. The file name is displayed in the Compile window’s title bar.

You may invoke the LogicGem compiler using one of the following methods:

Menu Bar

Click on the Compiler menu function.

Click on the Compile option.

View compiled code in the Compile window.

Tool Bar

Click on the icon to start a compile.

The Compiler menu also offers the Compile All option that generates source code immediately for the active and all inactive Worksheets. The generated code files are automatically saved into your table directory with the appropriate file extensions. Multiple Compile windows are opened, one for each Worksheet.

The following example shows a compile of the sample decision table using the following parameters:

Since the condition and action stubs in the sample decision table don’t have actual programming code in them, the output generated by LogicGem in this case should only be considered pseudo-code. This example illustrates the need for the logic programmer to be diligent in using valid programming language constructs in decision table stubs if LogicGem is to be used for generating programming code. Using LogicGem to develop generic business rules, on the other hand, allows the flexibility of using simple phrases for stub values.

Compiled Worksheet

The next example shows a compile of the sample decision table using the following parameters:

This type of compile is ideal for system and/or programming documentation. Since documenting the core logic of a software application is often difficult and time consuming, this LogicGem feature can result in significant time savings.

Compiled Worksheet

The third example shows a compile of the sample decision table using the following parameters:

For this compile, we’ve used a higher degree of verbosity, specifically Rule Numbers, Table, and Rule Descriptions. The result is more readable and better documented pseudo-code.

Compiled Worksheet