Object- Oriented Software Composition
Total Page:16
File Type:pdf, Size:1020Kb
Oscar Nierstrasz and Dennis Tsichritzis, Object-Oriented Software Composition, Prentice Hall, 1995. Reproduced with the permission of the Publisher, Prentice Hall (a Pearson Education company). This work is protected by copyright and may not be reproduced other than when downloaded and viewed on a single Central Processor Unit (CPU) for private use only. It is not otherwise to be reproduced or transmitted or made available on a network without prior written permission of Prentice Hall. All other rights reserved. Object- Oriented Software Composition EDITED BY Oscar Nierstrasz UNIVERSITY OF BERNE AND Dennis Tsichritzis UNIVERSITY OF GENEVA First published 1995 by Prentice Hall International (UK) Ltd Campus 400, Maylands Avenue Hemel Hempstead Hertfordshire, HP2 7EZ A division of Simon & Schuster International Group © Prentice Hall 1995 All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form, or by any means, electronic, mechanical, photocopying, recording or otherwise, without prior permission, in writing, from the publisher. For permission within the United States of America contact Prentice Hall Inc., Englewood Cliffs, NJ 07632 Printed and bound in Great Britain by T.J. Press (Padstow) Ltd, Padstow, Cornwall. Library of Congress Cataloging-in-Publication Data Object-oriented software composition / edited by Oscar Nierstrasz and Dennis Tsichritzis. p. cm.—(The Object-oriented series) Includes bibliographical references and index. ISBN 0-13-220674-9 1. Object-oriented programming (Computer science) I. Nierstrasz Oscar Marius, 1957- . II. Tsichritzis, Dionysios C. III. Series: Prentice-Hall object-oriented series. QA76.64.0277 1995 005.1'1—dc20 95-7616 CIP British Library Cataloguing in Publication Data A catalogue record for this book is available from the British Library ISBN: 0-13-220674-9 Contents Contributors ix Foreword xi Akinori Yonezawa Preface xiii Oscar Nierstrasz and Dennis Tsichritzis PART I Introduction 1 1 Component-Oriented Software Technology 3 Oscar Nierstrasz and Laurent Dami 1.1 Introduction 3 1.2 Objects vs. Components 7 1.3 Technical Support for Components 9 1.4 Component Engineering 20 1.5 Conclusions 24 PART II Concurrency and Distribution 29 2 Concurrency in Object-Oriented Programming Languages 31 Michael Papathomas 2.1Introduction 31 2.2 Design Space 33 2.3 Criteria for Evaluating Language Design Choices 43 2.4 Exploring the Language Design Space 49 2.5 Conclusion 63 vi Contents 3 Interoperation of Object-Oriented Applications 69 Dimitri Konstantas 3.1Reusing Objects from Different Environments 69 3.2 Procedure-Oriented Interoperability 71 3.3 Object-Oriented Interoperability 73 3.4 Comparison of Interoperability Support Approaches 75 3.5 Interface Bridging — Object-Oriented Interoperability 76 3.6 Interface Adaption 81 3.7 Object Mapping 87 3.8 Conclusions and Research Directions 90 PART III Specification and Composition 97 4 Regular Types for Active Objects 99 Oscar Nierstrasz 4.1Introduction 99 4.2 Types, Substitutability and Active Objects 101 4.3 Intersecting Service Types 103 4.4 Request Substitutability 105 4.5 Viewing Objects as Regular Processes 108 4.6 Subtyping Regular Types 110 4.7 Request Satisfiability 113 4.8 Open Problems 117 4.9 Concluding Remarks 119 5 A Temporal Perspective of Composite Objects 123 Constantin Arapis 5.1Introduction 123 5.2 Propositional Temporal Logic 126 5.3 The Specification of Temporal Properties 132 5.4 Verification 144 5.5 Concluding Remarks 150 vii 6 Functions, Records and Compatibility in the λN Calculus 153 Laurent Dami 6.1Introduction 153 6.2 A Lambda Calculus with Named Parameters 156 6.3 The Calculus at Work 162 6.4 Compatibility Relationship 167 6.5 Conclusion 172 PART IV Software Information Management 175 7 Component Classification in the Software Information Base 177 Panos Constantopoulos and Martin Dörr 7.1Introduction 177 7.2 The Software Information Base 179 7.3 Information Retrieval and User Interface 183 7.4 The Classification Scheme 186 7.5 Streamlining the Classification Process 191 7.6 Experiences 192 7.7 Conclusion 197 8 Managing Class Evolution in Object-Oriented Systems 201 Eduardo Casais 8.1Object Design and Redesign 201 8.2 Class Tailoring 203 8.3 Class Surgery 206 8.4 Class Versioning 212 8.5 Class Reorganization 218 8.6 Change Avoidance 230 8.7 Conversion 233 8.8 Filtering 236 8.9 Conclusion 240 9 The Affinity Browser 245 Xavier Pintado 9.1Introduction 245 9.2 Browsing Requirements 251 9.3 The Affinity Browser 252 9.4 The Affinity Browser by Example 259 9.5 Conclusion 270 viii Contents PART V Frameworks and Applications 273 10 Visual Composition of Software Applications 275 Vicki de Mey 10.1 Introduction 275 10.2 Related Work 276 10.3 A Framework for Visual Composition 278 10.4 Vista — A Prototype Visual Composition Tool 287 10.5 Sample Applications 290 10.6 Discussion 297 10.7 Conclusion 300 11 Multimedia Component Frameworks 305 Simon Gibbs 11.1 Digital Media and Multimedia 305 11.2 Multimedia Systems and Multimedia Programming 306 11.3 Multimedia Frameworks 308 11.4 A Multimedia Framework Example — Components 309 11.5 Video Widgets — A Programming Example 313 11.6 Summary 317 12 Gluons and the Cooperation between Software Components 321 Xavier Pintado 12.1 Introduction 321 12.2 An Overview of Cooperation Patterns 324 12.3 Requirements for a Financial Framework 333 12.4 Gluons 338 12.5 Gluons and the Financial Framework 341 12.6 Conclusion 347 Index 351 Contributors* Dr. Costas Arapis, GMD, Abtl. VMSD, Schloß Birlinghoven, D-53757 Sankt Augustin, GERMANY. E-mail: [email protected] Dr. Eduardo Casais, Forschungszentrum Informatik (FZI), Haid-und-Neu-Straße 10-14, D-76131 Karlsruhe, GERMANY. E-mail: [email protected] Prof. Panos Constantopoulos, Institute of Computer Science, Foundation for Research and Technology — Hellas, Science and Technology Park of Crete, Vassilika Vouton, P.O. Box 1385, GR-71110 Heraklion, Crete, GREECE. E-mail: panos@ ics.forth.gr Dr. Laurent Dami, Centre Universitaire d’Informatique, Université de Genève, 24, rue Général-Dufour, CH-1211 Genève 4, SWITZERLAND. E-mail: [email protected] Dr. Vicki de Mey, Apple Computer, Inc., One Infinite Loop, MS 301-4I, Cupertino, CA 95014, UNITED STATES. E-mail: [email protected] Dr. Martin Dörr, Institute of Computer Science, Foundation for Research and Technology — Hellas, Science and Technology Park of Crete, Vassilika Vouton, P.O. Box 1385, GR-71110 Heraklion, Crete, GREECE. E-mail: doerr@ ics.forth.gr Dr. Simon Gibbs, GMD, Schloß Birlinghoven, D-53757 Sankt Augustin, GERMANY. E-mail: [email protected] Dr. Dimitri Konstantas, Centre Universitaire d’Informatique, Université de Genève, 24, rue Général-Dufour, CH-1211 Genève 4, SWITZERLAND. E-mail: [email protected] Prof. Oscar Nierstrasz, Institut für Informatik (IAM), Universität Bern, Neubrückstrasse 10, CH- 3012 Bern, SWITZERLAND. E-mail: [email protected] Dr. Michael Papathomas, Lancaster University, Computing Department, Lancaster LA1 4YR, UNITED KINGDOM. E-mail: [email protected] Dr. Xavier Pintado, Centre Universitaire d’Informatique, Université de Genève, 24, rue Général-Dufour, CH-1211 Genève 4, SWITZERLAND. E-mail: [email protected] Prof. Dennis Tsichritzis, GMD, Schloß Birlinghoven, D-53757 Sankt Augustin, GERMANY. E-mail: [email protected] Up-to-date information concerning the authors is also available on the World Wide Web at: http://www.iam.unibe.ch/~oscar/OOSC/ *. Many of these coordinates have long become obsolete. Please contact [email protected] if you require help in contacting any of the authors. x Contributors Foreword Perhaps, “Going Beyond Objects” should be the subtitle of this volume, as a large portion of the contents departs from the early and popularly perceived image of “Objects.” The object-oriented programming paradigm has now been firmly accepted in the soft- ware community as offering the most powerful and promising technology for software de- velopment currently available, and its expressiveness and modelling power have been much appreciated. But, one of the greatest promises it made in its early stage was a dra- matic improvement in the ease of software composition and reuse, which is yet to be achieved. (People are sometimes entangled with webs of class hierarchies.) And the re- search continues. About ten years ago, Dennis and Oscar, moving from Toronto, founded the Object Sys- tems Group at the University of Geneva, and started a number of research projects to ex- tend the object-oriented paradigm in various ways. It did not take more than a couple of years for the group to become the most active and visible research centre of object-orient- ed technology in Europe. In the mean time, part of the group became involved in a large ESPRIT project called ITHACA which aimed at producing an application development environment based object-oriented technology. This volume presents, in a written form, the fruits of the group’s ten-year research and development, as directed by Dennis’ clear philosophy on research and innovation. The group attacked real problems and problems firmly based on reality. Dennis’ early career as a recursive function theorist, taught by Alonzo Church in Princeton, also encouraged foundational work in the group, and some chapters in this volume represent it. “Beyond Objects” was the title of the panel discussion at the European Conference on Object-Oriented Programming (ECOOP’91), which was organized by Oscar Nierstrasz and Dennis Tsichritzis in Geneva in July, 1991. They already had clear visions of where we/they should go from the “Objects” that only partially fulfil the early promise. One of their visions was the “Component-Based” approach for software construction. Future software construction for flexible open application should be performed by composition and configuration of plug-compatible software components that generalize objects, agents and functions. Oscar and Laurent explain this approach in the first chapter of this volume.