Seminar Model Driven Software Engineering What is it




























- Slides: 28

Seminar Model Driven Software Engineering What is it? Topics Requirements Schedule Contact

A famous painting by René Magritte based Software Development“, 2016 2

Systems versus Modells A model A system is. Model. Of conforms. To l The image (model) captures important properties and lets us reason about u appeareance u functions u usability u etc l But with an image (model) we cannot smoke. based Software Development“, 2016 3

Modells Represent Views of a System France 1453 The System based Software Development“, 2016 Models Railroads in France French cheese map Termite population in France 4

Metamodels explain Models l How do we know what a map tells us? l The „Legend“ explains the used symbols u „Bicycle Lane“ u… l The „Legend“ is the „metamodel“ of the map Ø Metamodels model the language of models Ø Elements & their legal use syntax Ø Meaning of elements semantics based Software Development“, 2016 5

Meta-Models l The „Image of an image“ is a meta-metamodel u One could go on like this forever… model. Of l The „image of an image of a pipe“ is a modell of a model – a metamodell u It captures aspects of images ð Frame, contents, label, … model. Of l The „image of a pipe“ is a model of the system u It captures aspects of pipes ð Shape, colour, . . . l The pipe is real – a system. based Software Development“, 2016 model. Of 6

The (Meta-)Modell-Pyramid Meta-Object-Facility conforms to source MOF (Meta-Object-Facility) M 3 (model of UML metamodels) UML Metamodel M 2 Class Association M 3 Attribute M 2 destination conforms to The UML Metamodell (Model of UML models) Class 1 * conforms to UML Model M 1 (Model of a system) A UML-Model Spy M 1 Name : String A System („the real world“) M 0 based Software Development“, 2016 conforms to My Name is. . . 7 M 0

Domain Specific Language (DSL) l Domain u An are of knowldege with tightly interrelated concepts u Examples: Genetics, flight control, data base management, … l DSL – Domain Specific Language u Approach: The Concepts of a domain are defined by a metamodel u Advantages compared to general purpose language ð Higher abstraction level ð Easier understanding by domain experts ð Automated mapping to lower abstraction levels u Examples ð Representation of database schema by ER diagramm (grafical DSL) ð Representation of database schema by DDL script (textual DSL) l MOF – Meta Object Facility u Model based language for defining meta models u Master form (unique metamodell MMM) based Software Development“, 2016 8

