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
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
,
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
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 3, 4, 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.
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 description language of ALUNI, called
,
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:
Concepts are interpreted as subsets of a domain and roles as binary relations
over that domain. Intuitively,
represents the negation of an
atomic concept, and is interpreted as the complement with respect to the domain
of interpretation.
represents the conjunction of two
concepts and is interpreted as set intersection, while
represents
disjunction and is interpreted as set union. Consequently,
represents the whole domain, and
the empty set.
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.
and
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
consists of an
interpretation domain
and an interpretation
function
that maps every concept C to a subset
of
and every role R to a subset
of
according to
the semantic rules specified in Table 1. The sets
and
are called the extensions of C and R respectively.
An ALUNI knowledge base, which expresses the knowledge about classes and
relations of the modeled domain, is formally defined as a triple
,
where
is a finite set of atomic concepts,
is a
finite set of atomic roles, and
is a finite set of so called
inclusion assertions. Each such assertion has the form
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.
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
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.
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
)
and (unrestricted) concept subsumption (written
as
)
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
)
and
finite concept subsumption (written as
).
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.
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.
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.
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.
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
we have:
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.
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
that maps each frame expression into
an
concept expression as follows:
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.
Proof. The claim directly follows from the semantics of frame knowledge bases and the
translation into DLs that we have adopted.
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.
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.
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
to
,
for
,
is denoted
.
We also write T[xi] to denote yi.
Before specifying the formal semantics of ER schemata we give an intuitive
description of the components of a schema.
The relation
models the ISA-relationship between entities. We do not
need to make any special assumption on the form of
such as acyclicity
or injectivity.
The function
is used to model attributes of entities. If for example
associates the
-labeled tuple
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
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
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
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
.
Cardinality constraints
in the form considered here have been introduced already by [3] and
subsequently studied by [48,63,45,77,73].
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
corresponding to an ER schema
is
constituted by a nonempty finite set
,
assumed to be disjoint
from all basic domains, and a function
that maps
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.
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
of a database state
as
the set of all elements of the basic domains
,
,
that
effectively appear as values of attributes in
.
More formally:
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].
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
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.
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.
![]()
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.
Proof. Let
be a finite model of
such that
.
We can
build a finite relation-descriptive model
by starting from
and
applying the following construction once for each relationship in
.
Let
be the model obtained in the previous step and let
with
be the next relationship to which we apply the
construction. We construct from
a model
such that
condition 8 is satisfied for
relationship R.
Given an individual
,
we denote by Ui(d),
the (unique) individual e such that
.
For
,
we define
.
We call conflict-set a set
with more than one element.
From each conflict-set
we randomly choose one
individual r, and we say that the others induce a conflict on
.
We call
the (finite) set of all objects
inducing a conflict on some
.
We define an interpretation
as the disjoint union of
copies of
,
one copy, denoted by
,
for every
set
.
We denote by
the copy in
of the
individual d in
.
Since the disjoint union of two models of an ALUNI knowledge base is again a model,
is a model of
.
Let
and
be two copies of
in
.
We call
exchanging
with
the operation on
consisting of replacing in
the
pair
with
and, at the same time,
replacing in
the pair
with
.
Intuitively, by exchanging
with
,
the individuals
and
do not induce conflicts
anymore.
We construct now from
an interpretation
as follows:
For each
and for each
such that
,
we
exchange
with
.
It is possible to
show that all conflicts are thus eliminated while no new conflict is created.
Hence, in
,
condition 8 for R is
satisfied.
We still have to show that
is a model of
in which
.
Indeed, it is straightforward to check by induction
that for every concept expression C' appearing in
,
for all
,
if and only if
.
Thus all
assertions of
are still satisfied in
and
.
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.