Model transformations. Model transformations. Model transformations. Model transformations

Size: px
Start display at page:

Download "Model transformations. Model transformations. Model transformations. Model transformations"

Transcription

1 The initialization of the attributes of a generated target model element by assigning references: Model target element generated by current rule Default target model element generated by another rule Non-default target model element generated by another rule The first case (assigning g a model element produced by the same rule is the simplest one: the considered reference can be initialized with the name of the other target pattern element consider the following example in which the rule Case1 has two target pattern model elements (o_1 and o_2, with o_1 having a reference to a Class2 model element defined (linktoclass2: rule Case1 { from i : MM_A!ClassA to o_1 : MM_B!Class1 ( linktoclass2 <- o_2, o_2 : MM_B!Class2 (... In the second case (assigning g the default target element of another rule: the considered reference has to be initialized with the source model element which is matched by the remote rule for generating the target model element to be assigned In the following example, the rule Case2_R1 aims to generate a target model element (o_1 that has a reference to a target model element that corresponds to the default target pattern (o_1 of the rule Case2_R2 Assuming that the source model element matched by Case2_R1 has a reference (linktoclassb to the relevant MM_ A!ClassB source model element, this assignment is expressed as follows: rule Case2_R1 { from i : MM_A!ClassA to o_ 1 : MM_ B!Class1 ( linktoclass2 <- i.linktoclassb rule Case2_R2 { from i : MM_A!ClassB to o_1 : MM_B!Class2 (...,...

2 rule Case2_R1 { from i : MM_A!ClassA to o_1 : MM_B!Class1 ( linktoclass2 <- i.linktoclassb rule Case2_R2 { from i : MM_A!ClassB to o_1 : MM_B!Class2 (...,... Alternative (also used in the non-default target element rule Case2_R1 { from i : MM_A!ClassA to o_1 : MM_B!Class1 ( linktoclass2 <- thismodule.resolvetemp(i.linktoclassb, o_1 rule Case2_R2 { from i : MM_ A!ClassB to o_1 : MM_B!Class2 (...,... Example of assignments / Faculteit Wiskunde en Informatica PAGE 5 Lazy rules Lazy rules are like matched rules, but are only applied when called by another rule / Faculteit Wiskunde en Informatica PAGE 6 / Faculteit Wiskunde en Informatica PAGE 7

3 Lazy rules lazy rule rule_name{ from in: MM1!MetaClass using{<variable definitions> to out1: MM2!MetaClass1( <bindings1>, out2: MM2!MetaClass2( <bindings2> do{<imperative block> Generates new target elements for every er call to the rule Invoked from other rules as follows: thismodule.rule_name(<model element of type MM1!MetaClass> / Faculteit Wiskunde en Informatica PAGE 9 Unique lazy matched rules unique lazy rule rule_name{ from in: MM1!MetaClass using{<variable definitions> to out1: MM2!MetaClass1( <bindings1>, out2: MM2!MetaClass2( <bindings2> do{<imperative block> Always returns rns the same target elements for a given source element, i.e., target elements are generated only once per source element Called rules The called rules provide ATL developers with convenient imperative programming facilities. Called rules can be seen as a particular type of helpers: they have to be explicitly called to be executed and they can accept parameters called rules can generate target model elements as matched rules do A called rule has to be called from an imperative code section, either from a match rule or another called rule A called rule does not include a source pattern / Faculteit Wiskunde en Informatica PAGE 11

4 Called rules [entrypoint]? rule rule_name(<parameters>{ using{<variable definitions> to out1: MM2!MetaClass1( <bindings1>, out2: MM2!MetaClass2( <bindings2> do{<imperative block> For generating target elements from imperative code No from clause Example of a called rule rule NewPerson (na: String, s_na: String { to p : MMPerson!Person ( name <- na do { p.surname <- s_na / Faculteit Wiskunde en Informatica PAGE 13 Besides matched rules, ATL defines an additional kind of rules enabling to explicitly generate target model elements from imperative code Except for the entrypoint called rule, this kind of rules must be explicitly called from an ATL imperative block. A called rule is identified by its name (rule_name. A called rule name must be unique within an ATL transformation must not collide with a helper name a called rule cannot be called "main" A called rule can optionally be declared as the transformation entrypoint/endpoint. p an ATL transformation can include one entrypoint/endpoint called rule. it is implicitly invoked at the beginning/ending of the transformation execution / Faculteit Wiskunde en Informatica PAGE 14 / Faculteit Wiskunde en Informatica PAGE 15

5 Helper with context helper context MM!MetaClass def: helper_name(<parameters>: return_type = let <variable definition> in <expression>; Invocation: <model element of type MM!MetaClass>.helper_name(<parameters> The context should never be of a collection type Helper without context helper def: helper_name(<parameters>: return_type = let <variable definition> in <expression>; Invocation: thismodule.helper_name(<parameters> More reading material _Overview_of_the_Atlas_Transformation_Language _The_ATL_Language For OCL functions refer to the ATL user guide / Faculteit Wiskunde en Informatica PAGE 17 XTEND Xtend transformation language: g Model transformation language OCL like expression language strong functional flavour Can be used in constraint checks, model transformations and code generators Add methods to meta types (Java calls are possible if necessary Tool support (syntax highlighting, code completion, debugger / Faculteit Wiskunde en Informatica PAGE 18 / Faculteit Wiskunde en Informatica PAGE 19

6 First we create an Xtend project Getting started Select in Eclipse File/New/Other Select then the Xpand/Xpand d project Select then the Next button Enter project name Select then the Finish button A Xtend project is created Create/copy needed metamodels click on src and then select New/Other Select Ecore Tools/Ecore Diagram / Faculteit Wiskunde en Informatica PAGE 20 / Faculteit Wiskunde en Informatica PAGE 21 Enter Directory Enter Domain file name Select Finish Create an Xtend file Click on src Select New/Other Select Xtend/Xtend File Click Next Enter File name Click Finish / Faculteit Wiskunde en Informatica PAGE 22 / Faculteit Wiskunde en Informatica PAGE 23

7 Xtend language g concepts: File extension must be *.ext Example import my::metamodel; extension other::extensionfile; /** * Documentation */ anexpressionextension(string stringparam : doingstuff(with(stringparam ; /** * java extensions are just mappings */ String ajavaextension(string param : JAVA my.javaclass.staticmethod(java.lang.string ; Extend Import Statements Using the import statement one can import name spaces of different types Syntax is: import my::imported::namespace; / Faculteit Wiskunde en Informatica PAGE 24 / Faculteit Wiskunde en Informatica PAGE 25 Extend Extension Import Statement You can import another extend file using the extension statement The syntax is: extension fully::qualified::extensionfilename; Reexporting Extensions To export extensions from another extension file together with your local extensions, you add the keyword 'reexport' extension fully::qualified::extensionfilename reexport; Extensions The syntax of a simple expression extension is as follows: ReturnType extensionname(paramtype1 paramname1, ParamType2...: expression-using-params; params; Example: String gettername(namedelement ele : 'get'+ele.name.firstupper(; / Faculteit Wiskunde en Informatica PAGE 26 / Faculteit Wiskunde en Informatica PAGE 27

8 Extension Invocation There are two different ways of how to invoke an extension: gettername(mynamedelement mynamedelement.gettername( Issues with extensions: Type Inference Recursion Cached Extensions If you call an extension without side effects very often, you would like to cache the result for each set of parameters, in order improve the performance You can just add the keyword 'cached' to the extension in order to achieve this: cached String gettername(namedelement ele : 'get'+ele.name.firstupper( ; / Faculteit Wiskunde en Informatica PAGE 28 / Faculteit Wiskunde en Informatica PAGE 29 Private Extensions By default all extensions are public, i.e. they are visible from outside the extension file. If you want to hide extensions you can add the keyword 'private' in front of them: private internalhelper(namedelement ele : // implementation... ; Create Extensions (Model Transformation The evaluation of extensions is innermost Circular references may lead to non termination create extensions enforces a non-innermost behaviour: Object is created before children are processed / Faculteit Wiskunde en Informatica PAGE 30 / Faculteit Wiskunde en Informatica PAGE 31

9 Syntax of Xtend (Xpand expressions: There are two different forms of conditional expressions. The first one is the so-called if expression. Syntax: condition? thenexpression : elseexpression The other one is called switch expression. Syntax: switch (expression { (case expression : thenexpression* default : catchallexpression The default part is mandatory, because switch is an expression, therefore it needs to evaluate to something in any case Syntax of Xtend (Xpand expressions: There is an abbreviation for Boolean expressions:switch { case booleanexpression : thenexpression default : catchallexpression Chain expression: expressions and functional languages should be free of side effects as far as possible. But sometimes there you need invocations that do have side effects. If you need to call such operations, you can use the chain expression. Syntax: anexpr -> anotherexpr -> lastexpr Each expression is evaluated in sequence, but only the result of the last expression is returned / Faculteit Wiskunde en Informatica PAGE 32 / Faculteit Wiskunde en Informatica PAGE 33 Syntax of Xtend (Xpand expressions: The create expression is used to instantiate new objects of a given type: new TypeName let expression The let expression lets you define local variables. Syntax is as follows: let v = expression : expression-with-v This is especially useful together with a chain- and a create expressions Recall the Xtext specification for Booleans: Model : OrBool ; OrBool : lhs=andbool (' ' rhs=orbool? ; AndBool : lhs=notbool ('&' rhs=andbool? ; NotBool : (not?='~? arg=bracketbool ; BracketBool : '(' orarg=orbool '' conarg=boolcon ; BoolCon : {TrueNode 'true' {FalseNode 'false' ; / Faculteit Wiskunde en Informatica PAGE 34 / Faculteit Wiskunde en Informatica PAGE 35

10 Grammars, signatures and meta-models Recall meta-model (of syntax tree for Booleans: First alternative for Boolean meta-model / Faculteit Wiskunde en Informatica PAGE 36 / Faculteit Wiskunde en Informatica PAGE 37 Model transformation Model transformation From concrete to abstract syntax meta-model import mbool; import ABool; extension org::eclipse::xtend::util::stdlib::io; mbool::bool convert(abool::orbool model : model.convertorbool(; mbool::bool convertorbool(abool::orbool orbool : if (orbool.rhs!= null then ( orbool.makeorbool( else ( orbool.lhs.convertandbool( ; create mbool::orbool makeorbool(abool::orbool orbool : this.setlhs( orbool.lhs.convertandbool( -> this.setrhs( orbool.rhs.convertorbool( ; From concrete to abstract syntax meta-model mbool::bool convertandbool(abool::andbool andbool : if (andbool.rhs!= null then ( andbool.makeandbool( else ( andbool.lhs.convertnotbool( ; create mbool::andbool makeandbool(abool::andbool andbool: this.setlhs(andbool.lhs.convertnotbool( -> this.setrhs(andbool.rhs.convertandbool(; mbool::bool convertnotbool(abool::notbool notbool : if (notbool.not == true then ( makenotbool(notbool.arg else ( convertbracketbool(notbool.arg ; / Faculteit Wiskunde en Informatica PAGE 38 / Faculteit Wiskunde en Informatica PAGE 39

11 Model transformation Overview of workshop From concrete to abstract syntax meta-model create mbool::notbool makenotbool(abool::bracketbool bracketbool : this.setarg(convertbracketbool(bracketbool; mbool::bool convertbracketbool(abool::bracketbool bracketbool : if (bracketbool.orarg!= null then ( bracketbool.orarg.convertorbool( else ( bracketbool.conarg.convertboolcon( ; Model driven software engineering g in general Grammars, signatures and meta-models mbool::boolcon convertboolcon(abool::boolcon boolcon : syserr("unknown boolcon encounterd: " + boolcon.tostring(; create mbool::boolcon convertboolcon(abool::truenode truenode : this.setvalue(mbool::boolliteral::true; create mbool::boolcon convertboolcon(abool::falsenode truenode : this.setvalue(mbool::boolliteral::false; / Faculteit Wiskunde en Informatica PAGE 40 / Faculteit Wiskunde en Informatica PAGE 41 Automatic transformation of domain specific models into software models Automatic translation from software models into executable code Ingredients: syntax and semantics of modeling formalisms should be described correctness preserving transformation steps should be defined code generators should be developed Xpand: Designed specifically for code (actually, text generation OO template engine supporting template polymorphism French quotation ti marks as escape characters Embedded Expressions based on Xtend (OCL like Support for Recursion Metamodel aware Editor with Code Completion and Syntax Highlighting hti Debugger / Faculteit Wiskunde en Informatica PAGE 42 / Faculteit Wiskunde en Informatica PAGE 43

12 Xpand statements: Import: make meta models visible to template file Define: define a new template File: open a file into which h output t is written Expand: Call another template for one or several elements Foreach: iterate over coll., generate e code for each elemente e If: conditional template code Extension: import an extension file for use in the templates t Error: report an error Let: define a temporary variable Import statement Xpand Editor knows your metamodel (code completion, validation You can work on different types of meta metamodels metamodels EMF, UML2, Java, When writing a template you have to specify the metamodel you are using This is done using the import syntax / Faculteit Wiskunde en Informatica PAGE 44 / Faculteit Wiskunde en Informatica PAGE 45 Define statement A Template file contains any number of templates A template is specified using the DEFINE keyword At template t has a name and dis defined dfor a certain type (from your meta model It is possible to have several templates with the same name but different types (i.e. Polymorphism if those are subtypes Optionally, a template may have additional parameters. Example of Xpand code Define / Faculteit Wiskunde en Informatica PAGE 46 / Faculteit Wiskunde en Informatica PAGE 47

13 File statement The FILE statement is used to specify the output file where the contents of a template and its called templates goes to The filename might be an expression Example of Xpand code File / Faculteit Wiskunde en Informatica PAGE 48 / Faculteit Wiskunde en Informatica PAGE 49 Expand statement EXPAND is used to invoke another template You have to specify the target object (if called for this, the FOR part can be omitted It is also possible to call a template FOREACH element in a collection (support for SEPARATOR Example of Xpand code Expand / Faculteit Wiskunde en Informatica PAGE 50 / Faculteit Wiskunde en Informatica PAGE 51

14 Foreach statement FOREACH is used to iterate over a collection The current element from the list is assigned to a local variable (AS part Optionally you may specify a SEPARATOR and ITERATOR If statement IF is used to add conditions to your template You may have any number of ELSE IF statements And one ELSE / Faculteit Wiskunde en Informatica PAGE 52 / Faculteit Wiskunde en Informatica PAGE 53 If statement IF is used to add conditions to your template You may have any number of ELSE IF statements And one ELSE Let statement LET is used to define a local variable (assign once Not used very often better use an extension Example of Xpand code Creation of files Iteration / Faculteit Wiskunde en Informatica PAGE 54 / Faculteit Wiskunde en Informatica PAGE 55

15 Example of Xpand code More information on Xpand: n/4.3.1/html/contents/core_reference.html#xpand_refere nce_introduction / Faculteit Wiskunde en Informatica PAGE 56 / Faculteit Wiskunde en Informatica PAGE 57

Model transformations. Overview of DSLE. Model transformations. Model transformations. The 4-layer architecture

Model transformations. Overview of DSLE. Model transformations. Model transformations. The 4-layer architecture Overview of DSLE Model driven software engineering g in general Grammars, signatures and meta-models DSL Design Code generation Models increase the level of abstraction used for both hardware and software

More information

ATL: Atlas Transformation Language. ATL User Manual

ATL: Atlas Transformation Language. ATL User Manual ATL: Atlas Transformation Language ATL User Manual - version 0.7 - February 2006 by ATLAS group LINA & INRIA Nantes Content 1 Introduction... 1 2 An Introduction to Model Transformation... 2 2.1 The Model-Driven

More information

Introduction to OpenArchitectureWare

Introduction to OpenArchitectureWare Introduction to OpenArchitectureWare Dr. Neil Loughran Neil.Loughran@sintef.no 20 th April 2009 ICT 1 Objective To give some insights into an alternative model transformation approach i.e. OpenArchitectureWare

More information

Book. Signatures and grammars. Signatures and grammars. Syntaxes. The 4-layer architecture

Book. Signatures and grammars. Signatures and grammars. Syntaxes. The 4-layer architecture Book Generic Language g Technology (2IS15) Syntaxes Software Language g Engineering g by Anneke Kleppe (Addison Wesley) Prof.dr. Mark van den Brand / Faculteit Wiskunde en Informatica 13-9-2011 PAGE 1

More information

with openarchitectureware

with openarchitectureware Model-Driven Development with openarchitectureware Markus Völter voelter@acm.orgorg www.voelter.de Sven Efftinge sven@efftinge.de www.efftinge.de Bernd Kolb bernd@kolbware.de www.kolbware.de 2006-7 Völter,

More information

QVT: Query, Views, Transformations

QVT: Query, Views, Transformations QVT: Query, Views, Transformations Rubby Casallas Grupo de Construcción de Software Uniandes Basics Transformations are essential for the MDE A model transformation: takes as input a model conforming to

More information

Rubby Casallas Grupo de Construcción de Software Uniandes http://wiki.eclipse.org/atl/user_guide http://www.sciences.univnantes.fr/lina/atl/atldemo/oclturorial/ 1 ATL and OCL Matched Rules Lazy Rules Called

More information

ECLIPSE MODELING PROJECT

ECLIPSE MODELING PROJECT ECLIPSE MODELING PROJECT A Domain-Specific Language Toolkit Richard С. Gronback AAddison-Wesley Upper Saddle River, NJ Boston Indianapolis San Francisco New York Toronto Montreal London Munich Pans Madrid

More information

ATL: ATLAS Transformation Language. MISO - Uniandes

ATL: ATLAS Transformation Language. MISO - Uniandes ATL: ATLAS Transformation Language MISO - Uniandes 1 Models are first class entities Transformations are models Transformations are assets 2 What is ATL? ATL is a model transformation language (MTL) developed

More information

ATL: ATLAS Transformation Language

ATL: ATLAS Transformation Language ATL: ATLAS Transformation Language Rubby Casallas Grupo de Construcción de Software Uniandes 1 Models are first class entities Transformations are models Transformations are assets 2 1 What is ATL? ATL

More information

New and Noteworthy. Peter Friese Bernd Kolb

New and Noteworthy. Peter Friese  Bernd Kolb New and Noteworthy Peter Friese peter.friese@gentleware.com http://www.gentleware.com Bernd Kolb b.kolb@kolbware.de http://www.kolbware.de What is openarchitectureware? oaw Languages New: AOP Mechanisms

More information

Model driven Engineering & Model driven Architecture

Model driven Engineering & Model driven Architecture Model driven Engineering & Model driven Architecture Prof. Dr. Mark van den Brand Software Engineering and Technology Faculteit Wiskunde en Informatica Technische Universiteit Eindhoven Model driven software

More information

Language engineering and Domain Specific Languages

Language engineering and Domain Specific Languages Language engineering and Domain Specific Languages Perdita Stevens School of Informatics University of Edinburgh Plan 1. Defining languages 2. General purpose languages vs domain specific languages 3.

More information

Chapter 4 Defining Classes I

Chapter 4 Defining Classes I Chapter 4 Defining Classes I This chapter introduces the idea that students can create their own classes and therefore their own objects. Introduced is the idea of methods and instance variables as the

More information

DSL Design. Overview of DSLE. DSL Design. DSL Desing. Domain specific languages

DSL Design. Overview of DSLE. DSL Design. DSL Desing. Domain specific languages Overview of DSLE Model driven software enineerin in eneral Grammars, and meta-models Code eneration Model-driven enineerin Goal: Raisin the level of abstraction from the computin domain to the problem

More information

Chapter 11. Categories of languages that support OOP: 1. OOP support is added to an existing language

Chapter 11. Categories of languages that support OOP: 1. OOP support is added to an existing language Categories of languages that support OOP: 1. OOP support is added to an existing language - C++ (also supports procedural and dataoriented programming) - Ada 95 (also supports procedural and dataoriented

More information

Plan. Language engineering and Domain Specific Languages. Language designer defines syntax. How to define language

Plan. Language engineering and Domain Specific Languages. Language designer defines syntax. How to define language Plan Language engineering and Domain Specific Languages Perdita Stevens School of Informatics University of Edinburgh 1. Defining languages 2. General purpose languages vs domain specific languages 3.

More information

Object Oriented Issues in VDM++

Object Oriented Issues in VDM++ Object Oriented Issues in VDM++ Nick Battle, Fujitsu UK (nick.battle@uk.fujitsu.com) Background VDMJ implemented VDM-SL first (started late 2007) Formally defined. Very few semantic problems VDM++ support

More information

The TTC 2011 Reengineering Challenge Using MOLA and Higher-Order Transformations

The TTC 2011 Reengineering Challenge Using MOLA and Higher-Order Transformations The TTC 2011 Reengineering Challenge Using MOLA and Higher-Order Transformations Agris Sostaks, Elina Kalnina, Audris Kalnins, Edgars Celms, and Janis Iraids Institute of Computer Science and Mathematics,

More information

openarchitectureware 4.1 An introduction

openarchitectureware 4.1 An introduction openarchitectureware 4.1 An introduction Markus Voelter, www.voelter.de, openarchitectureware (oaw) is a suite of tools and components assisting with model driven software development, more precisely it

More information

Weiss Chapter 1 terminology (parenthesized numbers are page numbers)

Weiss Chapter 1 terminology (parenthesized numbers are page numbers) Weiss Chapter 1 terminology (parenthesized numbers are page numbers) assignment operators In Java, used to alter the value of a variable. These operators include =, +=, -=, *=, and /=. (9) autoincrement

More information

Grammars. Prof. Andreas Prinz. Introduction, Compilers. Examples Meta-models vs. Grammars Summary

Grammars. Prof. Andreas Prinz. Introduction, Compilers. Examples Meta-models vs. Grammars Summary Meta-models and Grammars Prof. Andreas Prinz Introduction, Compilers Modelling & Meta-modelling Examples Meta-models vs. Grammars Summary Compilers Graphical Editor Parser Text editor Static checks (OCL)

More information

What Every Xtext User Wished to Know Industry Experience of Implementing 80+ DSLs

What Every Xtext User Wished to Know Industry Experience of Implementing 80+ DSLs What Every Xtext User Wished to Know Industry Experience of Implementing 80+ DSLs EclipseCon Europe 2016 2016-10-26 Roman Mitin Avaloq Evolution AG Allmendstrasse 140 8027 Zurich Switzerland T +41 58 316

More information

Introduction to Dependable Systems: Meta-modeling and modeldriven

Introduction to Dependable Systems: Meta-modeling and modeldriven Introduction to Dependable Systems: Meta-modeling and modeldriven development http://d3s.mff.cuni.cz CHARLES UNIVERSITY IN PRAGUE faculty of mathematics and physics 3 Software development Automated software

More information

Chapter 5: Procedural abstraction. Function procedures. Function procedures. Proper procedures and function procedures

Chapter 5: Procedural abstraction. Function procedures. Function procedures. Proper procedures and function procedures Chapter 5: Procedural abstraction Proper procedures and function procedures Abstraction in programming enables distinction: What a program unit does How a program unit works This enables separation of

More information

Static analysis and testing of executable DSL specification

Static analysis and testing of executable DSL specification Static analysis and testing of executable DSL specification Qinan Lai 1, Andy Carpenter 1 1 School of Computer Science, the University of Manchester, Manchester, UK {laiq,afc}@cs.man.ac.uk Keywords: Abstract:

More information

CISC836: Models in Software Development: Methods, Techniques and Tools

CISC836: Models in Software Development: Methods, Techniques and Tools CISC836: Models in Software Development: Methods, Techniques and Tools Topic 4: Code Generation with EMF Meta modeling Languages for meta models: Ecore Using EMF and Ecoreto define a data model Using EMF

More information

Subprograms. Copyright 2015 Pearson. All rights reserved. 1-1

Subprograms. Copyright 2015 Pearson. All rights reserved. 1-1 Subprograms Introduction Fundamentals of Subprograms Design Issues for Subprograms Local Referencing Environments Parameter-Passing Methods Parameters That Are Subprograms Calling Subprograms Indirectly

More information

Chapter 6 Introduction to Defining Classes

Chapter 6 Introduction to Defining Classes Introduction to Defining Classes Fundamentals of Java: AP Computer Science Essentials, 4th Edition 1 Objectives Design and implement a simple class from user requirements. Organize a program in terms of

More information

CSE 12 Abstract Syntax Trees

CSE 12 Abstract Syntax Trees CSE 12 Abstract Syntax Trees Compilers and Interpreters Parse Trees and Abstract Syntax Trees (AST's) Creating and Evaluating AST's The Table ADT and Symbol Tables 16 Using Algorithms and Data Structures

More information

Recursion and Iteration Support in USE Validator with AnATLyzer

Recursion and Iteration Support in USE Validator with AnATLyzer Recursion and Iteration Support in USE Validator with AnATLyzer Jesús Sánchez Cuadrado Modelling and Software Engineering Research Group (http://www.miso.es) Universidad Autónoma de Madrid (Spain) Abstract.

More information

Chapter 9. Subprograms

Chapter 9. Subprograms Chapter 9 Subprograms Chapter 9 Topics Introduction Fundamentals of Subprograms Design Issues for Subprograms Local Referencing Environments Parameter-Passing Methods Parameters That Are Subprograms Calling

More information

Introduction to MDE and Model Transformation

Introduction to MDE and Model Transformation Vlad Acretoaie Department of Applied Mathematics and Computer Science Technical University of Denmark rvac@dtu.dk DTU Course 02291 System Integration Vlad Acretoaie Department of Applied Mathematics and

More information

ATL Transformation Example

ATL Transformation Example 1. ATL Transformation Example: UML2 to Measure The UML2 to Measure example describes measurement on UML2 models, using metrics defined as ATL libraries. 1.1. Transformation Overview The aim of this transformation

More information

A Comparison of Ecore and GOPPRR through an Information System Meta Modeling Approach

A Comparison of Ecore and GOPPRR through an Information System Meta Modeling Approach A Comparison of Ecore and GOPPRR through an Information System Meta Modeling Approach Vladimir Dimitrieski, Milan Čeliković, Vladimir Ivančević and Ivan Luković University of Novi Sad, Faculty of Technical

More information

Questions? Static Semantics. Static Semantics. Static Semantics. Next week on Wednesday (5 th of October) no

Questions? Static Semantics. Static Semantics. Static Semantics. Next week on Wednesday (5 th of October) no Questions? First exercise is online: http://www.win.tue.nl/~mvdbrand/courses/glt/1112/ Deadline 17 th of October Next week on Wednesday (5 th of October) no lectures!!! Primitive types Primitive value

More information

Introduction to Model Driven Engineering using Eclipse. Frameworks

Introduction to Model Driven Engineering using Eclipse. Frameworks Introduction to Model Driven Engineering using Eclipse Model Driven Development Generator s Bruce Trask Angel Roman MDE Systems Abstraction Model Driven Development Refinement 1 Part I Agenda What is Model

More information

CPS 506 Comparative Programming Languages. Programming Language

CPS 506 Comparative Programming Languages. Programming Language CPS 506 Comparative Programming Languages Object-Oriented Oriented Programming Language Paradigm Introduction Topics Object-Oriented Programming Design Issues for Object-Oriented Oriented Languages Support

More information

CMSC 4023 Chapter 9. Fundamentals of Subprograms Introduction

CMSC 4023 Chapter 9. Fundamentals of Subprograms Introduction 9. 9.1. Introduction Two fundamental abstraction facilities Process abstraction Emphasized from early days Data abstraction Emphasized in the1980s 9.2. 9.2.1. General Subprogram Characteristics Each subprogram

More information

Compiler Theory. (Semantic Analysis and Run-Time Environments)

Compiler Theory. (Semantic Analysis and Run-Time Environments) Compiler Theory (Semantic Analysis and Run-Time Environments) 005 Semantic Actions A compiler must do more than recognise whether a sentence belongs to the language of a grammar it must do something useful

More information

MDD with OMG Standards MOF, OCL, QVT & Graph Transformations

MDD with OMG Standards MOF, OCL, QVT & Graph Transformations 1 MDD with OMG Standards MOF, OCL, QVT & Graph Transformations Andy Schürr Darmstadt University of Technology andy. schuerr@es.tu-darmstadt.de 20th Feb. 2007, Trento Outline of Presentation 2 Languages

More information

Two Basic Correctness Properties for ATL Transformations: Executability and Coverage

Two Basic Correctness Properties for ATL Transformations: Executability and Coverage Two Basic Correctness Properties for ATL Transformations: Executability and Coverage Elena Planas 1, Jordi Cabot 2, and Cristina Gómez 3 1 Universitat Oberta de Catalunya (Spain), eplanash@uoc.edu 2 École

More information

Paytm Programming Sample paper: 1) A copy constructor is called. a. when an object is returned by value

Paytm Programming Sample paper: 1) A copy constructor is called. a. when an object is returned by value Paytm Programming Sample paper: 1) A copy constructor is called a. when an object is returned by value b. when an object is passed by value as an argument c. when compiler generates a temporary object

More information

ADT: Eclipse development tools for ATL

ADT: Eclipse development tools for ATL ADT: Eclipse development tools for ATL Freddy Allilaire (freddy.allilaire@laposte.net) Tarik Idrissi (tarik.idrissi@laposte.net) Université de Nantes Faculté de Sciences et Techniques LINA (Laboratoire

More information

Computer Science II (20073) Week 1: Review and Inheritance

Computer Science II (20073) Week 1: Review and Inheritance Computer Science II 4003-232-01 (20073) Week 1: Review and Inheritance Richard Zanibbi Rochester Institute of Technology Review of CS-I Hardware and Software Hardware Physical devices in a computer system

More information

Generic Language Technology

Generic Language Technology Generic Language Technology Working with Xtext Introduction We have used Xtext to define a concrete syntax for a domain-specific language called Simple Language of Communicating Objects (SLCO). This language

More information

Lecture 7: Type Systems and Symbol Tables. CS 540 George Mason University

Lecture 7: Type Systems and Symbol Tables. CS 540 George Mason University Lecture 7: Type Systems and Symbol Tables CS 540 George Mason University Static Analysis Compilers examine code to find semantic problems. Easy: undeclared variables, tag matching Difficult: preventing

More information

dynamically typed languages Building Domain-Specific Languages for Model- Driven Development

dynamically typed languages Building Domain-Specific Languages for Model- Driven Development focus dynamically typed languages Building Domain-Specific Languages for Model- Driven Development Jesús Sánchez Cuadrado and Jesús García Molina, University of Murcia Embedding a domain-specific language

More information

Chapter 9. Subprograms

Chapter 9. Subprograms Chapter 9 Subprograms Chapter 9 Topics Introduction Fundamentals of Subprograms Design Issues for Subprograms Local Referencing Environments Parameter-Passing Methods Parameters That Are Subprograms Calling

More information

POLYMORPHISM 2 PART. Shared Interface. Discussions. Abstract Base Classes. Abstract Base Classes and Pure Virtual Methods EXAMPLE

POLYMORPHISM 2 PART. Shared Interface. Discussions. Abstract Base Classes. Abstract Base Classes and Pure Virtual Methods EXAMPLE Abstract Base Classes POLYMORPHISM 2 PART Abstract Classes Static and Dynamic Casting Common Programming Errors class B { // base class virtual void m( ) =0; // pure virtual function class D1 : public

More information

POLYMORPHISM 2 PART Abstract Classes Static and Dynamic Casting Common Programming Errors

POLYMORPHISM 2 PART Abstract Classes Static and Dynamic Casting Common Programming Errors POLYMORPHISM 2 PART Abstract Classes Static and Dynamic Casting Common Programming Errors CSC 330 OO Software Design 1 Abstract Base Classes class B { // base class virtual void m( ) =0; // pure virtual

More information

Reviewing for the Midterm Covers chapters 1 to 5, 7 to 9. Instructor: Scott Kristjanson CMPT 125/125 SFU Burnaby, Fall 2013

Reviewing for the Midterm Covers chapters 1 to 5, 7 to 9. Instructor: Scott Kristjanson CMPT 125/125 SFU Burnaby, Fall 2013 Reviewing for the Midterm Covers chapters 1 to 5, 7 to 9 Instructor: Scott Kristjanson CMPT 125/125 SFU Burnaby, Fall 2013 2 Things to Review Review the Class Slides: Key Things to Take Away Do you understand

More information

Process DSL Transformation by Mappings Using Virtual Functional Views

Process DSL Transformation by Mappings Using Virtual Functional Views Baltic J. Modern Computing, Vol. 3 (2015), No. 2, 133-147 Process DSL Transformation by Mappings Using Virtual Functional Views Lelde LACE, Audris KALNINS, Agris SOSTAKS Institute of Mathematics and Computer

More information

Kermeta tutorial. How to create an EMF meta model? François Tanguy, Didier Vojtisek, Zoé Drey, Marie Gouyette. Abstract

Kermeta tutorial. How to create an EMF meta model? François Tanguy, Didier Vojtisek, Zoé Drey, Marie Gouyette. Abstract Kermeta tutorial How to create an EMF meta model? François Tanguy, Didier Vojtisek, Zoé Drey, Marie Gouyette Abstract This tutorial show how to create an EMF model for the FSM example. Published Build

More information

A Short Summary of Javali

A Short Summary of Javali A Short Summary of Javali October 15, 2015 1 Introduction Javali is a simple language based on ideas found in languages like C++ or Java. Its purpose is to serve as the source language for a simple compiler

More information

Compilation of Object Oriented Languages Tik Compilers Seminar

Compilation of Object Oriented Languages Tik Compilers Seminar Compilation of Object Oriented Languages Burlacu Mihai Helsinki University of Technology burlacum@cc.hut.fi Abstract The paper covers briefly the object-oriented concepts, usability and advantages of using

More information

Advanced JML. and more tips and pitfalls. David Cok, Joe Kiniry, and Erik Poll

Advanced JML. and more tips and pitfalls. David Cok, Joe Kiniry, and Erik Poll Advanced JML and more tips and pitfalls David Cok, Joe Kiniry, and Erik Poll Eastman Kodak Company, University College Dublin, and Radboud University Nijmegen David Cok, Joe Kiniry & Erik Poll - ESC/Java2

More information

(Meta)Models between MetaEdit+

(Meta)Models between MetaEdit+ The Interchange of (Meta)Models between MetaEdit+ and Eclipse EMF Heiko Kern kern@informatik.uni-leipzig.de ni ig Nashville, Tennessee, 10/19/2008 1 Agenda 1. Introduction 2. MetaEdit-EMF-Bridge EMF 3.

More information

Java How to Program, 10/e. Copyright by Pearson Education, Inc. All Rights Reserved.

Java How to Program, 10/e. Copyright by Pearson Education, Inc. All Rights Reserved. Java How to Program, 10/e Education, Inc. All Rights Reserved. Each class you create becomes a new type that can be used to declare variables and create objects. You can declare new classes as needed;

More information

The Art of Model Transformation with Operational QVT

The Art of Model Transformation with Operational QVT The Art of Model Transformation with Operational QVT Sergey Boyko Radomil Dvorak Alexander Igdalov Borland Software Corporation 23 March, 2009 The Art of Model Transformation with Operational QVT - Sergey

More information

Computer Science at Kent

Computer Science at Kent Computer Science at Kent YATL: Yet Another Transformation Language - Reference Manual Version 1.0 Octavian Patrascoiu Technical Report No. 2-04 March 2004 Copyright 2004 University of Kent at Canterbury

More information

AADL Graphical Editor Design

AADL Graphical Editor Design AADL Graphical Editor Design Peter Feiler Software Engineering Institute phf@sei.cmu.edu Introduction An AADL specification is a set of component type and implementation declarations. They are organized

More information

C++ Programming: Polymorphism

C++ Programming: Polymorphism C++ Programming: Polymorphism 2018 년도 2 학기 Instructor: Young-guk Ha Dept. of Computer Science & Engineering Contents Run-time binding in C++ Abstract base classes Run-time type identification 2 Function

More information

A UML 2 Profile for Variability Models and their Dependency to Business Processes

A UML 2 Profile for Variability Models and their Dependency to Business Processes A UML 2 Profile for Variability Models and their Dependency to Business Processes Birgit Korherr and Beate List Women s Postgraduate College for Internet Technologies Institute of Software Technology and

More information

Atelier Java - J1. Marwan Burelle. EPITA Première Année Cycle Ingénieur.

Atelier Java - J1. Marwan Burelle.  EPITA Première Année Cycle Ingénieur. marwan.burelle@lse.epita.fr http://wiki-prog.kh405.net Plan 1 2 Plan 3 4 Plan 1 2 3 4 A Bit of History JAVA was created in 1991 by James Gosling of SUN. The first public implementation (v1.0) in 1995.

More information

Orccad, a Model Driven Architecture and Environment for Real-Time Control. Soraya Arias Florine Boudin Roger Pissard-Gibollet Daniel Simon

Orccad, a Model Driven Architecture and Environment for Real-Time Control. Soraya Arias Florine Boudin Roger Pissard-Gibollet Daniel Simon 1 Orccad, a Model Driven Architecture and Environment for Real-Time Control Soraya Arias Florine Boudin Roger Pissard-Gibollet Daniel Simon 2 Orccad : status and motivations Model: Control design oriented

More information

Model-Level Integration of the OCL Standard Library Using a Pivot Model with Generics Support

Model-Level Integration of the OCL Standard Library Using a Pivot Model with Generics Support Faculty of Computer Science, Institute for Software- and Multimedia-Technology, Chair for Software Technology Matthias Bräuer and Birgit Demuth Model-Level Integration of the Using a Pivot Model with Generics

More information

DSL Implementation. ... with language Workbenches. v1.1 Jan 16, Markus Voelter independent/itemis

DSL Implementation. ... with language Workbenches. v1.1 Jan 16, Markus Voelter independent/itemis DSL Implementation... with language Workbenches. v1.1 Jan 16, 2013 Markus Voelter independent/itemis voelter@acm.org www.voelter.de voelterblog.blogspot.de @markusvoelter +Markus Voelter Last Year s Talk

More information

Model Transformations for Embedded System Design and Virtual Platforms

Model Transformations for Embedded System Design and Virtual Platforms 1 Model Transformations for Embedded System Design and Virtual Platforms Nikos Matragkas, Ian Gray, Richard Paige, Dimitris Kolovos, Neil Audsley, Leandro Indrusiak Department of Computer Science The University

More information

Introduction to EGF. Benoît Langlois / Thales Global Services.

Introduction to EGF. Benoît Langlois / Thales Global Services. www.thalesgroup.com Introduction to EGF Benoît Langlois / Thales Global Services 2 / Agenda Introduction EGF Architecture Concepts & Practice EGF Portfolios 3 / Agenda Introduction EGF Architecture Concepts

More information

BIG MODELS AN ALTERNATIVE APPROACH

BIG MODELS AN ALTERNATIVE APPROACH 2. BIG MODELS AN ALTERNATIVE APPROACH Whitepaper Eclipse Summit 2008 Modeling Symposium Jos Warmer, Ordina (jos.warmer@ordina.nl) Abstract Scaling up modeling within project runs into many practical problems.

More information

The PCAT Programming Language Reference Manual

The PCAT Programming Language Reference Manual The PCAT Programming Language Reference Manual Andrew Tolmach and Jingke Li Dept. of Computer Science Portland State University September 27, 1995 (revised October 15, 2002) 1 Introduction The PCAT language

More information

Start Up Benoît Langlois / Thales Global Services Eclipse (EMFT) EGF 2011 by Thales; made available under the EPL v1.

Start Up Benoît Langlois / Thales Global Services Eclipse (EMFT) EGF 2011 by Thales; made available under the EPL v1. www.thalesgroup.com Start Up Benoît Langlois / Thales Global Services 2 / Introduction EGF Architecture Concepts & Practice EGF Portfolios 3 / Introduction EGF Architecture Concepts & Practice EGF Portfolios

More information

Pieter van den Hombergh Thijs Dorssers Stefan Sobek. February 10, 2017

Pieter van den Hombergh Thijs Dorssers Stefan Sobek. February 10, 2017 Inheritance and Inheritance and Pieter van den Hombergh Thijs Dorssers Stefan Sobek Fontys Hogeschool voor Techniek en Logistiek February 10, 2017 /FHTenL Inheritance and February 10, 2017 1/45 Topics

More information

Object oriented programming. Instructor: Masoud Asghari Web page: Ch: 3

Object oriented programming. Instructor: Masoud Asghari Web page:   Ch: 3 Object oriented programming Instructor: Masoud Asghari Web page: http://www.masses.ir/lectures/oops2017sut Ch: 3 1 In this slide We follow: https://docs.oracle.com/javase/tutorial/index.html Trail: Learning

More information

1 Lexical Considerations

1 Lexical Considerations Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science 6.035, Spring 2013 Handout Decaf Language Thursday, Feb 7 The project for the course is to write a compiler

More information

Chapter 11 Object and Object- Relational Databases

Chapter 11 Object and Object- Relational Databases Chapter 11 Object and Object- Relational Databases Copyright 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 11 Outline Overview of Object Database Concepts Object-Relational

More information

SUMMARY: MODEL DRIVEN SECURITY

SUMMARY: MODEL DRIVEN SECURITY SUMMARY: MODEL DRIVEN SECURITY JAN-FILIP ZAGALAK, JZAGALAK@STUDENT.ETHZ.CH Model Driven Security: From UML Models to Access Control Infrastructres David Basin, Juergen Doser, ETH Zuerich Torsten lodderstedt,

More information

An Introduction to Object Orientation

An Introduction to Object Orientation An Introduction to Object Orientation Rushikesh K Joshi Indian Institute of Technology Bombay rkj@cse.iitb.ac.in A talk given at Islampur Abstractions in Programming Control Abstractions Functions, function

More information

A UML 2 Profile for Variability Models and their Dependency to Business Processes

A UML 2 Profile for Variability Models and their Dependency to Business Processes A UML 2 Profile for Variability Models and their Dependency to Business Processes Birgit Korherr and Beate List Women s Postgraduate College for Internet Technologies Institute of Software Technology and

More information

Contents. I. Classes, Superclasses, and Subclasses. Topic 04 - Inheritance

Contents. I. Classes, Superclasses, and Subclasses. Topic 04 - Inheritance Contents Topic 04 - Inheritance I. Classes, Superclasses, and Subclasses - Inheritance Hierarchies Controlling Access to Members (public, no modifier, private, protected) Calling constructors of superclass

More information

Graphical Interface and Application (I3305) Semester: 1 Academic Year: 2017/2018 Dr Antoun Yaacoub

Graphical Interface and Application (I3305) Semester: 1 Academic Year: 2017/2018 Dr Antoun Yaacoub Lebanese University Faculty of Science Computer Science BS Degree Graphical Interface and Application (I3305) Semester: 1 Academic Year: 2017/2018 Dr Antoun Yaacoub 2 Crash Course in JAVA Classes A Java

More information

OCL Support in MOF Repositories

OCL Support in MOF Repositories OCL Support in MOF Repositories Joachim Hoessler, Michael Soden Department of Computer Science Technical University Berlin hoessler@cs.tu-berlin.de, soden@cs.tu-berlin.de Abstract From metamodels that

More information

Concepts of Programming Languages

Concepts of Programming Languages Concepts of Programming Languages Lecture 10 - Object-Oriented Programming Patrick Donnelly Montana State University Spring 2014 Patrick Donnelly (Montana State University) Concepts of Programming Languages

More information

CMSC131. Inheritance. Object. When we talked about Object, I mentioned that all Java classes are "built" on top of that.

CMSC131. Inheritance. Object. When we talked about Object, I mentioned that all Java classes are built on top of that. CMSC131 Inheritance Object When we talked about Object, I mentioned that all Java classes are "built" on top of that. This came up when talking about the Java standard equals operator: boolean equals(object

More information

ATL TRANSFORMATION EXAMPLE

ATL TRANSFORMATION EXAMPLE 1. ATL Transformation Example 1.1. Example: KM3 Problem The example describes a transformation a KM3 metamodel [1] in a Problem model. The generated Problem model contains the list of non-structural errors

More information

Integration of Application Business Logic and Business Rules with DSL and AOP

Integration of Application Business Logic and Business Rules with DSL and AOP Integration of Application Business Logic and Business Rules with DSL and AOP Bogumiła Hnatkowska and Krzysztof Kasprzyk Wroclaw University of Technology, Wyb. Wyspianskiego 27 50-370 Wroclaw, Poland Bogumila.Hnatkowska@pwr.wroc.pl

More information

CS112 Lecture: Defining Instantiable Classes

CS112 Lecture: Defining Instantiable Classes CS112 Lecture: Defining Instantiable Classes Last revised 2/3/05 Objectives: 1. To describe the process of defining an instantiable class 2. To discuss public and private visibility modifiers. Materials:

More information

A MOF based Meta-Model and a Concrete DSL Syntax of IIS*Case PIM Concepts

A MOF based Meta-Model and a Concrete DSL Syntax of IIS*Case PIM Concepts DOI:10.2298/CSIS120203034C A MOF based Meta-Model and a Concrete DSL Syntax of IIS*Case PIM Concepts Milan Čeliković, Ivan Luković, Slavica Aleksić, and Vladimir Ivančević University of Novi Sad, Faculty

More information

The SPL Programming Language Reference Manual

The SPL Programming Language Reference Manual The SPL Programming Language Reference Manual Leonidas Fegaras University of Texas at Arlington Arlington, TX 76019 fegaras@cse.uta.edu February 27, 2018 1 Introduction The SPL language is a Small Programming

More information

CPS 506 Comparative Programming Languages. Programming Language Paradigm

CPS 506 Comparative Programming Languages. Programming Language Paradigm CPS 506 Comparative Programming Languages Functional Programming Language Paradigm Topics Introduction Mathematical Functions Fundamentals of Functional Programming Languages The First Functional Programming

More information

M. (1) (1) (2) (1) ATLAS

M. (1) (1) (2) (1) ATLAS Practice of Model Transformation and Model Weaving in the Eclipse Modeling Project with ATL and AMW Part 1 ATL: the ATLAS Transformation Language Mikaël Barbero (1) Marcos Didonet Del Fabro (1) Juan M.

More information

CS 251 Intermediate Programming Inheritance

CS 251 Intermediate Programming Inheritance CS 251 Intermediate Programming Inheritance Brooke Chenoweth University of New Mexico Spring 2018 Inheritance We don t inherit the earth from our parents, We only borrow it from our children. What is inheritance?

More information

Rules and Helpers Dependencies in ATL Technical Report

Rules and Helpers Dependencies in ATL Technical Report Rules and Helpers Dependencies in ATL Technical Report Javier Troya 1, Martin Fleck 2, Marouanne Kessentini 3, Manuel Wimmer 2, and Bader Alkhaze 3 1 Department of Computer Languages and Systems, Universidad

More information

Reconciling TGGs with QVT

Reconciling TGGs with QVT Faculty for Computer Science Software Engineering Group Warburger Straße 100 33098 Paderborn Germany A Study of Model Transformation Technologies: Reconciling TGGs with QVT Diploma Thesis by Joel Greenyer

More information

An Introduction to MDE

An Introduction to MDE An Introduction to MDE Alfonso Pierantonio Dipartimento di Informatica Università degli Studi dell Aquila alfonso@di.univaq.it. Outline 2 2» Introduction» What is a Model?» Model Driven Engineering Metamodeling

More information

Lecture 3. Lecture

Lecture 3. Lecture True Object-Oriented programming: Dynamic Objects Static Object-Oriented Programming Reference Variables Eckel: 30-31, 41-46, 107-111, 114-115 Riley: 5.1, 5.2 D0010E Object-Oriented Programming and Design

More information

Metamodeling with Metamodels. Using. UML/MOF including OCL

Metamodeling with Metamodels. Using. UML/MOF including OCL Metamodeling with Metamodels Using UML/MOF including OCL Introducing Metamodels (Wikipedia) A metamodel is a model of a model An instantiation of metamodel gives a model Metamodeling is the process of

More information

Operational Semantics of Cool

Operational Semantics of Cool Operational Semantics of Cool Key Concepts semantics: the meaning of a program, what does program do? how the code is executed? operational semantics: high level code generation steps of calculating values

More information

Programmiersprachen (Programming Languages)

Programmiersprachen (Programming Languages) 2016-05-13 Preface Programmiersprachen (Programming Languages) coordinates: lecturer: web: usable for: requirements: No. 185.208, VU, 3 ECTS Franz Puntigam http://www.complang.tuwien.ac.at/franz/ps.html

More information