deletions, or modifications of rules at this time, it can switch between predefined sets of rules on the fly. Previously there has been little work involving rules and dynamic changes. We have built our work on the foundation developed in a paper written by Voltz *et al.* (2003). We have addressed five of the problems that this paper suggested were unsolvable. 1) By defining logical negation in Prolog, which makes it possible to satisfy the open world assumption, it is now possible to properly capture the semantics of complementary classes, as well as disjoint classes. 2) Disjunction in the head of a rule is captured with the use of a new disjunctive operator. 3) The disjunctive operator enables the analysis of enumerated classes. 4) Through an offline analysis of the given ontologies, SWORIER can automatically develop rules that enforce all and only the given cardinality constraints. 5) Using a different syntax to express OWL facts in Prolog, addressing properties of equivalent individuals has been simplified. Also, we dealt with three other issues: duplicate facts, cyclical hierarchies, and anonymous classes. We have also introduced alternative approaches for dealing with inconsistencies in the given information. When an inconsistency is discovered, it is always possible to simply send an error message to the developer. However, for many inconsistencies, the possibility of fixing the problem automatically is available. And, with existential constraints and minimum cardinality constraints, this can be done by adding new facts to the knowledge base or by applying the skolemization method. We have not yet confirmed which of these alternatives is preferable in which situations. We expect that by introducing pragmas (instructions/annotations to the knowledge compilation process), we can allow the developer to choose the specific behavior he/she wants. 

 Efficiency problems have been addressed through 1) extensionalization, which is a tabling method that converts a set of rules and facts into a set of facts, 2) avoiding reanalysis, which saves results the first time they are determined to avoid running the same costly evaluation again, and 3) code minimization, which deletes rules that are unnecessary, for both offline and online processing. In our experiments, the offline compilation process now completes in 6.5 hours, two dynamic changes are incorporated into the knowledge base in 10 milliseconds, and two queries can be answered in only 130 milliseconds. 

 In the future, we hope to analyze and convert the developer's rules into appropriately optimized rules, perhaps via the use of rewrite rules as for magic sets optimization and related rule techniques for logic queries (Cadoli *et al.* 1999; Sippu & Soisalon-Soininen 1996). (See Section 3.3.) Also, the ideas presented in Section 4 concerning multiple terms in the head, equivalent individuals, cardinality issues, cyclic hierachies, and anonymous classes have not yet been implemented. In addition, there are several primitives in OWL that are not yet implemented in SWORIER, including: cardinality, or, and subPropertyOf,5 and the logicNot predicate, introduced in Section 4.1 is only partially implemented.

## Acknowledgments

The authors' affiliation with The MITRE Corporation is provided for identification purposes only, and is not intended to convey or imply MITRE's concurrence with, or support for, the positions, opinions or viewpoints expressed by the authors. We note that the views expressed in this paper are those of the authors alone and do not reflect the official policy or position of any other organization or individual. 