Authors: Laurence Vignollet and Ruddy Lelouche
Abstract
Validating Knowledge-Based Systems (KBS) requires ensuring that automatically generated test cases achieve their intended coverage when processed by an inference engine. This paper presents an enhancement to the SYCOJET tool, which accounts for the engine's control strategy—such as rule prioritization and early termination—to bridge the gap between structural analysis and actual execution. By utilizing ATMS-like labeling and strategy-aware selection algorithms, the authors demonstrate a method for generating more effective and reliable test cases for complex KBS environments.
Introduction
Testing a Knowledge-Based System (KBS) is fundamentally different from testing traditional software. It is not merely a matter of checking rule correctness but understanding how the inference engine navigates those rules. Most automated testing tools operate under the assumption of an "exhaustive" engine that derives every possible fact. However, real-world engines often employ specific control strategies, such as stopping at the first conclusion or prioritizing rules based on weights. If a testing tool generates data to trigger a specific rule, but the engine's internal logic prioritizes a different path, the test case fails its objective. This paper addresses the discrepancy between theoretical test coverage and actual coverage achieved during system execution.
Methodology
The authors propose enhancing the SYCOJET tool through two primary technical approaches:
ATMS-like Labeling
They adapt De Kleer’s Assumption-based Truth Maintenance System (ATMS) to create "deduction labels." These labels map every terminal fact (a final conclusion) back to its "deduction environments"—the minimal sets of problem facts and rules required to reach that conclusion. This allows the system to summarize the deductive capability of a knowledge base without exhaustive permutation testing.
Strategy-Aware Selection
To handle the influence of the inference engine, the authors developed two selection modes:
- For Known Strategies: When the engine uses rule weights and a "stop at first terminal" approach, a formal mathematical framework is used to identify "potentially conflicting environments." This predicts if a test case will be diverted by a higher-priority rule.
- For Unknown Strategies: An empirical, iterative algorithm is used. The tool generates a test case, executes it, analyzes the resulting trace, and updates its generation criteria based on what was actually covered.
Key Insights and Results
A significant finding is the "Subset Trap": if the facts required for one environment are a subset of another, the engine may trigger the smaller set and terminate before reaching the intended logic of the larger set. Furthermore, the authors note that certain testing goals, such as executing every rule at least once, may be mathematically impossible depending on the engine's strategy (e.g., if a lower-weighted rule shares premises with a higher-weighted one).
Key results include:
- Formal Proofs: The authors provide theorems establishing necessary and sufficient conditions for whether a deduction path will be followed under a weighted-rule strategy.
- Practical Application: The methods have been successfully applied to real-world systems like GIBUS, developed for the European Space Agency.
- Operational Tooling: SYCOJET is now operational for KBSs using first-order logic, providing a practical solution for system validation.
Limitations and Future Work
The current framework assumes monotonic logic, where facts are only added and never retracted. Future research will focus on extending these methods to non-monotonic systems and optimizing the labeling process by using strategy knowledge to "prune" search trees during the initial construction phase, thereby reducing computational overhead.
Summary updated