Journal of Artificial Intelligence Research 11 (1999), pp. 199-240. Submitted 7/98; published 9/99.
© 1999 AI Access Foundation and Morgan Kaufmann Publishers. All rights reserved.

Unifying Class-Based Representation Formalisms

Diego Calvanese, Maurizio Lenzerini, Daniele Nardi
Dipartimento di Informatica e Sistemistica
Università di Roma ``La Sapienza''
Via Salaria 113, I-00198 Roma, Italy
{calvanese, lenzerini, nardi}@dis.uniroma1.it

Abstract:

The notion of class is ubiquitous in computer science and is central in many formalisms for the representation of structured knowledge used both in knowledge representation and in databases. In this paper we study the basic issues underlying such representation formalisms and single out both their common characteristics and their distinguishing features. Such investigation leads us to propose a unifying framework in which we are able to capture the fundamental aspects of several representation languages used in different contexts. The proposed formalism is expressed in the style of description logics, which have been introduced in knowledge representation as a means to provide a semantically well-founded basis for the structural aspects of knowledge representation systems. The description logic considered in this paper is a subset of first order logic with nice computational characteristics. It is quite expressive and features a novel combination of constructs that has not been studied before. The distinguishing constructs are number restrictions, which generalize existence and functional dependencies, inverse roles, which allow one to refer to the inverse of a relationship, and possibly cyclic assertions, which are necessary for capturing real world domains. We are able to show that it is precisely such combination of constructs that makes our logic powerful enough to model the essential set of features for defining class structures that are common to frame systems, object-oriented database languages, and semantic data models. As a consequence of the established correspondences, several significant extensions of each of the above formalisms become available. The high expressiveness of the logic we propose and the need for capturing the reasoning in different contexts forces us to distinguish between unrestricted and finite model reasoning. A notable feature of our proposal is that reasoning in both cases is decidable. We argue that, by virtue of the high expressive power and of the associated reasoning capabilities on both unrestricted and finite models, our logic provides a common core for class-based representation formalisms.

1. Introduction

In many fields of computer science we find formalisms for the representation of objects and classes [65]. Generally speaking, an object denotes an element of the domain of interest, and a class denotes a set of objects with common characteristics. We use the term ``class-based representation formalism'' to refer to a formalism that allows one to express several kinds of relationships and constraints (e.g., subclass constraints) holding among the classes that are meaningful in a set of applications. Moreover, class-based formalisms aim at taking advantage of the class structure in order to provide various information, such as whether a class is consistent, i.e., it admits at least one object, whether a class is a subclass of another class, and more generally, whether a given constraint holds between a given set of classes. From the above characterization, it should be clear that the formalisms referred to in this paper deal only with the structural aspects of objects and classes, and do not include any features for the specification of behavioral properties of objects.

Three main families of class-based formalisms are identified in this paper. The first one comes from knowledge representation and in particular from the work on semantic networks and frames (see for example [61,71]). The second one originates in the field of databases and in particular from the work on semantic data models (see for example [52]). The third one arises from the work on types in programming languages and object-oriented systems (see for example [58]).

In the past there have been several attempts to establish relationships among the various families of class-based formalisms (see Section 6 for a brief survey). The proposed solutions are not fully general and a formalism capturing both the modeling constructs and the reasoning techniques for all the above families is still missing. In this paper we address this problem by proposing a class-based representation formalism, based on description logics [17,70,43], and by using it for comparing other formalisms.

In description logics, structured knowledge is described by means of so called concepts and roles, which denote unary and binary predicates, respectively. Starting from a set of atomic symbols one can build complex concept and role expressions by applying suitable constructors which characterize a description logic. Formally, concepts are interpreted as subsets of a domain and roles as binary relations over that domain, and all constructs are equipped with a precise set-theoretic semantics. The most common constructs include boolean operations on concepts, and quantification over roles. For example, the concept $\texttt{Person}\sqcap \forall \texttt{child} \mbox{\bf .}\texttt{Male}$, denotes the set of individuals that are instances of the concept Person and are connected through the role child only to instances of the concept Male, while the concept $\exists \texttt{child}$ denotes all individuals that are connected through the role child to some individual. Further constructs that have been considered important include more general forms of quantification, number restrictions, which allow one to state limits on the number of connections that an individual may have via a certain role, and constructs on roles, such as intersection, concatenation and inverse. A description logic knowledge base, expressing the intensional knowledge about the modeled domain, is built by stating inclusion assertions between concepts, which have to be satisfied by the models of the knowledge base. The assertions are used to specify necessary and/or necessary and sufficient conditions for individuals to be instances of certain concepts. Reasoning on such knowledge bases includes the detection of inconsistencies in the knowledge base itself, determining whether a concept can be populated in a model of the knowledge base, and checking subsumption, i.e., whether all instances of a concept are necessarily also instances of another concept in all models of the knowledge base.

In this paper we propose a description logic called ALUNI, which is quite expressive and includes a novel combination of constructs, including number restrictions, inverse roles, and inclusion assertions with no restrictions on cycles. Such features make ALUNI powerful enough to provide a unified framework for frame systems, object-oriented languages, and semantic data models. We show this by establishing a precise correspondence with a frame-based language in the style of the one proposed by [46], with the Entity-Relationship model [35], and with an object-oriented language in the style of the one introduced by [2]. More specifically, we identify the most relevant features to model classes in each of the cited settings and show that a specification in any of those class-based formalisms can be equivalently expressed as a knowledge base in ALUNI. In this way, we are able to identify which are the commonalities among the families and which are the specificities of each family. Therefore, even though there are specific features of every family that are not addressed by ALUNI, we are able to show that the formalism proposed in this paper provides important features that are currently missing in each family, although their relevance has often been stressed. In this sense, our unifying framework points out possible developments for the languages belonging to all the three families.

