Nantes Université

Skip to content
Extraits de code Groupes Projets
Valider 3b886255 rédigé par Gerson Sunye's avatar Gerson Sunye
Parcourir les fichiers

More conflict resolutuion

parent b9cb6683
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
Pipeline #63623 en échec
:revealjs_center: false
:revealjs_display: flex
:revealjs_transition: none
:revealjs_slideNumber: c/t
:revealjs_theme: stereopticon
:revealjs_width: 1920
:revealjs_height: 1080
:revealjs_history: true
:revealjs_margin: 0
:source-highlighter: highlightjs
:imagesdir: images
:includedir: includes
= Model Driven Engineering
:revealjs_plugins: src/js/revealjs-plugins.js
[.subtitle]
An Introduction
Gerson Sunyé
gerson.sunye@univ-nantes.fr
== Agenda
* Definition
* Context
* Software Modeling
* Meta-modeling
* Conclusion
== Definition
[quote,Wikipedia]
____
Model-driven engineering (MDE) is a software development methodology which focuses on creating and exploiting domain models (that is, abstract representations of the knowledge and activities that govern a particular application domain), rather than on the computing (or algorithmic) concepts.
____
[quote,me]
And also focus on creating modeling languages to represent these domain models.
'''''
== Models as the central artifact of software development
image::model-central.png[align=center]
== Model-driven code generation
image::code-generation.png[align=center, width=1000px]
== Model-driven interoperability
image::interoperability.png[align=center, width=1000px]
== Model-driven reverse engineering
image::reverse.png[align=center, width=800px]
== Models@run.time
image::runtime.png[align=center]
== Agenda
* Definition
* *Context*
* Software Modeling
* Meta-modeling
* Conclusion
[.impact]
== Context
Software Engineering Today
== Modern Software Problems (1/2)
.Increasing complexity of software:
* Evolving functional requirements:
** Environment Integration, Adaptation, (Software and GUI), Flexibility (notion of product lines)
* Increasing importance of non-functional properties:
** Distributed systems, parallel and asynchronous
** Security
== Modern Software Problems (2/2)
.Increasing complexity of infrastructures:
* Operating system APIs, language libraries, application frameworks
.Increasing importance of quality of services:
* reliability, latency, performance
== Increasing complexity (1/2)
* The control software to run a U.S. military drone uses 3.5 million lines of code.
* A Boeing 787 has 6.5 million lines behind its avionics and online support systems.
* Google Chrome (browser) runs on 6.7 million lines of code (upper estimate).
* A Chevy Volt uses 10 million lines.
* The Android operating system runs on 12-15 million lines.
== Increasing complexity (2/2)
* The Large Hadron Collider uses 50 million lines.
* Not including backend code, Facebook runs on 62 million lines of code.
* With the advent of sophisticated, cloud-connected infotainment systems, the car software in a modern vehicle apparently uses 100 million lines of code. This is according to Wired magazine.
* All Google services combine for a whopping 2 billion lines.
{empty}[Source: http://www.visualcapitalist.com/millions-lines-of-code/[Visual Capitalist]]
== Technology evolution (1/2)
[width="100%",cols="^30%,^40%,^30%",options="header",]
|===
|’70 |’80 |’90
| Structured programming
| Objects
| Components
| Procedures, Pascal, C
| Smalltalk, C++
| Aspects, Components, Software Frameworks, Software Patterns
|===
.Time
image::arrow.png[align=center]
== Technology evolution (2/2)
[width="100%",cols="^50%,^50%",options="header",]
|===
| '00 | '10
| Services
| Low Code & No Code Approaches
| Javascript, Artifact Repositories
| Microsoft PowerApps, Google AppSheet, Mendix
|===
.Time
image::arrow.png[align=center]
== Design Patterns
* Embody architectural know-how of experts​
* As much about problems as about solutions​:
* pairs problem/solution in a context​
* About non-functional forces:
** reusability, portability, and extensibility.
* Not about classes & objects but collaborations​
** Actually, design pattern applications are parameterized collaborations
== From Objects to Components​
* Object = instance of a class​
* Class = reusable unit of software​
** focus on structural and functional properties​
** development concept​
* Component = deployment unit​
** focus on non-functional properties​
** installation/execution concept​
*** Explicit dependencies​
*** Configuration and connection
== Aspect Oriented Programming​
* Kiczales et al., ECOOP’97​
** MIT’s one of 10 key technologies for 2010​
* Encapsulation of cross-cutting concerns in OO programs​
** Persistence, contract checking, etc.​
* Weaving at some specific points (join points) in the program execution​
** Hence more than macros on steroids​
* AspectJ for AOP in Java​
** Some clumsiness in describing dynamic join points
== Good modularity
image::tomcat-xml.png[align=center,width=800px]
* XML parsing in org.apache.tomcat
** red shows relevant lines of code
** nicely fits in one box
== Tomcat
image::tomcat-pattern.png[align=center,width=800px]
* URL pattern matching in org.apache.tomcat
** red shows relevant lines of code
** nicely fits in two boxes (using inheritance)
== However
image::tomcat-log.png[align=center]
* Logging in org.apache.tomcat
* red shows lines of code that handle logging
* not in just one place
* not even in a small number of places
== AspectJ
* Small and well-integrated extension to Java
* General-purpose AO language
** just as Java is a general-purpose OO language
* Open Source (EPL2 License)
* Includes IDE support:
** Eclipse, NetBeans, JBuilder, IntelliJ IDEA
* Currently at release 1.9.7 (compatible with Java 15 & 16)
* https://www.eclipse.org/aspectj/[Eclipse project]
[.is-vcentered]
== Low and No Code Approaches
* Shortage of programmers even for simple applications: Mobile apps, Web, etc.
* Build programs that generate/configure programs:
** Put problem-solving capabilities into the hands of non-IT professionals
** Users can more quickly and easily create business apps that help them do their jobs
* Analysts at Gartner estimate that the low-code market grew 23% in 2020 to reach $11.3 billion, and will grow to $13.8 billion in 2021 and almost $30 billion by 2025
== In short
* Growing complexity of software
* Separation of concerns
* Separation of professions
* Requirement diversity
* Platform diversity
* Continuous evolution
[.block]
--
* Is source code the correct level of abstraction?
--
== Agenda
* Definition
* Context
* *Software Modeling*
* Meta-modeling
* Conclusion
== Defintion
[quote]
____
A Model is a simplified or partial representation of reality, defined in order to accomplish a task or to reach an agreement
____
== Why?
[quote]
Modeling, in the broadest sense, is the cost-effective use of something in place of something else for some cognitive purpose. It allows us to use something that is simpler, safer or cheaper than reality instead of reality for some purpose.
[quote,Jeff Rothenberg]
____
A model represents reality for the given purpose; the model is an abstraction of reality in the sense that it cannot represent all aspects of reality. This allows us to deal with the world in a simplified manner, avoiding the complexity, danger and irreversibility of reality.
____
== In Short
.Models are useful to:
* understand complex systems.
* communicate.
* minimize risks (early error detection).
* investigate and compare alternative solutions.
* drive implementations.
== Models in Science
image::Migratory-Routes-of-the-Blue-Whale.jpg[align=center]
* Description of a real phenomenon (descriptive models).
== Models in Traditional Engineering
.Example by Brian Selic
image::engineering.png[align=center,width=1000px]
* A reduced representation of some system that highlights the properties of interest from a given viewpoint.
* Description of something in order to build it (prescriptive models)​.
== Properties of a Useful Model
[Selic]
* *Abstract*: emphasize important aspects while removing irrelevant ones.
* *Understandable*: expressed in a form that is readily understood by observers.
* *Accurate*: Faithfully represents the modeled system
* *Predictive*: Can be used to answer questions about the modeled system
* *Inexpensive*: Much cheaper to construct and study than the modeled system
[.block]
--
_To be useful, engineering models must satisfy all of these characteristics_!
--
== Models in Software Engineering
[quote, Selic]
Software has the rare property that it allows us to directly evolve models into full-fledged implementations without changing the engineering medium, tools, or methods!
* This ensures perfect accuracy of software models; since the model and the system that it models are the same thing
* The model evolves into the system it was modeling
== Entity-Relationship Model
.[Chen ’76]
image::entity-relationship.png[align=center]
* Database modeling method, used to produce a type of conceptual schema or semantic data model of a system, often a relational database, and its requirements in a top-down fashion.
== Data-Flow Diagrams
.[Constantine & Yourdon ’75]
image::dfd-example.png[align=center,width=800px]
* Graphical representation of a flow of data through an information system.
== Petri Nets
Early seventies
.Mathematical modeling language for the description of distributed systems
image::petri.gif[align=center]
== State Diagrams [Booth ’67]
image::state-machine.svg[align=center]
* Describes the behavior of a system in terms of states.
== UML [Los 3 amigos ’96]
.One model, 4 dimensions, multiple views:
. Static Aspect (Who?)
** Class, Component, Package and Object Diagrams
. User view (What?)
** Use Case Diagrams
. Dynamic Aspects (When?)
** Interaction diagram (Sequence, Collaboration), State and Activity Diagrams
. Implementation Aspects (Where?)
** Component & Deployment Diagrams
== KAOS (Goal-Directed Requirements Acquisition) [Dardenne ’93]
image::kaos.png[align=center,width=1000px]
== ORM (Object-Role Model) [Halpin ’89]
image::orm.png[align=center,width=800px]
* Representation of the semantics of a universe of discourse. ORM is often used for data modeling and software engineering.
== Feature Models [Kang ’90]
image::feature-model.png[align=center,width=800px]
* Compact representation of all the products of the Software Product Line (SPL) in terms of ``features''.
== Agenda
* Definition
* Context
* Software Modeling
* *Meta-modeling*
* Conclusion
== Definitions
[quote]
____
Meta-modeling is the specification of a modeling language in another de modeling language, called _meta-language_.
____
[.quote]
____
Meta-language is a form of language or set of terms used for the description or analysis of another language
____
[.notes]
--
Une metalangue est une langue qui prend pour objet une autre langue et qui la formalise.
--
== Remark
* A meta-language is a language.
* Even if it is a meta-meta-meta-meta-meta-meta-meta-meta-meta-meta-meta-meta-meta-language.
== Language
.A language is composed of:
* A syntax
* A semantics
[.block]
* The syntax specifies the subjects (concepts, entities) and the verbs (links between these concepts) of a language.
* The semantics gives an interpretation to subjects and verbs.
== Language Syntax
* A language’s syntax is composed of two parts:
** The abstract syntax: defines the possible links
** The concrete syntax: defines the representation of subjects and verbs.
* An abstract syntax may have several concrete syntax.
* Two (or more) concrete syntax may share the same concrete syntax.
== Example: UML abstract syntax
image::uml-syntax.png[align=center]
[.columns.is-vcentered]
== Example: UML Concrete Syntax
[.column]
image::person.png[align=center]
[.column]
--
[code,hutn]
----
class “Person” {
feature: Attribute “name” {
visibility: "public"
isSpecification: false
type: "String"
}
feature: Attribute “age” {
visibility: "public"
isSpecification: false
type: "Integer"
}
}
----
Human-Usable Textual Notation (HUTN): Textual concrete syntax for any modeling language specified in MOF.
--
== Meta-Model
- A model that represents the syntax of a language.
- And only the syntax.
== Meta-Modeling Language
* A modeling language used to specify the syntax of other modeling languages.
* Often named «meta-meta-model»
* Examples:
** OPPR (MetaEdit+)
** MOF (OMG)
** Ecore (Eclipse Foundation)
== MOF - Meta Object Facility
* Meta-modeling language de proposed by the OMG and used to specify UML and other modeling languages: SysML, MOF, CWM, SPEM etc.
* MOF is similar to the UML class diagram and can be seen as a UML subset.
* MOF does not have a concrete syntax:
** It borrows the UML’s one.
* Current version: 2.5.1 (2016)
== MOF
* Since version 2.0 uses the UML Infrastructure Library
* Provides more powerful mechanisms to customize UML
* Allow users to define language dialects for platforms (e.g., J2EE, .NET) and domains (e.g., eBusiness, Finance, etc.)
== Modeling Techniques at OMG: 3 steps
image::steps.png[align=center,width=1000px]
== Example: DFD - Data Flow Diagram (Yourdon)
image::dfd-example.png[align=center,width=1000px]
[.notes]
--
Yourdon: Mémoire, Agent, Processus
--
== DFD meta-model, expressed in OPPR [Lyytinen 94]
image::dfd-oppr.png[align=center,width=1000px]
== Underlying Model
* Set of classes (in a programming language) allowing the instantiation of language.
* Can also be seen as a meta-model represented in a programming language.
.Current standards:
* Eclipse Modeling Framework (EMF). Last version: 2.31, 2022
* Java Metadata Interface (JMI). Last version: 2002
.Emerging technologies
* JetBrains MPS
[.notes]
--
JMI: Set of Java interfaces proposed by Sun, which helps the implementation of tools for any modeling language specified in MOF.
--
== QVT - Query-View-Transformation.
* Standart Model Query and Transformation language.
* *QVT-Operational*: imperative language for unidirectional transformations.
* *QVT-Relations*: declarative language for both unidirectional and bidirectional transformations.
* *QVT-Core*: specifies the semantics of the declarative language.
== Eclipse Modeling Framework (EMF)
* MOF, JMI et XMI at Eclipse.
* Simpler, smaller, more usable.
* The current _de facto_ standard.
== Agenda
* Definition
* Context
* Software Modeling
* Meta-modeling
* *Conclusion*
== MDE Principles
* Everything relevant to the development process is a model
* All the meta-models can be written in a common meta-modeling language.
* A development process can be modeled as a partially ordered set of model transformations, that take models as input and produce models as output
== Consequences
* Models are aspect oriented. Conversely: Aspects are models
* Transformations are aspects weavers. They can be modeled.
* Every meta-model defines a domain specific language
* Software development has two dimensions: M1-model development and M2-transformation development
* Related: Software Language Engineering
......@@ -564,62 +564,7 @@ Une metalangue est une langue qui prend pour objet une autre langue et qui la fo
* A meta-language is a language.
* Even if it is a meta-meta-meta-meta-meta-meta-meta-meta-meta-meta-meta-meta-meta-language.
<<<<<<< HEAD:src/asciidoc/introduction.adoc
== Language
.A language is composed of:
* A syntax
* A semantics
[.block]
* The syntax specifies the subjects (concepts, entities) and the verbs (links between these concepts) of a language.
* The semantics gives an interpretation to subjects and verbs.
== Language Syntax
* A language’s syntax is composed of two parts:
** The abstract syntax: defines the possible links
** The concrete syntax: defines the representation of subjects and verbs.
* An abstract syntax may have several concrete syntax.
* Two (or more) concrete syntax may share the same concrete syntax.
== Example: UML abstract syntax
image::uml-syntax.png[align=center]
[.columns.is-vcentered]
== Example: UML Concrete Syntax
[.column]
image::person.png[align=center]
[.column]
--
[code,hutn]
----
class “Person” {
feature: Attribute “name” {
visibility: "public"
isSpecification: false
type: "String"
}
feature: Attribute “age” {
visibility: "public"
isSpecification: false
type: "Integer"
}
}
----
Human-Usable Textual Notation (HUTN): Textual concrete syntax for any modeling language specified in MOF.
--
== Meta-Model
=======
== Meta-model
>>>>>>> f17f8fc2a7db92e60c08aec511bbc6d7cab442dc:src/slides/asciidoc/introduction.adoc
- A model that represents the syntax of a language.
- And only the syntax.
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter