10OCL - Introduction to OCL Bernhard Beckert U NIVERSITÄT...

Info iconThis preview shows pages 1–14. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Introduction to OCL Bernhard Beckert U NIVERSITÄT K OBLENZ-L ANDAU – p.1 OCL Object Constraint Language • Part of the UML standard. – p.2 OCL Object Constraint Language • Part of the UML standard. • Formal Specification Language. Precise semantics. – p.2 OCL Object Constraint Language • Part of the UML standard. • Formal Specification Language. Precise semantics. • (Quite) easy to read syntax. – p.2 OCL Object Constraint Language • Part of the UML standard. • Formal Specification Language. Precise semantics. • (Quite) easy to read syntax. • Why? Because UML is not enough! – p.2 UML is not enough. . . Person name:String age:int query getName():String birthday() setAge(newAge:int):int Vehicle colour:Colour enumeration Colour black():Colour white():Colour red():Colour Car Bike 1 0..* ownership owner fleet • Possible number of owners a car can have • Required age of car owners • Requirement that a person may own at most one black car – p.3 Some OCL examples I Person name:String age:int query getName():String birthday() setAge(newAge:int):int Vehicle colour:Colour enumeration Colour black():Colour white():Colour red():Colour Car Bike 1 0..* ownership owner fleet “A vehicle owner must be at least 18 years old”: – p.4 Some OCL examples I Person name:String age:int query getName():String birthday() setAge(newAge:int):int Vehicle colour:Colour enumeration Colour black():Colour white():Colour red():Colour Car Bike 1 0..* ownership owner fleet “A vehicle owner must be at least 18 years old”: context Vehicle inv: self. owner. age > = 18 – p.4 Some OCL examples I Person name:String age:int query getName():String birthday() setAge(newAge:int):int Vehicle colour:Colour enumeration Colour black():Colour white():Colour red():Colour Car Bike 1 0..* ownership owner fleet “A vehicle owner must be at least 18 years old”: context Vehicle inv: self . owner. age > = 18 – p.4 Some OCL examples I Person name:String age:int query getName():String birthday() setAge(newAge:int):int Vehicle colour:Colour enumeration Colour black():Colour white():Colour red():Colour Car Bike 1 0..* ownership owner fleet “A vehicle owner must be at least 18 years old”: context Vehicle inv: self. owner . age > = 18 – p.4 Some OCL examples I Person name:String age:int query getName():String birthday() setAge(newAge:int):int Vehicle colour:Colour enumeration Colour black():Colour white():Colour red():Colour Car Bike 1 0..* ownership owner fleet “A vehicle owner must be at least 18 years old”: context Vehicle inv: self. owner. age > = 18 – p.4 Some OCL examples I Person name:String age:int query getName():String birthday() setAge(newAge:int):int Vehicle colour:Colour enumeration Colour black():Colour white():Colour red():Colour Car Bike 1 0..* ownership owner fleet “A vehicle owner must be at least 18 years old”: context Vehicle inv: self. owner. age > = 18 – p.4 Some OCL examples I Person name:String age:int query getName():String...
View Full Document

This note was uploaded on 01/15/2011 for the course ECE 6161 taught by Professor Khkjk during the Winter '10 term at Concordia Canada.

Page1 / 53

10OCL - Introduction to OCL Bernhard Beckert U NIVERSITÄT...

This preview shows document pages 1 - 14. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online