th the d dex ex cd lite lang ngua uage ver version 1 1 0
play

Th The D DEx Ex CD Lite lang ngua uage Ver Version 1 1.0 3 rd - PDF document

Software Engineering, RWTH Aachen www.monticore.de/dex Th The D DEx Ex CD Lite lang ngua uage Ver Version 1 1.0 3 rd rd , 2014 April il 3 2014 Internal report Marita Breuer, Robert Eikermann, Timo Greifenberg, Katrin Hlldobler,


  1. Software Engineering, RWTH Aachen www.monticore.de/dex Th The D DEx Ex CD Lite lang ngua uage Ver Version 1 1.0 3 rd rd , 2014 April il 3 2014 Internal report Marita Breuer, Robert Eikermann, Timo Greifenberg, Katrin Hölldobler, Andreas Horst, Markus Look, Steffi Kaiser, Dimitri Plotnikov, Alex Roth, Bernhard Rumpe, Galina Volkova Software Engineering RWTH Aachen Germany 1

  2. Software Engineering, RWTH Aachen www.monticore.de/dex Ex Explanation a and Introduction DEX is a generator framework that basically generates a complete, running system from a single class diagram. While the DEX generator framework is capable of doing many more things, we also use it for the “Generative Software Development” lecture at RWTH Aachen. In this document we describe the core features of DEX that are mapped to the running program. These core features are defined as a simplified version of UML’s class diagrams, that we call “CD lite”. For more details please see http://www.monticore.de/dex DEX is a subproject of MontiCore – the DSL language workbench developed at RWTH Aachen. The rest of this document contains two sections: 1. The human readable grammar of CD lite. 2. The list of context conditions that apply to CD lite. This grammar is meant to understand the context free syntax of CD lite. It is not meant for parsing, and not for understanding the abstract syntax. Please note that in comparison to the UML/P class diagrams, the nonterminals have been renamed (by removing the “CD” prefix) and sometimes substructures have been removed. The context conditions come with the error code (that is also shown, when violated), and good and bad examples as well as with a reference to the context condition in [Sch12]. 2

  3. Software Engineering, RWTH Aachen www.monticore.de/dex Liter erat ature 1. [Rum12] B. Rumpe. Agile Modellierung mit UML : Codegenerierung, Testfälle, Refactoring. 2nd Edition, Springer Berlin, June 2012. 2. [Wei12] I. Weisemöller. Generierung domänenspezifischer Transformationssprachen. Shaker Verlag, ISBN 978-3-8440-1191-3. Aachener Informatik-Berichte, Software Engineering, Band 12. 2012. 3. [Sch12] M. Schindler. Eine Werkzeuginfrastruktu r zur agilen Entwicklung mit der UML⁄P . Shaker Verlag, ISBN 978-3-8440-0864-7. Aachener Informatik-Berichte, Software Engineering Band 11. 2012. 4. [HRR12] A. Haber, J. O. Ringert, B. Rumpe. MontiArc - Architectural Modeling of Interactive Distributed and Cyber-Physical Systems. RWTH Aachen University, Technical Report. AIB-2012-03. February 2012. 5. [MRR11e] S. Maoz, J. O. Ringert, B. Rumpe. CD2Alloy: Class Diagrams Analysis Using Alloy Revisited. In: Model Driven Engineering Languages and Systems (MODELS 2011), Wellington, New Zealand. pp. 592-607, LNCS 6981, 2011. 6. [Rum11] B. Rumpe. Modellierung mit UML. 2nd Edition, Springer Berlin, September 2011. 7. [KRV10] H. Krahn, B. Rumpe, S. Völkel. MontiCore: a Framework for Compositional Development of Domain Specific Languages. In: International Journal on Software Tools for Technology Transfer (STTT), Volume 12, Issue 5, pp. 353-372, September 2010. 8. [KBV06] H. Krahn, B. Rumpe, S. Völkel. Roles in Software Development using Domain Specific Modeling Languages. In: Proceedings of the 6th OOPSLA Workshop on Domain-Specific Modeling (DSM' 06), Portland, Oregon USA. Technical Report TR-37, Jyväskylä University, Finland, 2007 9. [GKR+06a] H. Grönniger, H. Krahn, B. Rumpe, M. Schindler, S. Völkel. MontiCore 1.0 - Ein Framework zur Erstellung und Verarbeitung domänenspezifischer Sprachen. Informatik-Bericht 2006-04. Technische Universität Braunschweig, Carl-Friedrich-Gauss- Fakultät für Mathematik und Informatik, 2006. 10. [GKR+06b] H. Grönniger, H. Krahn, B. Rumpe, M. Schindler. Integration von Modellen in einen codebasierten Softwareentwicklungsprozess. In: Proceedings der Modellierung 2006. 22.-24. März 2006, Innsbruck. GI-Edition - Lecture Notes in Informatics, LNI P-82, ISBN 3-88579-176-5, 2006. 3

  4. Software Engineering, RWTH Aachen www.monticore.de/dex 11. [Rum04c] B. Rumpe. Agile Modeling with the UML. Ed.: M. Wirsing, A. Knapp, S. Balsamo. In: Radical Innovations of Software and Systems Engineering in the Future. 9th International Workshop, RISSEF 2002. Venice, Italy, October 2002. LNCS 2941. Springer Verlag 2004. 12. [Rum03] B. Rumpe. Model-Based Testing of Object-Oriented Systems. In: Formal Methods for Components and Objects. F. de Boer, M.Bonsangue, S. Graf, W.-P. de Roever (eds.) International Symposium, FMCO 2002. Leiden, November 2002, Revised Lectures. LNCS 2852, Springer Publisher, 2003 13. [Rum02] Bernhard Rumpe. Executable Modeling with UML. A Vision or a Nightmare? In: Issues & Trends of Information Technology Management in Contemporary Associations, Seattle. Idea Group Publishing, Hershey, London, pp. 697-701. 2002. 4

  5. Software Engineering, RWTH Aachen www.monticore.de/dex Grammar f for t textual cl class ss d diagrams CDDefinition = "classdiagram" Name "{" (CDClass | CDInterface | CDEnum | CDAssociation)* "}" CDClass = "abstract"? "class" Name ("extends" ReferenceType ("," ReferenceType)*)? ("implements" ReferenceType ("," ReferenceType)*)? (CDClassBody | ";") CDClassBody = "{" CDAttribute* "}" CDAttribute = "/"? Type Name ("=" Value)? ";" CDInterface = "interface" Name ("extends" ReferenceType ("," ReferenceType)*)? ";" CDEnum = "enum" Name (CDEnumBody | ";") CDEnumBody = "{" (CDEnumConstant ("," CDEnumConstant)* ";")? "}" CDEnumConstant = Name CDAssociation = "<<ordered>>"? "association" "/"? Name? "<<ordered>>"? Cardinality? QualifiedName CDQualifier? RoleName? ( "->" | "<-" | "<->" | "--" ) RoleName? CDQualifier? QualifiedName Cardinality? "<<ordered>>"? ";" Cardinality = "[" ("*" | Int | Int ".." Int | Int ".." "*") "]"; CDQualifier = "[" Name "]" RoleName = "(" Name ")" 5

  6. Software Engineering, RWTH Aachen www.monticore.de/dex In natural language: The DEx CD Lite language allows you to model: Examples: class SomeClass; Classes, abstract class SomeAbstractClass; Abstract classes, Interfaces, interface SomeInterface; Enumerations enum SomeEnum; class SomeClass; Inheritance abstract class SomeAbstractClass; • with non-abstract superclasses class SomeSubClassA extends SomeClass; • with abstract superclasses class SomeSubClassB extends SomeAbstractClass; interface SomeInterface; Interface implementation class SomeClass implements SomeInterface; interface SomeInterface; Extension of interfaces interface SomeInterfaceA extends SomeInterface; class SomeClassA; interface SomeInterface; Attributes with type: class SomeClassC { • primitive data type int i; boolean b; • String String s; • Class in the CD model SomeClassA sca; • Interface in the CD model SomeInterface si; • Date Date d; • Wrapper Integer i2; Boolean b2; • List<Wrapper of primitive data type> List<Integer>; • List<String> List<String>; } class SomeClass; Associations abstract class SomeAbstractClass; • From classes, abstract classes, interfaces interface SomeInterface; (NOT: enums, external java classes) • To classes, abstract classes, interfaces, enums association someAssociationA [*] SomeClass (NOT: external java classes) (roleA) <-> (roleB) SomeAbstractClass [1] • With multiplicities: [0,1], [1], [*] • With navigation directions: ->, <-, --, <--> association someAssociationB SomeAbstractClass • With association and role names -- SomeInterface • Qualified associations: o With key: attribute of the opposite class o With stereotype <<ordered>> class A; Modifiers class B; • abstract (for classes) abstract class SomeAbstractClass; • derived for attributes /int someNumber • derived for associations association /someAssociation A -- B 6

Recommend


More recommend