One fundamental reason for regarding ALUNI as a unifying framework for class-based representation formalisms is that reasoning in ALUNI is hard, but nonetheless decidable, as shown by [29,25]. Consequently, the language features arising from different frameworks to build class-based representations are not just given a common semantic account, but are combined in a more expressive setting where one retains the capability of solving reasoning tasks. The combination of constructs included in the language makes it necessary to distinguish between reasoning with respect to finite models, i.e., models with a finite domain, and reasoning with respect to unrestricted models. [25] devises suitable techniques for both unrestricted and finite model reasoning, that enable for reasoning in the different contexts arising from assuming a finite domain, as it is often the case in the field of databases, or assuming that a domain can also be infinite. In the paper, we discuss the results on reasoning in ALUNI, and compare them with other results on reasoning in class-based representation formalisms.

Summarizing, our framework provides an adequate expressive power to account for the most significant features of the major families of class-based formalisms. Moreover, it is equipped with suitable techniques for reasoning in both finite and unrestricted models. Therefore, we believe that ALUNI captures the essential core of the class-based representation formalisms belonging to all three families mentioned above.

The paper is organized as follows. In the next section we present our formalism and in Sections 34, and 5 we discuss three families of class-based formalisms, namely, frame languages, semantic data models, and object-oriented data models, showing that their basic features are captured by knowledge bases in ALUNI. The final sections contain a review of related work, including a discussion of reasoning in ALUNI and class-based formalism, and some concluding remarks.


2. A Unifying Class-Based Representation Language

In this section, we present ALUNI, a class-based formalism in the style of description logics (DLs) [17,70,43,41]. In DLs the domain of interest is modeled by means of concepts and roles, which denote classes and binary relations, respectively. Generally speaking, a DL is formed by three basic components:

In the rest of the section we describe the specific form that these three components assume in ALUNI.


2.1 The Description Language of ALUNI


Table 1: Syntax and semantics of $\mathcal{ALUNI}$
Construct Syntax Semantics
atomic concept A $A^{\mathcal{I}}\subseteq \Delta^{\mathcal{I}}$
atomic negation $\neg A$ $\Delta^{\mathcal{I}}\setminus A^{\mathcal{I}}$
conjunction $C_1\sqcap C_2$ $C_1^{\mathcal{I}}\cap C_2^{\mathcal{I}}$
disjunction $C_1\sqcup C_2$ $C_1^{\mathcal{I}}\cup C_2^{\mathcal{I}}$
universal quantification $\forall R \mbox{\bf .}C$ $\{o \mid
\forall o'\,\mbox{\bf .}\;(o,o')\in R^{\mathcal{I}} \rightarrow o'\in C^{\mathcal{I}}\}$
number restrictions $\exists^{\mbox{\tiny$\geq$}n} R$ $\{o \mid
\sharp \{o'\mid (o,o')\in R^{\mathcal{I}}\} \geq n\}$1
  $\exists^{\mbox{\tiny$\leq$}n} R$ $\{o \mid
\sharp \{o'\mid (o,o')\in R^{\mathcal{I}}\} \leq n\}$
atomic role P $P^{\mathcal{I}}\subseteq \Delta^{\mathcal{I}}\times \Delta^{\mathcal{I}}$
inverse role P- $\{(o,o')\mid(o',o)\in P^{\mathcal{I}}\}$

In the description language of ALUNI, called $\mathcal{ALUNI}$, concepts and roles are formed according to the syntax shown in Table 1, where A denotes an atomic concept, P an atomic role, C an arbitrary concept expression, R an arbitrary role expression, and n a nonnegative integer. To increase readability of concept expressions, we also introduce the following abbreviations:

\begin{eqnarray*}
\top &\equiv& A\sqcup \neg A, \quad\textrm{for some atomic co...
...ts^{\mbox{\tiny$\leq$}n} R\sqcap \exists^{\mbox{\tiny$\geq$}n} R
\end{eqnarray*}


Concepts are interpreted as subsets of a domain and roles as binary relations over that domain. Intuitively, $\neg A$ represents the negation of an atomic concept, and is interpreted as the complement with respect to the domain of interpretation. $C_1\sqcap C_2$ represents the conjunction of two concepts and is interpreted as set intersection, while $C_1\sqcup C_2$ represents disjunction and is interpreted as set union. Consequently, $\top$ represents the whole domain, and $\bot$ the empty set. $\forall R \mbox{\bf .}C$ is called universal quantification over roles and is used to denote those elements of the interpretation domain that are connected through role R only to instances of the concept C. $\exists^{\mbox{\tiny$\geq$}n} R$ and $\exists^{\mbox{\tiny$\leq$}n} R$ are called number restrictions, and impose on their instances restrictions on the minimum and maximum number of objects they are connected to through role R. P-, called the inverse of role P, represents the inverse of the binary relation denoted by P.

More formally, an interpretation $\mathcal{I}=(\Delta^{\mathcal{I}},\cdot^{\mathcal{I}})$ consists of an interpretation domain $\Delta^{\mathcal{I}}$ and an interpretation function  $\cdot^{\mathcal{I}}$ that maps every concept C to a subset $C^{\mathcal{I}}$ of $\Delta^{\mathcal{I}}$ and every role R to a subset $R^{\mathcal{I}}$ of $\Delta^{\mathcal{I}}\times \Delta^{\mathcal{I}}$ according to the semantic rules specified in Table 1. The sets $C^{\mathcal{I}}$ and $R^{\mathcal{I}}$ are called the extensions of C and R respectively.

Example 2.1   Consider the concept expression

\begin{displaymath}
\begin{array}[t]{@{}l}
\forall \texttt{enrolls} \mbox{\bf ...
...teaches}^{-} \sqcap {}\\
\neg \texttt{AdvCourse}
\end{array}\end{displaymath}

specifying the constraints for an object to be a university course. The expression reflects the fact that each course enrolls only students, and restrictions on the minimum and maximum number of enrolled students. By using the role teaches and the inverse constructor we can state the property that each course is taught by exactly one individual, who is either a professor or a graduate student. Finally, negation is used to express disjointness from the concept denoting advanced courses. $\Box$


2.2 Knowledge Bases in ALUNI

An ALUNI knowledge base, which expresses the knowledge about classes and relations of the modeled domain, is formally defined as a triple $\mathcal{K}=(\mathcal{A},\mathcal{P},\mathcal{T})$, where $\mathcal{A}$ is a finite set of atomic concepts, $\P $ is a finite set of atomic roles, and $\mathcal{T}$ is a finite set of so called inclusion assertions. Each such assertion has the form

\begin{displaymath}A \mathrel{~\dot\preceq~}C\end{displaymath}

where A is an atomic concept and C an arbitrary concept expression. Such an inclusion assertion states by means of the concept C necessary properties for an element of the domain in order to be an instance of the atomic concept A. Formally, an interpretation $\mathcal{I}$ satisfies the inclusion assertion $A \mathrel{\dot\preceq}C$ if $A^{\mathcal{I}}\subseteq C^{\mathcal{I}}$. An interpretation $\mathcal{I}$ is a model of a knowledge base $\mathcal{K}$ if it satisfies all inclusion assertions in $\mathcal{K}$. A finite model is a model with finite domain.

Example 2.2   (2.1 cont.) The assertion

\begin{displaymath}\texttt{Course}~\mathrel{\dot\preceq}~ \begin{array}[t]{@{}l}...
...dent}) \sqcap
\exists^{= 1} \texttt{teaches}^{-}
\end{array}\end{displaymath}

