Enabling UCM-based transformations UCMExporter Enabling UCM-based transformations
Ali Echihabi – University of Ottawa, SITE Summary Background Information The benefit of having UCMExporter The problems and challenges How UCMExporter works Detailed features of the transformation process (customization, connectors for causality, naming the connectors, parallel synthesizing) A demonstration February 5, 2019 Ali Echihabi – University of Ottawa, SITE
Ali Echihabi – University of Ottawa, SITE Motivation Enabling the transformation of UCM requirements scenarios to design and testing scenario notations. Tool Support February 5, 2019 Ali Echihabi – University of Ottawa, SITE
Ali Echihabi – University of Ottawa, SITE Previous Work UCMNav MSC direct (Andrew Miga, 2001) Scenario in XML (Xiangyang He, 2002) MSC via XML (S. Cui, D.Y. Cho, 2002-2003) TTCN (Bryan Mulvihill, 2003) February 5, 2019 Ali Echihabi – University of Ottawa, SITE
Benefits of Using UCMExporter Can use UCMNav for the requirements phase. UCM communicate better the Use Cases to clients and engineers Generate MSC and SD to do the design Test Automatic Customizable February 5, 2019 Ali Echihabi – University of Ottawa, SITE
Technologies and Tools Java (Eclipse): Implementation XML with JDOM: XML parsing and building XSLT with XSLTC: transforming XML documents UCMNav 2: creating Use Case Maps Rational Rose: Viewing Sequence Diagrams Unisys XMI Add-on: importing/exporting XMI documents for Rational Rose Tau 4.4: viewing MSC’s Xselerator: creating and testing the XSL transformations JDOM: XSLT XMI: February 5, 2019 Ali Echihabi – University of Ottawa, SITE
UCMExporter: Black Box View February 5, 2019 Ali Echihabi – University of Ottawa, SITE
Problems and Challenges A need for a detailed mapping between UCM concepts and MSC and SD. XMI does not define the diagram layout. No tool does an auto-layout of the XMI file. No tool provides documentation on how it does its layout. Allowing for customization (e.g. protocols). Centralizing the logic for future changes. February 5, 2019 Ali Echihabi – University of Ottawa, SITE
Ali Echihabi – University of Ottawa, SITE A Sample UCMNavXML Refers to XML file generated with UCMNav. Describes one or more scenarios. A scenario is a path in the UCM February 5, 2019 Ali Echihabi – University of Ottawa, SITE
Ali Echihabi – University of Ottawa, SITE UCM2TTCN Input: a UCMNavXML file Output: test cases (.ttcn and .mlf) XSL sheet written by Bryan Mulvihill. February 5, 2019 Ali Echihabi – University of Ottawa, SITE
Ali Echihabi – University of Ottawa, SITE UCM2MSC: Previous Work There was a previous work to generate MSC from UCMNavXML using XSL only. The mapping between UCM and MSC was defined. However, the XSL sheet was complicated. Work done by S. Cui February 5, 2019 Ali Echihabi – University of Ottawa, SITE
UCM2XMI: First Approach Input: UCMNavXML A Java class that will parse the input and generate the output. First Step: Generating “pure” XMI Second Step: Adding tool specific diagram information. (learning by example) February 5, 2019 Ali Echihabi – University of Ottawa, SITE
Expressing Parallelism with SD Comments, colors, labels? Comments need to be placed in specific locations (near the beginning and end). Rose discards the location information. Colors are discarded too. Labels are used (p1.s1, p1.s1.p1.s1) February 5, 2019 Ali Echihabi – University of Ottawa, SITE
Parallelism Example for SD February 5, 2019 Ali Echihabi – University of Ottawa, SITE
The Need for an Intermediate Step Both UCM2MSC and UCM2XMI became very complicated, and had many things in common. Putting things in common to (current and future) transformations in one place (e.g. finding instances) will improve code quality. Defect fixing, code maintenance & evolution will become much easier. Steps after the intermediate step should become straight forward (since all info should be ready) February 5, 2019 Ali Echihabi – University of Ottawa, SITE
Ali Echihabi – University of Ottawa, SITE XMLInputTransform Package for the intermediate step. Hides complexity. Responsible for preparing the information needed for the transformations (e.g. instances, messages…) February 5, 2019 Ali Echihabi – University of Ottawa, SITE
UCMExporterXML: Sample 1 February 5, 2019 Ali Echihabi – University of Ottawa, SITE
Advantages of Intermediate Step UCM2MSC became a fairly simple XSL sheet (as XSL is supposed to be used) Same thing for the first step of UCM2XMI The second step of UCM2XMI was not effected. All future improvements will only effect the intermediate step February 5, 2019 Ali Echihabi – University of Ottawa, SITE
XMLInputTransform: A Detailed Look Makes instances and components readily available. Connectors: preserve causality. Preserving causality with parallelism has separate rules. All logic is localized: better maintenance. February 5, 2019 Ali Echihabi – University of Ottawa, SITE
UCMExporterXMLInputTransformer Triggers the transformation (intermediate) step. Asks MessageSynthesizer to identify the messages and connectors. Asks ParallelConnectorMessagesSynthesizer to find connectors related to parallel behavior. February 5, 2019 Ali Echihabi – University of Ottawa, SITE
Ali Echihabi – University of Ottawa, SITE MessageSynthesizer Defines the mapping between UCM and messages and connectors. Mapping is general to cover both MSC and SD. (e.g. is-task, timer-property) Changes in the mapping only effect this class. February 5, 2019 Ali Echihabi – University of Ottawa, SITE
ParallelConnectorMessagesSynthesizer Preserves causality in parallel behavior. A more elaborate parsing of the UCMNavXML compared to MessageSynthesizer. Needs to know what is before, inside, and after a parallel block. Uses XSL to gather that information. Uses Java to insert new connectors February 5, 2019 Ali Echihabi – University of Ottawa, SITE
Parallel Connector Rules: E1 February 5, 2019 Ali Echihabi – University of Ottawa, SITE
Parallel Connector Rules: E2 February 5, 2019 Ali Echihabi – University of Ottawa, SITE
Parallel Connector Rules: E3 February 5, 2019 Ali Echihabi – University of Ottawa, SITE
Parallel Connector Rules: E4 February 5, 2019 Ali Echihabi – University of Ottawa, SITE
UCMExporterXML: Sample 2 Messages keep enough information for the transformations to make decisions. Something that is used only by one transformation can be invisible to others. (thanks to XSL). February 5, 2019 Ali Echihabi – University of Ottawa, SITE
More Features in Intermediate Step Architecture allows for improving intermediate step. Invisible to transformations. By improving the intermediate step we improve the transformations (give them more correct information to work with) February 5, 2019 Ali Echihabi – University of Ottawa, SITE
Generating Descriptive Names Connectors were called m1, m2 We want m1 to mean the same thing in separate MSC. Simple approach: did_X_do_Y Users can customize. February 5, 2019 Ali Echihabi – University of Ottawa, SITE
Customizing Connector Messages Can use a specific protocol for connectors. Can specify own way of naming Can specify protocol between specific instances. February 5, 2019 Ali Echihabi – University of Ottawa, SITE
Parallel Interleaving User might choose to generate all possibilities (for a synthesizer) Goal: Generate one scenario for each possible parallel sequence interleaving. Now doing the simplest possibility: taking sequences in order they are given in UCMNavXML. February 5, 2019 Ali Echihabi – University of Ottawa, SITE
UCMExporter: Sample Use Generate UCMNavXML with UCMNav Generate XMI, MSC, TTCN for the scenarios. Customize the communication patterns with your own XSL. Ask for parallel interleavings (now only the simplest form) View SD with Rational Rose View MSC with Tau 4.4 February 5, 2019 Ali Echihabi – University of Ottawa, SITE
UCMExporter: Big Picture February 5, 2019 Ali Echihabi – University of Ottawa, SITE
Ali Echihabi – University of Ottawa, SITE Demonstration Input: Model simpletelephone ScenarioTLnotActiveSuccess Output MSC, XMI View results Customization example Interleavings February 5, 2019 Ali Echihabi – University of Ottawa, SITE
Ali Echihabi – University of Ottawa, SITE Thank You http://ucmexporter.sourceforge.net February 5, 2019 Ali Echihabi – University of Ottawa, SITE