People usually distinguish between general modeling languages and domain-specific languages. With this classification, UML clearly belongs to the first group.
It’s also clear (I´d say to almost everybody) that for some domains UML is not exactly the best option and that a domain-specific language tailored to that domain produce much better results.
Nevertheless, what we should never forget is that UML may not be a domain-specific language but it is a many-domains language . That is, UML may not be suited for all domains but can be directly applied to easily and successfully model many of them .
Please avoid creating DSLs that just reinvent the wheel again and again. If your DSL resembles too much UML maybe you should consider using just (a subset of) UML.
UML has many defects but at least after all this time we are more or less aware of all of them!. Instead, when creating an unnecessary DSL you may end up repeating many of the mistakes that we’ve managed TO solve (OR AT least identify) in the case OF UML.
We already fought a hard battle against the UML fever . Let’s try to avoid falling victims of the DSL fever now.
This post is not at all against DSLs. It’s just against the perversion of the DSL concept.
FNR Pearl Chair. Head of the Software Engineering RDI Unit at LIST. Affiliate Professor at University of Luxembourg. More about me.
Actually, I am with Jordi.
Something that I find UML (+Profiles) VERY useful is for prototyping languages in a quick and inexpensive manner. You can easily define the metamodel of your language, add icons, create models, see how they look like, change the metamodel (and/or the icons), create models, see how they look like, check the expressiveness of the language, write some OCL constraints, validate your models, etc. UML and their associated tools (editors, checkers, etc) are of great help here!
Have you tried to prototype a language with GMF?
I am not saying that UML is better than ad-hoc DSLs. What I do believe is that the UML vs DSL war is a nonsense (as all wars), when we can have the best of both worlds for designing, creating and making the most out of our models (i.e., for language engineering). Let’s use them BOTH.
At least, the way I WORK IN many occasions IS by prototyping WITH UML (+Profiles) until I GET a stable DSL. AND THEN decide whether the kinds OF things that I want TO do WITH my models deserve the effort required TO CREATE an ad-hoc DSL OR NOT. Sometimes it does. IN other occasions it doesn’t. But definitely I will not recommend anybody to prototype a graphical language with GMF.
My two cents.
Antonio.
PS. I am normally dealing with graphical models. Do not want to get into a discussion about textual DSLs and a comparison with them. This is a separate story 🙂
I think that’s NOT an argument pro-UML, but against GMF. If you go FOR prototyping graphical DSLs, I think the competition IS something LIKE Obeo Designer OR Poseidon FOR DSLs.
(posted ON behalf OF Andrea Baruffaldi)
I guess SOME OF the questions ARE:
– how many non expert people need TO UNDERSTAND the model now
– how manywill have TO UNDERSTAND it it IN 3-4 years TIME (WHEN maybe the 2-3 analysts moved TO another department OR… TO another company)
With ALL other conditions equal: the MORE the NUMBER, the MORE UML IS better than a specific DSL
(I apologize for joining so late but another thread here was so provocative I could not resist.)
The comment on the level of understanding now and in future is interesting for me – especially since I see things quite differently than Andrea Baruffaldi.
Empirical studies, like those comparing understanding of UML models versus DSL/DSM models, show that models expressed with a DSL are easier to understand than those expressed in UML. See e.g. IEEE Software 2009 article (http://www.computer.org/portal/web/csdl/doi/10.1109/MS.2009.87) on direct comparison via a controlled experiment. Is there any data that shows opposite? Shows that UML models are easier to understand then DSM models?
Perhaps we can make a comparison together too. Give me some UML models and I’ll create a DSL that makes the models easier to read, understand, remember and verify than those based on UML. But please do not give me models which sole purpose is to describe the object-oriented program code as UML is pretty good on that and I would loose then 😉 So, a mobile application, automotive system, pace maker, insurance contract etc would be fine.
Situation in the longer run is also interesting. If I understood correctly the argument, it says that since UML is widely known then also for those moving to a new company it will be easier to understand models when they are expressed with UML. I think it is obvious that general purpose languages are always more widely known than domain-specific ones, but still the models expressed with the domain concepts the company is working at makes again models easier to understand. To be concrete, let’s use an example of an insurance company and there models of insurance contracts. We can express those contracts using the concepts of bonus, payment, risk, accident etc with a DSML or with class, package, aggregation, inheritance etc. with UML. Since the new person MUST learn and understand the domain of insurance anyway (regardless what modeling language is used) why not then use the domain concepts directly? No extra mapping to learn from domain to UML (and in fact to some specific version of UML).
…or Microsoft DSL Tools, or MetaEdit+ from MetaCase. On the research side there’s also GME AND AToM3. OF course I LIKE MetaEdit+ the best, but if you ask other people they too say that MetaEdit+ IS the easiest OF the tools. You can build a simple LANGUAGE IN under 5 minutes, including rules AND scalable custom symbols. We’re also lucky in having been around for a while, so things like scalability, integrating multiple users’ WORK, AND LANGUAGE evolution aren’t problems.
[…] UML is a MDL (many-domains language) (Model-Driven) Engineering vs Science Social sharing and bookmarking services popular among people like us Why and how a transformation tool contest makes sense and it is useful From XML Schemas to UML class diagrams […]
[…] UML is good to model many things but clearly misses the point when it comes to model complex user interfaces and interactions. […]
Jordi is 100% correct that it does not make much sense to create another language to model classes, inheritance, dependencies etc. But if your domain is something else, and I would say that 99,999% of domains are something else, then using a language that addresses that domain makes a lot of sense.
For example, if you are working in automotive industry, and architectures are of your interest, then you should check AADL, EAST-ADL, AUTOSAR or some other automotive architecture language. If you are instead developing an infotainment system for a car, then you should check the languages that address HMI (Human-Machine Interfaces) development and so on.
If suitable language is not available then you can define your own. Why? A language that gets closer to your actual problem works always, yes ALWAYS, better than any general purpose language. If you don’t believe me, let’s look cases: show me a model in UML and I’ll show a domain-specific modeling language that works better 😉
“show me a model in UML and I’ll show a domain-specific modeling language that works better”*
yes, basically agree, but does it have to be a completely new DSL or is a UML profile >always< enough?
Have fun
|=
PS
thinking a bit pathologically: would the UML meta model be a counter example 😉
@modelpractice:
> yes, basically agree, but does it have to be a completely new DSL or is a UML profile >always< enough?
Simple counter-example: AUTOSAR. Mapping 100% of AUTOSAR to UML profiles is hell.
Regards,
Andreas
@modelpractice: if the domain we are modeling is close to the UML concepts then profile makes sense. In other words: if we want to classify classes into <>, <> etc then stereotypes and tagged values can be used.
If the domain is something else, like most domains are, then the effort to twist existing concepts, their rules, semantics etc. will be simply too much effort. Not when defining the language/profile, but more importantly when using the language.
Profiles are also pretty limited: what if our domain does not need the concept of ‘class’? Can we remove it?
my answer to both points could only be, “it depends” (on the view), since modelling is such a broad area. Personally, my view is that of business systems analysis, thus I’m modelling in the first place for the sake of understanding the problem.
Judging by the examples on your web site, is your focus more on modelling with the aim of generation?
Have fun
|=
Hi,
I have some disorder in the concepts, searchong the definition of a DSL you can find that it’s an aggregation of abstact syntax, concrete syntax and semantic, im wondering why we could not consider UML as a DSL as it we still have UML metamodel? i hope that the reflections with be more than “DSL for a specific domain againt UML”
Thanks
Mahmoud —
ANY language can be defined in terms of its abstract syntax, concrete syntax and semantics. It is just that, for a DSL, one tailors the abstract syntax, concrete syntax and semantics for a specific domain purpose, while, for UML, the abstract syntax, concrete syntax and semantics are fixed, as defined in the UML specification.
As has been mentioned in other comments, UML provides some ability to tailor its application through profiles. But a profile currently can only subset the UML abstract syntax and should not violate the standard semantics for that subset (though it can constrain and/or compatibly extend them). Thus a profile can be said to essentially defined a “dialect” of UML, rather than a whole new language.
Note, though, that there is a current OMG RFP that is looking for proposals to improve the UML profiling mechanism in ways that will make it much easier to effectively define domain-specific modeling languages as profiles of UML (see http://www.omg.org/cgi-bin/doc?ad/2011-6-22).
— Ed
Is UML a DSL???
The answer (as usual) is it depends. We can look at UML as general modeling language used to model any kind of software system or we could look it as a DSL if we think of UML as a domain-specific language for the domain of “modeling software systems” (UML is a specialized language for doing that) in the same way we could say that SQL is a generic language to query any table (regardless the “domain” the info stored in the table represents) or a DSL since SQL is a language specialized in performing the task of querying tables.
As M. Folwer says here http://martinfowler.com/bliki/DslBoundary.html , “intention is the key here, both of the language writer and of the user”
Jordi —
Actually, even though UML may have originated in the software world (many years ago!), UML 2 is very explicitly not specialized just to “modeling software systems”. The business process modeling and workflow modeling communities had a strong influence on the activity modeling features of UML 2, and I have personally used UML quite extensively for business architecture modeling and conceptual information modeling. As another example, one of the most widely used profiles of UML, SysML, is intended for the modeling of mixed hardware/software systems, or even hardware systems with no software in them at all (as few of those as there are these days!).
So, UML has really become a general modeling language (what “modeling” is in general has already been discussed extensively on other threads!). And saying that the domain of UML is “modeling” seems to me to be pretty much the same as saying that the domain of Java is “programming”. That is, it means that neither are really “domain specific” in the problem domain sense.
I think your original post of UML as a “Many-Domain Language” was quite on-point on this.
— Ed
“same as saying that the domain of Java is “programming””
+1
Exactly what I came here to write… 🙂
@modelpractice: If you mean by example cases those at http://www.metacase.com/cases and sample languages from various domains at http://www.metacase.com/cases/dsm_examples.html, the focus is in most cases on generating code. Naturally those models support also understanding, communication etc.
If our aim is to model only for understanding then pen&paper works fine, or use of powerpoint as then we are totally free to use a language/visualization that fits to the need.
@Mahmoud:
As Ed already mentioned, abstract syntax, concrete syntax and semantics are ingredients to build a language. These ingredients in themselves do not define if the language is domain-specific. Some tools allow limited language customization (e.g. UML profiling) or complete freedom of creation (as typical of language workbenches).
*An* answer to the question If a language is domain-specific, can be given only by users from a specific domain. Note that there could be many answers and I do mean that UML can also be considered a DSL. (I am aware that some prefer to limit concept of “domain-specificity” to vertical domains only. However, I prefer not to discriminate users of horizontal domains as well)
In fact, I totally agree with Jordi’s reply about “intention”. UML may be intended by creators to be Universal, by it is possible for UML (or sooner parts of it) to be a DSL in eyes of end users.
Also, I am not sure if it is meaningful to pose a question if UML is a DSL. The reason for this is that despite its name suggesting a single language, UML is in fact is a number of integrated languages.
@Juha-Pekka Tolvanen
Hello, still to me the most basic task of a modeling tool is to keep the model consistent, especially if one has lots of different views (dia types) on it.
I can only speak for my sort of analytical tasks, where the “usual” basic model/ diagram types like ERM, State machine, class dia, etc are doing quite well in principle, but are often limited in flexibility.
Thus the approach standard language + flex mechanism (mainly profiles or ‘misuse’ of elements) seems the right one for me, nevertheless I’m constantly looking for improvements.
have fun
|=
@modelpractice: Good that your raised the issue of model consistency. Our customers usually have created different model/diagram types too but they don’t threat them as separate units but rather integrate them via a common metamodel (aka language definition). This keeps various models – with the help of the tool – consistent or at least report about inconsistencies.
The metamodel of UML has basically the same approach as described above but since it is not fixed to any specific domain the support for handling model consistency is not….hmmm… particularly strong. It again goes back to the domain-specific nature: once we define a language for a particular domain we most likely also know how consistency among the models should be handled. For example, if we change object X in behavioral view/model type then property in static view/model type should be changed too. Such data can be put to the metamodel and tools can support it when modeling. Last year we wrote a paper that gets close to this language integration part (http://www.dsmforum.org/events/DSM10/Papers/Tolvanen.pdf)
In addition to the consistency I would also add completeness to the same category as a domain-specific modeling language can “know” if the model is not complete (e.g. warn about omitted values, or values given in wrong syntax, missing connections etc.). General purpose modeling languages (like UML, SySML etc) don’t know about such domain characteristics and therefore these languages don’t guide us on if we can stop modeling. To use an example: in the insurance world all product bundles must contain at least two insurance products. The language for insurance products can include this rule and thus warns about product bundles that do not support the domain rule. Such capability again is lacking from general purpose languages (UML, SySML) where all developers must master the domain rules as the language doesn’t give any support for them.
@Juha-Pekka Tolvanen cc @Andreas Graf
Thx for the paper. I fully agree that integration is done (if it has to be done) best at meta level. Also consistency and especially completeness can, yes, of course be handled better if one can manipulate the meta-model, than just a profile.
Nevertheless, extending the language is just the smaller part of the modelling job. At least 90% of my work(*) is about using the common model/dia types (and they’re doing very well). Thus my first criterion is, how well can the basic dia types be handled (without setting them up from scratch).
This leaves me with a trade-off: the best approach/ tool for the 90% even though for the remaining (domain specific) 10% it is just 2nd best.
Have fun
|=
(*) I may say this for analysis in business software development. Of course there are other areas with different preferences, like the AUTOSAR example of @Andreas Graf
@modelpractice: It is fine to create common models/dia types for understanding, communication etc., but unfortunately the possibilities for code generation, model analysis, etc are then modest.
I don’t know deeply other tools, but at least MetaEdit+ comes with predefined languages (about 70) and you may then freely modify their metamodels, integrate them with each other etc. Such language integration does not even take much time since it is based on efficient metametamodel (yes, we are eating our own food…;-) This could give you the extra 10-20% needed in the cases you described.
It would be of course nice if larger number of languages would be available, but unfortunately among the thousands of languages implemented with MetaEdit+ only a fraction is published or made available to be used by others. This simply because companies who created their languages and generators do not want to publish them.
I fully agree with the comment by Andreas Graf on AUTOSAR as shoehorning existing metamodels into UML profiles is pretty close to hell….. I’ve seen it been tried many times: e.g. in this automotive context not only for AUTOSAR but also for EASD-ADL, AADL and others. In metamodel-based tools it is much easier and in fact done for various languages: http://www.metacase.com/cases/dsm_examples-auto.html
@Juha-Pekka Tolvanen It’s fine to generate code, but unfortunately most software projects struggle with understanding in the first place 😉
“MetaEdit+ comes with predefined languages (about 70) … ”
Ok, that’s a positive surprise to me. Judging from the examples on the page I had a different (obviously wrong) impression.
Thus, one can do “standard” modeling (the usual stuff, like Use Cases, ERD, Components, …) as well as with any other tool and if she likes to modify the language she can do so on the meta level? Best of both worlds, sounds almost to good to be true :o) This would make “classic” modeling tools obsolete, wouldn’t it?
Have fun
|=
“>MetaEdit+ comes with predefined languages (about 70) …
Ok, that’s a positive surprise to me. Judging from the examples on the page I had a different (obviously wrong) impression.”
Since all modeling languages can be defined with metamodels we have included various general purpose languages as examples too (see a list of those at http://www.metacase.com/methods/)
“Best of both worlds, sounds almost to good to be true ;- ) This would make “classic” modeling tools obsolete, wouldn’t it?”
I believe it depends on the modelers’ choice: Do they want to have freedom and control on how they model things or do they feel that someone in standardization board or in dev team of tool vendor know better what is needed 😉
License price may also be a hurdle for someone, (e.g. 150€ in case of MetaEdit+ Workbench, see http://www.metacase.com/introductory_license.html)
mp:”This would make “classic” modeling tools obsolete, wouldn’t it?”
jpt:”I believe it depends on the modelers’ choice: Do they want to have freedom and control on how they model things or do they feel that someone in standardization board or in dev team of tool vendor know better what is needed ;-)”
Great, that this decision is sooo simple!
😉 😉
|=