=Paper= {{Paper |id=Vol-52/paper-5 |storemode=property |title=UML-Based Ontology Modelling for Software Agents |pdfUrl=https://ceur-ws.org/Vol-52/oas01-cranefield-1.pdf |volume=Vol-52 }} ==UML-Based Ontology Modelling for Software Agents== https://ceur-ws.org/Vol-52/oas01-cranefield-1.pdf
        UML-Based Ontology Modelling for Software Agents

                            Stephen Cranefield , Stefan Hausteiny and Martin Purvis

                                                                                    y
                    Department of Information Science                                 University of Dortmund
                          University of Otago                                         Computer Science VIII
                              PO Box 56                                                 Baroper Str. 301
                        Dunedin, New Zealand                                       D-44221 Dortmund, Germany
               fscranefield,mpurvisg@infoscience.otago.ac.nz                             stefan.haustein@udo.edu


ABSTRACT                                                                 in the field of software engineering and are widely supported by
Ontologies play an important role in defining the terminology that       robust commercial tools, the use of UML for ontology represen-
agents use in the exchange of knowledge-level messages. As object-       tation in agent systems would help to hasten the uptake of agent-
oriented modelling, and the Unified Modeling Language (UML)              based systems concepts into industry. This paper therefore exam-
in particular, have built up a huge following in the field of soft-      ines the potential for UML to be used for ontology modelling, com-
ware engineering and are widely supported by robust commercial           pares it to traditional approaches (description logic in particular)
tools, the use of UML for ontology representation in agent systems       and discusses some further possibilities for applying UML-based
would help to hasten the uptake of agent-based systems concepts          technologies to agent communication and reasoning systems.
into industry. This paper examines the potential for UML to be
used for ontology modelling, compares it to traditional description      The paper is structured as follows: First, we discuss traditional ap-
logic formalisms and discusses some further possibilities for apply-     proaches to ontology modelling, focusing in particular on descrip-
ing UML-based technologies to agent communication systems.               tion logic. We then explain why we consider UML to be suitable
                                                                         as a knowledge representation language before making a compar-
                                                                         ison between the features of description logic and UML. We then
1.    INTRODUCTION                                                       discuss UML in the wider context of agent communication.
Ontologies play an important role in defining the terminology that
agents use in the exchange of knowledge-level messages and there-
fore the choice of an ontology representation language is a sig-         2. TRADITIONAL APPROACHES
nificant issue when designing a multi-agent system. Traditional          The most widely used traditional approaches for ontology mod-
approaches to ontology representation use modelling formalisms           elling are the Knowledge Interchange Format (KIF) [26] and de-
developed by the artificial intelligence knowledge representation        scription logic.
community—in particular, frame-based languages descended from
the KL-ONE system [7] and their formalisations as various forms          KIF is a language based on first-order predicate logic with ex-
of description logic. However, these languages were developed for        tensions for representing definitions and metaknowledge. While
use in monolithic knowledge representation systems that are very         first-order logic is a low-level language for expressing ontologies,
different in character from distributed multi-agent systems.             the Ontolingua tool [19] allows users to build KIF ontologies at a
                                                                         higher level of description by importing predefined ontology defi-
One of the potentially significant advantages of multi agent systems     nitions. In particular, the frame ontology [24] allows ontologies to
is that agents built using different technologies can be combined to     be described at a level similar to description logics.
form a society and can collectively solve problems that none of the
agents could on their own. In particular, it cannot be assumed that      Description logics are a formalisation of the representations and
all agents will be implemented on top of a KL-ONE style knowl-           processes underlying frame-based knowledge representation sys-
edge representation system. Therefore, the choice of a ontology          tems in the tradition of KL-ONE [7]. These systems support the
modelling language should depend more on its suitability for the         definition of concepts by simply naming them and specifying where
initial construction of the ontology than any support it may offer for   they fit in the generalisation/specialisation hierarchy of existing
specialised run-time reasoning. In fact, we believe that the reason-     concepts. New concepts can also be defined in terms of existing
ing requirements of future multi-agent applications are not likely to    concepts using the operations of concept conjunction: the and op-
be predominant design criteria and other issues such as coping with      erator can be used to specify that the new concept is a common
design complexity are more important.                                    specialisation of a number of other concepts. New roles may be in-
                                                                         troduced to represent possible relationships that may hold between
In addition, there are other things to consider when deciding what       individuals in the domain being modelled, and concept definitions
representation to use for ontology modelling. If agent-based ar-         may include restrictions on the possible values, number of values,
chitectures are to find their way from the research laboratory into      or type of values that a role may have for the concept being defined.
wide-spread use in industry and business, we would do well to con-
sider the degree to which a candidate ontology modelling language        The following example, adapted from Nebel [27], illustrates these
would gain aceptance in the wider community outside the research         features of description logic. In the notation used, Anything is a
laboratories. As object-oriented modelling, and the Unified Model-       predefined concept representing the class of all things and the class
ing Language (UML) in particular, have built up a huge following         of all relations is denoted by anyrelation. The symbol rep-  =
resents concept definition and concept specialisation is represented                 Person          *    memberOf     Organisation
     
                                                                               givenName : String
by .                                                                          familyName : String   member      *
                                                                                                                     name : String



              
     Human  Anything
                                                                                        SportsClub                  ProfessionalBody
     Set  Anything                                                            sport : String                    profession : String
          
     Man  Human                                                               priceOfBeerAtClubRooms : Real     codeOfEthics : String
             
     Woman  Human
               
     member  anyrelation
     Team = (and Set                                                            Figure 1: A simple UML class diagram example
           


                 (all member Human)
                 (atleast 2 member))                                    commonly regarded as characteristic of the declarative knowledge
                                                                        representation paradigm [21, 13]:
Description logics are designed to support certain types of infer-
ences over user-defined concepts and instances of concepts and
                                                                            Knowledge expressed in UML is directly accessible for hu-
roles that may be stored in a knowledge base (see Section 4.4).
                                                                             man comprehension (via its standard graphical presentation)
These types of deduction are designed to help the user in incremen-
                                                                             and for machine processing (via the XMI model interchange
tally designing a coherent set of concepts and instances to describe
                                                                             format and associated software libraries or the application
a domain.
                                                                             programmer interface defined by the OMG’s Meta Object
                                                                             Facility).
3.       UML FOR ONTOLOGY MODELLING
The Unified Modeling Language is a language and associated graph-           Knowledge in a UML model can be changed easily due to the
ical notation for object-oriented analysis and design. The object-           modular nature of object-oriented modelling. Changes to one
oriented modelling paradigm has become the mainstream technique              feature in the model do not generally affect other features.
in the software industry based on the widely accepted view that
object-oriented modelling fits well with people’s intuitive models          UML models can be used for purposes that were not antic-
of the world [4].                                                            ipated at the time of model creation. In other words, UML
                                                                             is an abstract modelling language, not tied to any particular
UML is a standard from the Object Management Group (OMG)                     application.
[29]. The OMG is a consortium of around 800 member compa-                   New knowledge can be derived from UML models by rea-
nies and institutions involved in software engineering. Therefore,           soning about their contents. In particular, UML has an asso-
UML has a very large and rapidly expanding user community and                ciated constraint language—the Object Constraint Language
the language is widely taught in universities. There are also many           (OCL)—that can be used to define derived model elements
tools available for creating and editing models in UML using direct          (those that can be computed from other elements) and to as-
manipulation of the models’ graphical presentation1 .                        sert arbitrary constraints on the possible instances of a model.
                                                                             This aspect of UML has not been well supported by tools in
The use of UML is now widespread in industry and its rapid accep-            the past, but a number of OCL-aware tools [3, 35] and code
tance (even for the design of mission-critical applications) suggests        libraries [34] are beginning to appear.
that it provides an effective and scalable approach to conceptual
modelling, and therefore warrants serious consideration as an on-
tology modelling language [12, 1]. However, UML has a rather dif-       With this viewpoint, UML can be regarded as a suitable candidate
ferent character from the logic-based formalisms traditionally used     for knowledge representation. In particular, we refer to UML class
for ontology modelling. UML is defined in terms of a graphical          diagrams which provide a rich notation for defining classes, their
syntax as well as a metamodel defining the types of structure that      attributes and the relationships between them. They can therefore
may appear in a user’s model and the ways in which they can be          be used to define ontologies in an object-oriented fashion.
related to each other. The metamodel plays the same role that a
context-free grammar does in defining the legal combinations of         Figure 1 shows a simple class diagram specifying the structure of
terminal symbols in a string-based language, but without the limi-      and relations between classes representing people and organisa-
tations caused by the use of a linear textual format. There is cur-     tions. The diagram also shows two specialisations of the organisa-
rently no text-based syntax designed for human use (although work       tion class: sports club and professional body. In order to understand
is in progress to design one [30]), but there is a standard XML-        this UML class diagram, it is sufficient to know the following:
based format—the XML Model Interchange format (XMI)—that
allows models to be encoded as instances of the UML metamodel.
Despite these differences from traditional knowledge representa-            Rectangles depict classes.
tion languages, we believe UML models have a number of features
1
                                                                                 – The class name appears at the top (in italics if the class
  Although there are graphical notations and/or model editors exist-               is abstract).
ing for some AI knowledge representation languages (e.g. Seman-
tic Nets and Conceptual Graphs), UML is unique in having both a                  – Any attributes appear below in a separate compartment.
compact, high-level and standardised notation and a high degree of
tool support.                                                               Lines between classes represent association relationships.
          – Association ends may be labelled with “role names”.             4.2 Roles vs. Attributes and Associations
          – Association ends may be annotated with numbers in-              One significant difference between DL and object-oriented mod-
            dicating how many objects may have this association             elling notations, such as UML, is the style in which the structure
            with instances of the class at the other end. ‘*’ means         of concepts and relationships between concepts are defined. In DL,
            “zero or more”.                                                 there is a single construct to model these: the role. Roles are first-
                                                                            class entities: a binary role represents a binary relation on the uni-
      A line with a closed arrowhead represents generalisation,            verse of discourse U , i.e. a subset of U 2 . A given role can poten-
       with the arrow pointing to the more general class.                   tially be used to make an assertion about any individual in U .

UML contains many other modelling constructs besides those men-             A concept can be defined in terms of restrictions on the possible
tioned here [5, 28], such as n-ary associations, association classes        value types, number of values, or possible values for a role when
                                                                            applied to instances of that concept. Apart from any type restric-
(associations with their own attributes and the ability to take part in
associations with other objects), associations navigable in one di-         tions declared for particular concepts, roles are untyped. Also, if an
rection only, and “ordered” constraints on association ends (speci-         ontology makes no mention of a role in relation to a given concept,
fying a sequence-based rather than set-based semantics). UML also           this does not prevent a knowledge base from containing assertions
includes the Object Constraint Language (OCL) that can be used to           that an instance of a concept has a value for that role. Consider
constrain the possible models of a specification in ways that cannot        the Set concept defined earlier. This has no mention of any roles,
                                                                            although it is clear from the definition of Team (which is a speciali-
be achieved using the UML structural elements alone.
                                                                            sation of Set with restrictions on member) that the intended way of
Examples of more complex ontologies expressed in UML can be                 stating that instances are members of a set is to use the member role.
found elsewhere [12, 10, 11].                                               However, if the knowledge base contained the assertions (Set s)
                                                                            and (element s a) (where the second assertion uses the wrong
                                                                            vocabulary to refer to members of a set), this would not be consid-
4.     DESCRIPTION LOGIC AND UML:                                           ered to be an error (assuming that the role element was introduced
       A COMPARISON                                                         for some other concept in the ontology, e.g. PeriodicTable).
Description logic and UML have resulted from different fields of
research. Description logic was produced by the knowledge rep-              In fact, some forms of description logic would allow the ontology
resentation community as a formalisation of the conceptual mod-             designer to state that member is defined for Set by a statement of
elling support provided by systems such as KL-ONE. In particu-              the following form, which means that Set is a special case of things
lar, description logic is optimised to allow automated consistency          that have values for the member role:
checking and the classification of new concepts with respect to
existing concepts as the model is constructed. UML stems from                        

research into object-oriented modelling and is designed to allow              Set  (exists member Anything)
the direct expression of analysis and design models of problem do-
mains and software systems using OO concepts. In this section we            Ignoring the fact that this does not allow for empty sets, this now
will look at these differences from an agent system viewpoint.              allows the absence of any member assertions about set s to be de-
                                                                            tected (which may result in the mistaken use of element to be
4.1 Modelling paradigm                                                      discovered).
Defining an ontology in DL involves introducing terms naming or
describing concepts and combining them to create new terms de-              However, the fact that such declarations are not required before re-
scribing more complex concepts. Consider the DL definition of               ferring to member in a sub-concept means that developers (or tools
Team shown earlier:                                                         supporting DL) must exercise a certain discipline when building
                                                                            ontologies. This could become a problem when attempting to scale
     Team = (and Set
          
                                                                            the use of DL large-scale team development of ontologies.
                 (all member Human)
                 (atleast 2 member))                                        While the above declaration now indicates that the member role is
This definition states that the concept described by the symbol Team        associated with the concept Set, and therefore provides guidance
is the conjunction of three other concepts: Set, the unnamed con-           for users of the ontology, it still does not help to directly detect the
cept of anything that has a member role having a value that is any          mistaken assertion of (element s a) in the knowledge base. The
instance of the concept Human, and the unnamed concept of any-              following declaration would help:
thing that has a member role having at least two values. Although
these latter two concepts are highly unlikely to be of interest to                                                  
                                                                              (exists element Anything)  PeriodicTable
agents, it is unavoidable in DL that mentioning these role restric-
tions for the Team concept introduces them as concepts with the
same status as any others.                                                  This restricts the domain of element to the concept PeriodicTable
                                                                            and therefore it can no longer be used to make assertions about sets.
In UML, a class diagram is a direct specification of the structure of       However, there is now a more serious problem: Two designers can-
a number of classes and the relationships between them. A class is          not work on independent parts of the ontology without reserving
defined by firstly an optional parent class (or a set of parent classes),   unique names for every role they need to define. This is clearly not
from which it inherits all attributes and associations, and secondly        a viable approach.
a set of additional attributes and associations. Each class can be
seen as the template for all instances of that class. Only the classes      It could be argued that it is not desirable to prevent the simulta-
that are of interest to the modeller need to be defined.                    neous use of different terms such as member and element in the
same database. This could be compared with Tim Berners-Lee’s                  Concept Satisfiability
                                                                                Can a concept C have a non-empty set of instances?
notion of the Semantic Web where “anyone can say anything about
anything” [2]. However, this requirement does not seem to ap-
ply to ontology-based agent communication. The nature of inter-                 Detecting when a concept is unsatisfiable can be useful dur-
agent communication using an agent communication language is                    ing ontology design to alert the user when an invalid model
that agents agree on an ontology to use. They know what the ap-                 is being defined.
plicable roles are for each individual they wish to talk about and
                                                                              Subsumption
can be assumed to converse in it correctly. While it will no doubt
be necessary to translate between ontologies, this is probably bet-             Is a given concept description more general or more specific
ter handled as a separate process involving specialised translation             than another, or can no such relation be established?
agents.
                                                                                The ability to answer this question allows DL systems to per-
                                                                                form automatic classification of concepts. When an ontology
In contrast, in UML, the internal structure and relationships be-
                                                                                designer defines a new concept, the system can determine
tween classes are represented by attributes and associations, with              how this concept relates to other existing ones.
attributes being used to represent slots of simple types and asso-
ciations being used to express relationships between classes. At-             Knowledge-Base Satisfiability
tributes and associations are not defined globally, but are defined
in the context of the particular classes with which they are con-               Are the model and the set of recorded instances consistent
cerned. Thus, since an attribute of a class is only known in the                with each other?
context of that class, it may be expressed as a simple identifier,              This check can be used to validate a model using sample in-
such as “name”, “member”, etc., without the necessity of defining               stance data. It can also potentially be used during normal
its global semantics for the whole model.                                       agent operation to check that meaningful information is be-
                                                                                ing provided by other agents.
One of the significant features that UML offers is assistance at de-
sign time in the management of complexity. This is accomplished               Instance Checking
by the way in which modelling elements are localised in scope.                  Is a an instance of concept C in any model of the knowledge
This feature of design locality makes it more likely that the model             base?
designer will be able to construct a more complex design by means
of manageable ‘chunks’, whose complexity is encapsulated within                 This is closely related to the previous question and is also
the scope of a class or a few classes. Although a DL may provide                concerned with the validation of information.
more advanced mechanisms for detecting inconsistencies among
modelling elements that the designer has constructed, it doesn’t of-
                                                                          The first two categories above are applicable during the design of
fer the guidance in managing complexity that UML does. The de-
                                                                          an ontology and are well supported by description logic. In con-
sign locality that UML inherently offers by means of its structure
                                                                          trast, there are no corresponding analysis capabilities for UML.
assists the design in “getting it right from the outset”, and the value
                                                                          However, object-oriented modelling is a mature field with well-
of this feature should not be underestimated.
                                                                          established and proven methodologies for the design of models.
                                                                          This suggests that such inference abilities are not critical to the pro-
4.3 Formal Properties                                                     cess of designing complex models.
Much research has been done on the semantics of description log-
ics and the computational complexity of reasoning with them to an-        It could be possible to equip UML design tools with similar capa-
swer various types of questions about models. This is the main ad-        bilities. However, the structural modelling elements of UML to-
vantage of using DLs for ontology modelling: their well-understood        gether with the Object Constraint Language provides a formalism
properties. This depth of research has also led to the definition of      that is more expressive than DL and the usual trade-off between
a wide array of different DLs with varying degrees of expressive-         representational power and tractability applies. As OCL is “es-
ness; however as these generally share a common core of modelling         sentially a variant of [first order predicate logic] tuned for writing
concepts, interoperability shouldn’t be a problem.                        constraints on object structures” [9], concept satisfiability is only
                                                                          semi-decidable for UML.
In contrast, UML currently lacks a formal definition. The semantics
of UML are defined by a metamodel, some additional constraints            It can also be argued that automatic classification based on struc-
expressed in the Object Constraint Language (essentially a form of        tural properties of a concept is not always desirable. The subsump-
first-order logic with an object-oriented syntax), and descriptions of    tion inference leads to problems where the distinction between two
the various elements of the language in English. This shortcoming         concepts cannot be modelled explicitly in the language, but the on-
is being addressed by the Precise UML Group [32] who are actively         tology designer wishes to have a “strongly typed” system in which
working on formal semantics for UML.                                      these concepts are distinct. For example, an ontology may con-
                                                                          tain two specialisations of collections: sets and lists. What is the
4.4 Inference Capabilities                                                subsumption relation between the three concepts if DL does not
There are various possible types of inference that a knowledge rep-       provide means to describe the differences?
resentation system could support. This section compares DL and
UML in terms of a number of different categories of reasoning.            The latter two categories above don’t have precise counterparts for
                                                                          UML. In UML an object always has a specific class associated with
The first four categories are listed by Bucheit et al. [8] as the min-    it and it is (conceptually at least) a structure that must conform
imum features that should be offered by a DL-based knowledge              to the structural definition of that class. However, in the presence
representation system:                                                    of OCL constraints in the ontology that relate to that class it is
necessary to check these in order to be certain that an object is valid.                                                     : Person      child   parent     : Person
There are now UML tools emerging [3, 35] that can store instances
                                                                                     : Man
                                                                                 name = "Kim"            +                 name = "Kim"                     name = "Bob"
and check that they conform to any relevant OCL constraints.
                                                                                                parent
The following two additional categories of reasoning are also likely                            2
                                                                                                            * child          { son = child->select(oclIsTypeOf(Man))
to be of interest to agent systems.                                                      Person

                                                                             +        name : String
                                                                                                            2
                                                                                                                              Person.allInstances->forAll(
                                                                                                                               p | self.name = p.name implies self = p) }

    Reasoning with Metaproperties                                                                          *
                                                                                             Man
      Some knowledge representation languages allow slots, roles                                            /son
      or properties (depending on the terminology used) to have
      certain ‘metaproperties’. For example, in OIL [31], proper-
      ties can be declared to be transitive, symmetric or functional.                                              child       parent
                                                                                                    : Man                                 : Person
      These declarations provide information that an agent could
                                                                                             name = "Kim"                               name = "Bob"
      potentially use for deduction.                                                                                son

    General Rule-Based Reasoning
      Ontologies expressed in lower-level languages such as KIF
      can include general axioms. The use of the frame ontology              Figure 2: An example of inference over knowledge in UML
      with KIF allows ontologies to be defined using the concept
      of frames while still retaining the ability to include general
                                                                           Description logics also have no notion of rules, although an ABox
      logical axioms. In many cases these axioms may simply be
                                                                           component in a knowledge representation system may support them.
      considered to be for specification and certification purposes
                                                                           OIL 1.0 ontologies could include a ‘rule-base’ but no specifica-
      only: any agent advertising that it can communicate using
                                                                           tion was given for the meaning of the rules or how they relate
      the ontology should always generate conforming instances.
                                                                           to the conceptual modelling part of the language. Later versions
      However, it is also possible for ontologies to include axioms
                                                                           of OIL and DAML+OIL [17] do not support this, but the defini-
      that agents might plausibly use to perform inference, partic-
                                                                           tion of a “DAML-L” language (combining conceptual models with
      ularly if–then rules that could be used in backwards chaining
                                                                           semantically-integrated rules) is a long-term aim of the DAML
      inference to answer queries, or in forward chaining inference
                                                                           project.
      to generate new information.
                                                                           Although UML does not resemble a traditional logic-based lan-
                                                                           guage recent research has shown how inference rules in UML can
Metaproperties can generally be defined using lower-level mod-
                                                                           be expressed as graph transformations on the UML metamodel [18,
elling constructs. In the case of OIL, their meaning is defined by
                                                                           22]. To give a taste of what inference with UML might look like,
expressions in an expressive description logic. While the underly-
                                                                           Figure 2 shows how new knowledge in the form of an object dia-
ing description logic is powerful enough to encode these notions
                                                                           gram can be generated by combining existing knowledge and infor-
using more primitive concepts such as role subsumption, agents
                                                                           mation about the ontology. In this example, one agent has commu-
are likely to want to make explicit deductions using metaproper-
                                                                           nicated to another that there is an object of class Man with “Kim” as
ties, rather than just having this information included in the more
                                                                           the value of its name attribute. The other agent knows that there is a
generic deductions described above. Although some DL-based sys-
tems can use satisfiability tests to perform more general inference
                                                                           Person object with name Kim and that this object is the child of a
by refutation, this is unlikely to be very efficient. It would be more
                                                                           Person object with name Bob. The ontology for this domain states
                                                                           that Man is a specialisation of Person, and includes two OCL con-
useful for agents to explicitly take note of metaproperties such as
                                                                           straints: one defining the derived (indicated by a ‘/’) role son (a son
transitivity that might occur in an ontology and use it to generate
                                                                           is a child that is a man), and the other stating (rather unrealistically)
new knowledge from old. Description logic has nothing to offer
                                                                           that the name attribute uniquely identifies objects of class Person.
in this regard: knowledge representation systems based on DL typ-
                                                                           Over several steps of inference the agent can conclude that the two
ically have a separate “ABox” (the “assertional” component) that
                                                                           objects with name Kim are the same and therefore Kim is a male
contains instance data and may have application-specific inference
                                                                           child, i.e. a son. Implementing this style of deduction in UML is a
mechanisms that are not formally connected with the DL inference
                                                                           subject for future research.
mechanisms.

For UML models, OCL constraints can be used to declare asso-               5. UML AND AGENT COMMUNICATION
ciation properties such as transitivity. However, describing such          In the previous sections we focused on the benefits of using UML
constraints may involve writing moderately complex OCL expres-             from the conceptual modelling perspective. However, in distributed
sions that are not immediately understandable to a human reader            agent systems, besides the ontology, agents need a concrete knowl-
(or an agent). Furthermore, there may be several different expres-         edge exchange language to be able to communicate with each other.
sions encoding the same constraint. One way around this would
be to use one of UML’s extension mechanisms, stereotypes, to de-           While the standards of the Foundation for Intelligent Physical agents
fine specialised types of association that are constrained (by OCL)        (FIPA) [20] are widely accepted as providing a good foundation for
to have certain metaproperties such as transitivity. An agent could        agent communication—ranging from the basic transportation pro-
then recognise the appearance of (e.g.) a ‘transitive’ stereotype and      tocol to the speech act level—the encoding of the message content
make inferences based on this knowledge, even if it could not un-          itself is still an open issue.
derstand OCL.
             : Person                       : ProfessionalBody                                             Marshalling
       givenName = "Sally"   memberOf   name = "ACM"                                                        package                       RDF API
       familyName ="Smith"              profession = "Computing                                                 .. {           uses            .. {
                                                      Machinery"                                                 ...(.) {
                                                                                                                  .....
                                                                                                                                                ...(.) {
                                                                                                                                                 .....
                                                                                                                   }                              }
                                        codeOfEthics = "Don’t write                                             }                              }
                                                        viruses"
              : Person
                                                                                                     uses                        javac
       givenName = "John"
       familyName ="Brown"                                                                          Java                           Java
                                                                                                 source files                   class files
                                                                                                    .. {                              100110
                                                                            UML-based                ...(.) {          javac          101001               loads
                                                                                                      .....                           011011
                                                                            design tool                                                                              Agents
       Figure 3: A simple UML object diagram example                                                }
                                                                                                       }                              000110
                                                                                                                                      101101

                                                                                          XSLT
                                                                                                           references
                                                                                                                                 references
                                                                               <....>
                                                                                          XSLT                                     references
The use of an object-oriented ontology representation language for              <....>
                                                                                  <...>
                                                                                 <.>
ontology modelling raises interesting questions about the form in              <..>


which knowledge should be stored within an agent and encoded                                     RDF schema                                                          Knowledge
                                                                           XMI document           (in XML)                                                         (in RDF/XML)
within inter-agent messages. If an agent developer is using an
object-oriented model of the problem domain and is also using a
agent development toolkit based on an object-oriented language
(such as Java), it may be most convenient to encode domain knowl-            Figure 4: UML “data binding” via an RDF serialisation
edge using Java objects and to include these within messages to
play the role of propositions. There is evidence for a desire amongst
                                                                             1. a concise and convenient representation for object diagrams
agent developers to have this ability: the FIPA content language
                                                                                within an agent (e.g. as networks of Java objects)
SL (for “Semantic Language”) includes the ability to use func-
tional terms built from object ‘constructors’ that appear in the on-         2. a concise and convenient serialisation format for object dia-
tology, the JADE agent platform [16] allows application-specific                grams
Java classes to be associated with concepts in an ontology, and
members of the FIPA agentcities mailing list have been discussing            3. a marshalling framework to make it easy for agents to convert
the inclusion of ontology-specific objects within XML encodings                 between 1 and 2.
of messages.

Given a set of ontologies described using UML class diagrams,             Requirement 1 can be achieved (for agents developed using Java)
knowledge about the domains described in these ontologies can be          by generating from a UML class diagram a set of corresponding
expressed as instances of the classes in the ontologies. This knowl-      Java classes.
edge can therefore be formalised as a UML object diagram. In
object diagrams, rectangles denote objects, specifying their class        A candidate for requirement 2 is the XML Model Interchange (XMI)
and the object’s attribute values. The lines between objects show         format which is an XML-based standard for exchanging models. In
‘links’: instances of associations between classes.                       particular it provides an XML DTD corresponding to the concepts
                                                                          in the UML metamodel. This provides a convenient format for
Figure 3 shows a simple object diagram showing instances of the           exchanging a model such as an ontology. However, it does not pro-
classes defined in Figure 1. This can be considered to be a declar-       vide a concise and convenient way to encode object diagrams. This
ative representation of knowledge. It states that there are Person        is because the UML metamodel has concepts such as Instance, Link
objects with names “Sally Smith” and “John Brown” and that these          and LinkEnd rather than domain-specific concepts such as Person,
are both members of the ProfessionalBody object with name “ACM”.          Organisation, etc. Therefore an XMI encoding of an object diagram
It also records the profession and code of ethics of this latter object   has separate cross-referenced entities for each instance, ‘attribute
(note: this diagram in no way represents the official policy of the       link’, link and link end and an application has to piece together the
ACM).                                                                     application-specific objects from these.

For a simple, domain-specific agent, this diagram (or, more accu-         A better solution is to generate a domain-specific schema from the
rately, a Java or OODBMS encoding of it) may be the most conve-           class diagram. One possibility is to generate an XML schema and
nient way to represent knowledge, rather than using a knowledge           then Requirement 3 could be satisfied by one of the various Java
base containing separate facts such as class(object1, person)             XML binding [33] implementations under development. However,
and givenName(object1, "Sally"). The choice between these                 an alternative approach has been taken based on the simpler data
representations may depend largely on how much (if any) reasoning         model underlying the Resource Description Framework (RDF) [25].
the agent is expected to do. If general deductive capabilities are re-    Figure 4 shows an implemented mechanism [10, 11] for generating
quired, then a traditional logic-based representation of knowledge        RDF schemas and sets of Java classes corresponding to ontologies
is likely to be more suitable. However, this will not be required for     in UML. The generation is performed using Extensible Stylesheet
all agents.                                                               Language Transformations [36]. The generated classes in conjunc-
                                                                          tion with some additional marshalling support classes allow object
                                                                          diagrams to be converted between in-memory networks of Java ob-
5.1 Message serialisation via RDF                                         jects and RDF serialisations with a single method call.
If two agents represent domain knowledge as object diagrams, it
would be most convenient for them to communicate information to           This technique can be extended to allow complete agent messages
each other in this form as well. To provide this ability requires:        (not just the content expression) to be conceptualised as UML ob-
ject diagrams and serialised using RDF. Agent communication lan-         
guages and content languages can be viewed as an ontologies for
                                                                           Sally
communication and knowledge representation, and their abstract
                                                                           Smith
syntax can be defined using UML. This approach to language speci-          
fication could be less error-prone than the grammar-based approach           
used currently, and would provide a uniform framework for mod-             
elling and investigating the relationships between agent communi-        
cation languages and ontologies [15, 14].
                                                                         
                                                                           John
5.2 Message serialisation via SOAP                                         Brown
The RDF serialisation provides a machine-readable and ontology-            
specific encoding of object-oriented knowledge that can be used              
for encoding knowledge within messages or for publishing infor-            
mation on the “Semantic Web”. However, the RDF format is not             
ideal for this purpose. One problem is that RDF (like DL) has uni-
versal ‘properties’ which must be used to represent class attributes     
and association ends. The solution chosen was to generate unique           ACM
property names within each class by prepending the class name to           Computing Machinery
each UML attribute and rolename. However, this makes the RDF               Don't write viruses
serialisation verbose for a human to read. In addition there are a         
number of other factors that complicate human reading and ma-                
chine parsing of RDF files [23].                                             
                                                                           
An alternative is to use the serialisation format of the Simple Object   
Access Protocol (SOAP) [6]. SOAP is a specification covering re-
mote procedure calls over HTTP. It contains an object serialisation
format that can be compared to the Resource Description Format                 Figure 5: SOAP encoding of the object diagram
(RDF) to some extent, although RDF is more than just an object
serialisation format.
                                                                         7. REFERENCES
SOAP is supported by computer industry leaders like Microsoft,           [1] F. Bergenti and A. Poggi. Exploiting UML in the design of
IBM and SUN. The simplicity of SOAP together with the strong                 multi-agent systems. In A. Omicini, R. Tolksdorf, and
support from the industry suggests that many SOAP-based services             F. Zambonelli, editors, Engineering Societies in the Agents
will be available in the near future. Although SOAP is an rela-              World, Lecture Notes in Computer Science 1972, pages
tively young technology, implementations for many programming                106–113. Springer, 2000. (an earlier version is available at
languages are available. SOAP is suited for all kinds of automated           http://lia.deis.unibo.it/confs/ESAW00/pdf/ESAW13.pdf).
internet services like weather forecasts, traffic services, and logis-
tics coordination, to give just a few examples.                          [2] T. Berners-Lee. Metadata architecture. World Wide Web
                                                                             Consortium Discussion Document, 1997.
The main difference from RDF is that SOAP does not rely on glob-             http://www.w3.org/2000/01/sw/.
ally unique slot names, thus the inclusion of the class name in the      [3] BoldSoft. ModelRun product Web page.
property name is not neccessary.                                             http://www.boldsoft.com/products/modelrun/, 2001.
Figure 5 shows the SOAP serialisation of the object diagram shown        [4] G. Booch. Object-Oriented Analysis and Design with
in Figure 3.                                                                 Applications. Addison-Wesley, 2nd edition, 1994.
                                                                         [5] G. Booch, I. Jacobson, and J. Rumbaugh. The Unified
6.    CONCLUSION                                                             Modeling Language User Guide. Addison-Wesley, 1998.
This paper has discussed the application of the Unified Modeling
Language to ontology modelling for agent systems. The charac-            [6] D. Box, D. Ehnebuske, G. Kakivaya, A. Layman,
teristics of UML and description logic—the most widely used tra-             N. Mendelsohn, H. F. Nielsen, S. Thatte, and D. Winer.
ditional ontology modelling language—were compared. Although                 Simple Object Access Protocol (SOAP) 1.1. Note, World
UML may not currently have the support for reasoning that is of-             Wide Web Consortium, 2000.
fered by description logic, we believe that UML’s strengths in many          http://www.w3.org/TR/2000/NOTE-SOAP-20000508.
other areas make it suitable as a candidate for general adoption for
ontology representation. In particular its features that assist in the   [7] R. J. Brachman and J. G. Schmolze. An overview of the
modelling of complex systems and its association with many other             KL-ONE knowledge representation system. Cognitive
standard business technologies suggest that there is a significant           Science, 9(2):171–216, April 1985.
advantage to using UML in comparison with other approaches cur-          [8] M. Buchheit, F. Donini, and A. Schaerf. Decidable reasoning
rently in use.                                                               in terminological knowledge representation systems. Journal
                                                                             of Artificial Intelligence Research, 1:109–138, 1993.
The paper also discussed the use of UML for representing instance
information within agent messages and presented some technolo-           [9] T. Clark, A. Evans, S. Kent, S. Brodsky, and S. Cook. A
gies to support this style of knowledge representation.                      feasibility study in rearchitecting UML as a family of
     languages using a precise OO meta-modeling approach.            [22] M. Gogolla. Graph transformations on the UML metamodel.
     Report, Precise UML Group, September 2000.                           In Proceedings of the ICALP Workshop on Graph
     http://www.cs.york.ac.uk/puml/mml/mmf.pdf.                           Transformations and Visual Modeling Techniques
                                                                          (GVMT’2000), pages 359–371. Carleton Scientific, 2000.
[10] S. Cranefield. Networked knowledge representation and                ftp://ftp.informatik.uni-bremen.de/%2Flocal/db/papers/
     exchange using UML and RDF. Journal of Digital                       Gogolla 2000 GraGra.ps.
     Information, 1(8), 2001. http://jodi.ecs.soton.ac.uk/.
                                                                     [23] S. Haustein. Semantic Web languages: RDF vs. SOAP
[11] S. Cranefield. UML and the Semantic Web. Proceedings of the          serialisation. In Proceedings of the Second International
     Semantic Web Working Symposium (SWWS), 2001 (to appear).             Workshop on the Semantic Web, pages 14–22, May 2001.
     Earlier version available at http://www.otago.ac.nz/                 http://semanticweb2001.aifb.uni-karlsruhe.de/
     informationscience/publctns/complete/papers/dp2001-04.pdf.gz.        semanticWebWorkshop2001.pdf.
[12] S. Cranefield and M. Purvis. UML as an ontology modelling       [24] Knowledge Systems Laboratory. The Frame Ontology.
     language. In Proceedings of the Workshop on Intelligent              ftp://ftp.ksl.stanford.edu/pub/knowledge-sharing/ontologies/
     Information Integration, 16th International Joint Conference         html/frame-ontology/frame-ontology.lisp.html, 1994.
     on Artificial Intelligence (IJCAI-99), 1999.
     http://sunsite.informatik.rwth-aachen.de/Publications/          [25] O. Lassila and R. R. Swick. Ressource Description
     CEUR-WS/Vol-23/cranefield-ijcai99-iii.pdf.                           Framework (RDF) model and syntax specification. Technical
                                                                          report, World Wide Web Consortium, 1999.
[13] S. Cranefield and M. Purvis. Extending agent messaging to            http://www.w3.org/TR/1999/REC-RDF-SYNTAX-
     enable OO information exchange. In R. Trappl, editor,                19990222.
     Cybernetics and Systems 2000: Proceedings of the 2nd
     International Symposium “From Agent Theory to Agent             [26] National Committee for Information Technology Standards.
     Implementation” (AT2AI-2) at the 5th European Meeting on             Draft proposed American national standard for Knowledge
     Cybernetics and Systems Research (EMCSR 2000), Vienna,               Interchange Format. http://logic.stanford.edu/kif/dpans.html,
     2000. Austrian Society for Cybernetic Studies. An earlier            1998.
     version is available at http://www.otago.ac.nz/                 [27] B. Nebel. Reasoning and Revision in Hybrid Representation
     informationscience/publctns/complete/papers/dp2000-                  Systems. Number 422 in Lecture Notes in Artificial
     07.pdf.gz.                                                           Intelligence. Springer-Verlag, 1990.
[14] S. Cranefield and M. Purvis. Generating ontology-specific       [28] Object Management Group. OMG Unified Modeling
     content languages. In Proceedings of the Workshop on                 Language Specification, version 1.3.
     Ontologies in Agent Systems, 5th International Conference            http://www.omg.org/technology/documents/formal/
     on Autonomous Agents, 2001. http://sunsite.informatik.rwth-          unified modeling language.htm, 2000.
     aachen.de/Publications/CEUR-WS/.
                                                                     [29] Object Management Group. OMG Web site.
[15] S. Cranefield, M. Purvis, and M. Nowostawski. Is it an               http://www.omg.org/, 2001.
     ontology or an abstract syntax? Modelling objects,
     knowledge and agent messages. In Proceedings of the             [30] Object Management Group. UML textual notation RFP.
     Workshop on Applications of Ontologies and                           http://www.omg.org/techprocess/meetings/schedule/
     Problem-Solving Methods, 14th European Conference on                 UML Textual Notation RFP.html, 2001.
     Artificial Intelligence (ECAI 2000), 2000.                      [31] On-To-Knowledge project. OIL Web site.
     http://delicias.dia.fi.upm.es/WORKSHOP/ECAI00/16.pdf.
                                                                          http://www.ontoknowledge.org/oil, 2000.
[16] CSELT. The JADE agent platform Web site.                        [32] Precise UML Group. The Precise UML Group home page.
     http://sharon.cselt.it/projects/jade/, 2001.                         http://www.puml.org, 2001.
[17] DARPA Technology Integration Center. DAML project Web           [33] M. Reinhold. XML data binding specification. Java
     site. http://www.daml.org, 2001.                                     Specification Request JSR-000031, Sun Microsystems,
                                                                          1999. http://java.sun.com/aboutJava/communityprocess/jsr/
[18] A. S. Evans. Reasoning with UML class diagrams. In
                                                                          jsr_031_xmld.html.
     Proceedings of the Workshop on Industrial Strength Formal
     Methods (WIFT’98). IEEE Press, 1998.                            [34] Technische Universität Dresden. Dresden OCL toolkit.
     http://www.cs.york.ac.uk/puml/papers/evanswift.pdf.                  http://sourceforge.net/projects/dresden-ocl/, 2000.
[19] A. Farquhar, R. Fikes, and J. Rice. The Ontolingua Server: a    [35] University of Bremen. A UML-based specification
     tool for collaborative ontology construction. In Proceedings         environment.
     of the 10th Knowledge Acquisition for Knowledge-Based                http://www.db.informatik.uni-bremen.de/projects/USE/,
     Systems Workshop (KAW’96), 1996.                                     2001.

[20] Foundation for Intelligent Physical Agents. FIPA Web site.      [36] World Wide Web Consortium. XSL Transformations (XSLT)
     http://www.fipa.org, 2001.                                           version 1.0. http://www.w3.org/TR/xslt, 1999.

[21] M. R. Genesereth and N. J. Nilsson. Logical Foundations of
     Artificial Intelligence. Morgan Kaufmann, 1987.