 We have imposed strong efficiency requirements, demanding that queries are answered in a matter of seconds. And, unlike previous work, SWORIER can assimilate dynamic changes that are provided at run time, including adding new facts, removing facts, and swapping rule sets, which also must be done in seconds. To achieve this level of efficiency, we established three techniques: extensionalization, avoiding reanalysis, and code minimization. This paper is organized as follows: First, Section 2 provides the reader with background information. Then, Section 3 describes SWORIER's system design. Section 4 addresses the challenges found in previous research. Section 5 adds a capability to handle dynamic changes. 

Section 6 analyzes and addresses the efficiency of the system, and then Section 7 discusses related work. Finally, Section 8 summarizes the paper, offers conclusions, and discusses future work.

## 2. Background

 We are investigating the interaction between rules and ontologies in the Semantic Web to determine how a standard language should best express them (Stoutenburg *et al.* 2006). In particular, to determine whether an ontology and the corresponding rules should be integrated or layered, we specified, translated, and executed information in: 1) SWRL, which integrates OWL with rules (Horrocks *et al.* 2004), and 2) RuleML layered on top of OWL. The ontologies and instances were developed in the Cerebra OWL ontology development environment,1 the SWRL 
and RuleML rules were created in a text editor, and AMZI! (2006) Prolog was used as the inference engine. We translated the constructs for both the integrated and layered approaches into Prolog code, gauging each approach in terms of effectiveness, efficiency, difficulty, restrictiveness, translatability, and suitability for deployment in an operational setting. 

![0_image_0.png](0_image_0.png)

