
Runtime Service Composition via Logic-Based Program Synthesis Sven Lämmermann A dissertation submitted to the Royal Institute of Technology in partial fulfillment of the requirements for the degree of Doctor of Philosophy June 2002 TRITA-IT AVH 02:03 ISSN 1403-5286 ISRN KTH/IT/AVH 02/03–SE Department of Microelectronics and Information Technology Royal Institute of Technology Stockholm, Sweden Author’s e-mail address: [email protected] Department of Microelectronics and Information Technology Royal Institute of Technology Electrum 229, 16440 Kista (Stockholm), Sweden © Sven Lämmermann, 2002 Abstract Dynamic composition of services from components at runtime can help to provide flexible service infrastructures, but requires advanced composition techniques. To address this problem, we have developed a composition method that is tailored to services. The method integrates an efficient deductive program synthesis technique with a specification language. The work is realized in the context of an object- oriented software platform. The platform introduces a declarative extension to an object-oriented programming language in order to combine advantages of object- oriented programming with positive sides of declarative programming. We introduce the notion of declarative service programming. The declarative part uses the extended structural synthesis of programs, which we have developed. The extended structural synthesis of programs is an extension of the structural synthesis of programs (SSP). In contrast to the original SSP, our extensions allow program composition for dynamic environments. In pure SSP, the context in which components are used has to be specified in advance, i.e. statically. Service configurations are represented as classes and interfaces. We introduce metainterfaces as logical specifications of classes. They can be used in two ways: as specifications of computational usage of classes or as specifications of new classes composed from classes already supplied with metainterfaces. A metainterface is a specification that 1) introduces a collection of interface variables of a class, 2) introduces axioms showing the possibilities of computing provided by methods of the class, in particular, which interface variables are computable from other variables under which conditions, and 3) introduces metavariables that connect implicitly different metainterfaces and reflect on the conceptual level mutual needs of components. Our aim in designing the specification language has been to make it as convenient as possible for a software developer. This language allows a simple and exact translation into the language of logic used by the synthesis process, but we have tried to avoid excessive use of logical notations. We have implemented a prototype for automated compositional synthesis. It has been used in several experiments to show the feasibility of fully automated service composition. We describe some service composition examples. We present performance measurements of service compositions involving large number of component specifications. Our prototype implementation has shown good synthesis performance for services occurring in practice. Acknowledgements This thesis is the result of my research at KTH during the period January 1998 − December 2001. The support I have received from KTH and PCC project financially in the form of a PhD student scholarship is herewith thankfully acknowledged. I am grateful to my supervisor Prof. Enn Tyugu for the time he invested in advising me as well as for his encouragement. I also benefited much from discussions with Tarmo Uustalu. He was particularly helpful in explaining the structural synthesis of programs to me and was a wonderful source of the kind of information logicians don't write about because they assume everyone already knows it. I would like to thank Prof. Grigori Mints, who helped me to take my first steps in logic during a course given at the former Department of Teleinformatics in 1998. Thanks to Vladimir Vlassov, who has given advice and encouragement. Thanks to Prof. Seif Haridi who always has had an open ear for any problem. It is also a pleasure to record my appreciation of the help I have received from Hans Holmberg, Rita Johnsson, Rita Fjällendahl, Agneta Herling, Hans-Jörgen Rasmusson and the late Barbro Persson. I am, of course, also grateful to Bernd Fischer from NASA Ames Research for reviewing this dissertation and for his kind promise to serve as the opponent at the defence event. His comments significantly improved the technical content. To Ian Marsh from SICS, I owe thanks for proofreading this thesis and suggesting improvements to the language. Finally, I would like to thank my family, especially my dear wife Beatrice and my sons Patrice Noel and Pascal Christophe for their endurance and encouragement. Sven Lämmermann Stockholm June 2002 To Beatrice Contents List of Tables xv List of Figures xvi 1 Introduction 1 1.1 Background.................................................................................................. 2 1.2 Motivation ................................................................................................... 3 1.2.1 Service Composition...................................................................... 3 1.2.2 Composition Languages ................................................................ 4 1.2.3 Program Synthesis ......................................................................... 4 1.3 Problem Statement....................................................................................... 5 1.3.1 Service Composition from Components........................................ 5 1.3.2 Specification Language ................................................................. 6 1.3.3 Implementation.............................................................................. 7 1.4 Proposed Solution........................................................................................ 7 1.4.1 Automated Service Composition................................................... 8 1.4.2 Specification Language for Services and Components.................. 8 1.5 Contributions ............................................................................................... 9 ix x CONTENTS 1.6 Outline ....................................................................................................... 11 2 Services and Runtime Service Composition 13 2.1 Introduction................................................................................................ 13 2.2 Traditional Services ................................................................................... 14 2.3 Runtime Service Composition: Why?........................................................ 15 2.3.1 Interoperability ............................................................................ 16 2.3.2 Platform Independence ................................................................ 17 2.3.3 Active Networks .......................................................................... 17 2.4 Runtime Service Composition: How?........................................................ 18 2.4.1 Service Components .................................................................... 19 2.4.2 Service Component Specification................................................ 20 2.4.3 Service Composition.................................................................... 21 2.5 Sample Application.................................................................................... 21 2.6 Requirements for Runtime Service Composition ...................................... 23 3 A Calculus for Runtime Service Composition 27 3.1 Preliminaries.............................................................................................. 28 3.1.1 Intuitionistic Logic....................................................................... 28 3.1.2 Natural Deduction........................................................................ 29 3.1.3 Intuitionistic Natural Deduction .................................................. 30 3.1.3.1 Inference Rules.............................................................. 31 3.1.3.2 Localizing Hypotheses................................................... 36 3.1.3.3 Structural Properties of Hypothesis ............................... 37 3.1.3.4 Proof Terms ................................................................... 38 3.1.4 Derivation Example and Program Extraction from Proofs .......... 40 3.2 Structural Synthesis of Programs............................................................... 41 3.2.1 Logical Language LL................................................................... 42 3.2.2 Inference Rules ............................................................................ 44 3.2.3 Completeness of LL ..................................................................... 45 3.2.4 Program Extraction...................................................................... 46 CONTENTS xi 3.2.5 Structural Synthesis Rules ........................................................... 47 3.2.6 Program Extraction for Structural Synthesis Rules ..................... 49 3.2.7 Example of a Proof with Program Extraction.............................. 49 3.2.8 Dependent and Independent Subtasks ......................................... 50 3.2.9 Proof Search Algorithm............................................................... 51 3.2.10 Branch Control Structures in SSP................................................ 54 3.3 Extended Structural
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages204 Page
-
File Size-