makes use of a complex concept expression to state necessary conditions for an object to be an instance of the concept Course. $\Box$

In ALUNI no restrictions are imposed on the form that the inclusion assertions may assume. In particular we do not rule out cyclic assertions, i.e., assertions in which the concept expression on the right hand side refers, either directly or indirectly via other assertions, to the atomic concept on the left hand side. In the presence of cyclic assertions different semantics may be adopted [66]. The one defined above, called descriptive semantics, accepts all interpretations that satisfy the assertions in the knowledge base, and hence interprets assertions as constraints on the domain to be modeled. For inclusion assertions, descriptive semantics has been claimed to provide the most intuitive results [21]. Alternative semantics which have been proposed are based on fixpoint constructions [66,69,39], and hence allow to define in a unique way the interpretation of concepts.

In general, cycles in the knowledge base increase the complexity of reasoning [66,8,24] and require a special treatment by reasoning procedures [7,22]. For this reason, many DL based systems assume the knowledge base to be acyclic [19,20]. However, this assumption is unrealistic in practice, and cycles are definitely necessary for a correct modeling in many application domains. Indeed, the use of cycles is allowed in all data models used in databases, and, as shown in the following sections, in order to capture their semantics in ALUNI the possibility of using cyclic assertions is fundamental.

Besides inclusion assertions, some DL based systems also make use of equivalence assertions [22], which express both necessary and sufficient conditions for an object to be an instance of a concept. Although this possibility is ruled out in ALUNI, this does not limit its ability of capturing both frame based systems and database models, where the constraints that can be expressed correspond naturally to inclusion assertions.


2.3 Reasoning in ALUNI

The basic tasks we consider when reasoning over an ALUNI knowledge base are concept consistency and concept subsumption:

The inclusion of number restrictions and inverse roles in $\mathcal{ALUNI}$ and the ability in ALUNI of using arbitrary, possibly cyclic inclusion assertions allows one to construct a knowledge base in which a certain concept is consistent but has necessarily an empty extension in all finite models of the knowledge base. Similarly, a subsumption relation between two concepts may hold only if infinite models of the knowledge base are ruled out and only finite models are considered.