Concrete Syntax versus Abstract Syntax 1 package demo; name demo parent 2 class C { class package(1, 0, 'demo') class(2, 1, 'C') name C method(3, 2, 'm', int, [4]) parent 3 int m(int i) { param(4, 3, ‘i'‚ int) name m method parent block(5, 3, [6]) typ method e 5 4 param int block } } based Software Development“, 2016 m call(6, 5, null, 3 ) parent 7 var access int va r name 6 i type parent m(i); name i ident(7, 6, 4 ) 9

Concrete Syntax versus Abstract Syntax package demo; ● Describes the structure of the input or output of a system ◆ Textual ◆ Graphical ● Specified by a grammar ◆ Textual → EBNF ◆ Graphical → Graph grammar based Software Development“, 2016 package(1, 'demo'). 0, ● Describes the structure of the internal representation (= the model) ◆ Objects ◆ Clauses ◆ Relations ● Specified by a meta-model ◆ See previous slides 10

Families of Model Transformation Text-to-model Concrete Syntax Abstract Syntax (textual / grafical) based Software Development“, 2016 (internal) Model-to-model Model-to-text 11

„Model-based Software Development“ Summer semester 2016 Core MDSE Topics – –

1. Eclipse Modeling Framework l ECORE as the basis of tool interoperability ECORE conforms to Meta-model of Source Model Meta-model of Target Model conforms to Source Model Transformation Rules Target Model l Transformation rules use the meta-models l Tools use ECORE to understand the meta-models based Software Development“, 2016 13

1. Xtext: Define your own DSL! ● 1. Define the grammar of your language based Software Development“, 2016 14

2. Xtext: Define your own DSL! ● 2. Automatically generate ◆ a parser ◆ an internal model ◆ a complete IDE for the new language based Software Development“, 2016 15

3. Xtext: Customize your DSL! ● Configure the code generation workflow ◆ Workflow language (MWE 2) ◆ Dependency injection (Google Guice) ◆ Continuous Integration (Maven) ● Customize ◆ Semantic checking ◆ Error reporting ◆ Outline ◆ Formatting ◆ Autocompletion based Software Development“, 2016 16

4. Xtend: Model to Model Transformation ● Full programing language ● Java made easy ◆ Less boilerplate code ◆ Type inference ◆… ● You can work on the model otherwise, but Xtrend makes it much easier based Software Development“, 2016 17

5. Xtend: Model to text transformation ● Template language embedded into Xtend based Software Development“, 2016 Reference to an attribute of the currently processed model element Start template Literal output (fully formatted, no need for System. out. println(„…“) End template Embedded code 18

6. Viatra: Graph-based Model to Model Transformation ● Graph-based transformations based Software Development“, 2016 www. eclipse. org/viatra/ 19

7. ATL: Hybrid model-to-model transformation ● Declarative … l …and operational based Software Development“, 2016 20

„Model-based Software Development“ Summer semester 2016 Application Topics – –

Propositionalization ● What is Machine Learning? ◆ Learning models from observations ◆ E. g detect spam emails, predict whether printing machine will fail ● Often transformations to simple feature vectors ◆ Feature vector example: (sunny, 23. 2 degrees Celsius, windy) ◆ Real world: often complex relationships e. g. social graphs of persons, complex interactions in machines Task : ● Look at transformation techniques from MDSE perspective and present comparative analysis with (dis-)advantages based Software Development“, 2016 22

Propositionalization ● References: Ristoski, Petar, and Heiko Paulheim. "A comparison of propositionalization strategies for creating features from linked open data. " Linked Data for Knowledge Discovery (2014): 6. http: //ceur-ws. org/Vol-1232/LD 4 KD 2014 -complete. pdf#page=6 Kramer, S. , Lavrac, N. , Flach, P. : Propositionalisation approaches to Relational Data Mining. In Dzeroski, S. , Larac, N. , eds. : Relational Data Mining. Springer, Berlin (2001) 262– 291 Maier, Marc, et al. "Flattening network data for causal discovery: What could go wrong? . " Workshop on Information in Networks. 2013. http: //people. cs. umass. edu/~maier/papers/maier-et-al-win 2013 -1. pdf based Software Development“, 2016 23

Machine Learning ● Modelling: Each type of classifier is a model, which follows certain properties and learns a particular task. e. g. – Decision Trees – Neural Networks – Rule based Learners ● Task 1: Look at learning algorithms from MDSE perspective and present an analysis of models ● Task 2: Look at a machine learning tool e. g. WEKA, and present a comparative analysis of learning models from MDSE perspective based Software Development“, 2016 24

Kernel based Learning ● Modelling layer : ● There are some classifiers called kernel based classifiers. ● They require data to be transformed in a particular manner. i. e. ð low dimensions ð linearly separable. ● Task: Explore different kernel techniques from MDSE perspective and present analysis of kernel based modelling methods based Software Development“, 2016 25

Kernel based Learning References : l Bishop, Christopher M. "Model-based machine learning. " Philosophical Transactions of the Royal Society of London A: Mathematical, Physical and Engineering Sciences 371. 1984 (2013): 20120222. l http: //research. microsoft. com/en-us/um/people/cmbishop/downloads/Bishop. MBML-2012. pdf l http: //docs. aws. amazon. com/machine-learning/latest/dg/training-mlmodels. html l http: //machinelearningmastery. com/a-tour-of-machine-learning-algorithms/ based Software Development“, 2016 26

Model based Optimization ● Given a complex optimization problem, the task is to find the values of parameters that optimize the problem. e. g. ð Data packet routing, ð Shortest path ð Function optimization ● There are different methods to model a solution to such problem. ● Mathematical Modelling – Gradient Descent ● Algorithmic Modelling – Genetic Algorithm ● Task : Explore any one type of such optimization algorithms with MDSE perspective and highlight the underlying modelling techniques based Software Development“, 2016 27

Model based Optimization l. References : ð http: //jmlr. csail. mit. edu/proceedings/papers/v 22/domke 12. p df ð http: //castlelab. princeton. edu/ORF 569 papers/Hu%20 et%20 al%20%20 Survey%20 of%20 modelbased%20 methods%20 for%20 global%20 optimization. pdf based Software Development“, 2016 28