Knowledge Base Compilation

F. D. Highland, Christine T. IwaskiwIJCAI 1989

Abstract In the late 1980s, the utility of expert systems was often constrained by the computational overhead of interpretive inference engines. This paper by F. D. Highland and C. T. Iwaskiw introduces HiPER (High Performance Embedded Reasoning), a system designed to compile knowledge bases directly into procedural code. By transforming rule networks into hard-coded logic, the authors achieved significant speed improvements—up to 11x in complex benchmarks—enabling the deployment of AI reasoning in time-critical industrial and aerospace applications.

Introduction

Expert systems represented the vanguard of artificial intelligence in the 1980s, yet their practical application in real-time environments was limited. Systems requiring rapid responses, such as flight control or industrial monitoring, found traditional "inference engines" too slow. These engines functioned as specialized interpreters, repeatedly looping through rules and facts to find matches. The resulting overhead from data structure lookups and node traversals created a performance bottleneck that specialized hardware could not easily or affordably solve.

The HiPER Methodology

The researchers at IBM proposed a paradigm shift: moving from interpretation to full compilation. Their system, HiPER, eliminates the runtime inference engine by baking reasoning logic directly into the program's procedural structure (e.g., C or PL/1).

The compilation process involves several key stages:

  1. Network Representation: Rules are first mapped to a network structure, similar to a RETE network, where nodes represent specific tests, actions, or facts.
  2. Rule Tree Partitioning: The global network is subdivided into manageable "rule tree" subnetworks.
  3. Procedural Transformation: Each rule tree is converted into a procedural function. Rather than an engine traversing a tree at runtime, the logic is implemented using a case structure within a while loop. When a condition is met, the "case index" is updated to point to the next logical node, effectively hard-coding the traversal path.
  4. Data Distribution: Specific entry-point procedures are generated. When data changes, only the relevant compiled functions are triggered, minimizing unnecessary computation.
Figure 4: The transformation process from a declarative knowledge base (A) to a structured rule tree (B) and finally to optimized procedural code (C).

Internal Logic Representation

The internal representation of these rules allows for complex logical combinations. For instance, an internal rule tree can represent nested AND/OR conditions that the compiler then flattens into efficient procedural branches. This structure ensures that the reasoning path is optimized before any code is executed.

Figure 1: An example of an internal rule tree structure used by HiPER to represent complex logical goals.

Performance and Results

The authors evaluated HiPER against KnowledgeTool, a contemporary high-performance hybrid system, using two benchmarks: the "Monkey and Bananas" NASA AI test and the "MOCA" (Maintenance Operations Center Automation) airline scheduling prototype.

HiPER demonstrated a 3x speed increase in the NASA benchmark. More impressively, in the complex MOCA application, HiPER was 11 times faster, reducing CPU time from 16.96 seconds to just 1.49 seconds. This performance gain came with a trade-off: the compiled code's memory footprint was approximately 75% larger due to the repetition of optimized logic. However, for most real-time systems of the era, this was a highly favorable exchange.

Conclusion

By merging the inference engine into the application code itself, HiPER transformed expert systems into "black box" modules easily integrated into conventional software environments. While compilation introduces some rigidity—requiring a recompile for rule changes—the massive gains in execution speed and the ability to run on standard hardware made it a landmark approach for embedding intelligence into real-time systems.

Summary updated

BibTeX
@inproceedings{highland1989knowledge,
  author = {F. D. Highland and Christine T. Iwaskiw},
  title = {{Knowledge Base Compilation}},
  booktitle = {International Joint Conference on Artificial Intelligence},
  year = {1989},
}
Figure