Object-oriented simulation language UML2 SP
This project is maintained by vgurianov
See also Gurianov V.I. A Brief Overview of the UML Scientific Profile, arXiv:2104.10042 (cs.DC), 2021
UML 2 SP is an abbreviation for UML 2 Scientific Profile and designed for the development of simulation models.
A simulation include follow steps:
UML2 SP support three first step. This Unified Process (UP) modification is called SSP (Simulation with Scientific Profile).
Consider the following simple situation.
Problem domain: Greeting
– Mr. Goldsmith : Good morning. How are you?.
– Mr. Brown: Not bad, thank you /Thanks, not so well.
It’s necessary create a simulation model of dialog.
Conceptual modeling
As a rule, a scientific models is depicted as an ontologies.
In our opinion, frame semantic networks can be used to describe scientific models along with mathematical models.
In UML2 SP conceptual model is an ontology.
Class diagram is:
Figure 1 - The ontology of the situation
Problem domain semantics.
Further we use the terms of knowledge engineering.
A “Component” frame define concept “Subject” . This frame has “name” and “next” slots.
A “Leaf” frame define concept “Human”.
A “Composite” frame define concept “Dialog space” and has “pl” slot.
A “Root” frame define concept “Environment”. It is initial and boundary conditions.
A “Node” frame define concept “Greeting” and has “msg” slot. It is the system under study.
Class operations define a rule of change of slot.
Computational semantics.
Ontologies described in UML SP can be attributed to the class of executable ontologies, because the model can be immediately translated into one of the programming languages.
With view of computational semantic, the class diagram is variant of a Composite pattern by GoF.
As a rule, ontology alone is not enough to describe a model. For example, it is required to define the operations algorithm in some detail.
Class operations define rules for changing slots and define a concepts. A critical meaning is given to the operations of the «Exist» stereotype. These operations determine the course of model time.
One may use communication diagrams for this purpose, Figure 2. The communication diagram is an instance of the Class diagram:
Figure 2 - Step 1
The dialog includes the following events.
Figure 3 - Step 2
The simulation model in C++ code: main.cpp