380 likes | 547 Views
ZML: Z family on the web with their UML photos. Sun Jing Supervisor: Dr. Jin Song DONG. Presentation Overview. Motivations Introduction to Z family languages & UML UML Translation Guidelines Formal Models of ZML Implementation issue Conclusion. Motivations.
E N D
ZML: Z family on the web with their UML photos Sun Jing Supervisor: Dr. Jin Song DONG
Presentation Overview • Motivations • Introduction to Z family languages & UML • UML Translation Guidelines • Formal Models of ZML • Implementation issue • Conclusion
Precisely and Visually capture system requirements • Develop a web environment for Z family notations • Share design models • Hyperlinks among models • Advance browsing facilities • Develop projection tool for visualizing Object-Z/TCOZ specifications in UML Diagrams • Use Object-Z to specify and design the essential functionalities of the ZML environment
Z An state-orient formal specification language based on set theory and predicate logic
Object-Z Object oriented extension to Z
TCOZ Integration of Object-Z with Timed CSP
TCOZ Integration of Object-Z with Timed CSP
UML • UML stands for Unified Modeling Language • The UML combines/collects • Data Modeling concepts (Entity Relationship Diagrams) • Business Modeling (work flow) • Object Modeling • Component Modeling • The UML is the standard language for visualizing, specifying, constructing, and documenting the artifacts of a software-intensive system • It can be used with many processes, throughout the development life cycle, and across different implementation technologies
State Diagrams State Diagrams State Diagrams State Diagrams State Diagrams State Diagrams Object Diagrams Component Diagrams Class Diagrams Component Diagrams Component Diagrams Deployment Diagrams Use Case Diagrams Use Case Diagrams Scenario Diagrams Scenario Diagrams Use Case Diagrams Use Case Diagrams Scenario Diagrams Scenario Diagrams Use Case Diagrams Sequence Diagrams Statechart Diagrams Collaboration Diagrams Models, Views, and Diagrams Models Activity Diagrams
Linkage between Object-Z/TCOZ &UML • Static view Class / Class diagram • Collaboration view Communication / Collaboration diagram • Dynamic view operation/ statechart diagram
Static View class
Static View Inheritance
Static View Aggregation
Static View Association
Collaboration View Synchronized Communication
Collaboration View Asynchronized Communication
Dynamic View More ...
Basic idea • ZML – Define a customized XML for Z family languages for web-browsing purpose • UML tool – Rational Rose 2000 supports XMI import/export according to UML.DTD • Therefore, our translation rules are applied using XSLT techniques to automatically translate Object-Z/TCOZ model(XML) to UML diagrams(XMI) and vice versa
Syntax definition <ElementType name="op" content="eltOnly" order="seq"> <element type="name" minOccurs="1" maxOccurs="1"/> <element type="delta" minOccurs="0" maxOccurs="1"/> <element type="decl" minOccurs="0" maxOccurs="*"/> <element type="predicate" minOccurs="0" maxOccurs="*"/> … </ElementType> <ElementType name="classdef" content="eltOnly"> <element type=“state" minOccurs=“1" maxOccurs=“1"/> <element type=“init" minOccurs="0" maxOccurs=“1"/> <element type="op" minOccurs="0" maxOccurs="*"/> … </ElementType> XML Schema
Syntax definition <!ELEMENT Foundation.Core.Class ( Foundation.Core.ModelElement.name, Foundation.Core.ModelElement.visibility, Foundation.Core.GeneralizableElement.isRoot, Foundation.Core.GeneralizableElement.isLeaf, Foundation.Core.GeneralizableElement.isAbstract, Foundation.Core.Class.isActive, XMI.extension*, Foundation.Core.ModelElement.constraint*, Foundation.Core.ModelElement.requirement*, Foundation.Core.ModelElement.provision*, Foundation.Core.ModelElement.stereotype*, …> UML DTD
XSL Transformation <xsl:template match="classdef[@layout='simpl'] classdef[@layout='gen']"> <html> … <a><xsl:attribute name="name"><xsl:value-of select="name"/></xsl:attribute></a> … <xsl:apply-templates select="state"/> <xsl:apply-templates select="init"/> <xsl:apply-templates select="op"/> … </html> </xsl:template> Web browsing
XSL Transformation UML class diagram projection <xsl:variable name="AggregationNo" select=‘position()'/> <xsl:choose> <xsl:when test = "//classdef[$classNo]/name =./type"> <![CDATA[ <Foundation.Core.AssociationEnd xmi.idref=‘ ]]> <xsl:value-of select="concat(‘G.',1 + $AggregationNo*3)"/><![CDATA[ '/> ]]> </xsl:when> <xsl:when test = "//classdef[$classNo]/state/decl/dtype/type = ./type"> <![CDATA[ <Foundation.Core.AssociationEnd xmi.idref=‘ ]]> <xsl:value-of select="concat(‘G.',1+$AggregationNo*3-1)"/><![CDATA[ '/> ]]> </xsl:when> </xsl:choose>
Case study – Queue example <classdef layout="simpl" align="left"> <name>ActiveQueue</name> <inherit><type>Queue</type></inherit> <state> <decl> <name>in, out</name> <dtype><type>&chan;</type></dtype> </decl> … </state> <op layout="calc"> <name>Join</name> … ActiveQueue in ZML
Case study – Queue example ActiveQueue on Web
Case study – Queue example <Association xmi.id='G.2'> <name /> <connection> <AssociationEnd xmi.id='G.3'> <name /> <multiplicity>1</multiplicity> <type><xmi.idref='S.10010'/><!-- TwoActiveQueues --></type> </AssociationEnd> <AssociationEnd xmi.id="G.4"> <name /> <multiplicity>1..*</multiplicity> <type><xmi.idref="S.10001" /><!-- ActiveQueue --> </type> </AssociationEnd> </connection> </Association> TwoActiveQueue & ActiveQueue in XMI
Case study – Queue example Queues in UML
Conclusions • XML/XSL approach to the development of a web environment for Z family languages • Auto type referencing • Schema calculus and Inheritance expansions • Semantic links and projections between Object-Z/TCOZ with UML diagrams • A formal approach to modeling web applications • A standard XML environment for all formal notations – Formal specification Markup Language (FML)