Figure 1: An ALUNI knowledge base with two concepts that are equivalent in all finite models
\begin{figure}
\framebox[\textwidth]{\parbox{0.95\textwidth}{\small
\vspace{-\...
...{Number}
\end{eqnarray*} \par
\vspace{-\belowdisplayshortskip}
}} \end{figure}

Example 2.3   Let $\mathcal{K}_\mathit{even}$ be the knowledge base shown in Figure 1. Intuitively, the assertions in $\mathcal{K}_\mathit{even}$ state that for each number there is an even number which doubles it, and that all numbers which double it are even. Each even number is a number, doubles at most one number, and doubles only numbers. Observe that for any model $\mathcal{I}$ of $\mathcal{K}_\mathit{even}$, the universal quantifications together with the functionality of doubles in the assertions imply that $\sharp \texttt{Even}^{\mathcal{I}}\geq\sharp \texttt{Number}^{\mathcal{I}}$, while the direct inclusion assertion between Even and Number implies that $\sharp \texttt{Even}^{\mathcal{I}}\leq\sharp \texttt{Number}^{\mathcal{I}}$. Therefore, the two concepts have the same cardinality, and since one is a sub-concept of the other, if the domain is finite, their extensions coincide. This does not necessarily hold for infinite domains. In fact, the names we have chosen suggest already an infinite model of the knowledge base in which Number and Even are interpreted differently. The model is obtained by taking the natural numbers as domain, and interpreting Number as the whole domain, Even as the even numbers, and doubles as the set $\{(2n,n) \mid n\geq 0\}$. $\Box$

The example above shows that ALUNI does not have the finite model property, which states that if a concept is consistent in a knowledge base then the knowledge base admits a finite model in which the concept has a nonempty extension. Therefore, it is important to distinguish between reasoning with respect to unrestricted models and reasoning with respect to finite models. We call (unrestricted) concept consistency (written as $\mathcal{K} \not\models_{u} C \preceq\bot $) and (unrestricted) concept subsumption (written as $\mathcal{K} \models_{u} A \preceq C$) the reasoning tasks as described above, i.e., carried out without restricting the attention to finite models. The corresponding reasoning tasks carried out by considering finite models only, are called finite concept consistency (written as $\mathcal{K} \not\models_{f} C \preceq\bot $) and finite concept subsumption (written as $\mathcal{K} \models_{f} A \preceq C$).

Example 2.4   (2.3 cont.) Summing up the previous considerations, we can say that Number is not subsumed by Even in $\mathcal{K}_\mathit{even}$, i.e., $\mathcal{K}_\mathit{even} \not\models_{u} \texttt{Number} \preceq \texttt{Even}$, but is finitely subsumed, i.e., $\mathcal{K}_\mathit{even} \models_{f} \texttt{Number} \preceq \texttt{Even}$. Equivalently $\texttt{Number}\sqcap \neg \texttt{Even}$ is consistent in $\mathcal{K}_\mathit{even}$, i.e., $\mathcal{K}_\mathit{even} \not\models_{u} \texttt{Number}\sqcap \neg \texttt{Even} \preceq\bot $, but is not finitely consistent, i.e., $\mathcal{K}_\mathit{even} \models_{f} \texttt{Number}\sqcap \neg \texttt{Even} \preceq\bot $. $\Box$

A distinguishing feature of ALUNI is that reasoning both in the finite and in the unrestricted case is decidable. In particular, unrestricted concept satisfiability and concept subsumption are decidable in deterministic exponential time [38,29], and since reasoning in strict sublanguages of ALUNI is already EXPTIME-hard [25], the known algorithms are computationally optimal. Finite concept consistency in ALUNI is also decidable in deterministic exponential time while finite concept subsumption (in the general case) is decidable in deterministic double exponential time [25]. A more precise discussion on the methods for reasoning in ALUNI is provided in Section 6.2, while a detailed account of the adopted algorithms and an analysis of their computational complexity is presented by [25].

In the next sections we show how the two forms of reasoning with respect to unrestricted and finite models, capture the reasoning tasks that are typically considered in different formalisms for the structured representation of knowledge.


3. Frame Based Systems

Frame languages are based on the idea of expressing knowledge by means of frames, which are structures representing classes of objects in terms of the properties that their instances must satisfy. Such properties are defined by the frame slots, that constitute the items of a frame definition. Since the 70s a large number of frame systems have been developed, with different goals and different features. DLs bear a close relationship with the KL-ONE family of frame systems [76]. However, here we would like to consider frame systems from a more general perspective, as discussed for example by [53,54], and establish the correspondence with ALUNI knowledge bases in this context.

We remark that we are restricting our attention to those aspects that are related to the taxonomic structure. Moreover, as discussed below, we consider assertional knowledge bases, where intensional knowledge is characterized in terms of inclusion assertions rather than definitions. In addition, we do not consider those features that cannot be captured in a first-order framework, such as default values in the slots, attached procedures, and the specification of overriding inheritance policies. Some of the issues concerning the modeling of these aspects in DLs are addressed by [42,44], within a modal nonmonotonic extension of DLs.

3.1 Syntax of Frame Based Systems

To make the correspondence precise, we need to fix syntax and semantics for the frame systems we consider. Unfortunately, there is no accepted standard and we have chosen to use here basically the notation adopted by [46], which is used also in the KEE 2 system.

Definition 3.1   A frame knowledge base, denoted by $\mathcal{F}$, is formed by a set of frame and slot names, and is constituted by a set of frame definitions of the following form:

\begin{displaymath}\textbf{Frame}:~F~\textbf{in KB}~\mathcal{F}~~~ E,\end{displaymath}

where E is a frame expression, i.e., an expression formed according to the following syntax:

\begin{displaymath}E ~\longrightarrow ~\begin{array}[t]{@{}l}
\textbf{SuperClas...
...ty.Min}:~m_k\\
~~~\textbf{Cardinality.Max}:~n_k
\end{array} \end{displaymath}

F and S denote frame and slot names, respectively, m and n denote positive integers, and H denotes slot constraint, which can be specified as follows:

\begin{displaymath}H ~\longrightarrow ~ \begin{array}[t]{@{}l}
F \mid\\
(\tex...
...{UNION} ~ H_1 ~ H_2) \mid \\
(\textrm{NOT} ~ H)
\end{array} \end{displaymath}


$\Box$

For readers that are familiar with the KEE system, we point out that we omit the specification of the sub-classes for a frame present in KEE, since it can be directly derived from the specification of the super-classes.

Figure 2: A KEE knowledge base
\framebox[\textwidth]{\parbox{0.95\textwidth}{\small\begin{minipage}[t]{6cm}
\b...
...~~ \\
\> \textbf{SuperClasses}:~\texttt{Student}\end{tabbing} \end{minipage}}} 202

Example 3.2   Figure 2 shows a simple example of a knowledge base modeling the situation at an university expressed in the frame language we have presented. The frame Course represents courses which enroll students and are taught either by graduate students or professors. Cardinality restrictions are used to impose a minimum and maximum number of students that may be enrolled in a course, and to express that each course is taught by exactly one individual. The frame AdvCourse represents courses which enroll only graduate students, i.e., students who already have a degree. Basic courses, on the other hand, may be taught only by professors. $\Box$

3.2 Semantics of Frame Based Systems

To give semantics to a set of frame definitions we resort to their interpretation in terms of first-order predicate calculus [49]. According to such interpretation, frame names are treated as unary predicates, while slots are considered binary predicates.

A frame expression E is interpreted as a predicate logic formula E(x), which has one free variable, and consists of the conjunction of sentences, obtained from the super-class specification and from each slot specification. In particular, for the super-classes $F_1,\ldots,F_{h}$ we have:

\begin{displaymath}F_1(x) \land \ldots \land F_h(x)\end{displaymath}

and for a slot specification

\begin{displaymath}
\begin{array}{l}
\textbf{MemberSlot}:~S \\
~~~\textbf{Va...
...inality.Min}:~m\\
~~~\textbf{Cardinality.Max}:~n
\end{array}\end{displaymath}

we have

\begin{displaymath}
\begin{array}{l}
\forall y\mbox{\bf .}\,(S(x,y) \rightarro...
..._{n+1})) \rightarrow
\bigvee_{i\neq j} y_i=y_j),
\end{array}\end{displaymath}

under the assumption that within one frame definition the occurrences of x refer to the same free variable. Finally the constraints on the slots are interpreted as conjunction, disjunction and negation, respectively, i.e.:

\begin{displaymath}
\begin{array}{lll}
(\textrm{INTERSECTION} ~ H_1 ~ H_2) &\t...
...NOT} ~ H) &\textrm{ is interpreted as }& \neg H(x)
\end{array}\end{displaymath}

A frame definition

\begin{displaymath}\textbf{Frame}:~F~\textbf{in KB}~\mathcal{F}~~~ E\end{displaymath}

is then considered as the universally quantified sentence of the form

