Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is UML a programming language?

Tags:

Could UML be used to program a computer system on its own, without a supporting implementation language, e.g. diagrams straight to machine code (maybe via C or C++ etc), without human coding intervention.

like image 503
WeNeedAnswers Avatar asked Mar 21 '10 03:03

WeNeedAnswers


People also ask

Why UML is not a programming language?

UML is not a programming language, it is rather a visual language. We use UML diagrams to portray the behavior and structure of a system. UML helps software engineers, businessmen and system architects with modelling, design and analysis.

What type of language is UML?

Unified Modeling Language, or UML, is a visual language that helps software developers visualize and construct new systems. It's not a programming language — it's a set of rules specifically for drawing diagrams.

Why is UML a language?

YAML is a data serialization language that is often used for writing configuration files. Depending on whom you ask, YAML stands for yet another markup language or YAML ain't markup language (a recursive acronym), which emphasizes that YAML is for data, not documents.

Is UML dependent on a programming language?

Short answer: no. Some UML modeling tools can generate Java, C++, and code in other programming languages. However, what it generates are usually interfaces and class relationships.


2 Answers

Short answer: no. Some UML modeling tools can generate Java, C++, and code in other programming languages. However, what it generates are usually interfaces and class relationships. These tools generate stubs for which the implementation still needs to be provided, so human intervention is necessary.

like image 22
Michael Aaron Safyan Avatar answered Oct 13 '22 00:10

Michael Aaron Safyan


I'm going to go against the general trend and share an experience that shows what UML can do today, and what some future version of UML (or another modeling approach) could be.

First a bit of history.

Way back when, people programmed computers in assembly (not going ALL the way back here). Then along came higher level languages like C and Basic. Programmers that were very good in assembly argued that you can't fully express everything the processor is capable of doing (in an optimized manner) in a higher level language. In fact, they were right. Some things were much less optimal from a memory and performance perspective in higher level languages because you could not fully control the instructions issued to the processor.

The thing is, higher level languages provided a much more abstract form of expression. So, they caught on and after a while, people didn't really care that you could not fully control every aspect of the processor because the developers were so much more productive (Moore's Law also helped).

Similar rounds happened with object oriented languages, and again with managed languages. Each time, a higher level of abstraction became available and eventually won out because it was more efficient to use as a developer. In fact, generally inefficiencies in the higher levels of expression disappear as compilers become better and optimization techniques improve.

Model driven development is a higher level of expression. You cannot fully represent any code you could write in, say, C# or Java. Especially not out of the box. However, it is possible to generate a very substantial portion of an application directly from a UML model.

I led the UML-based code generation effort for several rather large projects. In many cases, we could generate 30% to 60% of the entire source code of the (real life, enterprise-class) applications. And that's just with a small team writing generators for a particular domain. Eventually, an entire industry will be behind tools to generate more and more of real-life application from models.

That is the next step in the natural evolution we have seen in our industry time and time again, ever since the first assembly codes abstracted opcodes (there was probably something before that, but that was before my time).

like image 77
Eric J. Avatar answered Oct 12 '22 22:10

Eric J.