The Semantic Web should enable greater access not only to content but also to services on the Web. Users and software agents should be able to discover, invoke, compose, and monitor Web resources offering particular services and having particular properties. As part of the DARPA Agent Markup Language program, we have begun to develop an ontology of services, called DAML-S, that will make these functionalities possible. This white paper describes the overall structure of the ontology, the service profile for advertising services, and the process model for the detailed description of the operation of services. We also compare DAML-S with several industry efforts to define standards for characterizing services on the Web.
Efforts toward the creation of the Semantic Web are gaining momentum [2]. Soon it will be possible to access web resources by content rather than just by keywords. A significant force in this movement is the development of DAML--the DARPA Agent Markup Language [8]. DAML enables the creation of ontologies for any domain and the instantiation of these ontologies in the description of specific web sites.
Among the most important web resources are those that provide services. By ``service'' we mean Web sites that do not merely provide static information but allow one to effect some action or change in the world, such as the sale of a product or the control of a physical device. The Semantic Web should enable users to locate, select, employ, compose, and monitor Web-based services automatically.
To make use of a Web service, a software agent needs a computer-interpretable description of the service, and the means by which it is accessed. An important goal for DAML, then, is to establish a framework within which these descriptions are made and shared. Web sites should be able to employ a set of basic classes and properties for declaring and describing services, and the ontology structuring mechanisms of DAML provide the appropriate framework within which to do this.
This white paper describes an effort to define just such an ontology. We call this language DAML-S. We first motivate our effort with some sample tasks. In the central part of the paper we describe the upper ontology for services that we have developed, including the ontologies for profiles, processes, and time, and thoughts toward a future ontology of process control. We then compare DAML-S with a number of recent efforts in industry to standardize a markup language for services.
Services can be primitive in the sense that they invoke only a single Web-accessible computer program, sensor, or device that does not rely upon another Web service, and there is no ongoing interaction between the user and the service, beyond a simple response. For example, a service that returns a postal code or the longitude and latitude when given an address would be in this category. Or services can be complex, composed of multiple primitive services, often requiring an interaction or conversation between the user and the services, so that the user can make choices and provide information conditionally. One's interaction with www.amazon.com to buy a book is like this; the user searches for books by various criteria, perhaps reads reviews, may or may not decide to buy, and gives credit card and mailing information. DAML-S is meant to support both categories of services, but of course, complex services have provided the primary motivations for the features of the language [11,12]. The following four sample tasks will give the reader an idea of the kinds of tasks we expect DAML-S to enable.
Any Web-accessible program/sensor/device that is declared as a service will be regarded as a service. DAML-S does not preclude declaring simple, static web pages to be services. But our primary motivation in defining DAML-S has been to support more complex tasks like those described above.
The class Service stands at the top of a taxonomy of services, and its properties are the properties normally associated with all kinds of services. The upper ontology for services is silent as to what the particular subclasses of Service should be, or even the conceptual basis for structuring this taxonomy, but it is expected that the taxonomy will be structured according to functional and domain differences and market needs. For example, one might imagine a broad subclass, B2C-transaction, which would encompass services for purchasing items from retail web sites, tracking purchase status, establishing and maintaining accounts with the sites, and so on.
Our structuring of the ontology of services is motivated by the need to provide three essential types of knowledge about a service (shown in figure 1), each characterized by the question it answers:
The properties presents, describedBy, and supports are properties of Service. The classes ServiceProfile, ServiceModel, and ServiceGrounding are the respective ranges of those properties. We expect that each descendant class of Service, such as B2C-transaction, will present a descendant class of ServiceProfile, be describedBy a descendant class of ServiceModel, and support a descendant class of ServiceGrounding. The details of profiles, models, and groundings may vary widely from one type of service to another--that is, from one descendant class of Service to another. But each of these three classes provides an essential type of information about the service, as characterized in the rest of the paper.
The service profile tells ``what the service does''; that is, it gives the type of information needed by a service-seeking agent to determine whether the service meets its needs (typically such things as input and output types, preconditions and postconditions, and binding patterns). Ultimately, we will want to be able to use logical rules in such a specification for expressing interactions among parameters. For instance, a rule might say that if a particular input argument is bound in a certain way, certain other input arguments may not be needed, or may be provided by the service itself. Indeed, as DAML and DAML-S evolve, logical rules, and inferential approaches enabled by them, are likely to play an increasingly important role in models and groundings, as well as in profiles. See [5] for additional examples.
The service model tells ``how the service works''; that is, it describes what happens when the service is carried out. For non-trivial services (those composed of several steps over time), this description may be used by a service-seeking agent in at least four different ways: (1) to perform a more in-depth analysis of whether the service meets its needs; (2) to compose service descriptions from multiple services to perform a specific task; (3) during the course of the service enactment, to coordinate the activities of the different participants; (4) to monitor the execution of the service. For non-trivial services, the first two tasks require a model of action and process, the last two involve, in addition, an execution model.
A service grounding (``grounding'' for short) specifies the details of how an agent can access a service. Typically a grounding will specify a communications protocol (e.g., RPC, HTTP-FORM, CORBA IDL, SOAP, Java RMI, OAA ACL [10]), and service-specific details such as port numbers used in contacting the service. In addition, the grounding must specify, for each abstract type specified in the ServiceModel, an unambiguous way of exchanging data elements of that type with the service (that is, the marshaling/serialization techniques employed). The likelihood is that a relatively small set of groundings will come to be widely used in conjunction with DAML services. Groundings will be specified at various well-known URIs.
Generally speaking, the ServiceProfile provides the information needed for an agent to discover a service. Taken together, the ServiceModel and ServiceGrounding objects associated with a service provide enough information for an agent to make use of a service.
The upper ontology for services deliberately does not specify any cardinalities for the properties presents, describedBy, and supports. Although, in principle, a service needs all three properties to be fully characterized, it is possible to imagine situations in which a partial characterization could be useful. Hence, there is no specification of a minimum cardinality. Further, it should certainly be possible for a service to offer multiple profiles, multiple models, and/or multiple groundings. Hence, there is no specification of a maximum cardinality.
In general, there need not exist a one-to-one correspondence between profiles, models, and/or groundings. The only constraint among these three characterizations that might appropriately be expressed at the upper level ontology is that for each model, there must be at least one supporting grounding.
In the following two sections we discuss the service profile and the service model in greater detail (Service groundings are not discussed further, but will be covered in greater depth in a subsequent publication.)
A service profile provides a high-level description of a service and its provider [18,17]; it is used to request or advertise services with discovery/location registries. Service profiles consist of three types of information: a human readable description of the service; a specification of the functionalities that are provided by the service; and a host of functional attributes which provide additional information and requirements about the service that assist when reasoning about several services with similar capabilities. Service functionalities are represented as a transformation from the inputs required by the service to the outputs produced. For example, a news reporting service would advertise itself as a service that, given a date, will return the news reported on that date. Functional attributes specify additional information about the service, such as what guarantees of response time or accuracy it provides, or the cost of the service.
While service providers use the service profile to advertise their services, service requesters use the profile to specify what services they need and what they expect from such a service. For instance, a requester may look for a news service that reports stock quotes with no delay with respect to the market. The role of the registries is to match the request against the profiles advertised by other services and identify which services provide the best match.
Implicitly, the service profiles specify the intended purpose of the service, because they specify only those functionalities that are publicly provided. A book-selling service may involve two different functionalities: it allows other services to browse its site to find books of interest, and it allows them to buy the books they found. The book-seller has the choice of advertising just the book-buying service or both the browsing functionality and the buying functionality. In the latter case the service makes public that it can provide browsing services, and it allows everybody to browse its registry without buying a book. In contrast, by advertising only the book-selling functionality, but not the browsing, the agent discourages browsing by requesters that do not intend to buy. The decision as to which functionalities to advertise determines how the service will be used: a requester that intends to browse but not to buy would select a service that advertises both buying and browsing capabilities, but not one that advertises buying only.
The service profile contains only the information that allows registries to decide which advertisements are matched by a request. To this extent, the information in the profile is a summary of the information in the process model and service grounding. Where, as in the above example, the service does not advertise some of its functionalities, they will not be part of the service profile. But they are part of the service model to the extent that they are needed for achieving the advertised services. For example, looking for a book is an essential prerequisite for buying it, so it would be specified in the process model, but not necessarily in the profile. Similarly, information about shipping may appear within the process model but not the profile.
Information about the service, such as its provenance, a text summary etc is provided within the profile. This is primarily for use by human users, although these properties are considered when locating requested services.
An essential component of the profile is the specification of what the service provides and the specification of the conditions that have to be satisfied for a successful result. In addition, the profile specifies what conditions result from the service including the expected and unexpected results of the service activity.
The service is represented by input and output properties of the profile. The input property specifies the information that the service requires to proceed with the computation. For example, a book-selling service could require the credit-card number and bibliographical information of the book to sell. The outputs specify what is the result of the operation of the service. For the book-selling agent the output could be a receipt that acknowledges the sale.
<rdf:Property rdf:ID="input"> <rdfs:comment> Property describing the inputs of a service in the Service Profile </rdfs:comment> <rdfs:domain rdf:resource="#ServiceProfile"/> <rdfs:subPropertyOf rdf:resource="#parameter"/> </rdf:Property>
While inputs and outputs represent the service, they are not the only things affected by the operations of the service. For example, to complete the sale the book-selling service requires that the credit card is valid and not overdrawn or expired. In addition, the result of the sale is not only that the buyer owns the book (as specified by the outputs), but that the book is physically transferred from the the warehouse of the seller to the house of the buyer. These conditions are specified by precondition and effect properties of the profile. Preconditions present one or more logical conditions that should be satisfied prior to the service being requested. These conditions should have associated explicit effects that may occur as a result of the service being performed. Effects are events that are caused by the successful execution of a service.
<rdf:Property rdf:ID="preconditions"> <rdfs:domain rdf:resource="#ServiceProfile"/> <rdfs:range rdf:resource="#Thing"/> </rdf:Property>
The service profile also provides a specific type of preconditions called accessConditions that are expected to be true for the service to succeed, but they are not modified by the activity of the service. Access conditions are used when the access to the service is restricted to only some users: as, for example, services that are restricted to users affiliated to some organization. For instance, to access a classified news service a user needs to have some level of clearance, details about it would be specified as an accessCondition.
Finally, the Profile allows the specification of what domainResources are affected by the use of the service. These domain resources may include computational resources such as bandwidth or disk space as well as more material resources consumed when the service controls some machinery. This type of resource may include fuel, or materials modified by the machine.
In the previous section we introduced the functional description of services, yet there are other aspects of services that the users should be aware of. Whilst a service may be accessed from anywhere on the Internet, it may only be applicable to a specific audience. For instance, although it is possible to order food for delivery from a Pittsburgh-based restaurant website in general, one cannot reasonably expect to do this from California. Functional attributes address the problem that there are other properties that can be used to describe a service other than a functional process. These properties are described below.
<!-- Dun and Bradstreet Rating --> <rdf:Property rdf:ID="dAndBRating"> <rdfs:subPropertyOf rdf:resource="#qualityRating" /> </rdf:Property>
As a result of the service profile, the user, be it a human, a program or another service, would be able to identify what the service provides, what conditions result from the service and whether the service is available, accessible and how it compares with other functionally equivalent services.
A more detailed perspective on services is that a service can be viewed as a process. We have defined a particular subclass of ServiceModel, the ProcessModel (as shown in figure 2), which draws upon well-established work in a variety of fields, such as AI planning and workflow automation, and which we believe will support the representational needs of a very broad array of services on the Web.
The two chief components of a process model are the process, which describes a service in terms of its component actions or processes, and enables planning, composition and agent/service interoperation; and the process control model, which allows agents to monitor the execution of a service request. We will refer to the first part as the Process Ontology and the second as the Process Control Ontology. Only the former has been defined in the current version of DAML-S, but below we briefly describe our intentions with regard to the latter. We have defined a simple ontology of time, described below; in subsequent versions this will be elaborated. We also expect in a future version to provide an ontology of resources.
We expect our process ontology to serve as the basis for specifying a wide array of services. In developing the ontology, we drew from a variety of sources, including work in AI on standardizations of planning languages [6], work in programming languages and distributed systems [14,13], emerging standards in process modeling and workflow technology such as the NIST's Process Specification Language (PSL) [16] and the Workflow Management Coalition effort (http://www.aiim.org/wfmc), work on modeling verb semantics and event structure [15], work in AI on modeling complex actions [9], and work in agent communication languages [10,7].
The primary kind of entity in the Process Ontology is, unsurprisingly, a ``process''.2A process can have any number of inputs, representing the information that is, under some conditions, required for the execution of the process. It can have any number of outputs, the information that the process provides, conditionally, after its execution. Participants and other parameters may be specified; for example, the participants may include the roles in the event frame, such as the agents, patient, and instrument, whereas other parameters, especially for physical devices, might be rates, forces, and knob-settings. There can be any number of preconditions, which must all hold in order for the process to be invoked. Finally, the process can have any number of effects.
A process can often be viewed either as a primitive, undecomposable process or as a composite process, decomposable into a complex of other primitive or composite processes. Either perspective may be the more useful in some given context. Thus, a top-level Process class has, as its sole subclass, CompositeProcess, which in turn is subclassed by a variety of control structures.
More precisely, in DAML-S:
<rdfs:Class rdf:ID="Process"> <rdfs:comment> Top-level class for describing how a service works </rdfs:comment> </rdfs:Class>
Class Process has related properties parameter, input, output, participant, precondition, and (conditional) effect. Each of these properties ranges over a DAML object, which, at the upper ontology level, is not restricted at all. The properties input, output, and participant are categorized as subproperties of parameter. Subclasses of Process for specific domains can use DAML language elements to indicate more specific range restrictions, as well as cardinality restrictions for each of these properties.
The following is an example of a property definition:
<rdf:Property rdf:ID="parameter"> <rdfs:domain rdf:resource="#Process"/> <rdfs:range rdf:resource= "http://www.daml.org/2001/03/daml+oil#Thing"/> </rdf:Property>
In addition to its action-related properties, a Process has a number of bookkeeping properties such as name(rdf:literal), address (URI), documentsread (URI), documentsupdated (URI), and so on.
<rdfs:Class rdf:ID="CompositeProcess"> <rdfs:subClassOf rdf:resource="#Process"/> </rdfs:Class>
<rdf:Property rdf:ID="components"> <rdfs:comment> Holds the specific arrangement of subprocesses. </rdfs:comment> <rdfs:domain rdf:resource="#CompositeProcess"/> </rdf:Property>
Composite processes are processes that have additional properties called components to indicate the ordering and conditional execution of the subprocesses from which they are composed. For instance, the composite process, Sequence, has a components property that ranges over a ProcessList (a list whose items are restricted to be simple or composite processes). In the process ``upper ontology'', we have attempted to come up with a minimal set of process classes that can be specialized to describe a variety of Web services. This minimal set consists of Sequence, Split, Split + Join, Choice, Unordered, Condition, If-Then-Else, Iterate, Repeat-While, and Repeat-Until.
Note that while a composite process is a process, and thus has slots for preconditions and effects, there may be no easy way to compute these values for an arbitrary composite process, given its component sub-processes.
There are two fundamental relations between processes and composite processes. The expand relation associates a Process with the CompositeProcess describing its component subprocesses, while its inverse, the collapse relation represents the association of the CompositeProcess to its atomic Process form. Expanding is intended to provide a ``glassbox'' and collapsing a ``blackbox'' view of the process. The expanded version is likely to be used for service composition (both off-line and runtime) and the collapsed version for service execution.
The minimal set of composition templates (subclasses of CompositeProcess) is as follows:
<rdfs:Class rdf:ID="Sequence"> <rdfs:subClassOf rdf:resource="#CompositeProcess"/> <rdfs:subClassOf> <daml:Restriction> <daml:onProperty rdf:resource="#components"/> <daml:toClass rdf:resource="#ProcessList"/> </daml:Restriction> </rdfs:subClassOf> </rdfs:Class>
<rdfs:Class rdf:ID="Split"> <rdfs:subClassOf rdf:resource="#CompositeProcess"/> <rdfs:subClassOf> <daml:Restriction> <daml:onProperty rdf:resource="#components"/> <daml:toClass rdf:resource="#ProcessBag"/> </daml:Restriction> </rdfs:subClassOf> </rdfs:Class>
Split is similar to other ontologies' use of Fork, Concurrent, or Parallel. We use the DAML sameClassAs feature to accommodate the different standards for specifying this.
<rdf:Property rdf:ID="ifCondition"> <rdfs:comment> The if condition of an if-then-else </rdfs:comment> <rdfs:domain rdf:resource="#If-Then-Else"/> <rdfs:range> rdf:resource ="#Condition" </rdfs:range> </rdf:Property> <rdf:Property rdf:ID="then"> <rdfs:domain rdf:resource="#If-Then-Else"/> <rdfs:range rdf:resource="#CompositeProcess"/> </rdf:Property> <rdf:Property rdf:ID="else"> <rdfs:domain rdf:resource="#If-Then-Else"/> <rdfs:range rdf:resource="#CompositeProcess"/> </rdf:Property>
A process instantiation represents a complex process that is executing in the world. To monitor and control the execution of a process, an agent needs a model to interpret process instantiations with three characteristics:
We have not defined a process control ontology in the current version of DAML-S, but we plan to in a future version.
For the initial version of DAML-S we have defined a very simple upper ontology for time. There are two classes of entities--instants and intervals. Each is a subclass of temporal-entity.
There are three relations that may obtain between an instant and an interval, defined as DAML-S properties:
No assumption is made that intervals consist of instants.
There are two possible relations that may obtain between a process and one of the temporal objects. A process may be in an at-time relation to an instant or in a during relation to an interval. Whether a particular process is viewed as instantaneous or as occuring over an interval is a granularity decision that may vary according to the context of use. These relations are defined in DAML-S as properties of processes.
Viewed as intervals, processes could have properties such as startTime and endTime which are synonymous (daml:samePropertyAs) with the Start-Of and End-Of relation that obtains between intervals and instants.
One further relation can hold between two temporal entities--the before relation. The intended semantics is that for an instant or interval to be before another instant or interval, there can be no overlap or abutment between the former and the latter. In DAML-S the Before property whose domain is the Temporal-entity class and whose range is a Temporal-entity.
Different communities have different ways of representing the times and durations of states and events (processes). For example, states and events can both have durations, and at least events can be instantaneous; or events can only be instantaneous and only states can have durations. Events that one might consider as having duration (e.g., heating water) are modeled as a state of the system that is initiated and terminated by instantaneous events. That is, there is the instantaneous event of the start of the heating at the start of an interval, that transitions the system into a state in which the water is heating. The state continues until another instantaneous event occurs--the stopping of the event at the end of the interval. These two perspectives on events are straightforwardly interdefinable in terms of the ontology we have provided. Thus, DAML-S supports both.
The various relations between intervals defined in Allen's temporal interval calculus [1] can be defined in a straightforward fashion in terms of before and identity. Thus, in the near future, when DAML is augmented with the capability of defining logical rules, it will be easy to incorporate the interval calculus into DAML-S. In addition, in future versions of DAML-S we will define primitives for measuring durations and for specifying clock and calendar time.
DAML-S is an attempt to provide an ontology, within the framework of the DARPA Agent Markup Language, for describing Web services. It will enable users and software agents to automatically discover, invoke, compose, and monitor Web resources offering services, under specified constraints. We have released an initial version of DAML-S. It can be found at the URL: http://www.daml.org/services/daml-s
We expect to enhance it in the future in ways that we have indicated in the paper, and in response to users' experience with it. We believe it will help make the Semantic Web a place where people can not only find out information but also get things done.