\begin{displaymath}\forall x \mbox{\bf .}(F(x) \rightarrow E(x)).\end{displaymath}

The whole frame knowledge base $\mathcal{F}$ is considered as the conjunction of all first-order sentences corresponding to the frame definitions in $\mathcal{F}$.

Here we regard frame definitions as necessary conditions, which is commonplace in the frame systems known as assertional frame systems, as opposed to definitional systems, where frame definitions are interpreted as necessary and sufficient conditions.

In order to enable the comparison with our formalisms for representing structured knowledge we restrict our attention to the reasoning tasks that involve the frame knowledge base, independently of the assertional knowledge, i.e., the frames instances. [46] mention several reasoning services associated with frames, such as:

These reasoning services are formalized in the first-order semantics as follows.

Definition 3.3   Let $\mathcal{F}$ be a frame knowledge base and F a frame in $\mathcal{F}$. We say that F is consistent in $\mathcal{F}$ if the first-order sentence $\mathcal{F}\land\exists x\mbox{\bf .}F(x)$ is satisfiable. Moreover, we say that a frame description E is more general than F in $\mathcal{F}$ if $\mathcal{F}\models \forall x\mbox{\bf .}(F(x)\rightarrow E(x))$.$\Box$

3.3 Relationship between Frame Based Systems and ALUNI

The first-order semantics given above allows us to establish a straightforward relationship between frame languages and ALUNI. Indeed, we now present a translation from frame knowledge bases to ALUNI knowledge bases.

We first define the function $\theta $ that maps each frame expression into an $\mathcal{ALUNI}$ concept expression as follows:

This mapping allows us to translate a frame knowledge base into an ALUNI knowledge base, as specified in the following definition.

Definition 3.4   The ALUNI knowledge base $\theta (\mathcal{F})=(\mathcal{A},\mathcal{P},\mathcal{T})$ corresponding to a frame knowledge base $\mathcal{F}$ is obtained as follows:

Figure 3: The ALUNI knowledge base corresponding to the KEE knowledge base in Figure 2
\begin{figure}
\framebox[\textwidth]{\parbox{0.95\textwidth}{\small
\vspace*{-...
...Student}
\end{eqnarray*} \par
\vspace{-\belowdisplayshortskip}
}} \end{figure}

Example 3.5   (3.2 cont.) We illustrate the translation on the frame knowledge base in Figure 2. The corresponding ALUNI knowledge base is shown in Figure 3. $\Box$

The correctness of the translation follows from the correspondence between the set-theoretic semantics of ALUNI and the first-order interpretation of frames (see for example [49,15,43]). We can observe that inverse roles are in fact not necessary for the formalization of frames. Indeed, the possibility of referring to the inverse of a slot has been rarely considered in frame knowledge representation systems (Some exceptions are reported in [53]). Due to the absence of inverse roles the distinction between reasoning in finite and unrestricted models is not necessary 3. Consequently, all the above mentioned forms of reasoning are captured by unrestricted concept consistency and concept subsumption in ALUNI knowledge bases. This is summarized in the following theorem.

Theorem 3.6   Let $\mathcal{F}$ be a frame knowledge-base, F be a frame in $\mathcal{F}$, E be a frame description, and $\theta (\mathcal{F})$, $\theta (F)$, and $\theta (E)$ be their translations in ALUNI. Then the following hold:

Proof. The claim directly follows from the semantics of frame knowledge bases and the translation into DLs that we have adopted.$\Box$

By Theorem 3.6 it becomes possible to exploit the methods for unrestricted reasoning on ALUNI knowledge bases in order to reason on frame knowledge bases. Since the problem of reasoning, e.g., in KEE is already EXPTIME-complete, we do not pay in terms of computational complexity for the expressiveness added by the constructs of ALUNI. In fact, by resorting to the correspondence with ALUNI it becomes possible to add to frame systems useful features, such as the possibility of specifying the inverse of a slot [53], and still retain the ability to reason in EXPTIME.


4. Semantic Data Models

Semantic data models were introduced primarily as formalisms for database schema design. They provide a means to model databases in a much richer way than traditional data models supported by Database Management Systems, and are becoming more and more important because they are adopted in most of the recent database design methodologies and Computer Aided Software Engineering tools.

The most widespread semantic data model is the Entity-Relationship (ER) model introduced by [35]. It has by now become a standard, extensively used in the design phase of commercial applications. In the commonly accepted ER notation, classes are called entities and are represented as boxes, whereas relationships between entities are represented as diamonds. Arrows between entities, called ISA relationships, represent inclusion assertions. The links between entities and relationships represent the ER-roles, to which number restrictions are associated. Dashed links are used whenever such restrictions are refined for more specific entities. Finally, elementary properties of entities are modeled by attributes, whose values belong to one of several predefined domains, such as Integer, String, or Boolean.

The ER model does not provide constructs for expressing explicit disjointness or disjunction of entities, but extensions of the model allow for the use of generalization hierarchies which represent a combination of these two constructs. In order to keep the presentation simple, we do not consider generalization hierarchies in the formalization we provide, although their addition would be straightforward. Similarly, we omit attributes of relations.

We now show that all relevant aspects of the ER model can be captured in ALUNI, and thus that reasoning on an ER schema can be reduced to reasoning on the corresponding ALUNI knowledge base. Since ALUNI is equipped with capabilities to reason on knowledge bases, both with respect to finite and unrestricted models (see Section 6.2), the reduction shows that reasoning on the ER model, and more generally on semantic data models, is decidable.

As in the case of frame-based systems, we restrict our attention to those aspects that constitute the core of the ER model. For this reason we do not consider some features, such as keys and weak entities, that have been introduced in the literature [35], but appear only in some of the formalizations of the ER model and the methodologies for conceptual modeling based on the model. A proposal for the treatment of keys in description logics is presented by [16].

In order to establish the correspondence between the ER model and ALUNI, we present formal syntax and semantics of ER schemata.

4.1 Syntax of the Entity-Relationship Model

