The Twins demo is an example of asynchronous peer-to-peer communication between 2 identical, threaded component instances, refer to context diagram below. Each peer can send a question to the other peer via its output port, receive a question via its input port, send an answer via its output port, and receive an answer via its input port. This illustrates a communication protocol involving 2 ports for each peer. The implementation has an orthogonal state machine with 2 regions: for the question and for the answer. This enables full duplex communication behaviour.
Verification happens not at the port level but at a higher 'application' level. The context architecture TwinsTest can be verified without the need for component instances having stereotype Mock. The NativeTriggers are the driving forces for stimuli.
Furthermore, this demo also includes an application where the peers send 10 questions/answers to eachother. The context diagram of this application is shown here:
Valid combinations for generating source code are in the table below.
Target |
Generate |
Protocols |
|
TwinProtocol |
Simulation code, Verification code |
Architecture |
|
Twins |
Source code + main In this application the peers send 10 questions and answers to each other. |
TwinsTest |
Simulation code, Verification code |
The file TismSds.html contains an overview of the verification scenarios.
The files in the tables below are free to download.
Twins.xml | The XMI file of the Twins UML model. |
Twins.tsm | The project file for the TismTool. |
TwinsTranslations.tsl |
The translation table. |
Twins.pdf | The UML diagrams. |
Twins.zip | The zipped archive containing the (generated) source code, the verification executable, and the logfiles TismLog_0001.txt and TismSeq_0001.txt. |
AllTwins.zip | All the above files zipped together. |
Twins.xml |
The XMI file of the Twins UML model. |
Twins_Java.tsm |
The project file for the TismTool. |
TwinsTranslations_Java.tsl |
The translation table. |
Twins.pdf |
The UML diagrams. |
Twins_Java.zip |
The zipped archive containing the (generated) source code, the verification executable jar, and the logfiles TismLog_0001.txt and TismSeq_0001.txt. |
AllTwins_Java.zip |
All the above files zipped together. |
Twins_Cpp.xml |
The XMI file of the Twins UML model. |
Twins_Cpp.tsm |
The project file for the TismTool. |
TwinsTranslations_Cpp.tsl |
The translation table. |
Twins_Cpp.pdf |
The UML diagrams. |
Twins_Cpp.zip |
The zipped archive containing the (generated) source code, the verification executable, and the logfiles TismLog_0001.txt and TismSeq_0001.txt. The used C++ Boost library has version 1.48 . |
AllTwins_Cpp.zip |
All the above files zipped together. |
L_TWINS_CPP.tar.gz |
The tar-zipped archive containing the (generated) source code, the makefiles, the verification executable, and the logfiles TismLog_0001.txt and TismSeq_0001.txt. The used C++ Boost library has version 1.47 . |
L_AllTWINS_CPP.tar.gz | The tar-zipped archive containing the XMI file of the Twins UML model, TismTool project file, the translation table, pdf of UML diagrams, and the above L_TWINS_CPP.tar.gz file. |
Twins_C.xml |
The XMI file of the Twins UML model. |
Twins_C.tsm |
The project file for the TismTool. |
TwinsTranslations_C.tsl |
The translation table. |
Twins_C.pdf |
The UML diagrams. |
Twins_C.h | Include file inserted in TsmSystem.h . |
Twins_C.zip |
The zipped archive containing the (generated) source code, the verification executable, and the logfiles TismLog_0001.txt and TismSeq_0001.txt. The used OSAL library is based on Windows. |
AllTwins_C.zip |
All the above files zipped together. |
L_TWINS_C.tar.gz |
The tar-zipped archive containing the (generated) source code, the makefiles, the verification executable, and the logfiles TismLog_0001.txt and TismSeq_0001.txt. The used OSAL library is based on Linux. |
L_AllTWINS_C.tar.gz |
The tar-zipped archive containing the XMI file of the Twins UML model, TismTool project file, the translation table, pdf of UML diagrams, and the above L_TWINS_C.tar.gz file. |
TismTool reports the following remarks about the UML model:
W 4535: Self-transition is errorprone for NativeTrigger @ ( Xmi > Data > Protocols > TwinProtocol > TwinServer > TwinServerPsm >> Idle )
W 4535: Self-transition is errorprone for NativeTrigger @ ( Xmi > Data > Protocols > TwinProtocol > TwinServer > TwinServerPsm >> Idle )
ad W 4535:
Self-transitions may cause an unlimited number of messages to a receiver causing queue overflow.
By downloading and/or using the above items you accept the terms of the Disclaimer. So make sure you have read it before downloading or using anything from this section of the site. In general terms that means you use them at your own risk, and we accept NO RESPONSIBILITY WHATSOEVER for anything that may occur as a result of your use of, or inability to use, any item provided via these pages.
TismTool reports the following remarks about the UML model:
W 5030: Effect 'Name' preferred over 'Operation' @ ( ProxyReaderClientPsm >> CompoundState >> Open ) => ( ProxyReaderClientPsm >> CompoundState >> Open )