Download Objekt-Orientierte Software-Entwicklung mit UML - SE-Wiki

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Neural modeling fields wikipedia , lookup

Biological neuron model wikipedia , lookup

Agent-based model in biology wikipedia , lookup

Transcript
Seminar
Model Driven Software Engineering
What is it?
Topics
Requirements
Schedule
Contact
A famous painting by René Magritte
„Model-based Software Development“, 2016
2
Systems versus Modells
A model
A system
isModelOf
conformsTo
 The image (model) captures important properties and lets us reason
about
 appeareance
 functions
 usability
 etc
 But with an image (model) we cannot smoke.
„Model-based Software Development“, 2016
3
Modells Represent Views of a System
France 1453
French cheese map
The System
Models
Railroads in France
„Model-based Software Development“, 2016
Termite population
in France
4
Metamodels explain Models
 How do we know what a
map tells us?
 The „Legend“ explains
the used symbols
 „Bicycle Lane“
…
 The „Legend“ is the
„metamodel“ of the map
 Metamodels model the
language of models
 Elements & their legal use  syntax
 Meaning of elements  semantics
„Model-based Software Development“, 2016
5
Meta-Models
 The „Image of an image of an image“
is a meta-metamodel
 One could go on like this forever…
modelOf
 The „image of an image of a pipe“
is a modell of a model – a metamodell
 It captures aspects of images
 Frame, contents, label, …
modelOf
 The „image of a pipe“ is a model of the
system
 It captures aspects of pipes
 Shape, colour, ...
 The pipe is real – a system.
„Model-based Software Development“, 2016
modelOf
6
The (Meta-)Modell-Pyramid
Meta-Object-Facility
conforms to
source
MOF (Meta-Object-Facility)
M3 (model of UML metamodels)
UML Metamodel
M2
Class
Association
destination
M3
conforms to
The UML Metamodell
(Model of UML models)
1
*
Class
Attribute
M2
conforms to
UML Model
M1
A UML-Model
(Model of a system)
Spy
M1
Name : String
A System
(„the real world“)
conforms to
My Name is ...
M0
„Model-based Software Development“, 2016
M0
7
Domain Specific Language (DSL)
 Domain
 An are of knowldege with tightly interrelated concepts
 Examples: Genetics, flight control, data base management, …
 DSL – Domain Specific Language
 Approach: The Concepts of a domain are defined by a metamodel
 Advantages compared to general purpose language
 Higher abstraction level
 Easier understanding by domain experts
 Automated mapping to lower abstraction levels
 Examples
 Representation of database schema by ER diagramm (grafical DSL)
 Representation of database schema by DDL script (textual DSL)
 MOF – Meta Object Facility
 Model based language for defining meta models
 Master form (unique metametamodell MMM)
„Model-based Software Development“, 2016
8
Concrete Syntax versus Abstract Syntax
1
package
package demo;
name
demo
package(1, 0, 'demo')
parent
class(2, 1, 'C')
2
class C {
class
name
C
method(3, 2, 'm', int,[4])
parent
int m(int i) {
3
param(4, 3, ‘i'‚ int)
name
m
method
block(5, 3, [6])
method
parent
5
int
block
4
param
name
i
parent
int
m(i);
name
6
m
call
}
call(6, 5, null, 3 )
parent
}
7
var access
„Model-based Software Development“, 2016
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
„Model-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)
(internal)
Model-to-model
Model-to-text
„Model-based Software Development“, 2016
11
„Model-based Software Development“
Summer semester 2016
Core MDSE Topics
–
–
1. Eclipse Modeling Framework
 ECORE as the basis of tool interoperability
ECORE
conforms to
Meta-model of
Source Model
Meta-model of
Target Model
conforms to
conforms to
Source Model
Transformation
Rules
Target Model
 Transformation rules use the meta-models
 Tools use ECORE to understand the meta-models
„Model-based Software Development“, 2016
13
1. Xtext: Define your own DSL!
● 1. Define the grammar of your language
„Model-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
„Model-based Software Development“, 2016
15
3. Xtext: Customize your DSL!
● Configure the code generation workflow
◆ Workflow language (MWE2)
◆ Dependency injection (Google Guice)
◆ Continuous Integration (Maven)
● Customize
◆ Semantic checking
◆ Error reporting
◆ Outline
◆ Formatting
◆ Autocompletion
„Model-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
„Model-based Software Development“, 2016
17
5. Xtend: Model to text transformation
● Template language embedded into Xtend
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
„Model-based Software Development“, 2016
18
6. Viatra: Graph-based
Model to Model Transformation
● Graph-based transformations
www.eclipse.org/viatra/
„Model-based Software Development“, 2016
19
7. ATL: Hybrid
model-to-model transformation
● Declarative …
rule Member2Female {
from
s : Families!Member (s.isFemale())
to
t : Persons!Female (
fullName <- s.firstName + ' ' + s.familyName
)
}
 …and operational
helper context Families!Member def: isFemale() : Boolean =
if not self.familyMother.oclIsUndefined() then
true
else
if not self.familyDaughter.oclIsUndefined() then
true
else
false
endif
endif;
„Model-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
„Model-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/LD4KD2014-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-win2013-1.pdf
„Model-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
„Model-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
„Model-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/BishopMBML-2012.pdf
 http://docs.aws.amazon.com/machine-learning/latest/dg/training-mlmodels.html
 http://machinelearningmastery.com/a-tour-of-machine-learning-algorithms/
„Model-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
„Model-based Software Development“, 2016
27
Model based Optimization
References :
 http://jmlr.csail.mit.edu/proceedings/papers/v22/domke12/domke12.p
df
 http://castlelab.princeton.edu/ORF569papers/Hu%20et%20al%20%20Survey%20of%20modelbased%20methods%20for%20global%20optimization.pdf
„Model-based Software Development“, 2016
28