© Software Languages Team, University of Koblenz-Landau
Modeling software systems
at a macroscopic scale
Ralf Lämmel
Softw...
© Software Languages Team, University of Koblenz-Landau
Source: Colin Atkinson, Thomas Kühne:
Model-Driven Development: A
...
© Software Languages Team, University of Koblenz-Landau
http://en.wikipedia.org/wiki/Lassie
http://www.counter-currents.co...
© Software Languages Team, University of Koblenz-Landau
A typical software project
(at the macroscopic scale)
programming ...
© Software Languages Team, University of Koblenz-Landau
Can we model software projects more precisely
in terms of language...
© Software Languages Team, University of Koblenz-Landau
A megamodel is a model of which at least
some elements represent a...
© Software Languages Team, University of Koblenz-Landau
A megamodel
!
ATL Starter’s Guide Date 07/1
MMM
MMt
Ma Mb
MMa
Mt
M...
© Software Languages Team, University of Koblenz-Landau
A megamodel
Source:
http://en.wikipedia.org/wiki/Tombstone_diagram...
© Software Languages Team, University of Koblenz-Landau
• Megamodeling must help with managing diversity
and heterogeneity...
© Software Languages Team, University of Koblenz-Landau
The notion of megamodel
• Megamodels are (ER) models.
• Entities o...
© Software Languages Team, University of Koblenz-Landau
How to validate megamodeling claims?
By “=” we mean (roughly) that...
© Software Languages Team, University of Koblenz-Landau
Fig. 1. The linguistic architecture of a software product when dis...
© Software Languages Team, University of Koblenz-Landau
Linked megamodels
An entity is linked
to a unique
resource that
ca...
© Software Languages Team, University of Koblenz-Landau
<xs:element name="company">
	 	 <xs:complexType>
	 	 	 <xs:sequenc...
© Software Languages Team, University of Koblenz-Landau
Key design principles of MegaL as
general-purpose megamodeling lan...
© Software Languages Team, University of Koblenz-Landau
MegaL prelude
// Entity types
Set < Entity .
Artifact < Entity .
L...
© Software Languages Team, University of Koblenz-Landau
Some megamodels
Java : Language .
extern JavaProgram : File .
Java...
© Software Languages Team, University of Koblenz-Landau
• Different sources of (partial) errors
• Extensibility of the lan...
© Software Languages Team, University of Koblenz-Landau
MegaL pipeline
event recorder
event bus
events events events
report
© Software Languages Team, University of Koblenz-Landau
Thank you!
Questions?
https://github.com/avaranovich/megal
http://...
Upcoming SlideShare
Loading in …5
×

Modeling software systems at a macroscopic scale