Although the ER model has by now become an industrial standard, several variants and extensions have been introduced, which differ in minor aspects in expressiveness and in notation [35,72,9,73,74]. Also, ER schemata are usually defined using a graphical notation which is particularly useful for an easy visualization of the data dependencies, but which is not well suited for our purposes. Therefore we have chosen a formalization of the ER model which abstracts with respect to the most important characteristics and allows us to develop the correspondence to ALUNI.

In the following, for two finite sets X and Y we call a function from a subset of X to Y an X-labeled tuple over Y. The labeled tuple T that maps $x_i\in X$ to $y_i\in Y$, for $i\in\{1,\ldots,k\}$, is denoted $[x_1\colon y_1,\ldots,x_{k}\colon y_{k}]$. We also write T[xi] to denote yi.

Definition 4.1   An ER schema is a tuple $\S =(\mathcal{L}_{\mathcal{S}},{\mathrel{\preceq_{\mathcal{S}}}},\mathit{att}_{\mathcal{S}},
\mathit{rel}_{\mathcal{S}},\mathit{card}_{\mathcal{S}})$, where

Before specifying the formal semantics of ER schemata we give an intuitive description of the components of a schema. The relation $\mathrel{\preceq_{\mathcal{S}}}$ models the ISA-relationship between entities. We do not need to make any special assumption on the form of $\mathrel{\preceq_{\mathcal{S}}}$ such as acyclicity or injectivity. The function $\mathit{att}_{\mathcal{S}}$ is used to model attributes of entities. If for example $\mathit{att}_{\mathcal{S}}$ associates the $\mathcal{A}_\mathcal{S}$-labeled tuple $[A_1\colon \texttt{Integer},A_2\colon \texttt{String}]$ to an entity E, then E has two attributes A1,A2 whose values are integers and strings respectively. For simplicity we assume attributes to be single-valued and mandatory, but we could easily handle also multi-valued attributes with associated cardinalities. The function $\mathit{rel}_{\mathcal{S}}$ associates a set of roles to each relationship symbol R, determining implicitly also the arity of R, and for each role U in such set a distinguished entity, called the primary entity for U in R. In a database satisfying the schema only instances of the primary entity are allowed to participate in the relationship via the role U. The function $\mathit{card}_{\mathcal{S}}$ specifies cardinality constraints, i.e., constraints on the minimum and maximum number of times an instance of an entity may participate in a relationship via some role. Since such constraints are meaningful only if the entity can effectively participate in the relationship, the function is defined only for the sub-entities of the primary entity. The special value $\infty$ is used when no restriction is posed on the maximum cardinality. Such constraints can be used to specify both existence dependencies and functionality of relations [36]. They are often used only in a restricted form, where the minimum cardinality is either 0 or 1 and the maximum cardinality is either 1 or $\infty$. Cardinality constraints in the form considered here have been introduced already by [3] and subsequently studied by [48,63,45,77,73].

Figure 4: An ER schema
\begin{figure}
\centering {\setlength{\unitlength}{1.1pt}\begin{small}
\begin{p...
...0,1){40}}
\put(250,20){\vector(0,1){40}}
\end{picture}\end{small}}
\end{figure}

Example 4.2   Figure 4 shows a simple ER schema modeling a state of affairs similar to the one represented by the KEE knowledge base in Figure 2. We have used the standard graphic notation for ER schemata, except for the dashed link, which represents the refinement of a cardinality constraint for the participation of a sub-entity (in our case AdvCourse) in a relationship (in our case ENROLLING). $\Box$

4.2 Semantics of the Entity-Relationship Model

The semantics of an ER schema can be given by specifying which database states are consistent with the information structure represented by the schema. Formally, a database state $\mathcal{B}$ corresponding to an ER schema $\S =(\mathcal{L}_{\mathcal{S}},{\mathrel{\preceq_{\mathcal{S}}}},\mathit{att}_{\mathcal{S}},
\mathit{rel}_{\mathcal{S}},\mathit{card}_{\mathcal{S}})$ is constituted by a nonempty finite set  $\Delta^{\mathcal{B}}$, assumed to be disjoint from all basic domains, and a function  $\cdot^{\mathcal{B}}$ that maps

The elements of $E^{\mathcal{B}}$, $A^{\mathcal{B}}$, and $R^{\mathcal{B}}$ are called instances of E, A, and R respectively.

A database state is considered acceptable if it satisfies all integrity constraints that are part of the schema. This is captured by the definition of legal database state.

Definition 4.3   A database state $\mathcal{B}$ is said to be legal for an ER schema $\S =(\mathcal{L}_{\mathcal{S}},{\mathrel{\preceq_{\mathcal{S}}}},\mathit{att}_{\mathcal{S}},
\mathit{rel}_{\mathcal{S}},\mathit{card}_{\mathcal{S}})$, if it satisfies the following conditions:

Notice that the definition of database state reflects the usual assumption in databases that database states are finite structures (see also [37]). In fact, the basic domains are not required to be finite, but for each legal database state for a schema, only a finite set of values from the basic domains are actually of interest. We define the active domain $\Delta^{\mathcal{B}}_{\mathit{act}}$ of a database state $\mathcal{B}$ as the set of all elements of the basic domains $D^{{\mathcal{B}_\mathcal{D}}}$, $D \in \mathcal{D}_\mathcal{S}$, that effectively appear as values of attributes in $\mathcal{B}$. More formally:

