From Algebraic Specification to Ontological Description of Service Semantics Dongmei Liu School of Computer Science and Technology Nanjing University of Science and Technology Nanjing, 210094, P.R. China dmliukz@njust.edu.cn Hong Zhu and Ian Bayley Dept of Computing and Communication Technologies Oxford Brookes University Oxford OX33 1HX, UK hzhu@brookes.ac.uk, ibayley@brookes.ac.uk Abstract—The accurate description of service semantics plays a crucial role in service discovery, composition and interaction. Most work in this area has been focussed on ontological descriptions, which are searchable and machine- understandable, but do not define service functionality in a verifiable and testable way. Formal specification techniques, having evolved over the past 30 years, can define semantics verifiably and testablly, but they have not yet been applied to service computing because formal specifications are not searchable. There is a huge gap between these two methods of semantics description. In this paper, we bridge the gap. Our technique is to specify services formally in an algebraic specification language and then to extract ontological description as profiles in the language OWL-S, with the associated searchability benefits. We present a prototype tool for performing this transformation and report a case study to demonstrate the feasibility of our approach. The algebraic specification language we use is SOFIA (Service Oriented Formalism in Algebras). Keywords-Web services, Formal semantics, Algebraic speci- fication, Ontology, OWL-S. I. I NTRODUCTION The advent of Web Services as autonomous, platform- independent computational entities has greatly facilitated the uptake and use of the paradigm of service-oriented computing. Various initiatives have been advanced to define the semantics of services. These are aimed at enabling the automation of service discovery, composition and interoper- ation. Generally speaking, the semantics of software systems and their components can be described in two different ways: using ontologies and using formal specifications. The former is easy for software developers to understand and for computers to process. The latter, however, gives semantics that are both testable and verifiable. Unfortunately, there is wide gap between these two approaches. This paper aims at bridging the gap with an automated software tool that converts the formal specification to the ontology, thereby conferring the machine-readability and human-understandability benefits of ontologies onto formal specifications. The main contributions of this paper are: 1) a set of mapping rules that translate algebraic specifi- cations into domain ontologies, 2) the rules that, given such a domain ontology, extract ontological descriptions of services from the same algebraic specifications, 3) a tool called TrS2O that implements both rules for the SOFIA algebraic specification language, and 4) a case study in which the tool is applied to a real world RESTful Web Service, the API of GoGrid [1]. The GoGrid API is a RESTful Web Service that enables resource management of Infrastructure-as-a-Service (IaaS) on the cloud. SOFIA has been devised as an improvement on our previous algebraic specification language CASSOC-WS [2], with significant changes to the syntax and semantics. For the sake of space, SOFIA will be documented in a separate paper. A short reference manual is available at [3]. The transformation rules, however, will be presented in a general language-neutral form though the tool TrS2O has been implemented for SOFIA. The remainder of the paper is organised as follows. Section II defines the general mathematical structure of algebraic/co-algebraic specifications. Section III presents the mapping rules that translate algebraic specifications into ontologies and the rules that extracts ontological descriptions of the service semantics. Section IV describes the prototype tool TrS2O that implements both sets of rules for the SOFIA language and represents the resulting ontology and service semantics in OWL and OWL-S profiles. Section V reports the case study of GoGrid API. Section VI concludes the paper with a comparison of related work and a discussion of future work. II. MATHEMATICAL STRUCTURE OF ALGEBRAIC SPECIFICATIONS In this section, we integrate the theories of algebraic and co-algebraic specifications to define the mathematical framework in which specification languages for service- oriented systems, such as SOFIA, can be formally defined. A. Algebraic Structures We regard a service-oriented system as consisting of a collection of units. As in [4], we assume that the specifi- cation of a software system is well-structured in the sense 1