Event-Driven Model Transformations in Domain-Specific Modeling

Total Page:16

File Type:pdf, Size:1020Kb

Event-Driven Model Transformations in Domain-Specific Modeling Budapest University of Technology and Economics Department of Computer Science and Information Theory Event-driven Model Transformations in Domain-specific Modeling Languages PhD Thesis Istvan´ Rath´ MSc in Technical Informatics Supervisor: Dr. Daniel´ Varro,´ PhD associate professor Budapest, December 2010 i Summary In today’s model-centric software engineering world, domain-specific modeling languages play a piv- otal role in agile system modeling, rapid prototyping and generative programming. These techniques are important factors in achieving increased productivity, improved software quality and lower mainte- nance and documentation costs. Due to extensive research and industrial interest in language engineering technology over the last decade, the development of domain-specific languages as development tools is nowadays significantly easier, but still requires expertise in a wide range of domains: language engineering heavily relies on core modeling and other auxiliary technologies (such as graphical editing frameworks and parser generators). In parallel, extensive research has been invested into model transformations that provide the foundations for integrating DSMLs into development processes and facilitate crucial use-cases such as automated mappings and code generation. The results of these related technologies can be combined to further advance domain-specific language development and decrease tool development costs. Therefore, this thesis is centered around the concept of tight integration of model transformations into language engineering techniques, so that they may provide high level foundations for advanced language engineering aspects such as well-formedness constraint evaluation, automated mappings be- tween various concrete and abstract syntax representations and simulation based on dynamic semantics. As a crucial enabling factor, the traditional, batch execution-oriented paradigm of model trans- formation development needs to be adapted to domain-specific modeling scenarios that are inherently interactive. To support this approach, the core scientific contribution of this work is focused on event- driven transformations that run like daemons in the background, and react to complex changes of the model whenever necessary in the form of transformation actions. In this work, I (i) give novel con- ceptual foundations for event-driven transformations based on event-condition-action formulas that are well known in expert systems; (ii) provide a high level specification language, extending the VIATRA2 transformation language to allow a high degree of knowledge and implementation re-use from tradi- tional transformation engineering; (iii) elaborate a high performance prototype implementation of an event-driven graph transformation system based on incremental graph pattern matching. I developed in-depth applications of this technology in domain-specific modeling language engi- neering. First, event-driven transformations are combined with specification metamodels to create a mapping library that allows the complete separation of abstract and concrete syntax representations of a modeling language, which is a key challenge in developing very complex, yet still usable DSMLs. I also elaborate a framework for the design-time, integrated execution of dynamic semantics to provide high level model simulation support for DSMLs. By this approach, the rapid prototyping of dynamic modeling languages becomes feasible. Finally, I outline further applications in well-formedness con- straint evaluation and incremental code generation. To illustrate practical applications of the contributions of the thesis, I elaborate tool integration case studies in model-driven software development. In these scenarios, domain integration techniques are extensively used to support systems modeling from various, consistent modeling perspectives, while event-driven transformations are combined with advanced traceability modeling to create change- driven transformations that facilitate change propagation to external (deployed) models. The results of this work form an integral part of the VIATRA2 model transformation framework and the ViatraDSM language engineering framework. The case studies of the thesis are contributions to the SENSORIA, MOGENTES and SecureChange European Union research projects. ii Acknowledgements I wish to express my gratitude, first and foremost, to my supervisor, Dr. Daniel´ Varro.´ Without his continuous support, valuable insight, ideas, friendly advice and enthusiasm over the past six years, I would have never succeeded. I am also grateful to my colleagues in the Fault Tolerant Systems Research Group, especially Prof. Dr. Andras´ Pataricza and Dr. Istvan´ Majzik for their trust and support of my research. I highly acknowledge the VIATRA2 team, namely Dr. Andras´ Balogh, Gabor´ Bergmann, Abel´ Hegedus,¨ Akos´ Horvath,´ Zoltan´ Ujhelyi and Dr. Gergely Varro´ for the fruitful collaborative research work, and the fun we had. I am thankful to past members Andras´ Schmidt and David´ Vag´ o´ for their contributions in the early beginnings. Many thanks to research associates Mat´ e´ Kovacs,´ Dr. Balazs´ Polgar,´ and Daniel´ Toth,´ and my former MSc students: Andras´ Okr¨ os,¨ Ad´ am´ Horvath,´ and all the others for their ideas, suggestions, contributions and hard work in using, testing and developing VIATRA2 over many years. I would like to thank my colleagues at the University of Leicester, Prof. Dr. Reiko Heckel, Ajab Khan and Dr. Paolo Torrini for the fruitful collaborative work. I also highly acknowledge Philip Mayer at the Ludwig-Maximilians-Universitat¨ Munchen¨ for our joint work in the SENSORIA project. I wish to thank Dr. Krzysztof Czarnecki and his group for supporting my research visit at the University of Waterloo. My work was supported by the SENSORIA (IST-3-016004, FP6), DIANA (AERO1-030985, FP6), SecureChange (ICT-FET-231101, FP7) and MOGENTES (ICT-216679, FP7) European research projects, and the PhD Candidate Scholarship of the Faculty of Electrical Engineering of the Budapest University of Technology and Economics. Finally, I would like to thank my family and friends for their support and tolerance. Contents Contents iii 1 Introduction 1 1.1 Model-driven software engineering . 1 1.2 Domain-specific modeling languages in model-driven software engineering . 4 1.3 Challenges and contributions . 6 1.4 The structure of the thesis . 9 I Domain-specific language engineeering 11 2 Modeling preliminaries 13 2.1 Overview . 13 2.2 Running example . 14 2.3 Models and metamodels . 15 2.4 Well-formedness . 19 2.5 Models and metamodels in VIATRA2 .......................... 22 2.6 Traceability models . 24 2.7 Summary . 26 3 Language engineering in the ViatraDSM framework 29 3.1 Domains in modeling languages . 29 3.2 The ViatraDSM Framework . 33 3.3 Domain integration techniques . 37 3.4 Domain integration over the VPM model space . 41 3.5 Related work . 52 3.6 Summary . 56 II Event-driven transformations in domain-specific languages 59 4 Preliminaries of model transformations 61 4.1 Foundations of model transformations . 61 4.2 Incremental graph pattern matching . 75 4.3 Summary . 82 5 Event-driven transformations 83 5.1 Foundations of incremental model transformations . 83 5.2 Overview of event-driven transformations . 86 5.3 Graph triggers: an event-driven transformation language . 95 iii iv CONTENTS 5.4 Performance evaluation . 100 5.5 Related work . 104 5.6 Summary . 106 6 Sychronization between abstract and concrete syntax 107 6.1 Introduction . 107 6.2 Challenges of model synchronization in graphical editors . 108 6.3 Modeling the Abstract and Concrete Syntax . 111 6.4 Generic abstract-concrete synchronization with mapping models and live transformations112 6.5 Arbitrary abstract–concrete syntax mapping . 117 6.6 Implementation details . 121 6.7 Related work . 122 6.8 Summary . 125 7 Model simulation in DSMLs 127 7.1 Overview . 127 7.2 Model simulation by event-driven transformations . 128 7.3 Performance evaluation . 133 7.4 Related work . 135 7.5 Summary . 136 III Applications in tool integration 139 8 Change-driven transformations 141 8.1 Overview . 141 8.2 Change history models . 144 8.3 Applying CHMs to non-materialized models . 150 8.4 Related work . 152 8.5 Summary . 154 9 Tool integration based on change-driven transformations 157 9.1 The architecture of tool integration chains . 157 9.2 A metamodel for development and integration processes . 160 9.3 Case Study: The DIANA toolchain . 162 9.4 Implementation of the Tool Integration Framework . 165 9.5 Process modeling languages for tool integration . 167 9.6 Related work . 169 9.7 Summary . 171 IV Conclusions and Appendix 173 10 Conclusion 175 10.1 Fulfillment of objectives . 175 10.2 Applications of new results . 176 10.3 Future research directions . 177 CONTENTS v A Model transformation source listings 179 A.1 Abstract-concrete syntax synchronization transformations . 179 B Stochastic model simulation 183 B.1 Introduction . 183 B.2 Stochastic execution of simulation schemes . 185 B.3 Prototype implementation . 186 B.4 Initial experiments with simulating P2P networks . 187 C Tool integration in the SDE 189 C.1 Introduction . 189 C.2 High-Level Overview . 190 C.3 Design and Implementation . 192 C.4 Integrated Tools . 197 C.5 Tool Applications . 200 C.6 Summary . 204 List of publications 205 Book chapters . 205 Journals . 205 Conferences and workshops . 206 Master’s thesis . 207 Bibliography 209 Chapter 1 Introduction 1.1 Model-driven software engineering Models are projections of reality. In engineering, they are used to capture concepts related to the engineer’s task: the product that is being designed, its environment, and processes that may be involved in its life cycle. Models are attractive because they allow a problem to be precisely grasped at the right level of abstraction without unnecessarily delving into detail. In software development, models are used to represent data structures, communication between agents, algorithms, or at a higher abstraction level, entities in a complex system, e.g. organisational units or products in an e-commerce application. The software industry has been experimenting with high level models at the core of development for two decades.
Recommended publications
  • Adding Change Impact Analysis to the Formal Verification of C Programs
    Adding Change Impact Analysis to the Formal Verification of C Programs Serge Autexier and Christoph Lüth? Deutsches Forschungszentrum für Künstliche Intelligenz (DFKI), Enrique-Schmidt-Str. 5, 28359 Bremen, Germany [email protected], [email protected] Abstract. Handling changes to programs and specifications efficiently is a particular challenge in formal software verification. Change impact analysis is an approach to this challenge where the effects of changes made to a document (such as a program or specification) are described in terms of rules on a semantic representation of the document. This allows to describe and delimit the effects of syntactic changes semantically. This paper presents an application of generic change impact analysis to formal software verification, using the GMoC and SAMS tools. We adapt the GMoC tool for generic change impact analysis to the SAMS verification framework for the formal verification of C programs, and show how a few simple rules are sufficient to capture the essence of change management. 1 Introduction Software verification has come of age, and a lot of viable approaches to verifying the correctness of an implementation with respect to a given specification exist. However, the real challenge in software verification is to cope with changes — real software is never finished, the requirements may change, the implementa- tion may change, or the underlying hardware may change (particularly in the embedded domain, where hardware is a major cost factor). Here, many existing approaches show weaknesses; it is not untypical to handle changes by rerunning the verification and see where it fails (though there exist more sophisticated approaches [1, 5], cf.
    [Show full text]
  • Graph Computation Models
    Annegret Habel Mohamed Mosbah (Eds.) Graph Computation Models Second International Workshop, GCM 2008 Leicester, United Kingdom, September 2008 Proceedings Preface GCM 2008 is the second workshop of a series that serves as a forum for re- searchers that are interested in graph computation models. The scope of the workshop concerns graph computation models on graphical structures of various kinds (like graphs, diagrams, visual sentences and others). A variety of computa- tion models have been developed using graphs and graph transformations. These models include features for programming languages and systems, paradigms for software development, concurrent calculi, local computations and distributed al- gorithms, biological or chemical computations. Graph transformations can be an intermediate representation of a computation. In addition to being visual and intuitive, this representation also allows the use of mathematical methods for analysis and manipulation. The aim of the workshop is to bring together researchers interested in all aspects of computation models based on graphs and graph transformation tech- niques, and their applications. A particular emphasis is made for models and tools describing general solutions. The workshop includes tutorials and invited papers, contributed papers, and system demonstrations. The tutorials and invited papers introduce different types of graph transformations and their use to study computation models. The contributed papers consider specific topics of graph transformation models and their applications. The topics of the papers range from sequential graph transfor- mation, extended graph rewrite rules, efficient pattern matching of the left-hand side of a rule to a host graph, and the termination of a controlled graph transfor- mation system to parallel graph transformations in distributed adaptive design.
    [Show full text]
  • The Grgen User Manual
    Universit¨atKarlsruhe (TH) Forschungsuniversit¨at · gegr¨undet1825 Fakult¨atf¨urInformatik Institut f¨urProgrammstrukturen und Datenorganisation Lehrstuhl Prof. Goos The GrGen.NET User Manual Refers to GrGen.NET Release 2.7 milestone 1 |DRAFT| www.grgen.net Jakob Blomer Rubino Geiß Edgar Jakumeit December 5, 2010 ii ABSTRACT GrGen.NET: transformation of structures made easy { with languages for graph modeling, pattern matching, and rewrit- ing, as well as rule control; brought to life by a compiler and a rapid prototyping environment offering graphical and step- wise debugging. The Graph Rewrite Generator is a tool en- abling elegant and convenient development of graph rewriting applications with comparable performance to conventionally developed ones. This user manual contains both, normative statements in the sense of a reference manual as well as an informal guide to the features and usage of GrGen.NET. This manual is licensed under the terms of the Creative Commons Attribution-Share Alike 3.0 Germany license. The license is available at http://creativecommons.org/licenses/by-sa/3.0/de/ iii iv FOREWORD FOR RELEASE 1.4 First of all a word about the term \graph rewriting". Some would rather say \graph trans- formation"; some even think there is a difference between these two. We don't see such differences and use graph rewriting for consistency. The GrGen project started in spring 2003 with the diploma thesis of Sebastian Hack un- der supervision of Rubino Geiß. At that time we needed a tool to find patterns in graph based intermediate representations used in compiler construction. We imagined a tool that is fast, expressive, and easy to integrate into our compiler infrastructure.
    [Show full text]
  • Foundational Analysis Techniques for High-Level Transformation Programs
    Foundational Analysis Techniques for High-Level Transformation Programs Ahmad Salim Al-Sibahi Advisors: Committee: Andrzej Wąsowski Riko Jacob, IT University of Copenhagen Aleksandar Dimovski Tijs van der Storm, University of Groningen Submitted: September 2017 Xavier Rival, CNRS/ENS/INRIA/PSL Research University A A yst dqÌt Hy wkyF A w rysA rb yl rb Progress is beyond improving what is; Progress is moving towards what will be. Gibran Khalil Gibran v Abstract High-level transformation languages like TXL and Rascal, sim- plify writing and maintaining transformations such as refactorings and optimizations, by providing specialized language constructs that include powerful pattern matching, generic traversals, and fixed-point iteration. This expressivity unfortunately makes it hard to reason about the semantics of these languages, and there ex- ists few automated validation and verification tools for these lan- guages. The goal of this dissertation is to develop foundational tech- niques and prototype tools for verifying transformation programs, based on techniques from traditional programming language re- search. At first, I present a systematic analysis of declarative high- level transformation languages, like QVT and ATL, seeking to clar- ify their expressiveness. The analysis showed that virtually all ex- amined languages were Turing-complete and thus could not be treated specially for verification. I describe a joint effort in designing and validating an indus- trial modernization project using the high-level transformation lan- guage TXL. The transformation was validated using the translation validation and symbolic execution, catching 50 serious bug cases in an otherwise well-tested expert-written transformation, and thus showing the need for verification tools in this domain.
    [Show full text]
  • Foundational Analysis Techniques for High-Level Transformation Programs
    Foundational Analysis Techniques for High-Level Transformation Programs Ahmad Salim Al-Sibahi Advisors: Committee: Andrzej Wąsowski Riko Jacob, IT University of Copenhagen Aleksandar Dimovski Tijs van der Storm, University of Groningen Submitted: September 2017 Xavier Rival, CNRS/ENS/INRIA/PSL Research University A A yst dqÌt Hy wkyF A w rysA rb yl rb Progress is beyond improving what is; Progress is moving towards what will be. Gibran Khalil Gibran v Abstract High-level transformation languages like TXL and Rascal, simplify writing and maintaining transformations such as refactorings and optimizations, by providing specialized language constructs that include powerful pattern matching, generic traversals, and fixed- point iteration. This expressivity unfortunately makes it hard to reason about the semantics of these languages, and there exists few automated validation and verification tools for these languages. The goal of this dissertation is to develop foundational tech- niques and prototype tools for verifying transformation programs, based on techniques from traditional programming language re- search. At first, I present a systematic analysis of declarative high- level transformation languages, like QVT and ATL, seeking to clar- ify their expressiveness. The analysis showed that virtually all ex- amined languages were Turing-complete and thus could not be treated specially for verification. I describe a joint effort in designing and validating an indus- trial modernization project using the high-level transformation lan- guage TXL. The transformation was validated using the translation validation and symbolic execution, catching 50 serious bug cases in an otherwise well-tested expert-written transformation, and thus showing the need for verification tools in this domain.
    [Show full text]
  • Domain Specific Language Tool Development
    University of Latvia ELĪNA KALNIŅA MODEL TRANSFORMATION DEVELOPMENT USING MOLA MAPPINGS AND TEMPLATE MOLA Thesis for the PhD Degree at the University of Latvia Field: Computer Science Section: Programming Languages and Systems Scientific Advisor: Prof., Dr. Habil. Sc. Comp. AUDRIS KALNINS Riga – 2011 This work has been supported by the European Social Fund within the project «Support for Doctoral Studies at University of Latvia». Scientific Advisor: Professor, Dr. Sc. Comp. Audris Kalniņš Latvijas Universitāte Referees: Professor, Dr. Sc. Comp. Guntis Bārzdiņš University of Latvia Professor, Dr. Sc. Ing. Oksana Ņikiforova Riga Technical University Professor, Dr. Olegas Vasilecas Vilnius Gediminas Technical University (Vilnius, Lithuania) The defence of the thesis will take place in an open session of the Council of Promotion in Computer Science of the University of Latvia, in the Institute of Mathematics and Computer Science of the University of Latvia (Room 413, Raina Boulevard 29, Riga, Latvia) on March 7, 2012 at 4 PM. The thesis and its summary are available at the library of the University of Latvia (Kalpaka Boulevard 4, Riga, Latvia). 3 4 ABSTRACT Model transformation development for three specific domains: Model-Driven Software Development (MDSD), DSL tool development and transformation synthesis has been studied in the thesis. It is concluded that transformation development in domain- specific transformation languages is more straightforward and faster compared to traditional transformation languages. A domain-specific model transformation language has been developed for each studied domain. Two of them are based on mappings. In both cases it was concluded that mappings better fit for typical tasks and transformations better fit for non-standard tasks.
    [Show full text]
  • Solving the TTC 2014 Movie Database Case with Grgen.NET
    Solving the TTC 2014 Movie Database Case with GrGen.NET Edgar Jakumeit [email protected] The task of the Movie Database Case [2] is to identify all couples of actors who performed together in at least three movies. The challenge of the task is to do this fast on a large database. We employ the general purpose graph rewrite system GRGEN.NET in developing and optimizing a solution. 1 What is GrGen.NET? GRGEN.NET (www.grgen.net) is a programming language and development tool for graph structured data with pattern matching and rewriting at its core, which furthermore supports imperative and object- oriented programming, and features some traits of database-like query-result processing. Founded on a rich data modeling language with multiple inheritance on node and edge types, it offers pattern-based rewrite rules of very high expressiveness, with subpatterns and nested alternative, iterated, negative, and independent patterns, as well as preset input parameters and output def variables yielded to. The rules are orchestrated with a concise control language, which offers constructs that are simplifying backtracking searches and state space enumerations. Development is supported by graphical and stepwise debugging, as well as search plan explanation and profiling instrumentation for graph search steps – the former helps in first getting the programs correct, the latter in getting them fast thereafter. The tool was built for performance and scalability: its model data structures are designed for fast processing of typed graphs at modest memory consumption, while its optimizing compiler adapts the search process to the characteristics of the host graph at hand and removes overhead where it is not needed.
    [Show full text]
  • GP 2: Efficient Implementation of a Graph Programming Language
    GP 2: Efficient Implementation of a Graph Programming Language Christopher Bak Doctor of Philosophy University of York Computer Science September 2015 2 Abstract The graph programming language GP (Graph Programs) 2 and its implemen- tation is the subject of this thesis. The language allows programmers to write visual graph programs at a high level of abstraction, bringing the task of solving graph-based problems to an environment in which the user feels comfortable and secure. Implementing graph programs presents two main challenges. The first challenge is translating programs from a high-level source code representation to executable code, which involves bridging the gap from a non-deterministic pro- gram to deterministic machine code. The second challenge is overcoming the theoretically impractical complexity of applying graph transformation rules, the basic computation step of a graph program. The work presented in this thesis addresses both of these challenges. We tackle the first challenge by implementing a compiler that translates GP 2 graph pro- grams directly to C code. Implementation strategies concerning the storage and access of internal data structures are empirically compared to determine the most efficient approach for executing practical graph programs. The second challenge is met by extending the double-pushout approach to graph transformation with root nodes to support fast execution of graph transformation rules by restricting the search to the local neighbourhood of the root nodes in the host graph. We add this theoretical construct to the GP 2 language in order to support rooted graph transformation rules, and we identify a class of rooted rules that are appli- cable in constant time on certain classes of graphs.
    [Show full text]
  • Using Internal Domain-Specific Languages to Inherit Tool Support
    Journal of Software & Systems Modelling manuscript No. (will be inserted by the editor) Using Internal Domain-Specific Languages to inherit Tool Support and Modularity for Model Transformations Georg Hinkel · Thomas Goldschmidt · Erik Burger · Ralf Reussner Received: March 14, 2016 / Revision: January 5, 2017/ Accepted: not yet Abstract Model-driven engineering (MDE) has pro- .NET platform. The results confirm the value of inher- ven to be a useful approach to cope with todays ever ited modularity and tool support while conciseness and growing complexity in the development of software sys- understandability are still competitive. tems; nevertheless, it is not widely applied in industry. Keywords Model-driven Engineering · Model Trans- As suggested by multiple studies, tool support is a ma- formation · Domain-Specific Language · Tool Support · jor factor for this lack of adoption. Especially the devel- Extensibility opment of model transformations lacks good tool sup- port. Additionally, modularization techniques are in- evitable for the development of larger model transfor- 1 Introduction mations to keep them maintainable. Existing tools for MDE, in particular model transformation approaches, The increasing complexity of software systems has been are often developed by small teams and cannot keep tackled in the past by increasing the abstraction of pro- up with advanced tool support for mainstream gen- gramming languages. Today, it seems as if the abstrac- eral purpose programming languages, such as IntelliJ tion level of modern programming languages can hardly or Visual Studio. Internal DSLs are a promising solu- be raised without losing general purpose applicability. tion to these problems. In this paper, we investigate In recent years, many domain-specific languages (DSLs) the impact of design decisions of an internal DSL to the [10] have been proposed, which can be used to describe reuse of tool support and modularization concepts from systems at a higher abstraction level in terms of domain the host language.
    [Show full text]
  • Object-Oriented Graph Grammars for Computational Design Synthesis
    TECHNISCHE UNIVERSITÄT MÜNCHEN Lehrstuhl für Produktentwicklung Object-Oriented Graph Grammars for Computational Design Synthesis Bergen Helms Vollständiger Abdruck der von der Fakultät für Maschinenwesen der Technischen Universität München zur Erlangung des akademischen Grades eines Doktor-Ingenieurs genehmigten Dissertation. Vorsitzender: Univ.-Prof. Dr. rer. nat. Dr. h.c. Ulrich Walter Prüfer der Dissertation: 1. Univ.-Prof. Kristina Shea, Ph.D., Eidgenössische Technische Hochschule Zürich, Schweiz 2. Univ.-Prof. Dr.-Ing. Martin Eigner, Technische Universität Kaiserlsautern 3. Univ.-Prof. Dr.-Ing. Udo Lindemann Die Dissertation wurde am 20.09.2012 bei der Technischen Universität München eingereicht und durch die Fakultät für Maschinenwesen am 06.02.2013 angenommen. Abstract Conceptual design is an early design phase that is acknowledged as particularly critical. Its goal is the determination of the product’s essential characteristics that meet the given requirements. Conceptual design is characterized by high uncertainty resulting from lacking knowledge about the future prod- uct that makes it difficult to evaluate design quality and to systematically explore the set of solutions. Computational Design Synthesis (CDS) aims at supporting conceptual design through formalization and automation of knowledge-intensive design tasks. However, CDS still has little acceptance in industry due to the high effort required for knowledge and task formalization, the limited scope of application, the lack of reuse of existing paper-based design knowledge, the lack of modeling standards and tool integration, and the low maturity of software tools. The potential of CDS to increase development efficiency and innovative power motivates addressing these problems. This thesis contributes to the goal of increasing the applicability of CDS in every day design practice with the development and implementation of a hy- brid knowledge representation, termed object-oriented graph grammar, and an approach to automatically formalize engineering knowledge from design catalogs.
    [Show full text]
  • Paisley: a Pattern Matching Library for Arbitrary Object Models
    Paisley: APatternMatching Library forArbitrary Object Models Baltasar Trancon´ yWidemann Markus Lepper Technische Universitat¨ Ilmenau <semantics/> GmbH b-alutcaisarn.tnn.ol@ra tmau De e Abstract: Professional development of software dealing with structured models re- quires more systematic approach and semantic foundation than standard practice in general-purpose programming languages affords. One remedy is to integrate tech- niques from other programming paradigms, as seamless as possible and without forc- ing programmers to leave their comfort zone. Here we present atool for the imple- mentation of pattern matching as fundamental means of automated data extraction from models of arbitrary shape and complexity in ageneral-purpose programming language. The interface is simple but, thanks to elaborate and rigorous design, is also light-weight, portable, non-invasive,type-safe, modular and extensible. It is compat- ible with object-oriented data abstraction and has full support for nondeterminism by backtracking. The tool comes as alibrary consisting of twolevels: elementary pat- tern algebra (generic, highly reusable) and pattern bindings for particular data models (specific, fairly reusable, user-definable). Applications use the library code in asmall number of idiomatic ways, making pattern-matching code declarative in style, easily writable, readable and maintainable. Library and idiom together form atightly em- bedded domain-specific language; no extension of the host language is required. The current implementation is in Java,but assumes only standard object-oriented features, and can hence be ported to other mainstream languages. 1Introduction Declarative (functional or logical) languages are more or less equally powerful both when creating compound data, and when extracting their components: Term/pattern constructors on the right/left hand side of definition equations, respectively,offer balanced syntactic support with clean, inverse algebraic semantics.
    [Show full text]
  • Object-Oriented Concepts for Computational Design Synthesis
    INTERNATIONAL DESIGN CONFERENCE - DESIGN 2010 Dubrovnik - Croatia, May 17 - 20, 2010. OBJECT-ORIENTED CONCEPTS FOR COMPUTATIONAL DESIGN SYNTHESIS B. Helms and K. Shea Keywords: computational design synthesis, graph grammars, object- oriented programming, implementation 1. Introduction Computational tools have become routine means of support in the development of new, innovative and complex products in the last decades. The aim of approaches and tools in the area of computational design synthesis are to generate alternative solutions tailored to particular problems and to computationally describe solution spaces. As not only products are getting more and more complex, but also the environments in which they are developed and used, research in the field has proven it’s capability to support engineers when dealing with these challenges. However, design synthesis tools need to extend their scope of applications and become more efficient, more intelligent and more flexible in order to encourage industry up-take. A similar situation led in the sixties – after procedural programming has proven its great potential – to the development of the concepts of object-orientation and their implementation in the programming language Simula-67 [Meyer 1997]. This paper presents goals and concepts from object-oriented programming, points out their benefits and draws analogies to computational design synthesis in order to seize the same or similar benefits. More specifically, the realization of object-oriented techniques in design synthesis is presented in the context of graph-grammars. The aim of this paper is to present how the fundamentals of object-orientation are applicable in the computational design synthesis methodology and open the field for new promising applications.
    [Show full text]