When an expert system is falling into an impasse, it needs to exchange with other expert systems the information about inference engines and knowledge bases. The information must be lifted from the implementation details to some proper conceptual details acceptable to be exchanged.

In the field of knowledge engineering, the methodology has recently been developed to specify the semantics of expert systems free from implementation details. CommonKADS (J.Breuker and W.Van de Velde ,94) is a well-organized knowledge library which provide inference primitives called canonical functions, such as Select, Compare, Merge, etc. Although we describe inference engines similar to model-based diagnostic engines later in this paper, the following three functions turn out to be more useful: Propagate, Replace and Predict.

Furthermore, to say more important things, canonical functions are a little too general to be exchanged to refine inference engines and knowledge bases. In refining inference engines, generic procedural information, such as how to construct inference primitives, is often a key factor. Because canonical functions have only declarative semantics using (extended) first-order calculus, procedural semantics are missing and so have nothing about how to construct inference engines. Thus we put generic procedural semantics on canonical functions in order to get the level of canonical functions to a conceptually acceptable level of detail. We call canonical functions with generic procedure semantics "inference primitive structure templates (IPST)" , as shown in Figure 1. One canonical function has been divided into several templates, from the point of both the features of internal structures of inference primitive and the relationship between input and output, which may be one to one or one to many.

**Figure 1:** Inference Primitive Structure Templates as a Common Task Ontology

Sat Sep 28 20:16:55 JST 1996