930 views

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
930
On SlideShare
0
From Embeds
0
Number of Embeds
4
Actions
Shares
0
Downloads
15
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Modeling software systems at a macroscopic scale

  1. 1. © Software Languages Team, University of Koblenz-Landau Modeling software systems at a macroscopic scale Ralf Lämmel Software Languages Team University of Koblenz-Landau, Germany Joint work with Jean-Marie Favre, Andrei Varanovich, andVadim Zaytsev https://github.com/avaranovich/megal http://softlang.uni-koblenz.de/mega
  2. 2. © Software Languages Team, University of Koblenz-Landau Source: Colin Atkinson, Thomas Kühne: Model-Driven Development: A Metamodeling Foundation. IEEE Software (SOFTWARE) 20(5):36-41 (2003) Who is Lassie? What’s wrong with *modeling?
  3. 3. © Software Languages Team, University of Koblenz-Landau http://en.wikipedia.org/wiki/Lassie http://www.counter-currents.com/wp-content/uploads/2011/10/Lassie.jpg Too many implicit assumptions!
  4. 4. © Software Languages Team, University of Koblenz-Landau A typical software project (at the macroscopic scale) programming languages (e.g., Java, PHP, JavaScript, or Python) DSLs (e.g., CSS, XSLT, or SQL) library-based languages (e.g., JQuery, DOM API) configuration languages (e.g., Hibernate mapping) models schemas models “many” languages and technologies “somehow” related
  5. 5. © Software Languages Team, University of Koblenz-Landau Can we model software projects more precisely in terms of languages, technologies, and concepts?
  6. 6. © Software Languages Team, University of Koblenz-Landau A megamodel is a model of which at least some elements represent and/or refer to models or metamodels. Source: Bezivin, J., Jouault, F.,Valduriez, P.: On the need for Megamodels. In: Proceedings of the OOPSLA/GPCE: Best Practices for Model-Driven Software Development workshop (2004) We embrace this notion in the broadest sense: programs are models and grammars are metamodels (or v.v.) etc.
  7. 7. © Software Languages Team, University of Koblenz-Landau A megamodel ! ATL Starter’s Guide Date 07/1 MMM MMt Ma Mb MMa Mt MMb conformsTo conformsTo conformsTo conformsTo conformsTo conformsTo Transformation MMMMMM MMtMMt MaMa MbMb MMaMMa MtMt MMbMMb conformsTo conformsTo conformsTo conformsTo conformsTo conformsTo Transformation Figure 1. An overview of model transformation 1 summarizes the full model transformation process. A model Ma, conforming to a metamo s here transformed into a model Mb that conforms to a metamodel MMb. The transformation d by the model transformation model Mt which itself conforms to a model transformat odel MMt. This last metamodel, along with the MMa and MMb metamodels, has to conform t etamodel (such as MOF or Ecore). Source: http://wiki.eclipse.org/ATL/Concepts#Model_Transformation Model transformations with ATL What to think of this part?
  8. 8. © Software Languages Team, University of Koblenz-Landau A megamodel Source: http://en.wikipedia.org/wiki/Tombstone_diagram Bootstrapping a C compiler written in C, by compiling it using another compiler written in machine code.
  9. 9. © Software Languages Team, University of Koblenz-Landau • Megamodeling must help with managing diversity and heterogeneity of software technologies. • Cognitive value is important! Specific motivations of megamodeling: Empirical Assessment of MDE in Industry by John Hutchinson, Jon Whittle, Mark Rouncefield and Steinar Kristoffersen use of models for team communication use of models for understanding a problem at an abstract level use of models to capture and document designs “Generic” motivations:
  10. 10. © Software Languages Team, University of Koblenz-Landau The notion of megamodel • Megamodels are (ER) models. • Entities of interest ‣ Languages ‣ Technologies (components thereof) ‣ Programs ‣ ... • Relationships of interest ‣ Conformance ‣ Transformation ‣ ...
  11. 11. © Software Languages Team, University of Koblenz-Landau How to validate megamodeling claims? By “=” we mean (roughly) that one can define the same set of instances up to a uniquely defined isomorphism. = ?
  12. 12. © Software Languages Team, University of Koblenz-Landau Fig. 1. The linguistic architecture of a software product when displayed with the Me- gaL/Explorer tool. Demo http://worker.101companies.org/MegaModels/implementations/xsdClasses/
  13. 13. © Software Languages Team, University of Koblenz-Landau Linked megamodels An entity is linked to a unique resource that can be browsed and examined correspondsTo
  14. 14. © Software Languages Team, University of Koblenz-Landau <xs:element name="company"> <xs:complexType> <xs:sequence> <xs:element ref="name"/> <xs:element maxOccurs="unbounded" minOccurs="0" ref="department"/> </xs:sequence> </xs:complexType> </xs:element> http://101companies.org/resources/contributions/jaxbComposition/inputs/ Company.xsd/element/xs:schema/element/xs:element?format=html http://101companies.org/resources/contributions/jaxbComposition/src/main/java/ org/softlang/company/xjc/Company.java/class/Company?format=html public class Company { @XmlElement(required = true) protected String name; protected List<Department> department; /** * Gets the value of the name property. * * @return * possible object is * {@link String } * */ public String getName() { return name; } ..... Use of fragments to establish an observable correspondence
  15. 15. © Software Languages Team, University of Koblenz-Landau Key design principles of MegaL as general-purpose megamodeling language • Entities and relationships are extensible. • Everything is a resource, i.e.: • accessible over HTTP. • Relationships are executable.
  16. 16. © Software Languages Team, University of Koblenz-Landau MegaL prelude // Entity types Set < Entity . Artifact < Entity . Language < Set . Technology < Entity . Concept < Entity . File < Artifact . Folder < Artifact . // Relationship types elementOf < Entity * Set . subsetOf < Set * Set . partOf < Artifact * Artifact . instanceOf < Concept * Concept . isA < Concept * Concept . conformsTo < Artifact * Artifact . definitionOf < Artifact * Language .
  17. 17. © Software Languages Team, University of Koblenz-Landau Some megamodels Java : Language . extern JavaProgram : File . JavaProgram elementOf Java . /* Models, metamodels, and conformance */ Model < Artifact . Metamodel < Model . conformsTo < Model * Metamodel . /* The MVC concept. MVC consists of model, view, and controller. Those subconcepts depend on the main concept. MVC is a design pattern. */ MVC : Concept . Model @ MVC : Concept . View @ MVC : Concept . Controller @ MVC : Concept . DP ["Design pattern"] : Concept . Model partOf MVC . View partOf MVC . Controller partOf MVC . MVC instanceOf DP .
  18. 18. © Software Languages Team, University of Koblenz-Landau • Different sources of (partial) errors • Extensibility of the language • To be controlled by the type system Design challenges of MegaL
  19. 19. © Software Languages Team, University of Koblenz-Landau MegaL pipeline event recorder event bus events events events report
  20. 20. © Software Languages Team, University of Koblenz-Landau Thank you! Questions? https://github.com/avaranovich/megal http://softlang.uni-koblenz.de/mega

×