Formal specification to UML transformation demo


Please Note:


Introduction

This formal specification to UML transformation technique can be applied to Object-Z and Timed Communicating Object Z (an integrated formal techniques combining Object-Z and Timed-CSP).

The aim to transform formal models to a visual notation--- UML model. Currently, only transformation of the static views to class diagrams is implemented. The formal specification is written in XML (instead of the usual way---LaTeX), while with the emergence of XMI (XML Metadata Interchange), it becomes possible to build up an interchange of UML with other standards. The UML tool Rational Rose partially supports XML file Inport/Export. (To add this feature to your Rational Rose 2000, you have to download and install the Add-in built by Unisys Corporation.)

Therefore,XSLT technology is chosen to realize our tranformation rules, tranforming XML (formal model) to XMI (UML).


Formal model in TCOZ

In this demo, a TCOZ model for Light-Control system is used as an example. Because of the space limitation, in this page I only show you a small part of the specificaitons. To view the complete specification of the whole system, please click here.

Light
dim: Percent actuator
on:
TurningOndim := 100; on := true
TurningOffdim := 0; on := false

ControlledLight
Light
button, dimmer: chan
ButtonPushingbutton?1→([dim>0]∙ TurningOff ☐ [dim=0]∙ TurningOn )
DimChange[n : Percent ]∙dimmer?n→([on]∙dim:=n ☐ [¬on]∙SKIP)
MAINμN ∙ ( ButtonPushingDimChange ); N

The TCOZ specifications are written in XML, whose structures are defined in the XML Schema file objectZschema.xml.

Click here to view XML source for the small part above.

Click here to view XML source for the complete model of the light control system.


Transformation