The complexity of modern process plants is steadily increasing. To overcome this potential source of error it is obvious that a abstract way to model such systems is needed. Piping and Instrumentation Diagrams or P&IDs are used in various areas to model these complex plants. To evolve the usage of P&IDs in the industry, significant support of modeling tools is needed. Our research showed that currently few tools allow modeling of such diagrams.
Dedicated to research and teaching in the realm of Model Engineering at the Business Informatics Group of the Vienna University of Technology.
Sunday, September 25, 2016
Implementation of Piping and Instrumentation Diagrams for Enterprise Architect
The complexity of modern process plants is steadily increasing. To overcome this potential source of error it is obvious that a abstract way to model such systems is needed. Piping and Instrumentation Diagrams or P&IDs are used in various areas to model these complex plants. To evolve the usage of P&IDs in the industry, significant support of modeling tools is needed. Our research showed that currently few tools allow modeling of such diagrams.
Comparison of the Eclipse Modeling Framework (EMF) with the Meta Programming System (MPS)
Introduction
In the last decade a dramatic growth of software intricacy and different methodologies and techniques have been proposed to support the development of complex systems. Model Driven Engineering lays the focus more on modelling than on coding and lets software architects harness the opportunity of dealing with higher-level abstractions.
Evaluation
By implementing a pre-defined language named IML in these two meta modeling systems, the knowledge was gained to accomplish the evaluation. In each of these two implementations, the focus was held on using system specific elements and do not focus on details and syntactic sugar.
Outlook
The work gives only a small overview about some parts of those very powerful meta modeling tools. The focus was on analyzing an existing language in EMF and implementing this language completely from scratch in MPS by focusing on the Meta-Modeling and defining and implementing of the abstract syntax.
For more information on the project, we kindly refer to the full report and the source code of the implementation.
Realizing a DSL in MPS
By Alexander Eigner and Paramvir Parhar
IntroductionThe aim of this project was to get first hands-on-experience in the Meta Programming System by implementing an own domain specific language in MPS. This DSL should be based on some main ideas from the fields of systems engineering and executable UML. By taking the structuring aspect of systems engineering into account this DSL should allow the user to model a system that is composed out of interlinked components. Following some ideas of executable UML this DSL should also allow the user to model behavioral aspects of a system and to execute (e.g. simulate) this system already during the design phase by means of code generation.
The Meta Programming System
For implementing our DSL we used a relatively new language workbench, namely Meta Programming System developed by JetBreains. JetBrains MPS is an open-source language workbench for language engineering. MPS itself is implemented in Java. It runs on the JVM and allows defining general-purpose as well as domain-specific languages. Unlike other implementa- tions MPS does not use a parser or grammer at all, but it uses structural editors, in which the textual syntax represents a projection of the abstract syntax tree (AST), hence the user edits directly on the abstract syntax tree. Therefore, MPS supports mixed notations like textual, symbolic, or graphical. The fact that MPS does not use a parser allows users to enable language modularization and com- position more easily. The projection of the AST guides the user through the development as it knows what is allowed and what not. MPS supports combining and extending different languages. In order to trans- late the DSL code into another language like Java it is necessary to do a model transformation.
Implemented DSL: ComponentStateCharts (CSC)
The name of the implemented domain specific language origins from two well known modeling diagram-types, the component diagram and the statechart diagram. CSC offers the possibility to model the structure of a system by allowing the user to define components and connect them with eachother via ports, which shows the similarity of our DSL to component diagrams. CSC also allows the user to define the behavior of a system by letting the user define a state machine for each component. Therefore the domain of CSC extends to the modeling of structured systems that consist out of interlinked components with specific behavioral features. CSC moreover allows the user to define a simple execution sequence, which is a sequence of function-calls of the components, in order to simulate a sequence of events on these components. In addition to that a CSC-to-Java generator was implemented that can generate a Java class for each component as well as a simulation class to simulate a concrete behavior of the components according to the defined execution sequence.
Evaluation
The main part of the evaluation was conducted by counting the number of code-lines that were needed to model a sample systen in CSC against the number of Java code-lines that were generated via the CSC-to-Java generator. This evaluation showed, that there was a huge saving in code-lines in CSC due to its laconic and error-tolerant syntax. Besides the saving of code-lines CSC also has some shortcomings. Due to the lack of time of this project it was not possible to implement a sophisticated concept for component-functions that e.g. could allow the user to define return types. This fact can lead the user to tedious coding-bypasses if he or she wishes to overcome that lack of return types.
Future work
There are several upgrade possibilities for CSC. Component-functions could for example have return types. The transitions of a component's statechart diagram could have guard conditions. Components could interact with eachother sophisticatedly via data streams. The use of Realtime UML could allow a wider range of analysis during the execution of a CSC model.
Monday, July 25, 2016
Diagram Centric Model Versioning
By Stefan Schefberger and Matthias Winkelhofer
Introduction
Diagram Example:
Requirements
- no strict separation in model and diagram differences
- keep control over the management of model changes
- full functionality of the versioning mechanism
- implementation compatible to the already existing groups
Approach
Solution
| Default representation without grouping |
Outlook
But as a closing statement, once more we would like to note, that the Diagram Centric group implementation is the first step in a specialized model oriented perspective of representing the changes of graphical and logical models.
Wednesday, July 20, 2016
Interactive Model Animator for xMOF Models
By Matthias Hoellthaler and Tobias Ortmayr
Introduction
Model-driven Development (MDD) gained significant popularity over the last couple of years. Because of the higher abstraction of domain-specific languages it is possible to minimize redundant activities and improve the understandability of complex problems. This leads to a software development process which is less code-centric and more model-centric. Models are no longer only used to document design decisions, but became the main development artifact and source for code generation. Therefore, adequate techniques for ensuring the quality of models and their correctness in terms of expected behavior are necessary.
Existing ecosystems like the Eclipse Modelling Framework (EMF) provide profound tooling support for well-established concepts but are lagging behind current trends and developments like executable Domain Specific Modelling Languages (xDSML). The research field of xDSML is in comparison a relative young one. Unfortunately, this results in a lack of well established standards. The Moliz project provides with xMOF a promising approach for specifying xDSMLs based on the OMG standards MOF and fUML.
The aim of this project was to build a prototype of a model animator for xMOF models to improve the tool support for xMOF. This animator extends the debugging functionality of the Moliz model execution engine by interpreting debugging events to retrieve information about the current execution state of the model and using this information to visualize the state in the graphical representation (in this case activity diagrams). The animator supports node-wise stepping of xMOF activities and animates the activity diagrams to give the language designer a visual feedback about the state of the ongoing execution. To facilitate the integration into the Moliz project the model animator is implemented as an Eclipse plug-in. We implemented the animation in Graphiti and Sirius to demonstrate the differences between the two approaches.
Animation with Graphiti
In Figure 1 we see the Graphiti-based animator during the execution of a Petri net. As we can see in the bottom right, the nodes of the activity diagram are animated. Even after the end of an activity they are still animated for better traceability. They will only be reset if the activity diagram is executed again.
|
|
| Figure 1: Animation with Graphiti |
Animation with Sirius
In Figure 2 we can see the same model. This time it is animated with Sirius. Both animators provide comparable functionality, however, the Sirius-based animator provides a more sophisticated animation of activity diagrams.
|
|
| Figure 2: Animation with Sirius |
Outlook
The project should be extended in the future to further improve the tooling support. The following features are the most promising ones:
- Animation support for simultaneously executing activities should be supported. In particular, if two or more caller execute the same activity, the current state of the diagram is currently overwritten by the newest caller.
- Interactive stack traces are a useful addition to give the possibility for navigating between activity diagrams.
- The Sirius editor should be capable of representing all xMOF metaclasses. At the moment only the Activity metaclass and associated elements are represented.
- A better mapping algorithm should be implemented to guarantee a correct mapping between model elements and diagram elements. At the moment the name property of an element needs to be unique. A violation of this constraint can cause unexpected behavior.
Implementation
The source code of the project can be found on Github.
Tuesday, July 19, 2016
Modernizing Software Languages through the Application of Model-Driven Engineering
From XML Schema to Xtext
By Agnes Fröschl, Bernd Landauer, and Bernhard Müller.
Introduction
Since the invention of Extensible Markup Language (XML) [Harold], it has gained a great popularity. The language is nowadays used as configuration and exchange format for a vast amount of applications. Some examples are the GPS Exchange Format (GPX), Scalable Vector Graphics (SVG) or configuration files for Computer Numeric Control (CNC) machines for production data. To make sure a provided XML file is valid, XML Schema Definition (XSD) [Gao] was introduced. However, XML and XSD are both optimized for machine processing and not human readability [Badros].To bring language engineers, i.e., for example, the person who designed the instruction reader for a CNC machine and domain experts, i.e., for example, the person who operates the CNC machine, together, the XMLText Framework [Neubauer] has been introduced. It provides a transformation from XSD to Xtext-based Domain Specific Language (DSL) [Eysholdt, Tolvanen] with a more comprehensive and easily human readable concrete syntax.
In this work, we describe various XSD features that are not yet supported or limited by the XMLText transformation as well as our efforts to extend it [3]. The target is to escape fixed concrete syntax and provide an easy to use and customizable syntax for non-language engineers. Another important key feature is to keep backward compatibility, such that systems, which rely on XML files as an input source, do not need to be adapted to fit the new syntax.
Extension of the XMLText framework
Although some features are already implemented in XMLText, XSD provides an extensive amount of advanced features, for which support has still to be created. Our work mainly focused on extending the Ecore and Xtext Grammar generation.Data types were our first area of contribution. Instead of proper Xtext Terminals, only stubs were created. We implemented valid Terminals for various data types. With this extension, only minor efforts were necessary to implement the support of various length restrictions for strings.
A more advanced feature was the implementation of mixed content, i.e., the support for the mixed=true XSD attribute. This construct allows the mixing of various newly defined elements in the created syntax or, in other words, text content with arbitrary text elements between tags.
Finally, we implemented ID and IDREF to ensure unique values for certain elements to which others can refer to. The related features KEY and KEYREF have been examined but their support has not been implemented due to the usage of complex XPath rules which are beyond the scope of our project.
Concrete Syntax DSL
Making the concrete syntax DSL even more readable and customizable, we explored the possibilities of Xtext to adapt the concrete syntax and style the appearance in the editor.The figure below shows an example how a customized concrete syntax for a company hierarchy could look like. Other implemented extensions can be seen too, like date data type which yields an error if the date is not valid, e.g. month greater than 12. Auto-completion for IDREF values referencing available ID values. An arbitrary text content element between the named tags.
![]() |
| customized concrete syntax DSL |
Future Work
The XMLText framework targets a quite complex problem, not least because of the feature richness of XSD and respectively XML. There are several topics for further extensions. Future work may include following Topics:- Implementation of further XSD features closing existing gaps,
- an XPath to OCL [Warmer] converter to fully support for example KEY and KEYREF XSD features,
- a fully automized generation of customized concrete syntax DSL, which includes a configuration wizard for syntax adaption,
- and a CSS interpreter for concrete syntax DSL styling.
Resources
XMLText framework fork including extensions: https://github.com/syrenio/XMLText
Monday, July 18, 2016
Context Modeling and Analysis of Cyber Physical Production
Introduction
In order to support the approach presented in [1], we implemented an Eclipse based graphical editor for modeling i) FOMs, ii) their composition and iii) HOMs. For analyzing the CTMC model we implemented a code generation feature that generates the input for the Probabilistic Symbolic Model Checker (PRISM). The following figure shows an overview of the process we facilitate with our implemented tools.
Case Study: Factory Operator
certain kind of product. After turning out a certain amount of items it enters a phase of self-maintenance where it checks if its tools need replacements or some re-calibration is necessary. Completing this process after every item would be too time consuming so the time span between self-maintenance phases is adjusted to be optimal in respect to the price of the raw goods and the probable amount spoilage it will produce when self-maintenance would become necessary during
a production phase.
Context Modeling
Context Analysis
References
[1] Berardinelli, L., Cortellessa, V., and Di Marco, A. Fundamental Approaches to Software Engineering: 13th International Conference, FASE 2010, Held as Part of the Joint European Conferences on Theory and Practice of Software, ETAPS 2010, Paphos, Cyprus, March 20-28, 2010. Proceedings. Springer Berlin Heidelberg, Berlin, Heidelberg, 2010, ch. Performance Modeling and Analysis of Context-Aware Mobile Software Systems, pp. 353–367.[2] PRISM - Probabilistic Symbolic Model Checker. http://www.prismmodelchecker.org/.








