Abstract
The development of complex expert systems requires the integration of diverse programming paradigms to handle varied knowledge structures and reasoning strategies. This paper introduces PEACE (Prolog-based Engineering Applications Environment), a system that amalgamates object-oriented, rule-oriented, and data-oriented programming within a logic programming framework. Central to PEACE is the relation-oriented paradigm, which elevates relationships between objects to first-class entities. This approach facilitates flexible inheritance, bi-directional link maintenance, and improved knowledge base readability.
Introduction
In the mid-1980s, the construction of expert systems faced significant hurdles in representing real-world knowledge. Traditional tools, often Lisp-based, frequently suffered from rigid inference mechanisms and poor readability. Specifically, a single uniform inference engine often failed to accommodate the diverse reasoning strategies required for different application components. Furthermore, the separation of inference rules from target data objects made knowledge bases difficult to maintain.
While Prolog offered powerful logic programming capabilities, it lacked native support for object-oriented structures and the "demons" (triggers) essential for data-oriented programming. PEACE was developed to bridge these gaps, amalgamating these paradigms into Prolog without sacrificing its core strengths of backtracking and unification.
The PEACE System and the Relation-Oriented Paradigm
PEACE represents a knowledge base as a semantic network where every entity is an object. Unlike traditional frame-based systems where relations like isa or part-of are hard-coded, PEACE allows users to define "relation-objects." These objects specify their own properties, such as inverse relations (e.g., parent is the inverse of child) and specific inheritance rules.
As shown in Figure 1, the system can represent complex interdependencies. For instance, defining a parent relation automatically allows the system to infer the child relation. This bi-directional link maintenance ensures consistency across the network without requiring manual updates for every reciprocal link.
Key Technical Features
- Meta-Programming: PEACE is implemented using a "Prolog-in-Prolog" meta-interpreter, allowing the system to redefine how goals are satisfied and how inheritance is handled.
- Uniform Object Representation: The system removes the strict distinction between "classes" and "instances." An object's role is defined dynamically by its relations to other objects, allowing for more flexible "flat" networks common in engineering domains.
- Demons and Methods: Data-oriented programming is supported through "demons" (e.g.,
when_emptytriggers to calculate default values), while object-oriented methods are implemented as Prolog predicates.
Implementation and Practical Application
The PEACE environment provides a robust interface for querying and visualizing these complex relational structures. By leveraging Prolog's built-in clause-indexing, the system maintains efficient performance even when navigating deep inheritance chains or large semantic networks.
Figure 2 illustrates the system's ability to display relational hierarchies and execute logic-based queries. Users can utilize standard Prolog features like setof or backtracking to perform complex searches, such as identifying all male relatives of a specific individual within the family network.
The practical utility of PEACE was demonstrated in the SHOOTX diagnostic expert system, used for fault diagnosis in the NEAX61 ESS telecommunications switch. PEACE proved particularly effective in representing the intricate "symptom-hypothesis" relationships and the physical topology of the switching equipment.
Conclusion
PEACE successfully demonstrates that multiple programming paradigms can coexist within a logic programming environment. By treating relations as first-class citizens and utilizing a meta-interpreter, the system provides a flexible and powerful tool for building expert systems. While the meta-programming approach introduces some performance overhead, the gains in representational power and maintainability made it a viable solution for complex engineering applications of the era.
Summary updated