Is source code the correct level of abstraction?
Definition
Context
Software Modeling
Anatomy of a Modeling Language
Meta-modeling
Conclusion
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.
And also focus on creating modeling languages to represent these domain models.
Definition
Context
Software Modeling
Anatomy of a Modeling Language
Meta-modeling
Conclusion
Software Engineering Today
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
Operating system APIs, language libraries, application frameworks
reliability, latency, performance
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.
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.
[Source: Visual Capitalist]
’70 | ’80 | ’90 |
---|---|---|
Structured programming | Objects | Components |
Procedures, Pascal, C | Smalltalk, C++ | Aspects, Components, Software Frameworks, Software Patterns |
'00 | '10 |
---|---|
Services | Low Code & No Code Approaches |
Javascript, Artifact Repositories | Microsoft PowerApps, Google AppSheet, Mendix |
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
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
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
XML parsing in org.apache.tomcat
red shows relevant lines of code
nicely fits in one box
URL pattern matching in org.apache.tomcat
red shows relevant lines of code
nicely fits in two boxes (using inheritance)
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
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)
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
Growing complexity of software
Separation of concerns
Separation of professions
Requirement diversity
Platform diversity
Continuous evolution
Is source code the correct level of abstraction?
Definition
Context
Software Modeling
Anatomy of a Modeling Language
Meta-modeling
Conclusion
A Model is a simplified or partial representation of reality, defined in order to accomplish a task or to reach an agreement
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.
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.
understand complex systems.
communicate.
minimize risks (early error detection).
investigate and compare alternative solutions.
drive implementations.
Description of a real phenomenon (descriptive models).
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).
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
To be useful, engineering models must satisfy all of these characteristics!
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
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.
Graphical representation of a flow of data through an information system.
Early seventies
Describes the behavior of a system in terms of states.
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
Representation of the semantics of a universe of discourse. ORM is often used for data modeling and software engineering.
Compact representation of all the products of the Software Product Line (SPL) in terms of ``features''.
Definition
Context
Software Modeling
Anatomy of a Modeling Language
Meta-modeling
Conclusion
A syntax
A semantics
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.
A language’s syntax is composed of two parts:
The abstract syntax: defines the concepts (subjects) and possible links (verbs).
The concrete syntax: defines their representation.
An abstract syntax may have several concrete syntax.
Two (or more) concrete syntax may share the same concrete syntax.
Class, Association, Attribute, Operation/Method, etc.
Class contains Attributes, Class contains Operations, Association from Class, Association to Class
Failed to generate image: Could not find the 'mmdc' executable in PATH; add it to the PATH or specify its location using the 'mmdc' document attribute erDiagram CUSTOMER ||--o{ ORDER : places ORDER ||--|{ LINE-ITEM : contains CUSTOMER }|..|{ DELIVERY-ADDRESS : uses
class "Order" { class "Sales Line Item" feature: Attribute "title" { visibility: "public" isSpecification: false type: "String" } feature: Operation calculateTax() { visibility: "public" } } }
Definition
Context
Software Modeling
Anatomy of a Modeling Language
Meta-modeling
Conclusion
Meta-modeling is the specification of a modeling language in another de modeling language, called meta-language.
Meta-language is a form of language or set of terms used for the description or analysis of another language
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.
A model that represents the syntax of a language.
And only the syntax.
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)
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)
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.)
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.
Eclipse Modeling Framework (EMF). Last version: 2.31, 2022
Java Metadata Interface (JMI). Last version: 2002
JetBrains MPS
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.
MOF, JMI et XMI at Eclipse.
Simpler, smaller, more usable.
The current de facto standard.
Definition
Context
Software Modeling
Anatomy of a Modeling Language
Meta-modeling
Conclusion
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
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