A Versioning Profile for UML 1'x and 2'0 - PowerPoint PPT Presentation

1 / 19
About This Presentation
Title:

A Versioning Profile for UML 1'x and 2'0

Description:

with baseclass attribute ModelElement. and definedTag class Version. HorizontalTrace ... A versioned Model can only contain versioned ModelElements as ownedEle ... – PowerPoint PPT presentation

Number of Views:37
Avg rating:3.0/5.0
Slides: 20
Provided by: mick52
Category:

less

Transcript and Presenter's Notes

Title: A Versioning Profile for UML 1'x and 2'0


1
A Versioning Profile for UML 1.x and 2.0
  • Ragnhild Van Der Straeten
  • Tom Mens

2
Overview
  • Introduction of a versioning profile
  • Specification of profile in UML 1.x
  • Specification of OCL constraints on versioning
    profile in UML 1.x
  • Specification of versioning profile in UML 2.0
  • OCL constraints in the versioning profile in UML
    2.0??

3
Context
4
Versioning Profile in UML1.5
5
Profile conform to Meta-model?
  • VersionedElement
  • is a Stereotype
  • with baseclass attribute ModelElement
  • and definedTag class Version
  • HorizontalTrace
  • is a Stereotype
  • that is a generalisation of the predefined
    stereotype Trace

6
OCL Constraints on the Profile (1)
  • A ltltversionedgtgt Model can only contain
    ltltversionedgtgt ModelElements as ownedEle-
    ments.The version of each ownedElement must equal
    the version of the containing Model.
  • context ModelElement def
  • let isVersionedBoolean
  • self.stereotype-gtname-gtincludes("versioned)
  • let getVersion TaggedValue
  • self.stereotype
  • -gtany(name"versioned").definedTag
  • -gtany(tagType"version").typedValue

7
OCL constraints on the Profile (2)
  • context Model inv
  • self.isVersioned implies
  • self.ownedElement-gtforall(e e.isVersioned and
    (e.getVersion self.getVersion))

8
OCL Constraints on the Profile (3)
  • A ltlthorizontalgtgt Trace can only be specified
    between ltltversionedgtgt clients and ltltversionedgtgt
    suppliers that all have the same version.
  • context Abstraction inv
  • (self.stereotype-gtname-gtincludes(horizontal))
  • implies (self.client-gtunion(self.supplier))-gt
  • forall(e e.isVersioned and (e.getVersion
    self.getVersion))

9
OCL Constraints on UML Profile (4)
  • All suppliers of an ltltevolutiongtgt Trace must be
    ltltversionedgtgt and must have the same version. All
    clients of an ltltevolutiongtgt Trace must be
    ltltversionedgtgt and must have the same version. The
    version of the suppliers must precede the version
    of the clients.

10
OCL Constraints on the UML Profile (5)
  • context Abstraction inv
  • let aSupplier self.supplier-gtany(true)
  • let aClient self.client-gtany(true)
  • in
  • (self.stereotype-gtname-gtincludes("evolution"))
  • implies
  • ((aSupplier.getVersion lt aClient.getVersion)
  • and
  • self.supplier-gtforall(ee.getVersion
  • aSupplier.getVersion)
  • and
  • self.client-gtforall(ee.getVersion
    aClient.getVersion))

11
Migrate Profile to UML 2.0
12
UML 2.0 Metamodel for Profiles
13
Instance Specification
14
Exercise
  • Define the constraints in OCL

15
Our SolutionOCL Constraints (1)
  • context NamedElement deflet isVersionedBoolean
    self.extension.ownedEnd.type-gtname-gtincludes(
    versioned)let getVersionValueSpecification
    self.extension.ownedEnd.type-gtany(nameversion
    ed).ownedAttribute-gtany(nameversion).slot

16
OCL Constraints (2)
  • context Model invself.isVersioned
    implies(self.ownedMember-gtforall(ee.isVersioned
    and (e.getVersion lt self.getVersion))
    andself.ownedMember-gtexists(e.getVersion
    self.getVersion))

17
OCL Constraints (3)
  • context Abstraction inv(self.extension.ownedEnd.
    type-gtname-gtincludes(horizontal))
    implies(self.client-gtunion(self.supplier))-gtfora
    ll(ee.isVersioned and (e.getVersion.predecessor(
    ) self.getVersion.predecessor()))

18
OCL Constraints (4)
  • context Abstraction inv
  • Let aSupplier self.supplier-gtany(true)
  • Let aClient self.client-gtany(true)
    in(self.extension.ownedEnd.type-gtname-gtincludes(
    evolution) implies(aSupplier.getVersion lt
    aClient.getVersion))

19
Example of version ordering
Write a Comment
User Comments (0)
About PowerShow.com