Modularity and Reuse of Domain-Specific Languages

Total Page:16

File Type:pdf, Size:1020Kb

Modularity and Reuse of Domain-Specific Languages Modularity and reuse of domain-specific languages Citation for published version (APA): Sutii, A. M. (2017). Modularity and reuse of domain-specific languages: an exploration with MetaMod. Technische Universiteit Eindhoven. Document status and date: Published: 07/11/2017 Document Version: Publisher’s PDF, also known as Version of Record (includes final page, issue and volume numbers) Please check the document version of this publication: • A submitted manuscript is the version of the article upon submission and before peer-review. There can be important differences between the submitted version and the official published version of record. People interested in the research are advised to contact the author for the final version of the publication, or visit the DOI to the publisher's website. • The final author version and the galley proof are versions of the publication after peer review. • The final published version features the final layout of the paper including the volume, issue and page numbers. Link to publication General rights Copyright and moral rights for the publications made accessible in the public portal are retained by the authors and/or other copyright owners and it is a condition of accessing publications that users recognise and abide by the legal requirements associated with these rights. • Users may download and print one copy of any publication from the public portal for the purpose of private study or research. • You may not further distribute the material or use it for any profit-making activity or commercial gain • You may freely distribute the URL identifying the publication in the public portal. If the publication is distributed under the terms of Article 25fa of the Dutch Copyright Act, indicated by the “Taverne” license above, please follow below link for the End User Agreement: www.tue.nl/taverne Take down policy If you believe that this document breaches copyright please contact us at: [email protected] providing details and we will investigate your claim. Download date: 06. Oct. 2021 Modularity and Reuse of Domain-Specific Languages: an exploration with MetaMod PROEFSCHRIFT ter verkrijging van de graad van doctor aan de Technische Universiteit Eindhoven, op gezag van de rector magnificus prof.dr.ir. F.P.T. Baaijens, voor een commissie aangewezen door het College voor Promoties, in het openbaar te verdedigen op dinsdag 7 november 2017 om 16:00 uur door Ana Maria Şutîi geboren te Bacău, Roemenië Dit proefschrift is goedgekeurd door de promotoren en de samenstelling van de promotie- commissie is als volgt: voorzitter: prof.dr.ir. B. Koren promotor: prof.dr. M.G.J. van den Brand co-promotor: dr.ir. T. Verhoeff leden: prof.dr. J.J. Lukkien Prof.Dr. B. Rumpe (RWTH) prof.dr. E. Scott (Royal Holloway University) dr. E. van Wijk (University of Minnesota) prof.dr. J.J. Vinju (Centrum van Wiskunde en Informatica) Het onderzoek of ontwerp dat in dit proefschrift wordt beschreven is uitgevoerd in overeenstemming met de TU/e Gedragscode Wetenschapsbeoefening. Modularity and Reuse of Domain-Specific Languages: an exploration with MetaMod Ana Maria Şutîi Promotor: prof.dr. M.G.J. van den Brand (Eindhoven University of Technology) Copromotor: dr.ir. T. Verhoeff (Eindhoven University of Technology) Additional members of the core committee: prof.dr. J.J. Lukkien (Eindhoven University of Technology) prof.dr. J.J. Vinju (Centrum Wiskunde en Informatica) prof.dr. B. Rumpe (RWTH Aachen University) prof.dr. E. Scott (Royal Holloway University of London) prof.dr. E. van Wyk (University of Minnesota) The work in this thesis has been carried out under the auspices of the research school IPA (Institute for Programming research and Algorithmics). IPA dissertation series 2017-09. Part of the work in this thesis has been carried out as part of the European Union’s ARTEMIS Joint Undertaking for CRYSTAL - Critical System Engineering Acceleration - under grant agreement No. 332830. A catalogue record is available from the Eindhoven University of Technology Library ISBN: 978-90-386-4379-3 c A.M. Şutîi, 2017. Printed by the print service of Ipskamp Printing, Enschede, The Netherlands All rights reserved. No part of this publication may be reproduced, stored in a retrie- val system, or transmitted, in any form or by any means, electronically, mechanically, photocopying, recording or otherwise, without prior permission of the author. Acknowledgements My PhD has been an incredible journey, during which I have grown both professionally and personally. Besides the technical knowledge, the PhD made me more confident in my abilities to take on challenging tasks and it has shown me how to deal with uncertainty. It has also taught me to be more self-disciplined and resilient in stressful times. On the fun side, during these four years, I attended inspiring conferences, workshops and summer schools in various parts of the world. There, I met inspiring people and I have visited beautiful places. These people and the places I visited, all left a profound mark on me. It is now time to express my gratitude towards people who have guided, supported, and encouraged me during the four years of my PhD. In the next paragraphs, I will mention the people that had the greatest influence on me in this period. First and foremost, I am really grateful towards my two supervisors, Mark and Tom. The guidance, liberty, and trust they gave me was of uttermost importance for the completion of my PhD. Mark has always been the one to give me the high-level overview and to put my work into perspective. Tom has always been the one to discuss the details of my work and to show me the beauty of abstraction. Thank you both for the great, inspiring talks we had these four years. You made my PhD journey a pleasure. Both of you have showed me the joy of good mentorship and guidance. Moreover, thank you, Tom, for the tennis games we played Saturday mornings, and the small conversations in Dutch we always had after each game. I have always cherished the moments spent with my colleagues. We enjoyed numerous drinks, barbecues, coffees, and chit-chats together. They have made life at the university a real delight. My south American colleagues helped me improve my Spanish and Portuguese, they got me into playing football, and they showed me what a good barbecue really is. Moreover, they introduced me to “farofa” (no more barbecues without it) and the famous Pernambuco “bolo de rolo”. My Asian colleagues brought me numerous flavors from Asia. They showed me the Chinese “sweets”, the real pistachios (not the ones you find in European shops), the amazing saffran, the smoked tea, and so many other flavors. I also had a failed attempt to learn Chinese. Last, but not least, my European friends showed me how diverse Europe itself is and how, despite the differences, we share dishes that I thought were exclusively romanian! I am especially grateful to my dutch colleagues who have shared precious tricks and tips on how to get around the dutch culture. I wholeheartedly thank my colleagues for showing me the joy of diversity. Among my ii colleagues, I mention Yanja Dajsuren, Önder Babur, Dana Zhang, Ulyana Tikhonova, Felipe Ebert, Weslley Silva Torres, Neda Noroozi, Sander de Putter, Josh Mengerink, Fei Yang, Alexander Serebrenik, Anton Wijs, Luna Luo, Mahmoud Talebi, Thomas Neele, Alexander Fedotov, Mauricio Verano Merino, Kousar Aslam, Rodin Aarssen, Priyanka Karkhanis, Guilherme Amaral Avelino, Sangeeth Kochanthara, Omar Alzuhaibi, Sjoerd Cranen, Sarmen Keshishzadeh, Bogdan Vasilescu, Aminah Zawedde, Yuexu Chen, Maarten Manders, Dragan Bosnacki, Tim Willemse, Hans Zantema, Jaewon Oh, Alexander Aroyo, Miguel Botto Tobar, Loek Cleophas, Rob Faessen, Frank Peter, Arash Khabbaz Saberi, Luc Engelen, Arjan van der Meer, Maciej Gazda, Raquel Alvarez Ramirez, Ion Barosan, Ad Aerts, Harold Weffers, Maggy de Wert, Margje Mommers-Lenders, Tineke van den Bosch, and Willeke Quaedflieg. During these four years, I got involved in various associations and clubs, that have made my PhD life much more enjoyable and fulfilling. I especially thank my improv friends, who have provided for numerous magical evenings at the International Hub in Eindhoven. They have showed me the joy of living in the moment. I express warm thanks to my Toastmasters friends as well. They have showed me the joy of sharing personal stories. Last, but not least, I express gratitude to my PhD Council friends. Organizing events for the PhD community was a very rewarding experience. They have showed me the joy of giving back to the community. I express sincere gratitude to my friends, with whom I have spent many wonderful evenings and weekends. Besides spending relaxing times together, we had many stimulating conversations about life and work. They have showed me the joy of friendship. I would also like to convey my gratitude to the students that I have supervised (Jia Zhang, Stef van Schuylenburg, and Nanne Wielinga) or lectured (2016-2017 PDEng trainees) during these four years. They have showed me the joy of sharing knowledge. I am also extremely grateful for the opportunity I have been given to work at Fabien Campagne’s laboratory at Weill Cornell Medicine in New York. I especially thank Mark for allowing me to do this internship at a short notice, and Fabien for guiding me through the entire period. Besides domain-specific language technology, I have learned a great deal about biology, statistics, and data analysis during this period. It has been a truly intense learning period. Moreover, I will never forget the magical evenings spent in New York and the numerous people I met there from all over the world. I want to thank people from different companies that, during my PhD, have allowed me to present my work at their offices, and have given me valuable feedback.
Recommended publications
  • Object-Oriented Programming in Scheme with First-Class Modules
    Ob jectOriented Programming in Scheme with FirstClass Mo dules and Op eratorBased Inheritance Guruduth Banavar Gary Lindstrom Department of Computer Science University of Utah Salt LakeCityUT Abstract Wecharacterize ob jectoriented programming as structuring and manipulating a uniform space of rstclass values representing modules a distillation of the notion of classes Op erators over mo dules individually achieve eects such as encapsulation sharing and static binding A variety of idioms of OO programming nd convenient expression within this mo del including several forms of single and multiple inheritance abstract classes class variables inheritance hierarchy combination and reection Weshow that this programming style simplies OO programming via enhanced uniformity and supp orts a exible mo del of ob jectorientation that provides an attractive alternative to metaprogramming Finallyweshow that these notions of OO programming are language indep endent by implementing a Mo dular Scheme prototyp e as a completion of a generic OO framework for mo dularity Pap er Category Research Topic Area Language design and implementation Intro duction Classbased ob jectoriented programming is usually thought of as creating a graph structured inher itance hierarchy of classes instantiating some of these classes and computing with these instances Instances are typically rstclass values in the language ie they can b e created stored accessed and passed into and out of functions Classes on the other hand are usually not rstclass values and inheritance is
    [Show full text]
  • Modular Programming with Functions
    CHAPTER 4 MODULAR PROGRAMMING WITH FUNCTIONS Copyright © 2013 Pearson Education, Inc. Modularity •A program may also contain other functions, and it may refer to functions in another file or in a library. These functions , or modules , are sets of statements that perform an operation or compute a value •To maintain simplicity and readability in long and complex programs, we use a short main, and other functions instead of using one long main function. •By separating a solution into a group of modules, each module is easier to understand, thus adhering to the basic guidelines of structured programming Copyright © 2013 Pearson Education, Inc. Modularity •Braking a problem into a set of modules has many advantages: 1. Every module can be written and tested separately from the rest of the program 2. A module is smaller than a complete program, so testing is easier 3. Once a module has been tested, it can be used in new program without having to retest it ( reusability ) 4. Use of modules ( modularity ) usually reduces the overall length of programs 5. Several programmers can work on the same project if it is separated into modules Copyright © 2013 Pearson Education, Inc. Modularity Main Modules Copyright © 2013 Pearson Education, Inc. Function Definition •A function consists of a definition statement followed by declarations and statements. The general form of a function is: return_type function_name(parameter_declarations) { declarations; statements; return expression; } •The parameter declarations represent the information passed to the function •Additional variables used by the function are defined in declarations statement •All functions should include a return statement Copyright © 2013 Pearson Education, Inc.
    [Show full text]
  • Scope in Fortran 90
    Scope in Fortran 90 The scope of objects (variables, named constants, subprograms) within a program is the portion of the program in which the object is visible (can be use and, if it is a variable, modified). It is important to understand the scope of objects not only so that we know where to define an object we wish to use, but also what portion of a program unit is effected when, for example, a variable is changed, and, what errors might occur when using identifiers declared in other program sections. Objects declared in a program unit (a main program section, module, or external subprogram) are visible throughout that program unit, including any internal subprograms it hosts. Such objects are said to be global. Objects are not visible between program units. This is illustrated in Figure 1. Figure 1: The figure shows three program units. Main program unit Main is a host to the internal function F1. The module program unit Mod is a host to internal function F2. The external subroutine Sub hosts internal function F3. Objects declared inside a program unit are global; they are visible anywhere in the program unit including in any internal subprograms that it hosts. Objects in one program unit are not visible in another program unit, for example variable X and function F3 are not visible to the module program unit Mod. Objects in the module Mod can be imported to the main program section via the USE statement, see later in this section. Data declared in an internal subprogram is only visible to that subprogram; i.e.
    [Show full text]
  • A Parallel Program Execution Model Supporting Modular Software Construction
    A Parallel Program Execution Model Supporting Modular Software Construction Jack B. Dennis Laboratory for Computer Science Massachusetts Institute of Technology Cambridge, MA 02139 U.S.A. [email protected] Abstract as a guide for computer system design—follows from basic requirements for supporting modular software construction. A watershed is near in the architecture of computer sys- The fundamental theme of this paper is: tems. There is overwhelming demand for systems that sup- port a universal format for computer programs and software The architecture of computer systems should components so users may benefit from their use on a wide reflect the requirements of the structure of pro- variety of computing platforms. At present this demand is grams. The programming interface provided being met by commodity microprocessors together with stan- should address software engineering issues, in dard operating system interfaces. However, current systems particular, the ability to practice the modular do not offer a standard API (application program interface) construction of software. for parallel programming, and the popular interfaces for parallel computing violate essential principles of modular The positions taken in this presentation are contrary to or component-based software construction. Moreover, mi- much conventional wisdom, so I have included a ques- croprocessor architecture is reaching the limit of what can tion/answer dialog at appropriate places to highlight points be done usefully within the framework of superscalar and of debate. We start with a discussion of the nature and VLIW processor models. The next step is to put several purpose of a program execution model. Our Parallelism processors (or the equivalent) on a single chip.
    [Show full text]
  • The Best of Both Worlds?
    The Best of Both Worlds? Reimplementing an Object-Oriented System with Functional Programming on the .NET Platform and Comparing the Two Paradigms Erik Bugge Thesis submitted for the degree of Master in Informatics: Programming and Networks 60 credits Department of Informatics Faculty of mathematics and natural sciences UNIVERSITY OF OSLO Autumn 2019 The Best of Both Worlds? Reimplementing an Object-Oriented System with Functional Programming on the .NET Platform and Comparing the Two Paradigms Erik Bugge © 2019 Erik Bugge The Best of Both Worlds? http://www.duo.uio.no/ Printed: Reprosentralen, University of Oslo Abstract Programming paradigms are categories that classify languages based on their features. Each paradigm category contains rules about how the program is built. Comparing programming paradigms and languages is important, because it lets developers make more informed decisions when it comes to choosing the right technology for a system. Making meaningful comparisons between paradigms and languages is challenging, because the subjects of comparison are often so dissimilar that the process is not always straightforward, or does not always yield particularly valuable results. Therefore, multiple avenues of comparison must be explored in order to get meaningful information about the pros and cons of these technologies. This thesis looks at the difference between the object-oriented and functional programming paradigms on a higher level, before delving in detail into a development process that consisted of reimplementing parts of an object- oriented system into functional code. Using results from major comparative studies, exploring high-level differences between the two paradigms’ tools for modular programming and general program decompositions, and looking at the development process described in detail in this thesis in light of the aforementioned findings, a comparison on multiple levels was done.
    [Show full text]
  • Chapter 2:Tools Selection
    MODEL-BASED DESIGN & VERFICATION OF EMBEDDED SYTEMS (MODEVES) Tools Selection Report Chapter 2: Tools Selection MODEL-BASED DESIGN & VERFICATION OF EMBEDDED SYTEMS (MODEVES) Tools Selection Report 1. MBSE Tools Investigation Once the researches are classified into different categories, the next step is to identify the tools and frameworks used in selected researches to perform various MBSE activities. It is important to mention here that a tool is used to perform a specific MBSE activity whereas a framework is a complete environment supporting set of tools that can be used to perform various MBSE activities. On the basis of literature review, 39 preliminary MBSE tools have been identified as given in Table VI. Table I: Preliminary tools selection Sr. Name of Tool / Corresponding Relevant Researches # Framework MBSE Activities 1 Topcased [62] Modeling [3][8][9][52] 2 Modelio Editor Modeling [12] [68] 3 Magic Draw Modeling [6][16][20] [131] 4 Eclipse GEF Modeling [17] [89] 5 Rhapsody [132] Modeling [4][19][22][57] 6 PapyrusMDT Modeling [21][44][60] [98] 7 EA MDG [85] Modeling [27] 8 Visual paradigm Modeling [60] [126] 9 MediniQVT Model [2] [121] Transformation 10 ATL [63] Model [3][8][39][44][46][50][59] Transformation 11 Xpand [97] Model [8][20] Transformation 12 Acceleo [67] Model [9][21][42][44] Transformation 13 MODCO [83] Model [13] Transformation 14 MODEASY Model [17] [17] Transformation 15 Apache Model [16][18] Velocity [86] Transformation 16 Eclipse EMF Model [21][41][37] MODEL-BASED DESIGN & VERFICATION OF EMBEDDED SYTEMS (MODEVES)
    [Show full text]
  • Software Quality / Modularity
    Software quality EXTERNAL AND INTERNAL FACTORS External quality factors are properties such as speed or ease of use, whose presence or absence in a software product may be detected by its users. Other qualities applicable to a software product, such as being modular, or readable, are internal factors, perceptible only to computer professionals who have access to the actual software text. In the end, only external factors matter, but the key to achieving these external factors is in the internal ones: for the users to enjoy the visible qualities, the designers and implementers must have applied internal techniques that will ensure the hidden qualities. EXTERNAL FACTORS Correctness: The ability of software products to perform their tasks, as defined by their specification. Correctness is the prime quality. If a system does not do what it is supposed to do, everything else about it — whether it is fast, has a nice user interface¼ — matters little. But this is easier said than done. Even the first step to correctness is already difficult: we must be able to specify the system requirements in a precise form, by itself quite a challenging task. Robustness: The ability of software systems to react appropriately to abnormal conditions. Robustness complements correctness. Correctness addresses the behavior of a system in cases covered by its specification; robustness characterizes what happens outside of that specification. There will always be cases that the specification does not explicitly address. The role of the robustness requirement is to make sure that if such cases do arise, the system does not cause catastrophic events; it should produce appropriate error messages, terminate its execution cleanly, or enter a so-called “graceful degradation” mode.
    [Show full text]
  • An Analysis of Metamodeling Practices for MOF and OCL Juan Cadavid, Benoit Combemale, Benoit Baudry
    An Analysis of Metamodeling Practices for MOF and OCL Juan Cadavid, Benoit Combemale, Benoit Baudry To cite this version: Juan Cadavid, Benoit Combemale, Benoit Baudry. An Analysis of Metamodeling Practices for MOF and OCL. Computer Languages, Systems and Structures, Elsevier, 2015, 41, pp.46. 10.1016/j.cl.2015.02.002. hal-01186015 HAL Id: hal-01186015 https://hal.inria.fr/hal-01186015 Submitted on 23 Aug 2015 HAL is a multi-disciplinary open access L’archive ouverte pluridisciplinaire HAL, est archive for the deposit and dissemination of sci- destinée au dépôt et à la diffusion de documents entific research documents, whether they are pub- scientifiques de niveau recherche, publiés ou non, lished or not. The documents may come from émanant des établissements d’enseignement et de teaching and research institutions in France or recherche français ou étrangers, des laboratoires abroad, or from public or private research centers. publics ou privés. Distributed under a Creative Commons Attribution - NonCommercial - NoDerivatives| 4.0 International License An Analysis of Metamodeling Practices for MOF and OCL Juan José Cadavida, Benoît Combemaleb, Benoit Baudryb aCEA, Saclay, France [email protected] bInria Rennes, France {benoit.combemale, benoit.baudry}@inria.fr Abstract The definition of a metamodel that precisely captures domain knowledge for effective know-how capitalization is a challenging task. A major obstacle for domain experts who want to build a metamodel is that they must master two radically different languages: an object-oriented, MOF-compliant, modeling language to capture the domain structure and first order logic (the Object Constraint Language) for the definition of well-formedness rules.
    [Show full text]
  • Chapter-2 Object Oriented Programming Very Short/ Short Answer Questions 1
    CHAPTER-2 OBJECT ORIENTED PROGRAMMING VERY SHORT/ SHORT ANSWER QUESTIONS 1. Discuss major OOP concepts briefly. Ans. Following are the general OOP concepts: 1. Data Abstraction: Data abstraction means, providing only essential information to the outside word and hiding their background details i.e. to represent the needed information in program without presenting the details. 2. Data Encapsulation: The wrapping up of data and operations/functions (that operate o the data) into a single unit (called class) is known as Encapsulation. 3. Modularity: Modularity is the property of a system that has been decomposed into a set of cohesive and loosely coupled modules. 4. Inheritance: Inheritance is the capability of one class of things to inherit capabilities or properties from another class. 5. Polymorphism: Polymorphism is the ability for a message or data to be processed in more than one form. 2. What are programming paradigms? Give names of some popular programming paradigms. Ans. Programming Paradigm: A Programming Paradigm defines the methodology of designing and implementing programs using the key features and building blocks of a programming language. Following are the different programming paradigms: (i) Procedural Programming (ii) Object Based Programming (iii) Object Oriented Programming 3. What are the shortcomings of procedural and modular programming approaches? Ans. Following are the various shortcomings of procedural and modular programming approaches: Procedural Programming is susceptible to design changes. Procedural Programming leads to increased time and cost overheads during design changes. Procedural and Modular programming both are unable to represent real world relationship that exists among objects. In modular programming, the arrangement of the data can’t be changed without modifying all the functions that access it.
    [Show full text]
  • Modular Programming
    Modular Programming Prof. Clarkson Fall 2016 Today’s music: "Giorgio By Moroder" by Daft Punk Te Moog modular synthesizer Review Previously in 3110: • Functions, data • lots of language features • how to build small programs Today: • language features for building large programs: structures, signatures, modules Question What’s the largest program you’ve ever worked on, by yourself or as part of a team? A. 10-100 LoC B. 100-1,000 LoC C. 1,000-10,000 LoC D. 10,000-100,000 LoC E. 100,000 LoC or bigger Scale • My solution to A1: 100 LoC • My solution to A2: 300 LoC • OCaml: 200,000 LoC • Unreal engine 3: 2,000,000 LoC • Windows Vista: 50,000,000 LoC http://www.informationisbeautiful.net/visualizations/million-lines-of-code/ ...can’t be done by one person ...no individual programmer can understand all the details ...too complex to build with subset of OCaml we’ve seen so far Modularity Modular programming: code comprises independent modules – developed separately – understand behavior of module in isolation – reason locally, not globally Java features for modularity • classes, packages: organize identifiers (classes, methods, fields, etc.) into namespaces • interfaces: describe related classes • public, protected, private: control what is visible outside a namespace • subtyping, inheritance: enables code reuse OCaml features for modularity • structures: organize identifiers (functions, values, etc.) into namespaces • signatures: describe related modules • abstract types: control what is visible outside a namespace • functors, includes: enable
    [Show full text]
  • Automatic Translation of OCL Meta-Level Constraints Into Java Meta-Programs
    Automatic Translation of OCL Meta-Level Constraints into Java Meta-programs Sahar Kallel, Chouki Tibermacine, Bastien Tramoni, Christophe Dony and Ahmed Hadj Kacem Abstract In order to make explicit and tangible their design choices, software de- velopers integrate, in their applications’ models, constraints that their models and their implemetations should satisfy. Various environments enable constraint check- ing during the modeling stage, but in most cases they do not generate code that would enable the checking of these constraints during the implementation stage. It turns out that this is possible in a number of cases. Environments that provide this functionality only offer it for functional constraints (related to the states of objects in applications) and not for architectural ones (related to the structure of applications). Considering this limitation, we describe in this paper a system that generates metaprograms starting from architecture constraints, written in OCL at the metamodel level, and associated to a specific UML model of an application. These metaprograms enable the checking of these constraints at runtime. Keywords: Software Architecture, Architecture Constraint, Object Constraint Language, Java Reflect Sahar Kallel Lirmm, Montpellier University, France, e-mail: [email protected] Chouki Tibermacine Lirmm, Montpellier University, Farance e-mail: [email protected] Bastien Tramoni Lirmm, Montpellier University, France e-mail: [email protected] Christophe Dony Lirmm, Montpellier University, France e-mail: [email protected] Ahmed Hadj Kacem ReDCAD, Sfax University, Tunisie e-mail: [email protected] 1 2 Kallel, Tibermacine, Tramoni, Dony and HadjKacem 1 Introduction Software architecture description is one of the main building blocks of an applica- tion’s design [4].
    [Show full text]
  • A Module System for C++ (Revision 2)
    Document number: N4214 Date: 2014-10-13 Working group: Modules SG Reply to: [email protected] A Module System for C++ (Revision 2) Gabriel Dos Reis Mark Hall Gor Nishanov Abstract We present a design of and a specification of module system for C++. The proposal focuses on programmer’s view of modules (both production and consumption) and how to better support modular programming in the large, componentization, scalable compilation, and semantics-aware devel- oper tools. Contents 1 Introduction ......... 1 5 Tools Support ......... 20 2 The Problems ......... 2 6 Build Systems ........ 21 3 Goals and Principles ..... 4 7 Migration ........... 21 4 Design Choices ........ 7 A Standardese ......... 21 1 Introduction The lack of direct language support for componentization of C++ libraries and programs, combined with increasing use of templates, has led to serious impedi- ments to compile-time scalability, and programmer productivity. It is the source of lackluster build performance and poor integration with cloud and distributed build systems. Furthermore, the heavy-reliance on header file inclusion (i.e. copy-and- paste from compilers’ perspective) and macros stifle flowering of C++ developer tools in increasingly semantics-aware development environments. Responding to mounting requests from application programmers, library de- velopers, tool builders alike, this report proposes a module system for C++ with a handful of clearly articulated goals. The proposal is informed by the current state of the art regarding module systems in contemporary programming languages, past 1 suggestions [4, 6] and experiments such as Clang’s [2, 5], and practical constraints specific to C++ ecosystem, deployment, and use. The design is minimalist; yet, it aims for a handful of fundamental goals 1.
    [Show full text]