\begin{displaymath}\Delta^{\mathcal{B}}_{\mathit{act}}=\{d \in D^{\mathcal{B}_\m...
...lta^{\mathcal{B}}
\,\mbox{\bf .}\;(e,d)\in A^{\mathcal{B}}\}.
\end{displaymath}

Since $\Delta^{\mathcal{B}}$ is finite and $\mathcal{A}_\mathcal{S}$ contains only a finite number of attributes, which are functional by definition, also $\Delta^{\mathcal{B}}_{\mathit{act}}$ is finite.

Reasoning in the ER model includes verifying entity satisfiability and deducing inheritance. Entity satisfiability amounts to checking whether a given entity can be populated in some legal database state [6,63,40], and corresponds to the notion of concept consistency in DLs. Deducing inheritance amounts to verifying whether in all databases that are legal for the schema, every instance of an entity is also an instance of another entity. Such implied ISA relationships can arise for different reasons. Either trivially, through the transitive closure of the explicit ISA relationships present in the schema, or in more subtle ways, through specific patterns of cardinality restrictions along cycles in the schema and the requirement of the database state to be finite [63,37].

Figure 5: The ER schema corresponding to Example 2.3
\begin{figure}
\centering {\setlength{\unitlength}{1pt}\begin{small}
\begin{pic...
...\thicklines \put(30,20){\vector(0,1){40}}
\end{picture}\end{small}}
\end{figure}

Example 4.4   Figure 5 shows an ER schema modeling the same situation as the knowledge base of Example 2.3. Arguing exactly as in that example we can conclude that the two entities Number and Even denote the same set of elements in every finite database legal for the schema, although the ISA relation from Number to Even is not stated explicitly. It is implied, however, due to the cycle involving the relationship and the two entities and due to the particular form of cardinality constraints. $\Box$

4.3 Relationship between Entity-Relationship Schemata and ALUNI

We now show that the different forms of reasoning on ER schemata are captured by finite concept consistency and finite concept subsumption in ALUNI. The correspondence between the two formalisms is established by defining a translation $\phi $ from ER schemata to ALUNI knowledge bases, and then proving that there is a correspondence between legal database states and finite models of the derived knowledge base.

Definition 4.5   Let $\S =(\mathcal{L}_{\mathcal{S}},{\mathrel{\preceq_{\mathcal{S}}}},\mathit{att}_{\mathcal{S}},
\mathit{rel}_{\mathcal{S}},\mathit{card}_{\mathcal{S}})$ be an ER schema. The ALUNI knowledge base $\phi (\mathcal{S})=(\mathcal{A},\mathcal{P},\mathcal{T})$ is defined as follows:
The set $\mathcal{A}$ of atomic concepts of $\phi (\mathcal{S})$ contains the following elements: The set $\P $ of atomic roles of $\phi (\mathcal{S})$ contains the following elements: The set $\mathcal{T}$ of assertions of $\phi (\mathcal{S})$ contains the following elements:

Figure 6: The ALUNI knowledge base corresponding to the ER schema in Figure 4
\begin{figure}
\framebox[\textwidth]{\parbox{0.95\textwidth}{\small
\vspace{-\...
...{Number}
\end{eqnarray*} \par
\vspace{-\belowdisplayshortskip}
}} \end{figure}

Example 4.6   (4.2 cont.) We illustrate the translation on the ER schema of Figure 4. The ALUNI knowledge base that captures exactly its semantics is shown in Figure 6, where for brevity the disjointness assertions (7) are omitted, and assertions with the same concept on the left hand side are collapsed. $\Box$

The translation makes use of both inverse attributes and number restrictions to capture the semantics of ER schemata. We observe that, by means of the inverse constructor, a binary relationship could be treated in a simpler way by choosing a traversal direction and mapping the relationship directly to a role. Notice also that the assumption of acyclicity of the resulting knowledge base is unrealistic in this case, and in order to exploit the correspondence for reasoning in the ER model, we need techniques that can deal with inverse attributes, number restrictions, and cycles together. As shown in Example 2.3, the combination of these factors causes the finite model property to fail to hold, and we need to resort to reasoning methods for finite models.

In fact, we can reduce reasoning in the ER model to finite model reasoning in ALUNI knowledge bases. For this purpose we define a mapping between database states corresponding to an ER schema and finite interpretations of the knowledge base derived from it. Due to the possible presence of relations with arity greater than 2, this mapping is however not one-to-one and we first need to characterize those interpretations of the knowledge base that directly correspond to database states.

Definition 4.7   Let $\S =(\mathcal{L}_{\mathcal{S}},{\mathrel{\preceq_{\mathcal{S}}}},\mathit{att}_{\mathcal{S}},
\mathit{rel}_{\mathcal{S}},\mathit{card}_{\mathcal{S}})$ be an ER schema and $\phi (\mathcal{S})$ be defined as above. An interpretation $\mathcal{I}$ of $\phi (\mathcal{S})$ is relation-descriptive, if for every relationship $R\in\mathcal{R}_\mathcal{S}$, with $\mathit{rel}_{\mathcal{S}}(R)=[U_1\colon E_1,\ldots,U_{k}\colon E_{k}]$, for every $d,d'\in(\phi (R))^{\mathcal{I}}$, we have that
\begin{displaymath}
(\bigwedge_{1\leq i\leq k} \forall d''\in\Delta^{\mathcal{I...
...rrow (d',d'')\in(\phi (U_i))^{\mathcal{I}}))\rightarrow d=d'.
\end{displaymath} (8)


$\Box$

Intuitively, the extension of a relationship in a database state is a set of labeled tuples, and such a set does not contain the same element twice. Therefore it is implicit in the semantics of the ER model that there cannot be two labeled tuples connected through all roles of the relationship to exactly the same elements of the domain. In a model of the ALUNI knowledge base corresponding to the ER schema, on the other hand, each tuple is represented by a new individual, and the above condition is not implicit anymore. It also cannot be imposed in ALUNI by suitable assertions. The following lemma, however, shows that we do not need such an explicit condition, when we are interested in reasoning on an ALUNI knowledge base corresponding to an ER schema. This is due to the fact that we can always restrict ourselves to considering only relation-descriptive models.

Lemma 4.8   Let $\S $ be an ER schema, $\phi (\mathcal{S})$ be the ALUNI knowledge base obtained from $\S $ according to Definition 4.5, and C be a concept expression of $\phi (\mathcal{S})$. If C is finitely consistent in $\phi (\mathcal{S})$, then there is a finite relation-descriptive model $\mathcal{I}$ of $\phi (\mathcal{S})$ such that $C^{\mathcal{I}}\neq\emptyset $.

Proof. Let $\mathcal{I}_0$ be a finite model of $\phi (\mathcal{S})$ such that $C^{\mathcal{I}}\neq\emptyset $. We can build a finite relation-descriptive model $\mathcal{I}'$ by starting from $\mathcal{I}_0$ and applying the following construction once for each relationship in $\mathcal{R}_\mathcal{S}$.

Let $\mathcal{I}$ be the model obtained in the previous step and let $R\in\mathcal{R}_\mathcal{S}$ with $\mathit{rel}_{\mathcal{S}}(R)=[U_1\colon E_1,\ldots,U_{k}\colon E_{k}]$ be the next relationship to which we apply the construction. We construct from $\mathcal{I}$ a model $\mathcal{I}_R$ such that condition 8 is satisfied for relationship R.

Given an individual $r\in(\phi (R))^{\mathcal{I}}$, we denote by Ui(d), $i\in\{1,\ldots,k\}$ the (unique) individual e such that $(r,e)\in(\phi (U_i))^{\mathcal{I}}$. For $e_i\in(\phi (E_i))^{\mathcal{I}}$, $i\in\{1,\ldots,k\}$ we define $X_{(U_1\colon e_1,\ldots,U_{k}\colon e_{k})}=\{r\in(\phi (R))^{\mathcal{I}}\mid U_i(d)=e_i,
\textrm{ for } i\in\{1,\ldots,k\}\}$. We call conflict-set a set $X_{(U_1\colon e_1,\ldots,U_{k}\colon e_{k})}$ with more than one element. From each conflict-set $X_{(U_1\colon e_1,\ldots,U_{k}\colon e_{k})}$ we randomly choose one individual r, and we say that the others induce a conflict on $(U_1\colon e_1,\ldots,U_{k}\colon e_{k})$. We call $\mathit{Conf}$ the (finite) set of all objects inducing a conflict on some $(U_1\colon e_1,\ldots,U_{k}\colon e_{k})$.

We define an interpretation $\mathcal{I}_{2^{\mathit{Conf}}}$ as the disjoint union of $2^{\sharp \mathit{Conf} }$ copies of $\mathcal{I}$, one copy, denoted by $\mathcal{I}_\mathcal{Z}$, for every set $\mathcal{Z}\in 2^{\mathit{Conf}}$. We denote by $d_\mathcal{Z}$ the copy in $\mathcal{I}_\mathcal{Z}$ of the individual d in $\mathcal{I}$. Since the disjoint union of two models of an ALUNI knowledge base is again a model, $\mathcal{I}_{2^{\mathit{Conf}}}$ is a model of $\phi (\mathcal{S})$. Let $\mathcal{I}_\mathcal{Z}$ and $\mathcal{I}_{\mathcal{Z}'}$ be two copies of $\mathcal{I}$ in $\mathcal{I}_{2^{\mathit{Conf}}}$. We call exchanging $U_k(r_\mathcal{Z})$ with $U_k(r_{\mathcal{Z}'})$ the operation on $\mathcal{I}_{2^{\mathit{Conf}}}$ consisting of replacing in $(\phi (U_k))^{\mathcal{I}_\mathcal{Z}}$ the pair $(r_\mathcal{Z},U_k(r_\mathcal{Z}))$ with $(r_\mathcal{Z},U_k(r_{\mathcal{Z}'}))$ and, at the same time, replacing in $(\phi (U_k))^{\mathcal{I}_{\mathcal{Z}'}}$ the pair $(r_{\mathcal{Z}'},U_k(r_{\mathcal{Z}'}))$ with $(r_{\mathcal{Z}'},U_k(r_\mathcal{Z}))$. Intuitively, by exchanging $U_k(r_\mathcal{Z})$ with $U_k(r_{\mathcal{Z}'})$, the individuals $r_\mathcal{Z}$ and $r_{\mathcal{Z}'}$ do not induce conflicts anymore.

We construct now from $\mathcal{I}_{2^{\mathit{Conf}}}$ an interpretation $\mathcal{I}_R$ as follows: For each $r\in\mathit{Conf}$ and for each $\mathcal{Z}\in 2^{\mathit{Conf}}$ such that $r\in\mathcal{Z}$, we exchange $U_k(r_\mathcal{Z})$ with $U_k(r_{\mathcal{Z}\setminus\{r\}})$. It is possible to show that all conflicts are thus eliminated while no new conflict is created. Hence, in $\mathcal{I}_R$, condition 8 for R is satisfied. We still have to show that $\mathcal{I}_R$ is a model of $\phi (\mathcal{S})$ in which $C^{\mathcal{I}_R}\neq\emptyset $. Indeed, it is straightforward to check by induction that for every concept expression C' appearing in $\phi (\mathcal{S})$, for all $\mathcal{Z}\in 2^{\mathit{Conf}}$, $d\in C'^{\mathcal{I}}$ if and only if $d_{\mathcal{Z}}\in C'^{\mathcal{I}_R}$. Thus all assertions of $\phi (\mathcal{S})$ are still satisfied in $\mathcal{I}_R$ and $C^{\mathcal{I}_R}\neq\emptyset $.$\Box$

With this result, the following correspondence between legal database states for an ER schema and relation-descriptive models of the resulting ALUNI knowledge base can be established.

Proposition 4.9   For every ER schema $\S =(\mathcal{L}_{\mathcal{S}},{\mathrel{\preceq_{\mathcal{S}}}},\mathit{att}_{\mathcal{S}},
\mathit{rel}_{\mathcal{S}},\mathit{card}_{\mathcal{S}})$ there exist two mappings $\alpha_\mathcal{S}$, from database states corresponding to $\S $ to finite interpretations of its translation $\phi (\mathcal{S})$, and $\beta_\mathcal{S}$, from finite relation-descriptive interpretations of $\phi (\mathcal{S})$ to database states corresponding to $\S $, such that:
1.
For each legal database state $\mathcal{B}$ for $\S $, $\alpha_\mathcal{S}(\mathcal{B})$ is a finite model of $\phi (\mathcal{S})$, and for each symbol $X\in\mathcal{E}_\mathcal{S}\cup\mathcal{A}_\mathcal{S}\cup\mathcal{R}_\mathcal{S}\cup\mathcal{D}_\mathcal{S}$, $X^{\mathcal{B}}=(\phi (X))^{\alpha_\mathcal{S}(\mathcal{B})}$.
2.
For each finite relation-descriptive model $\mathcal{I}$ of