Engineering Modeling Languages Turning Domain Knowledge into Tools Chapman & Hall/CRC Innovations in Software Engineering and Software Development Series Editor Richard LeBlanc Chair, Department of Computer Science and Software Engineering, Seattle University AIMS AND SCOPE This series covers all aspects of software engineering and software development. Books in the series will be innovative reference books, research monographs, and textbooks at the undergradu- ate and graduate level. Coverage will include traditional subject matter, cutting-edge research, and current industry practice, such as agile software development methods and service-oriented architectures. We also welcome proposals for books that capture the latest results on the domains and conditions in which practices are most effective. PUBLISHED TITLES Building Enterprise Systems with ODP: An Introduction to Open Distributed Processing Peter F. Linington, Zoran Milosevic, Akira Tanaka, and Antonio Vallecillo Computer Games and Software Engineering Kendra M. L. Cooper and Walt Scacchi Engineering Modeling Languages: Turning Domain Knowledge into Tools Benoit Combemale, Robert B. France, Jean-Marc Jézéquel, Bernhard Rumpe, Jim Steel, and Didier Vojtisek Evidence-Based Software Engineering and Systematic Reviews Barbara Ann Kitchenham, David Budgen, and Pearl Brereton Fundamentals of Dependable Computing for Software Engineers John Knight Introduction to Combinatorial Testing D. Richard Kuhn, Raghu N. Kacker, and Yu Lei Introduction to Software Engineering, Second Edition Ronald J. Leach Software Designers in Action: A Human-Centric Look at Design Work André van der Hoek and Marian Petre Software Development: An Open Source Approach Allen Tucker, Ralph Morelli, and Chamindra de Silva Software Engineering: The Current Practice Václav Rajlich Software Essentials: Design and Construction Adair Dingle Software Metrics: A Rigorous and Practical Approach, Third Edition Norman Fenton and James Bieman Software Test Attacks to Break Mobile and Embedded Devices Jon Duncan Hagar CHAPMAN & HALL/CRC INNOVATIONS IN SOFTWARE ENGINEERING AND SOFTWARE DEVELOPMENT Engineering Modeling Languages Turning Domain Knowledge into Tools Benoit Combemale University of Rennes 1, France Robert B. France Colorado State University, USA Jean-Marc Jézéquel University of Rennes 1, France Bernhard Rumpe RWTH Aachen University and Fraunhofer FIT, Germany Jim Steel AEHRC, CSIRO, Australia Didier Vojtisek Inria, France CRC Press Taylor & Francis Group 6000 Broken Sound Parkway NW, Suite 300 Boca Raton, FL 33487-2742 © 2017 by Taylor & Francis Group, LLC CRC Press is an imprint of Taylor & Francis Group, an Informa business No claim to original U.S. Government works Printed on acid-free paper Version Date: 20160916 International Standard Book Number-13: 978-1-4665-8373-3 (Hardback) This book contains information obtained from authentic and highly regarded sources. Reasonable efforts have been made to publish reliable data and information, but the author and publisher cannot assume responsibility for the validity of all materials or the consequences of their use. The authors and publishers have attempted to trace the copyright holders of all material reproduced in this publication and apologize to copyright holders if permission to publish in this form has not been obtained. If any copyright material has not been acknowledged please write and let us know so we may rectify in any future reprint. Except as permitted under U.S. Copyright Law, no part of this book may be reprinted, reproduced, transmit- ted, or utilized in any form by any electronic, mechanical, or other means, now known or hereafter invented, including photocopying, microfilming, and recording, or in any information storage or retrieval system, without written permission from the publishers. For permission to photocopy or use material electronically from this work, please access www.copyright. com (http://www.copyright.com/) or contact the Copyright Clearance Center, Inc. (CCC), 222 Rosewood Drive, Danvers, MA 01923, 978-750-8400. CCC is a not-for-profit organization that provides licenses and registration for a variety of users. For organizations that have been granted a photocopy license by the CCC, a separate system of payment has been arranged. Trademark Notice: Product or corporate names may be trademarks or registered trademarks, and are used only for identification and explanation without intent to infringe. Library of Congress Cataloging-in-Publication Data Names: Combemale, Benoit, author. Title: Engineering modeling languages / Benoit Combemale, Robert France, Jean-Marc Jezequel, Bernhard Rumpe, James Richard Heron Steel, Didier Vojtisek. Description: Boca Raton : Taylor & Francis, CRC Press, 2017. Identifiers: LCCN 2016026666 | ISBN 9781466583733 (hardback : alk. paper) Subjects: LCSH: Engineering--Data processing. | Modeling languages (Computer science) | Computer software--Development. | Computer simulation. Classification: LCC TA343 .C67 2017 | DDC 620.001/13513--dc23 LC record available at https://lccn.loc.gov/2016026666 Visit the Taylor & Francis Web site at http://www.taylorandfrancis.com and the CRC Press Web site at http://www.crcpress.com to our co-author, our colleague and our friend, rest in peace Robert. Contents List of Figures xv List of Exercises xix List of Sidebars xxi List of Listings xxiii Preface xxv Acknowledgments xxxi Chapter 1 What’s a Model? 1 1.1 Introduction . 2 1.2 Modeling in Science . 4 1.3 Modeling in Engineering . 5 1.4 Illustrative Example: Cellular Automata . 9 1.4.1 Cellular Automaton Topology . 10 1.4.2 Cellular Automaton Evolution Rules . 10 1.4.3 Modeling Cellular Automata . 11 1.5 Semantic Foundations of MDE: the Meaning of Models . 14 1.5.1 Basics of Denotational Semantics . 14 1.5.2 Underspecification and Interpretation in the Real World . 15 1.5.3 Operations on Models . 16 1.6 Exercises . 17 Chapter 2 What’s a Modeling Language? 19 2.1 Why We Need Modeling Languages . 20 2.2 Concrete Syntax . 21 2.2.1 Textual Concrete Syntax . 22 2.2.2 Graphical Concrete Syntax: Box-and-Line Diagrams 26 2.2.3 Graphical Concrete Syntax: Tabular Notations . 28 2.2.4 Graphical Concrete Syntax: Trees . 29 2.3 Abstract Syntax . 30 vii viii Contents 2.3.1 Abstract Syntax of Textual Languages . 31 2.3.2 Abstract Syntax of Graphical Languages . 32 2.3.3 Concrete and Abstract Syntax Relationship . 33 2.4 Semantics of a Modeling Language . 35 2.4.1 Denotational Semantics . 36 2.4.2 Operational Semantics . 41 2.5 Exercises . 43 Chapter 3 Metamodeling with MOF and Ecore 45 3.1 Metamodel and Meta-Language . 46 3.2 Metamodel, Meta-Language, Language Workbench, and Meta-Metamodel . 49 3.3 Meta-Object Facility (MOF) . 51 3.4 Ecore and EMF . 54 3.5 Representations for Machine Consumption . 58 3.5.1 Textual Representations for Machine Consumption 60 3.5.2 Database Representation . 61 3.6 Illustrative Example: Metamodels for the Cellular Automaton . 62 3.7 Exercises . 64 Chapter 4 Metamodeling with OCL 67 4.1 The Object Constraint Language . 68 4.1.1 Invariant and Its Context . 69 4.1.2 Basic Operations . 69 4.1.3 Collections . 71 4.1.4 Quantification, Collection, Selection . 73 4.1.5 Navigation along Associations . 74 4.1.6 Derived Attributes . 75 4.2 Advanced Features of OCL . 76 4.2.1 Nature of OCL: First Order and Expression Language? . 76 4.2.2 Specifying Operations in OCL . 77 4.2.3 Further Concepts of OCL . 79 4.2.4 OCL Used at Different Modeling Levels . 79 4.3 Usage of OCL for MOF . 80 4.3.1 OCL for Context Conditions . 81 4.3.1.1 Illustrative Example: Geometry Con- straints . 83 Contents ix 4.3.1.2 Illustrative Example: Enhanced Versions of OCL . 85 4.3.1.3 Illustrative Example: Filter Constraints . 86 4.3.1.4 Illustrative Example: Language Con- straints from Metamodel Composition . 86 4.3.2 OCL for the Execution Domains (Semantics) . 89 4.3.2.1 Illustrative Example: Evaluating Expres- sions . 89 4.3.2.2 Illustrative Example: Describing the Ef- fect of a Regular Geometry . 91 4.3.3 Conjunct Use of MOF and OCL . 93 4.4 Exercises . 96 Chapter 5 Building Editors and Viewers 99 5.1 Introduction . 100 5.2 Generic versus Specific Concrete Syntax . 101 5.3 Visual Representations for Human Reading . 102 5.4 Tree View . 103 5.4.1 Generic Tree View . 104 5.4.2 Customization of the Tree View . 105 5.4.3 Illustrative Example: Tree Editor for CAIR . 106 5.5 Diagram View (Box and Line) . 108 5.5.1 Generic Diagram View . 109 5.5.2 Customization of the Diagram View . 109 5.5.3 Illustrative Example: Graphical Editor for Uni- verse Models . 110 5.6 Textual View . 110 5.6.1 Generic Textual View . 113 5.6.2 Customization of the Textual View . 113 5.6.3 Illustrative Example: A Textual Editor for Cellu- lar Automation Evolution Rules . 114 5.7 Tabular View . 115 5.8 Other Views . 117 Chapter 6 Model Transformation: from Contempla- tive to Productive Models 119 6.1 Motivation . 120 6.2 Overview of Model Transformations . 121 6.2.1 Model-to-Text vs. Model-to-Model . 122 6.2.2 Homogeneous vs. Heterogeneous . 122 x Contents 6.2.3 Declarative vs. Imperative . 122 6.2.4 Unidirectional vs. Bidirectional . 125 6.2.5 Traceability . 125 6.3 Kermeta: An Executable Metamodeling Approach . 126 6.3.1 Kermeta as an Ecore Extension . 126 6.3.2 Kermeta as an Xtend Extension . 127 6.3.3 Kermeta as an OCL Extension . 127 6.3.4 Kermeta as a Metamodel Integration Platform . 128 6.3.5 Examples with Kermeta . 129 6.3.6 Scaling Up Transformations in Kermeta . 133 6.4 Exercises . 133 Chapter 7 Interpreter 135 7.1 Ingredients for Interpretation . 136 7.1.1 Runtime Data . 136 7.1.2 Computational Steps . 137 7.2 Design Pattern Interpreter . 138 7.3 Combining the Interpreter and Visitor Design Patterns . 139 7.3.1 Approach Overview . 139 7.3.2 Illustrative Example: Interpreter for Cellular Automaton Using a Visitor .
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages75 Page
-
File Size-