|

Textual model notations are used, not only in SysML v2

Textual model notations are used, not only in SysML v2

When we think of "modeling", we often think of graphical models, but models can also take other forms. Textual model notations in particular are a highly topical subject thanks to SysML v2.

This article is specifically about textual notations from which a model can be generated.

Model notations and display options

In typical modeling tools, we work with a model tree that hierarchically represents the entire model. This makes it possible to inspect individual model elements, typically in a small form ("element properties"). In addition, there are special model elements such as diagrams that represent a graphical view of the model, which the user can customize, for example by arranging the model elements that are now displayed graphically.

Incidentally, this is not limited to the modeling spheres frequently discussed here, such as SysML and UML limited. We also find this approach with CAD models, circuits (are also models), etc.

However, there are also other approaches. For example, requirements management tools always work with a data or information model. This is usually a simple ER model with attributed elements. The models are typically presented here in tabular form.

Finally, there are models that are actually only consumed in text form. These include, in particular, software code or data structures such as JSON or YAML. These can be processed by machines, but can also be read by humans.

Text-based UML tools are particularly useful for quick and informal model sketches, documentation and early design discussions

Jordi Cabot

Generate diagrams from text

We have been able to generate diagrams from software code for almost thirty years. This was particularly popular in the early 2000s, when large tapestries of class diagrams were generated from Java code. The architect often displayed these prominently, which made a big impression on non-technical employees in particular.

However, the text from which diagrams are generated does not have to be a "real" or complete model. It can also simply be a language that describes graphical elements. PlantUML is a good example of this: as it only describes the diagram, you can easily generate an invalid UML diagram with PlantUML. However, a UML class diagram generated from Java code will always be formally correct (otherwise the Java code would not compile). The new textual notation of SysML v2 also falls into this category.

Why are text-based UML tools so popular?

This approach is often referred to as "diagrams as code" and provides a bridge between textual and visual representations. For various reasons, it has become very popular:

  1. Use code infrastructure: Textual notations can be seamlessly integrated into version control systems and other tools that developers already use in their daily workflows. This makes implementation much easier, as no additional software needs to be learned, purchased or installed.
  2. Intuitive operationProgrammers in particular often find textual languages more intuitive and convenient than graphical ones, which further promotes the spread of these tools. And almost every engineer can now do a bit of programming.
  3. AccessibilityText-based modeling tools are often the only viable option for visually impaired modelers, as most accessibility tools work better with text input.
  4. Workflow integrationTextual model notations can be easily generated from all possible data sources in order to represent a situation in a notation-compliant manner. Textual model notations can also be parsed and processed automatically.

Textual model notations are excellent for quick and informal model sketches, for example for documentation or as draft templates for early design discussions. However, they are generally less suitable for extensive and rigorous modeling activities, as their functions and robustness are often limited.

Selection of text-based modeling tools

In the MoLa blog recently published a list of tools with textual modeling notation has been published. Here is a short summary, more details and screenshots can be found at MoLa:

  1. PlantUMLAlthough UML is in the name, PlantUML can also represent other notations, such as SysML or GANTT. It is the best-known tool in this category.
  2. yUMLAn online service that enables the creation of class, activity and use case diagrams. yUML is particularly useful for embedding UML diagrams in blogs, emails and wikis.
  3. NomnomlA simple web application with live preview. Nomnoml saves changes in the browser's local memory and keeps the syntax visually as close as possible to the generated UML diagram.
  4. UmpleUmple integrates modeling concepts directly into programming languages such as Java, C++, PHP and Ruby and adds UML attributes, associations and state machines to them.
  5. ZenUMLZenUML enables the quick creation of sequence diagrams, even for complex diagrams, and is particularly suitable for Confluence users.
  6. GleekGleek supports many UML diagram types, including object diagrams, and offers a variety of tutorials and examples on how to use the tool.
  7. TextUML ToolkitAn open source IDE for UML that creates models at the same speed as code and offers increased modeling productivity.
  8. UML GraphUses a Java-based syntax to render class and sequence diagrams and uses various tools to create diagrams.
  9. USE (UML-based Specification Environment)A system for the specification and validation of information systems based on a subset of UML and the Object Constraint Language (OCL).
  10. DotUMLSupports use case, sequence, state, class and deployment diagrams and can be used as a standalone web application or as a plug-in.
  11. Chart Mage: A tool for creating flowcharts and sequence diagrams with autocomplete function.
  12. WebSequenceDiagrams: An online editor for sequence diagrams with various notations and export options.
  13. Swimlanes: A simple online tool for creating sequence diagrams that exports diagrams as image files or URL links.
  14. QuickDatabaseDiagramsProvides a textual notation for creating ER diagrams.
  15. BPMN Sketch MinerA tool for quickly sketching BPMN diagrams.
  16. StructurizrSupports the creation of software architecture models based on the C4 model using a textual domain-specific language (DSL).

SysML v2 Text notation

An interesting role is played here by the SysML v2 as the standard defines a textual notation here. There have been heated discussions in the community as to whether the textual notation is the model or not. In particular, some advocates argue that a unique ID must be an integral part of the model. And this is something that the notation does not provide. However, this is a problem that could be solved with appropriate tools.

What is certain, however, is that the SysML v2 text notation is a step in the right direction.

Conclusion

Textual model notations have limitations; nevertheless, they can be used tactically in many situations to improve communication or to enable text-based integration. Of particular interest in the future will be the notations that represent the actual model. In this category, the SysML v2 Text notation potentially play a major role.

Photo by Anete Lūsiņa on Unsplash

Similar Posts

Leave a Reply