Optimization of Real-Time Rule-Based Expert Systems

Contact Information

Albert Mo Kim Cheng
Real-Time Systems Laboratory
Department of Computer Science
University of Houston--University ParkDepartment of Computer Science
Houston, TX 77204-3475
Phone: (713) 743-3353
Fax : (713) 743-3335
Email: cheng@cs.uh.edu

 

WWW PAGE

http://www.cs.uh.edu/~acheng/acheng.html

Keywords

real-time systems, expert systems, rule-based systems, analysis, optimization, synthesis

Project Award Information

3 years, year 3, ``Optimization of Real-Time Rule-Based Expert Systems.''

Project Summary

The major focus of this research is to develop the scientific foundation and to implement practical tools for optimizing and synthesizing rule-based expert systems to meet specified response time constraints. Real-time rule-based expert systems are embedded artificial intelligence (AI) systems increasingly used in many applications, such as airplane avionics, medical monitoring instruments, smart robots, space vehicles, and other safety critical applications. In addition to functional correctness, these systems must also satisfy stringent timing constraints. The result of missing a deadline in these systems may be catastrophic. If a given rule-based system cannot deliver an adequate performance in bounded time, then it has to be optimized or resynthesized. The first part of the project investigates several approaches (state-space-based and semantics-based) for optimizing the rule base of expert systems. The second part of the project investigates the optimization of the match phase, which has a highly unpredictable runtime.

Goals, Objectives, and Targeted Activities

Several steps for rule base optimization are accomplished this year (1998-1999): (1) development of a new run-time dynamic optimizer for real-time EQL rule-based systems to complement our static optimizer, (2) more refinement of our static EQL optimization algorithm with bidirectional search; (3) implementation of parallel sorting algorithms on the IBM SP2 supercomputer for use in parallel matching of condition elements in rules; and (4) derivation of new heuristics for rearranging the condition elements in rules to reduce the match time.

Indication of Success

To complement our static optimizer [Zupan & Cheng 98], we have developed a new run-time dynamic optimizer for real-time EQL rule-based systems to satisfy the specified response time constraints. Unlike the static optimization algorithm which optimizes a program before its execution, the dynamic algorithm tries to minimize the number of rules to be executed at run-time. The new run-time optimizer constructs a predicate dependency list, which consists of a predicate, an active rule list, and an inactive rule list, for each predicate in a rule-based program. It then generates an inactive rule list by putting all false rules in a predicate dependency list together, and dynamically selects rules for execution at run-time.

The optimized program executes only selected rules at run-time but has the same semantics as the original program. We implemented and evaluated the performance of the proposed algorithm using both synthetic and industrial real-time rule-based programs. Though the dynamic optimizer can be applied to any real-time rule-based system, we use EQL real-time systems in the implementation so that we can compare the performance with our static algorithm. The performance evaluation shows that the dynamic optimizer reduces response time as well as the number of rules and predicates significantly more than that achieved by using the static optimizer alone in many cases.

We have modified the optimization method [Zupan & Cheng 98] that we have developed earlier for EQL systems to optimize MRL (Macro Rule-based Language) systems. In particular, we implemented this method to optimize MRL systems after their corresponding state space graphs are constructed. Since the time and space complexity of bidirectional search (O(b^(d/2))) is better than breadth-first search's (O(b^d)), we use bidirection and bidirectional breadth-first search strategies instead of the original bottom-up and breadth-first search strategies employed earlier.

To further reduce the execution time of rule-based systems, we have been investigating parallelization of these systems. Earlier, we have developed techniques for rule-splitting to achieve a higher degree of parallelism while avoiding conflicts caused by parallel rule-firing. During this past year, we have studied the problem of implementing parallel OPS5 on the IBM SP2 supercomputer. Since up to 90% of the execution time is spent on matching (in the Rete network in the case of OPS5), improvement in the parallelization of the match phase is essential.

There are many comparisons in this match phase, especially in the two-input nodes. We first experimented with a good sorting algorithm to reduce the comparison time in two-input nodes. Performing comparison in two-input nodes is similar to performing a joint of two tables of data. If each class of working memory elements can be sorted in advance, then we can save more time when searching the required data. We implemented several alternatives of parallel sorting. We are attempting to find a good sorting algorithm which will give the best performance on IBM SP2 and can be used in the OPS5's rule interpreter.

Project Impact and Output

Project References

Area Background

Our research considers the case where an expert system forms the decision module of a real-time monitoring and controlling system. This real-time system takes sensor input readings periodically, and the embedded expert system must produce, based on these input values and state values from previous invocations of the expert system, an output decision which ensures the safety and progress of the real-time system and its environment prior to the taking of the next sensor input values. Thus, the upper bound on the expert system's execution time cannot exceed the length of the period between two consecutive sensor input readings. Therefore, the first objective is to determine before run-time a tight upper bound on the execution time of the expert system in every invocation. The second objective is to optimize the expert system by modifying or resynthesizing the rule base if the execution time is found to exceed the specified timing constraint. The most related area to our work is database systems, especially those with timing constraints or temporal characteristics (real-time, active, or temporal databases). Certain techniques for the analysis and optimization of rules can be applied to database queries and vice versa.

Area References

Potential Related Projects

I would like to collaborate with group(s) working on the analysis and optimization of real-time expert and database systems.