Software Design, Modelling and Analysis in UML

Size: px
Start display at page:

Download "Software Design, Modelling and Analysis in UML"

Transcription

1 Software Design, Modelling and Analysis in UML Lecture 03: Object Constraint Language (OCL) main Prof. Dr. Andreas Podelski, Dr. Bernd Westphal Albert-Ludwigs-Universität Freiburg, Germany

2 Contents & Goals Last Lecture: Basic Object System Signature Ë and Structure Sprelim System State σ Σ Ë (Smells like they re related to class/object diagrams, officially we don t know yet...) This Lecture: Educational Objectives: Capabilities for these tasks/questions: Please explain this OCL constraint. Please formalise this constraint in OCL. Does this OCL constraint hold in this system state? Can you think of a system state satisfying this constraint? Please un-abbreviate all abbreviations in this OCL expression. In what sense is OCL a three-valued logic? For what purpose? How are (C) and τ C related? Content: OCL Syntax, OCL Semantics over system states 2/36

3 What is OCL? And What is It Good For? 3/ main

4 What is OCL? How Does it Look Like? OCL: Object Constraint Logic Swhatis OCL/Beispiel TeamMember name : String age : Integer 2..* meetings participants * Meeting title : String numparticipants : Integer start : Date duration: Time move(newstart : Date) context TeamMember inv: age => 18 context Meeting inv: duration > 0 * 1 Location name : String ((C) Prof. Dr. P. Thiemann, 4/36

5 What s It Good For? Most prominent: write down requirements supposed to be satisfied by all system states. Often targeting all alive objects of a certain class Swhatis 5/36

6 What s It Good For? Most prominent: write down requirements supposed to be satisfied by all system states. Often targeting all alive objects of a certain class. Not unknown: write down pre/post-conditions of methods (Behavioural Features). Then evaluated over two system states Swhatis 5/36

7 What s It Good For? Most prominent: write down requirements supposed to be satisfied by all system states. Often targeting all alive objects of a certain class. Not unknown: write down pre/post-conditions of methods (Behavioural Features). Then evaluated over two system states. Common with State Machines: guards in transitions Swhatis 5/36

8 What s It Good For? Most prominent: write down requirements supposed to be satisfied by all system states. Often targeting all alive objects of a certain class Swhatis Not unknown: write down pre/post-conditions of methods (Behavioural Features). Then evaluated over two system states. Common with State Machines: guards in transitions. Lesser known: provide operation bodies. 5/36

9 What s It Good For? Most prominent: write down requirements supposed to be satisfied by all system states. Often targeting all alive objects of a certain class Swhatis Not unknown: write down pre/post-conditions of methods (Behavioural Features). Then evaluated over two system states. Common with State Machines: guards in transitions. Lesser known: provide operation bodies. Metamodeling: the UML standard is a MOF-Model of UML. OCL expressions define well-formedness of UML models (cf. Lecture 21). 5/36

10 Plan. Today: OCLExpressions(Ë The set ) of OCL Ë expressions over. Given an OCL expression expr, a system state σ Σ, and a valuation of Ë logical variables β, define IÂexpr Ã(σ, β) {true, false, }. Later: use I to define = Σ Ë OCLExpressions(Ë ). UML W N E OCL Diagram CD, SM ϕ OCL CD, SD S Swhatis Model Instances Ë = (Ì,, V,atr), SM (Σ Ë, A Ë, SM ) = M expr (σ 0, ε 0 ) (cons0,snd0) (σ 1, ε 1 ) (cons1,snd1)... G = (N, E, f) Ë,SD B = (Q SD, q 0, A Ë, SD, F SD ) Mathematics Class Diagram Composite Structure Diagram Structure Diagram Component Diagram Deployment Diagram Object Diagram Package Diagram Activity Diagram Sequence Diagram 6/36 Interacti Diagram

11 (Core) OCL Syntax [OMG, 2006] 7/ main

12 OCL Syntax 1/4: Expressions Where, given Ë = (Ì,, V,atr), expr ::= w : τ(w) W {self C C } is a set of typed logical variables, w has type τ(w) Soclsyn expr 1 = τ expr 2 : τ τ Bool oclisundefined τ (expr 1 ) : τ Bool {expr 1,...,expr n } : τ τ Set(τ) isempty(expr 1 ) : Set(τ) Bool size(expr 1 ) : Set(τ) Int allinstances C : Set(τ C ) v(expr 1 ) : τ C τ(v) r 1 (expr 1 ) : τ C τ D r 2 (expr 1 ) : τ C Set(τ D ) τ is any type Ì from T B T {Set(τ 0 ) τ 0 T B T } T B is a set of basic types, in the following we use T B = {Bool,Int,String} T = {τ C C } is the set of object types, Set(τ 0 ) denotes the set-of-τ 0 type for τ 0 T B T (sufficient because of flattening (cf. standard)) v : τ(v) atr(c), τ(v) Ì, r 1 : D 0,1 atr(c), r 2 : D atr(c), C, D. 8/36

13 OCL Syntax: Notational Conventions for Expressions Each expression ω(expr 1,expr 2,...,expr n ) : τ 1 τ n τ may alternatively be written ( abbreviated as ) expr 1. ω(expr 2,...,expr n ) if τ 1 is an object type, i.e. if τ 1 T. expr 1 -> ω(expr 2,...,expr n ) if τ 1 is a collection type (here: only sets), i.e. if τ 1 = Set(τ 0 ) for some τ 0 T B T. Examples: (self : τ C W; v,w : Int V ; r 1 : D 0,1, r 2 : D V ) self. v Soclsyn self. r 1. w self. r 2 -> isempty 9/36

14 OCL Syntax 2/4: Constants, Arithmetical Operators For example: expr ::=... true, false : Bool expr 1 {and, or, implies} expr 2 : Bool Bool Bool not expr 1 : Bool Bool 0, 1, 1, 2, 2,... : Int OclUndefined : τ expr 1 {+,,... } expr 2 : Int Int Int expr 1 {<,,... } expr 2 : Int Int Bool Soclsyn Generalised notation: expr ::= ω(expr 1,...,expr n ) with ω {+,,... } : τ 1 τ n τ 10/36

15 OCL Syntax 3/4: Iterate expr ::= expr 1 ->iterate(w 1 : τ 1 ; w 2 : τ 2 = expr 2 expr 3 ) or, with a little renaming, expr ::= expr 1 ->iterate(iter : τ 1 ; result : τ 2 = expr 2 expr 3 ) Soclsyn where expr 1 is of a collection type (here: a set Set(τ 0 ) for some τ 0 ), iter W is called iterator, gets type τ 1 (if τ 1 is omitted, τ 0 is assumed as type of iter) result W is called result variable, gets type τ 2, expr 2 in an expression of type τ 2 giving the initial value for result, ( OclUndefined if omitted) expr 3 is an expression of type τ 2 in which in particular iter and result may appear. 11/36

16 Iterate: Intuitive Semantics (Formally: later) expr ::= expr 1 ->iterate(iter : τ 1 ; result : τ 2 = expr 2 expr 3 ) Soclsyn τ 0 hlp = expr 1 ; τ 2 result = expr 2 ; while (!hlp.empty()) do od τ 1 iter = hlp.pop(); result = expr 3 ; Note: In our (simplified) setting, we always have expr 1 : Set(τ 1 ) and τ 0 = τ 1. In the type hierarchy of full OCL with inheritance and oclany, they may be different and still type consistent. 12/36

17 Abbreviations on Top of Iterate expr ::= expr 1 ->iterate(w 1 : τ 1 ; w 2 : τ 2 = expr 2 expr 3 ) expr 1 ->forall(w : τ 1 expr 3 ) is an abbreviation for expr 1 ->iterate(w: τ 1 ; w 1 : Bool = true w 1 expr 3 ). (To ensure confusion, we may again omit all kinds of things, cf. [OMG, 2006]) Soclsyn Similar: expr 1 ->Exists(w : τ 1 expr 3 ) 13/36

18 OCL Syntax 4/4: Context context ::= context w 1 : τ 1,...,w n : τ n inv : expr where w W and τ i T, 1 i n, n Soclsyn context w 1 : C 1,...,w n : C n inv : expr is an abbreviation for allinstances C1 ->forall(w 1 : C 1... allinstances Cn -> forall(w n : C n expr )... ) 14/36

19 Context: More Notational Conventions For context self : τ C inv : expr we may alternatively write ( abbreviate as ) context τ C inv : expr Soclsyn Within the latter abbreviation, we may omit the self in expr, i.e. for self.v and self.r we may alternatively write ( abbreviate as ) v and r 15/36

20 Examples (from lecture Softwaretechnik 2008 ) OCL/Beispiel TeamMember name : String age : Integer 2..* meetings participants * Meeting title : String numparticipants : Integer start : Date duration: Time move(newstart : Date) context TeamMember inv: age => 18 context Meeting inv: duration > 0 * 1 Location name : String ((C) Prof. Dr. P. Thiemann, Soclsyn 16/36

21 Examples (from lecture Softwaretechnik 2008 ) OCL/Mehr Navigation/Beispiele TeamMember name : String age : Integer 2..* meetings participants * Meeting title : String numparticipants : Integer start : Date duration: Time move(newstart : Date) context Meeting inv: self.participants->size() = numparticipants context Location inv: name="lobby" implies meeting->isempty() * 1 Location name : String ((C) Prof. Dr. P. Thiemann, Soclsyn 17/36

22 Example (from lecture Softwaretechnik 2008 ) TeamMember name : String age : Integer 2..* meetings participants * Meeting title : String numparticipants : Integer start : Date duration: Time * 1 Location name : String move(newstart : Date) context Meeting inv : participants -> iterate(i : TeamMember; n : Int = 0 n + i. age) /participants -> size() > Soclsyn 18/36

23 Not Interesting Among others: Enumeration types Type hierarchy Complete list of arithmetical operators The two other collection types Bag and Sequence Casting Runtime type information Pre/post conditions (maybe later, when we officially know what an operation is) Soclsyn 19/36

24 OCL Semantics [OMG, 2006] 20/ main

25 The Task OCL Syntax 1/4: Expressions expr ::= w : τ(w) Where, given Ë = (Ì,, V,atr), W {self } is a set of typed logical variables, w has type τ(w) Soclsyn expr 1 = τ expr 2 : τ τ Bool oclisundefined τ (expr 1 ) : τ Bool {expr 1,...,expr n } : τ τ Set(τ) isempty(expr 1 ) : Set(τ) Bool size(expr 1 ) : Set(τ) Int allinstances C : Set(τ C ) v(expr 1 ) : τ C τ(v) r 1 (expr 1 ) : τ C τ D r 2 (expr 1 ) : τ C Set(τ D ) τ is any type Ì from T B T {Set(τ 0 ) τ 0 T B T } T B is a set of basic types, in the following we use T B = {Bool,Int,String} T = {τ C C } is the set of object types, Set(τ 0 ) denotes the set-of-τ 0 type for τ 0 T B T (sufficient because of flattening (cf. standard)) v : τ(v) atr(c), τ(v) Ì, r 1 : D 0,1 atr(c), r 2 : D atr(c), C, D. 7/ Soclsem Given an OCL expression expr, a system state σ Σ Ë, and a valuation of logical variables β, define IÂ Ã(, ) : OCLExpressions(Ë ) Σ Ë (W I(Ì T B T )) I(Bool) such that IÂexpr Ã(σ, β) {true, false, Bool }. 21/36

26 Basically business as usual... (i) Equip each OCL (!) basic type with a reasonable domain, i.e. define function I on T B dom(i) (iv) Equip each arithmetical operation with a reasonable interpretation (that is, with a function operating on the corresponding domains). I.e. define function I on Soclsem (ii) Equip each object type τ C with a reasonable domain, i.e. define function I on τ C dom(i) (most reasonable: (C) as determined by structure of Ë ). (iii) Equip each set type Set(τ 0 ) with reasonable domain, i.e. define function I on {Set(τ 0 ) τ 0 T B T } dom(i) {+,,,... } dom(i), e.g., I(+) I(Int) I(Int) I(Int) (v) Set operations similar: Define function I on {isempty,... } dom(i) (vi) Equip each expression with a reasonable interpretation, i.e. define function I on I : Expr Σ Ë (W I(Ì T B T ))...except for OCL being a three-valued logic, and the iterate expression. I(Bool) 22/36

27 (i) Domains of Basic Types Recall: T B = {Bool,Int,String} We set: I(Bool) := {true,false} { Bool } I(Int) := Z { Int } I(String) :=... { String } We may omit index τ of τ if it is clear from context Soclsem 23/36

28 (ii) Domains of Object and (iii) Set Types Now we need a structure of our signature Ë = (Ì,, V,atr). Recall: assigns an (infinite) domain (C) to each class C. Let τ C be an (OCL) object type for a class C. We set I(τ C ) := (C) { τc } Soclsem Let τ be a type from T B T. We set I(Set(τ)) := 2 I(τ) { Set(τ) } Note: in the OCL standard, only finite subsets of I(τ). But infinity doesn t scare us, so we simply allow it. 24/36

29 Basically business as usual... (i) Equip each OCL (!) basic type with a reasonable domain, i.e. define function I on T B dom(i) (iv) Equip each arithmetical operation with a reasonable interpretation (that is, with a function operating on the corresponding domains). I.e. define function I on Soclsem (ii) Equip each object type τ C with a reasonable domain, i.e. define function I on τ C dom(i) (most reasonable: (C) as determined by structure of Ë ). (iii) Equip each set type Set(τ 0 ) with reasonable domain, i.e. define function I on {Set(τ 0 ) τ 0 T B T } dom(i) {+,,,... } dom(i), e.g., I(+) I(Int) I(Int) I(Int) (v) Set operations similar: Define function I on {isempty,... } dom(i) (vi) Equip each expression with a reasonable interpretation, i.e. define function I on I : Expr Σ Ë (W I(Ì T B T ))...except for OCL being a three-valued logic, and the iterate expression. I(Bool) 25/36

30 (iv) Interpretation of Arithmetic Operations Soclsem Literals map to fixed values: I(true) := true, I(false) := false, I(0) := 0, I(1) := 1,... I(OclUndefined τ ) := τ Boolean operations (defined point-wise for x 1, x 2 I(τ)): true, if x 1 τ x 2 and x 1 = x 2 I(= τ )(x 1,x 2 ) := false, if x 1 τ x 2 and x 1 x 2, otherwise Bool Integer operations (defined point-wise for x 1, x 2 I(Int)): { x 1 + x 2, if x 1 = x 2 I(+)(x 1, x 2 ) :=, otherwise Note: There is a common principle. Namely, the interpretation of an operation ω : τ 1...τ n τ is a function I(ω) : I(τ 1 ) I(τ n ) I(τ) on corresponding semantical domain(s). 26/36

31 (iv) Interpretation of OclIsUndefined The is-undefined predicate (defined point-wise for x I(τ)): { true, if x = τ I(oclIsUndefined τ )(x) := false, otherwise Soclsem 27/36

32 (v) Interpretation of Set Operations Soclsem Basically the same principle as with arithmetic operations... Let τ T B T. Set comprehension (x 1,...,x n I(τ)): I({} τ n)(x 1,...,x n ) := {x 1,...,x n } for all n N 0 Empty-ness check (x I(Set(τ))): true I(isEmpty τ )(x) := false Bool, if x =, if x = Set(τ), otherwise Counting (x I(Set(τ))): I(size τ )(x) := x if x Set(τ) and Int otherwise 28/36

33 (vi) Putting It All Together: Semantics of Expressions Task: Given OCL expression expr, system state σ Σ Ë, and valuation β, define IÂ Ã(, ) : OCLExpressions(Ë ) Σ Ë (W I(Ì T B T )) I(Bool) such that IÂexpr Ã(σ,β) {true, false, Bool }. OCL Syntax 1/4: Expressions expr ::= w : τ(w) Where, given Ë = (Ì,, V,atr), W {self } is a set of typed logical variables, w has type τ(w) OCL Syntax 2/4: Constants, Arithmetical Operators For example: Soclsem Soclsyn expr 1 = τ expr 2 : τ τ Bool oclisundefined τ (expr 1 ) : τ Bool {expr 1,...,expr n } : τ τ Set(τ) isempty(expr 1 ) : Set(τ) Bool size(expr 1 ) : Set(τ) Int allinstances C : Set(τ C ) v(expr 1 ) : τ C τ(v) r 1 (expr 1 ) : τ C τ D r 2 (expr 1 ) : τ C Set(τ D ) OCL Syntax 3/4: Iterate τ is any type Ì from T B T {Set(τ 0) τ 0 T B T } T B is a set of basic types, in the following we use T B = {Bool,Int,String} = {τ C C } is the set of object types, Set(τ 0) denotes the set-of-τ 0 type for τ 0 T B true, false expr 1 {and, or, implies} expr 2 not expr 1 0, 1, 1, 2, 2,... OclUndefined expr 1 {+,,... } expr 2 : Bool : Bool Bool Bool : Bool Bool : Int : τ : Int Int Int (sufficient because of flattening (cf. standard)) expr 1 {<,,... } expr 2 : Int Int Bool v : τ(v) atr(c), τ(v), Generalised notation: r 1 : D 0,1 atr(c), r 2 : D atr(c), C, D. expr ::= expr 1 ->iterate(w 1 : τ 1 ; w 2 : τ 2 = expr 2 expr 3 ) or, with a little renaming, expr ::= expr 1 ->iterate(iter : τ 1 ; result : τ 2 = expr 2 expr 3 ) Soclsyn 7/30 expr ::=... expr ::= ω(expr 1,...,expr n ) with ω {+,,... } OCL Syntax 4/4: Context : τ 1 τ n τ context ::= context w 1 : τ 1,...,w n : τ n inv : expr where w W and τ i T, 1 i n, n 0. 9/32 29/36

34 Preliminaries: Valuations of Logical Variables Recall: we have typed logical variables (w ) W, τ(w) is the type of w. By β, we denote a valuation of the logical variables, i.e. for each w W, β(w) I(τ(w)) Soclsem 30/36

35 (vi) Putting It All Together... expr ::= w ω(expr 1,...,expr n ) allinstances C v(expr 1 ) r 1 (expr 1 ) r 2 (expr 1 ) expr 1 ->iterate(v 1 : τ 1 ; v 2 : τ 2 = expr 2 expr 3 ) IÂwÃ(σ, β) := β(w) IÂω(expr 1,...,expr n )Ã(σ, β) := I(ω)(IÂexpr 1 Ã(σ, β),...iâexpr n Ã(σ, β)) IÂallInstances C Ã(σ, β) := dom(σ) (C) Note: in the OCL standard, dom(σ) is assumed to be finite. Again: doesn t scare us Soclsem 31/36

36 (vi) Putting It All Together... expr ::= w ω(expr 1,...,expr n ) allinstances C v(expr 1 ) r 1 (expr 1 ) r 2 (expr 1 ) expr 1 ->iterate(v 1 : τ 1 ; v 2 : τ 2 = expr 2 expr 3 ) Soclsem Assume expr 1 : τ C for some C. Set u 1 := IÂexpr 1 Ã(σ, β) (τ C ). { σ(u 1 )(v), if u 1 dom(σ) IÂv(expr 1 )Ã(σ, β) :=, otherwise IÂr 1 (expr 1 )Ã(σ, β) := IÂr 2 (expr 1 )Ã(σ, β) := { u, if u 1 dom(σ) and σ(u 1 )(r 1 ) = {u}, otherwise { σ(u 1 )(r 2 ), if u 1 dom(σ), otherwise (Recall: σ evaluates r 2 of type C to a set) 31/36

37 (vi) Putting It All Together... expr ::= w ω(expr 1,...,expr n ) allinstances C v(expr 1 ) r 1 (expr 1 ) r 2 (expr 1 ) expr 1 ->iterate(v 1 : τ 1 ; v 2 : τ 2 = expr 2 expr 3 ) Soclsem IÂexpr 1 ->iterate(v 1 : τ 1 ; v 2 : τ 2 = expr 2 expr 3 )Ã(σ, β) { IÂexpr := 2 Ã(σ,β), if IÂexpr 1 Ã(σ, β) = iterate(ṽ 1, v 1, v 2,expr 3, σ, β ), otherwise where β = β[ṽ 1 IÂexpr 1 Ã(σ,β) \ {x},v 1 x, v 2 IÂexpr 2 Ã(σ, β)] and { β(v 2 ), if β(ṽ 1 ) = iterate(ṽ 1, v 1,v 2,expr 3, σ,β) = iterate(ṽ 1, v 1, v 2,expr 3, σ,β ), otherwise where β = β[ṽ 1 β(v 1 ) \ {x},v 1 x, v 2 IÂexpr 3 Ã(σ, β)], x β(ṽ 1 ) Quiz: Is (our) I a function? Not if the outcome depends on order of choice of the x! 31/36

38 Example TeamMember name : String age : Integer 2..* meetings participants * Meeting title : String numparticipants : Integer start : Date duration: Time move(newstart : Date) context TeamMember inv: age => 18 context Meeting inv: duration > 0 * 1 Location name : String ((C) Prof. Dr. P. Thiemann, Soclsem 32/36

39 Outlook on Type Theory 33/ main

40 Well-Typedness... Note: in the definition of I, we have silently assumed that expressions are well-typed. Which is somewhat clear from the typed syntax. For instance, is obviously well-typed, while is not (if r : D ). context C inv : r-> size() + 1 context C inv : r Soutlook In Lecture 06: A precise definition of well-typed expressions using basic type theory. Why so late? Consider visibility of attributes in one go. 34/36

41 References 35/ main

42 References [OMG, 2006] OMG (2006). Object Constraint Language, version 2.0. Technical Report formal/ [OMG, 2007a] OMG (2007a). Unified modeling language: Infrastructure, version Technical Report formal/ [OMG, 2007b] OMG (2007b). Unified modeling language: Superstructure, version Technical Report formal/ [Warmer and Kleppe, 1999] Warmer, J. and Kleppe, A. (1999). The Object Constraint Language. Addison-Wesley main 36/36

Software Design, Modelling and Analysis in UML

Software Design, Modelling and Analysis in UML Software Design, Modelling and Analysis in UML Lecture 03: Object Constraint Language (OCL) 2012-10-30 03 2012-10-30 main Prof. Dr. Andreas Podelski, Dr. Bernd Westphal Albert-Ludwigs-Universität Freiburg,

More information

Software Design, Modelling and Analysis in UML

Software Design, Modelling and Analysis in UML Software Design, Modelling and Analysis in UML Lecture 03: Object Constraint Language (OCL) 2013-10-28 03 2013-10-28 main Prof. Dr. Andreas Podelski, Dr. Bernd Westphal Albert-Ludwigs-Universität Freiburg,

More information

Software Design, Modelling and Analysis in UML

Software Design, Modelling and Analysis in UML Software Design, Modelling and Analysis in UML Lecture 03: Object Constraint Language (OCL) 2013-10-28 03 2013-10-28 main Prof. Dr. Andreas Podelski, Dr. Bernd Westphal Albert-Ludwigs-Universität Freiburg,

More information

Lecture 03: Object Constraint Language

Lecture 03: Object Constraint Language Software Design, Modelling and Analysis in UML Lecture 03: Object Constraint Language 2016-10-27 Prof. Dr. Andreas Podelski, Dr. Bernd Westphal Albert-Ludwigs-Universität Freiburg, Germany 03 2016-10-27

More information

Software Design, Modelling and Analysis in UML

Software Design, Modelling and Analysis in UML Software Design, Modelling and Analysis in UML Lecture 07: A Type System for Visibility 2013-11-18 07 2013-11-18 main Prof. Dr. Andreas Podelski, Dr. Bernd Westphal Albert-Ludwigs-Universität Freiburg,

More information

Software Design, Modelling and Analysis in UML

Software Design, Modelling and Analysis in UML Software Design, Modelling and Analysis in UML Lecture 02: Semantical Model 2013-10-23 02 2013-10-23 main Prof. Dr. Andreas Podelski, Dr. Bernd Westphal Albert-Ludwigs-Universität Freiburg, Germany Contents

More information

Software Design, Modelling and Analysis in UML

Software Design, Modelling and Analysis in UML Software Design, Modelling and Analysis in UML Lecture 06: Class Diagrams I 2013-11-11 Prof. Dr. Andreas Podelski, Dr. Bernd Westphal Albert-Ludwigs-Universität Freiburg, Germany Course Map UML W N E Model

More information

Software Design, Modelling and Analysis in UML

Software Design, Modelling and Analysis in UML Software Design, Modelling and Analysis in UML Lecture 06: Class Diagrams I 2013-11-11 06 2013-11-11 main Prof. Dr. Andreas Podelski, Dr. Bernd Westphal Albert-Ludwigs-Universität Freiburg, Germany Course

More information

Software Design, Modelling and Analysis in UML

Software Design, Modelling and Analysis in UML Software Design, Modelling and Analysis in UML Lecture 05: Class Diagrams I 2012-11-07 05 2012-11-07 main Prof. Dr. Andreas Podelski, Dr. Bernd Westphal Albert-Ludwigs-Universität Freiburg, Germany Course

More information

Software Design, Modelling and Analysis in UML

Software Design, Modelling and Analysis in UML Software Design, Modelling and Analysis in UML Lecture 07: Class Diagrams II 2009-11-12 07 2009-11-12 main Prof. Dr. Andreas Podelski, Dr. Bernd Westphal Albert-Ludwigs-Universität Freiburg, Germany Contents

More information

Software Design, Modelling and Analysis in UML

Software Design, Modelling and Analysis in UML ourse Map ontents & Goals UML W N E Last Lecture: OL Semantics Software Design, Modelling and Analysis in UML Lecture 05: lass Diagrams I 2011-11-15 Prof. Dr. Andreas Podelski, Dr. Bernd Westphal Albert-Ludwigs-Universität

More information

Lecture 15: Hierarchical State Machines I

Lecture 15: Hierarchical State Machines I Software Design, Modelling and Analysis in UML Lecture 15: Hierarchical State Machines I 2015-01-08 Prof. Dr. Andreas Podelski, Dr. Bernd Westphal 15 2015-01-08 main Albert-Ludwigs-Universität Freiburg,

More information

Lecture 02: Semantical Model

Lecture 02: Semantical Model Software Design, Modelling and Analysis in UML Lecture 02: Semantical Model 2014-10-23 02 2014-10-23 main Prof. Dr. Andreas Podelski, Dr. Bernd Westphal Albert-Ludwigs-Universität Freiburg, Germany Contents

More information

Lecture 07: Class Diagrams II

Lecture 07: Class Diagrams II Software Design, Modelling and Analysis in UML Lecture 07: lass Diagrams II 2014-11-13 Prof. Dr. Andreas Podelski, Dr. Bernd Westphal Albert-Ludwigs-Universität Freiburg, Germany ontents & Goals Last Lecture:

More information

Software Design, Modelling and Analysis in UML

Software Design, Modelling and Analysis in UML Software Design, Modelling and Analysis in UML Lecture 20: Inheritance III 2012-02-14 20 2012-02-14 main Prof. Dr. Andreas Podelski, Dr. Bernd Westphal Albert-Ludwigs-Universität Freiburg, Germany Contents

More information

Lecture 10: State Machines Overview

Lecture 10: State Machines Overview Software Design, Modelling and Analysis in UML Lecture 10: State Machines Overview 2015-12-03 10 2015-12-03 main Prof. Dr. Andreas Podelski, Dr. Bernd Westphal Albert-Ludwigs-Universität Freiburg, Germany

More information

/50 5/50 2/50 3/50 6/50. UML-Notationsübersicht. Teil 1/4. Figure Examples of navigable ends. enda. endb main

/50 5/50 2/50 3/50 6/50. UML-Notationsübersicht. Teil 1/4. Figure Examples of navigable ends. enda. endb main a c e g i b d f h j * * Software Design, Modelling and Analysis in UML Lecture 07: Class Diagrams II 20--30 Prof. Dr. Andreas Podelski, Dr. Bernd Westphal Albert-Ludwigs-Universität Freiburg, Germany UML

More information

Software Engineering

Software Engineering Software Engineering Lecture 15: OCL Peter Thiemann University of Freiburg, Germany 01.07.2013 Peter Thiemann (Univ. Freiburg) Software Engineering 01.07.2013 1 / 28 What is OCL? OCL = Object Constraint

More information

What is OCL? OCL/Context

What is OCL? OCL/Context What is? Software Engineering Lecture 5: Prof. Dr. Peter Thiemann Universität Freiburg SS 20 = object constraint language standard query language of UML 2 specify expressions and constraints in object-oriented

More information

Software Design, Modelling and Analysis in UML

Software Design, Modelling and Analysis in UML Software Design, Modelling and Analysis in UML Lecture 08: Class Diagrams II 2013-11-20 08 2013-11-20 main Prof. Dr. Andreas Podelski, Dr. Bernd Westphal Albert-Ludwigs-Universität Freiburg, Germany Contents

More information

Lecture 16: Hierarchical State Machines II

Lecture 16: Hierarchical State Machines II Software Design, Modelling and Analysis in UML Lecture 6: Hierarchical State Machines II 206-0-9 6 206-0-9 main Prof. Dr. Andreas Podelski, Dr. Bernd Westphal Albert-Ludwigs-Universität Freiburg, Germany

More information

Metamodeling. Janos Sztipanovits ISIS, Vanderbilt University

Metamodeling. Janos Sztipanovits ISIS, Vanderbilt University Metamodeling Janos ISIS, Vanderbilt University janos.sztipanovits@vanderbilt.edusztipanovits@vanderbilt edu Content Overview of Metamodeling Abstract Syntax Metamodeling Concepts Metamodeling languages

More information

Specification with OCL

Specification with OCL Specification with OCL Jurriaan Hage Slides adapted from Birgit Demuth, TU Dresden e-mail: jur@cs.uu.nl homepage: http://www.cs.uu.nl/people/jur/ Department of Information and Computing Sciences, Universiteit

More information

Unified Modeling Language 2

Unified Modeling Language 2 Unified Modeling Language 2 Profiles 166 Usage scenarios Metamodel customization for adapting terminology to a specific platform or domain adding (visual) notation adding and specializing semantics adding

More information

Index. business modeling syntax 181 business process modeling 57 business rule 40

Index. business modeling syntax 181 business process modeling 57 business rule 40 OCL.book Page 203 Tuesday, July 22, 2003 9:48 PM Index Symbols OclAny, of 167 = OclAny, of 167 @pre 34, 86, 155 ^ 34, 156 ^^ 157 A abstract syntax 93 accumulator 153 action in statechart 56 activity

More information

Softwaretechnik Model Driven Architecture Meta Modeling

Softwaretechnik Model Driven Architecture Meta Modeling Softwaretechnik Model Driven Architecture Meta Modeling Prof. Dr. Peter Thiemann Universität Freiburg 22.06.2009 PT (Univ. Freiburg) Softwaretechnik Model Driven Architecture Meta Modeling 22.06.2009 1

More information

Semantics of programming languages

Semantics of programming languages Semantics of programming languages Informatics 2A: Lecture 27 John Longley School of Informatics University of Edinburgh jrl@inf.ed.ac.uk 21 November, 2011 1 / 19 1 2 3 4 2 / 19 Semantics for programming

More information

Specification-based Testing of Embedded Systems H. Schlingloff, SEFM 2008

Specification-based Testing of Embedded Systems H. Schlingloff, SEFM 2008 SEFM School 2008 Specification-based Testing of Embedded Systems Prof. Dr. Holger Schlingloff Humboldt-Universität zu Berlin and Fraunhofer FIRST, Berlin Lecture 5: OCL, ParTeG Course Outline L1: Introduction

More information

Variables. Substitution

Variables. Substitution Variables Elements of Programming Languages Lecture 4: Variables, binding and substitution James Cheney University of Edinburgh October 6, 2015 A variable is a symbol that can stand for another expression.

More information

Overview. Probabilistic Programming. Dijkstra s guarded command language: Syntax. Elementary pgcl ingredients. Lecture #4: Probabilistic GCL

Overview. Probabilistic Programming. Dijkstra s guarded command language: Syntax. Elementary pgcl ingredients. Lecture #4: Probabilistic GCL Overview Lecture #4: Probabilistic GCL 1 Joost-Pieter Katoen 2 3 Recursion RWTH Lecture Series on 2018 Joost-Pieter Katoen 1/31 Joost-Pieter Katoen 2/31 Dijkstra s guarded command language: Syntax Elementary

More information

Software Design, Modelling and Analysis in UML

Software Design, Modelling and Analysis in UML Software Design, Modelling and Analysis in UML Lecture 20: Inheritance I 2014-02-03 20 2014-02-03 main Prof. Dr. Andreas Podelski, Dr. Bernd Westphal Albert-Ludwigs-Universität Freiburg, Germany Contents

More information

Semantics of programming languages

Semantics of programming languages Semantics of programming languages Informatics 2A: Lecture 28 Mary Cryan School of Informatics University of Edinburgh mcryan@inf.ed.ac.uk 21 November 2018 1 / 18 Two parallel pipelines A large proportion

More information

Specification-based Testing of Embedded Systems H. Schlingloff, SEFM 2008

Specification-based Testing of Embedded Systems H. Schlingloff, SEFM 2008 SEFM School 2008 Specification-based Testing of Embedded Systems Prof. Dr. Holger Schlingloff Humboldt-Universität zu Berlin and Fraunhofer FIRST, Berlin Lecture 4: Mutations, OCL etc. Course Outline L1:

More information

LECTURE 8: SETS. Software Engineering Mike Wooldridge

LECTURE 8: SETS. Software Engineering Mike Wooldridge LECTURE 8: SETS Mike Wooldridge 1 What is a Set? The concept of a set is used throughout mathematics; its formal definition matches closely our intuitive understanding of the word. Definition: A set is

More information

Compositional Model Based Software Development

Compositional Model Based Software Development Compositional Model Based Software Development Prof. Dr. Bernhard Rumpe http://www.se-rwth.de/ Seite 2 Our Working Groups and Topics Automotive / Robotics Autonomous driving Functional architecture Variability

More information

Semantics of programming languages

Semantics of programming languages Semantics of programming languages Informatics 2A: Lecture 27 Alex Simpson School of Informatics University of Edinburgh als@inf.ed.ac.uk 18 November, 2014 1 / 18 Two parallel pipelines A large proportion

More information

Softwaretechnik. Lecture 19: Model Driven Engineering. Peter Thiemann. University of Freiburg, Germany

Softwaretechnik. Lecture 19: Model Driven Engineering. Peter Thiemann. University of Freiburg, Germany Softwaretechnik Lecture 19: Model Driven Engineering Peter Thiemann University of Freiburg, Germany 23.07.2012 Peter Thiemann (Univ. Freiburg) Softwaretechnik 23.07.2012 1 / 50 Introduction MDA Introduction

More information

3.7 Denotational Semantics

3.7 Denotational Semantics 3.7 Denotational Semantics Denotational semantics, also known as fixed-point semantics, associates to each programming language construct a well-defined and rigorously understood mathematical object. These

More information

Software Design, Modelling and Analysis in UML

Software Design, Modelling and Analysis in UML Software Design, Modelling and Analysis in UML Lecture 1: Introduction 2011-10-25 1 2011-10-25 main Prof. Dr. Andreas Podelski, Dr. Bernd Westphal Albert-Ludwigs-Universität Freiburg, Germany Contents

More information

CMSC 330: Organization of Programming Languages. Operational Semantics

CMSC 330: Organization of Programming Languages. Operational Semantics CMSC 330: Organization of Programming Languages Operational Semantics Notes about Project 4, Parts 1 & 2 Still due today (7/2) Will not be graded until 7/11 (along with Part 3) You are strongly encouraged

More information

CS422 - Programming Language Design

CS422 - Programming Language Design 1 CS422 - Programming Language Design Denotational Semantics Grigore Roşu Department of Computer Science University of Illinois at Urbana-Champaign 2 Denotational semantics, alsoknownasfix-point semantics,

More information

Course "Softwaretechnik" Book Chapter 2 Modeling with UML

Course Softwaretechnik Book Chapter 2 Modeling with UML Course "Softwaretechnik" Book Chapter 2 Modeling with UML Lutz Prechelt, Bernd Bruegge, Allen H. Dutoit Freie Universität Berlin, Institut für Informatik http://www.inf.fu-berlin.de/inst/ag-se/ Modeling,

More information

SOFTWARE ENGINEERING UML FUNDAMENTALS. Saulius Ragaišis.

SOFTWARE ENGINEERING UML FUNDAMENTALS. Saulius Ragaišis. SOFTWARE ENGINEERING UML FUNDAMENTALS Saulius Ragaišis saulius.ragaisis@mif.vu.lt Information source Slides are prepared on the basis of Bernd Oestereich, Developing Software with UML: Object- Oriented

More information

Denotational Semantics

Denotational Semantics Denotational Semantics 8 12 lectures for Part II CST 2010/11 Marcelo Fiore Course web page: http://www.cl.cam.ac.uk/teaching/1011/denotsem/ 1 Lecture 1 Introduction 2 What is this course about? General

More information

Object-Oriented Software Engineering Practical Software Development using UML and Java

Object-Oriented Software Engineering Practical Software Development using UML and Java Object-Oriented Software Engineering Practical Software Development using UML and Java Chapter 5: Modelling with Classes Lecture 5 5.1 What is UML? The Unified Modelling Language is a standard graphical

More information

Lecture 3: Recursion; Structural Induction

Lecture 3: Recursion; Structural Induction 15-150 Lecture 3: Recursion; Structural Induction Lecture by Dan Licata January 24, 2012 Today, we are going to talk about one of the most important ideas in functional programming, structural recursion

More information

15-819M: Data, Code, Decisions

15-819M: Data, Code, Decisions 15-819M: Data, Code, Decisions 08: First-Order Logic André Platzer aplatzer@cs.cmu.edu Carnegie Mellon University, Pittsburgh, PA André Platzer (CMU) 15-819M/08: Data, Code, Decisions 1 / 40 Outline 1

More information

Note that in this definition, n + m denotes the syntactic expression with three symbols n, +, and m, not to the number that is the sum of n and m.

Note that in this definition, n + m denotes the syntactic expression with three symbols n, +, and m, not to the number that is the sum of n and m. CS 6110 S18 Lecture 8 Structural Operational Semantics and IMP Today we introduce a very simple imperative language, IMP, along with two systems of rules for evaluation called small-step and big-step semantics.

More information

CONSTRAINT SPECIFICATIONS USING PATTERNS IN OCL

CONSTRAINT SPECIFICATIONS USING PATTERNS IN OCL CONSTRAINT SPECIFICATIONS USING PATTERNS IN OCL Ali Hamie. University of Brighton, Brighton, UK a.a.hamie@brighton.ac.uk ABSTRACT Constraint patterns are very useful for specifying OCL constraints on UML

More information

Formal Specification and Verification

Formal Specification and Verification Formal Specification and Verification Introduction to Promela Bernhard Beckert Based on a lecture by Wolfgang Ahrendt and Reiner Hähnle at Chalmers University, Göteborg Formal Specification and Verification:

More information

axiomatic semantics involving logical rules for deriving relations between preconditions and postconditions.

axiomatic semantics involving logical rules for deriving relations between preconditions and postconditions. CS 6110 S18 Lecture 18 Denotational Semantics 1 What is Denotational Semantics? So far we have looked at operational semantics involving rules for state transitions, definitional semantics involving translations

More information

Software Engineering using Formal Methods

Software Engineering using Formal Methods Software Engineering using Formal Methods Introduction to Promela Wolfgang Ahrendt & Richard Bubel & Reiner Hähnle & Wojciech Mostowski 31 August 2011 SEFM: Promela /GU 110831 1 / 35 Towards Model Checking

More information

Fundamentals of Software Engineering

Fundamentals of Software Engineering Fundamentals of Software Engineering Reasoning about Programs with Dynamic Logic - Part I Ina Schaefer Institute for Software Systems Engineering TU Braunschweig, Germany Slides by Wolfgang Ahrendt, Richard

More information

Formal Specification of Software Systems

Formal Specification of Software Systems Formal Specification of Software Systems Lecture Notes Winter Term 2001 / 2002 Heinrich Hußmann Technische Universität Dresden Formal Specification of Software Systems Summary: Construction of large software

More information

Formal Methods for Software Engineers

Formal Methods for Software Engineers Formal Methods for Software Engineers Professor Ray Welland Department of Computing Science University of Glasgow ray@dcs.gla.ac.uk INF3120-FM 1 Overview Motivation Why have formal specifications? Where

More information

1 Introduction. 3 Syntax

1 Introduction. 3 Syntax CS 6110 S18 Lecture 19 Typed λ-calculus 1 Introduction Type checking is a lightweight technique for proving simple properties of programs. Unlike theorem-proving techniques based on axiomatic semantics,

More information

TIME-BASED CONSTRAINTS IN THE OBJECT CONSTRAINT LANGUAGE OCL

TIME-BASED CONSTRAINTS IN THE OBJECT CONSTRAINT LANGUAGE OCL TIME-BASED CONSTRAINTS IN THE OBJECT CONSTRAINT LANGUAGE OCL Ali Hamie, John Howse School of Computing, Mathematical and Information Sciences, University of Brighton, Brighton, UK. {a.a.hamie@brighton.ac.uk,

More information

Software Engineering using Formal Methods

Software Engineering using Formal Methods Software Engineering using Formal Methods Introduction to Promela Wolfgang Ahrendt 03 September 2015 SEFM: Promela /GU 150903 1 / 36 Towards Model Checking System Model Promela Program byte n = 0; active

More information

Harvard School of Engineering and Applied Sciences CS 152: Programming Languages

Harvard School of Engineering and Applied Sciences CS 152: Programming Languages Harvard School of Engineering and Applied Sciences CS 152: Programming Languages Lecture 21 Tuesday, April 15, 2014 1 Static program analyses For the last few weeks, we have been considering type systems.

More information

Principles of Software Construction: Objects, Design and Concurrency. Just enough UML. toad

Principles of Software Construction: Objects, Design and Concurrency. Just enough UML. toad Principles of Software Construction: Objects, Design and Concurrency Just enough UML 15-214 toad Christian Kästner Charlie Garrod School of Computer Science With slides from Klaus Ostermann Learning Goals

More information

Directed Model Checking for PROMELA with Relaxation-Based Distance Functions

Directed Model Checking for PROMELA with Relaxation-Based Distance Functions Directed Model Checking for PROMELA with Relaxation-Based Distance Functions Ahmad Siyar Andisha and Martin Wehrle 2 and Bernd Westphal Albert-Ludwigs-Universität Freiburg, Germany {andishaa,westphal}@informatik.uni-freiburg.de

More information

CMSC 330: Organization of Programming Languages. Formal Semantics of a Prog. Lang. Specifying Syntax, Semantics

CMSC 330: Organization of Programming Languages. Formal Semantics of a Prog. Lang. Specifying Syntax, Semantics Recall Architecture of Compilers, Interpreters CMSC 330: Organization of Programming Languages Source Scanner Parser Static Analyzer Operational Semantics Intermediate Representation Front End Back End

More information

Appendix A OCL 2.0 Grammar

Appendix A OCL 2.0 Grammar Appendix A OCL 2.0 Grammar In this appendix we summarise the concrete syntax of OCL [113] using an extended Backus-Naur format [8]. The grammar in [113] is different from the grammar presented here. It

More information

Object-Oriented Theories for Model Driven Architecture

Object-Oriented Theories for Model Driven Architecture Object-Oriented Theories for Model Driven Architecture Tony Clark 1, Andy Evans 2, Robert France 3 1 King s College London, UK, anclark@dcs.kcl.ac.uk, 2 University of York, UK, andye@cs.york.ac.uk, 3 University

More information

Software Design, Modelling and Analysis in UML

Software Design, Modelling and Analysis in UML Software Design, Modelling and Analysis in UML Lecture 21: Inheritance II 2014-02-05 21 2014-02-05 main Prof. Dr. Andreas Podelski, Dr. Bernd Westphal Albert-Ludwigs-Universität Freiburg, Germany Contents

More information

Program Syntax; Operational Semantics

Program Syntax; Operational Semantics 9/5 Solved Program Syntax; Operational Semantics CS 536: Science of Programming, Fall 2018 A. Why Our simple programming language is a model for the kind of constructs seen in actual languages. Step-by-step

More information

Handling Integer Arithmetic in the Verification of Java Programs

Handling Integer Arithmetic in the Verification of Java Programs Handling Integer Arithmetic in the Verification of Java Programs Steffen Schlager 1st Swedish-German KeY Workshop Göteborg, Sweden, June 2002 KeY workshop, June 2002 p.1 Introduction UML/OCL specification

More information

Overview. CS389L: Automated Logical Reasoning. Lecture 6: First Order Logic Syntax and Semantics. Constants in First-Order Logic.

Overview. CS389L: Automated Logical Reasoning. Lecture 6: First Order Logic Syntax and Semantics. Constants in First-Order Logic. Overview CS389L: Automated Logical Reasoning Lecture 6: First Order Logic Syntax and Semantics Işıl Dillig So far: Automated reasoning in propositional logic. Propositional logic is simple and easy to

More information

Boolean expressions. Elements of Programming Languages. Conditionals. What use is this?

Boolean expressions. Elements of Programming Languages. Conditionals. What use is this? Boolean expressions Elements of Programming Languages Lecture 3: Booleans, conditionals, and types James Cheney So far we ve considered only a trivial arithmetic language L Arith Let s extend L Arith with

More information

Definition: A context-free grammar (CFG) is a 4- tuple. variables = nonterminals, terminals, rules = productions,,

Definition: A context-free grammar (CFG) is a 4- tuple. variables = nonterminals, terminals, rules = productions,, CMPSCI 601: Recall From Last Time Lecture 5 Definition: A context-free grammar (CFG) is a 4- tuple, variables = nonterminals, terminals, rules = productions,,, are all finite. 1 ( ) $ Pumping Lemma for

More information

Programming Languages Third Edition

Programming Languages Third Edition Programming Languages Third Edition Chapter 12 Formal Semantics Objectives Become familiar with a sample small language for the purpose of semantic specification Understand operational semantics Understand

More information

Higher-Order Logic. Specification and Verification with Higher-Order Logic

Higher-Order Logic. Specification and Verification with Higher-Order Logic Higher-Order Logic Specification and Verification with Higher-Order Logic Arnd Poetzsch-Heffter (Slides by Jens Brandt) Software Technology Group Fachbereich Informatik Technische Universität Kaiserslautern

More information

SUMMARY: MODEL DRIVEN SECURITY

SUMMARY: MODEL DRIVEN SECURITY SUMMARY: MODEL DRIVEN SECURITY JAN-FILIP ZAGALAK, JZAGALAK@STUDENT.ETHZ.CH Model Driven Security: From UML Models to Access Control Infrastructres David Basin, Juergen Doser, ETH Zuerich Torsten lodderstedt,

More information

Composite Structures

Composite Structures Composite Structures Marie-Agnès Peraldi-Frati UNSA/I3S/INRIA map@unice.fr UML 2 Composition Model Purpose: improve the black diamond composition Supports connections between parts at the same level of

More information

Prof. Dr. A. Podelski, Sommersemester 2017 Dr. B. Westphal. Softwaretechnik/Software Engineering

Prof. Dr. A. Podelski, Sommersemester 2017 Dr. B. Westphal. Softwaretechnik/Software Engineering Prof. Dr. A. Podelski, Sommersemester 2017 Dr. B. Westphal Softwaretechnik/Software Engineering http://swt.informatik.uni-freiburg.de/teaching/ss2017/swtvl Exercise Sheet 6 Early submission: Wednesday,

More information

UML Modeling I. Instructor: Yongjie Zheng September 3, CS 490MT/5555 Software Methods and Tools

UML Modeling I. Instructor: Yongjie Zheng September 3, CS 490MT/5555 Software Methods and Tools UML Modeling I Instructor: Yongjie Zheng September 3, 2015 CS 490MT/5555 Software Methods and Tools Object-Oriented Design: Topics & Skills Rational Unified Process Unified Modeling Languages (UML) Provide

More information

Metamodeling with Metamodels. Using. UML/MOF including OCL

Metamodeling with Metamodels. Using. UML/MOF including OCL Metamodeling with Metamodels Using UML/MOF including OCL Introducing Metamodels (Wikipedia) A metamodel is a model of a model An instantiation of metamodel gives a model Metamodeling is the process of

More information

Relational Database: The Relational Data Model; Operations on Database Relations

Relational Database: The Relational Data Model; Operations on Database Relations Relational Database: The Relational Data Model; Operations on Database Relations Greg Plaxton Theory in Programming Practice, Spring 2005 Department of Computer Science University of Texas at Austin Overview

More information

Learning Recursion. Recursion [ Why is it important?] ~7 easy marks in Exam Paper. Step 1. Understand Code. Step 2. Understand Execution

Learning Recursion. Recursion [ Why is it important?] ~7 easy marks in Exam Paper. Step 1. Understand Code. Step 2. Understand Execution Recursion [ Why is it important?] ~7 easy marks in Exam Paper Seemingly Different Coding Approach In Fact: Strengthen Top-down Thinking Get Mature in - Setting parameters - Function calls - return + work

More information

CSC312 Principles of Programming Languages : Functional Programming Language. Copyright 2006 The McGraw-Hill Companies, Inc.

CSC312 Principles of Programming Languages : Functional Programming Language. Copyright 2006 The McGraw-Hill Companies, Inc. CSC312 Principles of Programming Languages : Functional Programming Language Overview of Functional Languages They emerged in the 1960 s with Lisp Functional programming mirrors mathematical functions:

More information

Introductory logic and sets for Computer scientists

Introductory logic and sets for Computer scientists Introductory logic and sets for Computer scientists Nimal Nissanke University of Reading ADDISON WESLEY LONGMAN Harlow, England II Reading, Massachusetts Menlo Park, California New York Don Mills, Ontario

More information

Lecture 8: Use Cases and Scenarios

Lecture 8: Use Cases and Scenarios Softwaretechnik / Software-Engineering Lecture 8: Use Cases and Scenarios 2016-06-02 Prof. Dr. Andreas Podelski, Dr. Bernd Westphal Albert-Ludwigs-Universität Freiburg, Germany 8 2016-06-02 main Topic

More information

Model Driven Development Unified Modeling Language (UML)

Model Driven Development Unified Modeling Language (UML) Model Driven Development Unified Modeling Language (UML) An Overview UML UML is a modeling notation standardized by OMG (proposal 1997, ver.1.1 in 1998, ver. 2.0 in 2004) now in 2.4.1 mature based on notations

More information

Model Driven Architecture Action Semantics and Action Languages

Model Driven Architecture Action Semantics and Action Languages Model Driven Architecture Action Semantics and Action Languages Prof. Dr. Peter Thiemann Universität Freiburg 28.06.2006 Action Semantics What is it? OMG sanctioned approach to define the low-level behavior

More information

Hans Karlsen. MDriven The book. Doing effective Business by taking control of Information. Hans Karlsen, Stockholm, Sweden

Hans Karlsen. MDriven The book. Doing effective Business by taking control of Information. Hans Karlsen, Stockholm, Sweden Hans Karlsen MDriven The book Doing effective Business by taking control of Information Hans Karlsen, Stockholm, Sweden 2016-01-23 Part 8 Object Constraint Language 1 What is Object Constraint Language

More information

Chapter 3 (part 3) Describing Syntax and Semantics

Chapter 3 (part 3) Describing Syntax and Semantics Chapter 3 (part 3) Describing Syntax and Semantics Chapter 3 Topics Introduction The General Problem of Describing Syntax Formal Methods of Describing Syntax Attribute Grammars Describing the Meanings

More information

Operational Semantics. One-Slide Summary. Lecture Outline

Operational Semantics. One-Slide Summary. Lecture Outline Operational Semantics #1 One-Slide Summary Operational semantics are a precise way of specifying how to evaluate a program. A formal semantics tells you what each expression means. Meaning depends on context:

More information

From OCL to Propositional and First-order Logic: Part I

From OCL to Propositional and First-order Logic: Part I 22c181: Formal Methods in Software Engineering The University of Iowa Spring 2008 From OCL to Propositional and First-order Logic: Part I Copyright 2007-8 Reiner Hähnle and Cesare Tinelli. Notes originally

More information

Recency Types for Dynamically-Typed, Object-Based Languages

Recency Types for Dynamically-Typed, Object-Based Languages Recency Types for Dynamically-Typed, Object-Based Languages Phillip Heidegger, Peter Thiemann Albert-Ludwigs-Universität Freiburg 15.10.2008 Task: Maintenance Finding bugs in JavaScript programs Understanding

More information

Shared Variables and Interference

Shared Variables and Interference Illinois Institute of Technology Lecture 24 Shared Variables and Interference CS 536: Science of Programming, Spring 2018 A. Why Parallel programs can coordinate their work using shared variables, but

More information

Lecture 6. Abstract Interpretation

Lecture 6. Abstract Interpretation Lecture 6. Abstract Interpretation Wei Le 2014.10 Outline Motivation History What it is: an intuitive understanding An example Steps of abstract interpretation Galois connection Narrowing and Widening

More information

Formal Semantics. Prof. Clarkson Fall Today s music: Down to Earth by Peter Gabriel from the WALL-E soundtrack

Formal Semantics. Prof. Clarkson Fall Today s music: Down to Earth by Peter Gabriel from the WALL-E soundtrack Formal Semantics Prof. Clarkson Fall 2015 Today s music: Down to Earth by Peter Gabriel from the WALL-E soundtrack Review Previously in 3110: simple interpreter for expression language: abstract syntax

More information

Denotational Semantics

Denotational Semantics Denotational Semantics 10 lectures for Part II CST 2011/12 Andrew Pitts Course web page: http://www.cl.cam.ac.uk/teaching/1112/denotsem/ 1 Styles of formal semantics Operational. Meanings for program phrases

More information

Defining Languages GMU

Defining Languages GMU Defining Languages CS463 @ GMU How do we discuss languages? We might focus on these qualities: readability: how well does a language explicitly and clearly describe its purpose? writability: how expressive

More information

Engineering Design w/embedded Systems

Engineering Design w/embedded Systems 1 / 40 Engineering Design w/embedded Systems Lecture 33 UML Patrick Lam University of Waterloo April 4, 2013 2 / 40 What is UML? Unified Modelling Language (UML): specify and document architecture of large

More information

Applications of Formal Verification

Applications of Formal Verification Applications of Formal Verification Model Checking: Introduction to PROMELA Prof. Dr. Bernhard Beckert Dr. Vladimir Klebanov SS 2012 KIT INSTITUT FÜR THEORETISCHE INFORMATIK KIT University of the State

More information

The Object Contraint Language by Example

The Object Contraint Language by Example Formal Specification of Software The Object Contraint Language by Example Bernhard Beckert UNIVERSITÄT KOBLENZ-LANDAU B. Beckert: Formal Specification of Software p.1 The Classifier Context inv ( c :)?

More information

This is already grossly inconvenient in present formalisms. Why do we want to make this convenient? GENERAL GOALS

This is already grossly inconvenient in present formalisms. Why do we want to make this convenient? GENERAL GOALS 1 THE FORMALIZATION OF MATHEMATICS by Harvey M. Friedman Ohio State University Department of Mathematics friedman@math.ohio-state.edu www.math.ohio-state.edu/~friedman/ May 21, 1997 Can mathematics be

More information

Software Service Engineering

Software Service Engineering Software Service Engineering Lecture 4: Unified Modeling Language Doctor Guangyu Gao Some contents and notes selected from Fowler, M. UML Distilled, 3rd edition. Addison-Wesley Unified Modeling Language

More information

CISC836: Models in Software Development: Methods, Techniques and Tools

CISC836: Models in Software Development: Methods, Techniques and Tools CISC836: Models in Software Development: Methods, Techniques and Tools Topic 4: Code Generation with EMF Meta modeling Languages for meta models: Ecore Using EMF and Ecoreto define a data model Using EMF

More information