Lecture 04: OCL Semantics

Size: px
Start display at page:

Download "Lecture 04: OCL Semantics"

Transcription

1 Software Design, Modelling and Analysis in UML Lecture 04: OCL Semantics Prof. Dr. Andreas Podelski, Dr. Bernd Westphal main Albert-Ludwigs-Universität Freiburg, Germany Contents & Goals Last Lecture: OCL Syntax This Lecture: Educational Objectives: Capabilities for following tasks/questions. What does it mean that an OCL expression is satisfiable? When is a set of OCL constraints said to be consistent? Can you think of an object diagram which violates this OCL constraint? Sprelim Content: OCL Semantics maybe: OCL consistency and satisfiability 2/26

2 OCL Semantics [OMG, 2006] main 3/26 The Task Soclsyn OCL Syntax 1 4: Expressions expr ::= w : τ(w) 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) Where, given Ë = (Ì,, V,atr), W self } is a set of typed logical variables, w has type τ(w) τ is any type from Ì TB T Set(τ0) τ0 TB T } TB is a set of basic types, in the following we use TB = Bool,Int,String} T = τc C } is the set of object types, Set(τ0) denotes the set-of-τ0 type for τ0 TB T (sufficient because of flattening (cf. standard)) v : τ(v) atr(c), τ(v) Ì, r1 : D0,1 atr(c), r2 : D atr(c), C, D. 7/30 Given an OCL expression expr, a system state σ Σ D S, and a valuation of logical variables β, define I (, ) : OCLExpressions(S) Σ D S (W I(T T B T C )) I(Bool) such that I expr (σ,β) true,false, Bool }. 4/26

3 Basically business as usual... (i) Equip each OCL (!) basic type with a reasonable domain, i.e. define function I with dom(i) = T B 5/26 Basically business as usual... (i) Equip each OCL (!) basic type with a reasonable domain, i.e. define function I with dom(i) = T B (ii) Equip each object type τ C with a reasonable domain, i.e. define function I with dom(i) = τ C (most reasonable: D(C) determined by structure D of S). (iii) Equip each set type Set(τ 0 ) with reasonable domain, i.e. define function I with dom(i) = Set(τ 0 ) τ 0 T B T C } (iv) Equip each arithmetical operation with a reasonable interpretation (that is, with a function operating on the corresponding domains). I with dom(i) = +,,,...}, e.g., I(+) I(Int) I(Int) I(Int) 5/26

4 Basically business as usual... (i) Equip each OCL (!) basic type with a reasonable domain, i.e. define function I with dom(i) = T B (ii) Equip each object type τ C with a reasonable domain, i.e. define function I with dom(i) = τ C (most reasonable: D(C) determined by structure D of S). (iii) Equip each set type Set(τ 0 ) with reasonable domain, i.e. define function I with dom(i) = Set(τ 0 ) τ 0 T B T C } (iv) Equip each arithmetical operation with a reasonable interpretation (that is, with a function operating on the corresponding domains). I with dom(i) = +,,,...}, e.g., I(+) I(Int) I(Int) I(Int) (v) Set operations similar: I with dom(i) = isempty,...} (vi) Equip each expression with a reasonable interpretation, i.e. define function I : Expr Σ D S (W I(T T B T C )) I(Bool)...except for OCL being a three-valued logic, and the iterate expression. 5/26 (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. 6/26

5 (ii) Domains of Object and (iii) Set Types Now we need a structure D of our signature S = (T, C,V,atr). Recall: D assigns an (infinite) domain D(C) to each class C C. Let τ C be an (OCL) object type for a class C C. We set I(τ C ) := D(C) τc } Let τ be a type from T B T C. 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. 7/26 (iv) Interpretation of Arithmetic Operations Literals map to fixed values: I(true) := true, I(false) := false, I(0) := 0, I(1) := 1,... I(OclUndefined τ ) := τ 8/26

6 (iv) Interpretation of Arithmetic Operations 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 8/26 (iv) Interpretation of Arithmetic Operations 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 8/26

7 (iv) Interpretation of Arithmetic Operations 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). 8/26

8 (iv) Interpretation of OclIsUndefined The is-undefined predicate (defined point-wise for x I(τ)): true, if x = τ I(oclIsUndefined τ )(x) := false, otherwise 9/26 (v) Interpretation of Set Operations Basically the same principle as with arithmetic operations... Let τ T B T C. 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 10/26

9 (vi) Putting It All Together Soclsyn OCL Syntax 1 4: Expressions 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) Where, given Ë = (Ì,, V,atr), W self } is a set of typed expr ::= w : τ(w) logical variables, w has type τ(w) For example: τ is any type from Ì TB T expr 1 = τexpr 2 : τ τ Bool Set(τ0) τ0 TB T } expr ::=... oclisundefined τ(expr 1 ) : τ Bool TB is a set of basic types, in true, false : Bool expr 1,...,expr n } the following we use : τ τ Set(τ) TB = Bool,Int,String} expr 1 and, or, implies} expr 2 : Bool Bool Bool T = τc C } is the set of object types, Set(τ0) denotes the set-of-τ0 type for τ0 TB T (sufficient because of flattening (cf. standard)) v : τ(v) atr(c), τ(v) Ì, Generalised notation: r1 : D0,1 atr(c), r2 : D atr(c), C, D Soclsyn OCL Syntax 2 4: Constants, Arithmetical Operators 7/30 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 expr ::= ω(expr 1,...,expr n ) with ω +,,... } : τ 1 τ n τ 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 ) where expr 1 is of a collection type (here: a set Set(τ 0) for some τ 0), 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 0. 11/26 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)). 12/26

10 (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(σ) D(C) Note: in the OCL standard, dom(σ) is assumed to be finite. Again: doesn t scare us. 13/26 (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 ) Assume expr 1 : τ C for some C C. Set u 1 := I expr 1 (σ,β) D(τ C ). σ(u 1 )(v), if u 1 dom(σ) I v(expr 1 ) (σ,β) :=, otherwise u, if u 1 dom(σ) and σ(u 1 )(r 1 ) = u} I r 1 (expr 1 ) (σ,β) :=, otherwise σ(u 1 )(r 2 ), if u 1 dom(σ) I r 2 (expr 1 ) (σ,β) :=, otherwise (Recall: σ evaluates r 2 of type C to a set) 13/26

11 (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 expr 1 ->iterate(v 1 : τ 1 ; v 2 : τ 2 = expr 2 expr 3 ) (σ,β) I expr := 2 (σ,β), if I expr 1 (σ,β) = iterate(hlp,v 1,v 2,expr 3,σ,β ), otherwise where β = β[hlp I expr 1 (σ,β),v 2 I expr 2 (σ,β)] and iterate(hlp,v 1,v 2,expr 3,σ,β ) I expr := 3 (σ,β [v 1 x]), if β (hlp) = x} I expr 3 (σ,β ), if β (hlp) = X x} and X where β = β [v 1 x,v 2 iterate(hlp,v 1,v 2,expr 3,σ,β [hlp X])] 13/26

12 (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 expr 1 ->iterate(v 1 : τ 1 ; v 2 : τ 2 = expr 2 expr 3 ) (σ,β) I expr := 2 (σ,β), if I expr 1 (σ,β) = iterate(hlp,v 1,v 2,expr 3,σ,β ), otherwise where β = β[hlp I expr 1 (σ,β),v 2 I expr 2 (σ,β)] and iterate(hlp,v 1,v 2,expr 3,σ,β ) I expr := 3 (σ,β [v 1 x]), if β (hlp) = x} I expr 3 (σ,β ), if β (hlp) = X x} and X where β = β [v 1 x,v 2 iterate(hlp,v 1,v 2,expr 3,σ,β [hlp X])] Quiz: Is (our) I a function? 13/26 References main 25/26

13 main [Cabot and Clarisó, 2008] Cabot, J. and Clarisó, R. (2008). UML-OCL verification in practice. In Chaudron, M. R. V., editor, MoDELS Workshops, volume 5421 of Lecture Notes in Computer Science. Springer. [Cengarle and Knapp, 2001] Cengarle, M. V. and Knapp, A. (2001). On the expressive power of pure OCL. Technical Report 0101, Institut für Informatik, Ludwig-Maximilians-Universität München. [Cengarle and Knapp, 2002] Cengarle, M. V. and Knapp, A. (2002). Towards OCL/RT. In Eriksson, L.-H. and Lindsay, P. A., editors, FME, volume 2391 of Lecture Notes in Computer Science, pages Springer-Verlag. [Flake and Müller, 2003] Flake, S. and Müller, W. (2003). Formal semantics of static and temporal state-oriented OCL constraints. Software and Systems Modeling, 2(3): [Jackson, 2002] Jackson, D. (2002). Alloy: A lightweight object modelling notation. ACM Transactions on Software Engineering and Methodology, 11(2): [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/ /26

Lecture 4: OCL Semantics

Lecture 4: OCL Semantics Software Design, Modelling and Analysis in UML Lecture 4: OCL Semantics 2016-11-03 Prof. Dr. Andreas Podelski, Dr. Bernd Westphal Albert-Ludwigs-Universität Freiburg, Germany 4 2016-11-03 main Content

More information

Lecture 12: Core State Machines II

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

More information

Software Design, Modelling and Analysis in UML

Software Design, Modelling and Analysis in UML Software Design, Modelling and Analysis in UML Lecture 14: Core State Machines IV 2013-12-18 14 2013-12-18 main Prof. Dr. Andreas Podelski, Dr. Bernd Westphal Albert-Ludwigs-Universität Freiburg, Germany

More information

Lecture 2: Semantical Model

Lecture 2: Semantical Model Software Design, Modelling and Analysis in UML Lecture 2: Semantical Model 2016-10-20 Prof. Dr. Andreas Podelski, Dr. Bernd Westphal Albert-Ludwigs-Universität Freiburg, Germany 2 2016-10-20 main ->enable_water();

More information

Lecture 03: Duration Calculus I

Lecture 03: Duration Calculus I Real-Time Systems Lecture 03: Duration Calculus I 2014-05-08 Dr. Bernd Westphal 03 2014-05-08 main Albert-Ludwigs-Universität Freiburg, Germany Contents & Goals Last Lecture: Model of timed behaviour:

More information

Lecture 05: Duration Calculus III

Lecture 05: Duration Calculus III Real-Time Systems Lecture 05: Duration Calculus III 2014-05-20 Dr. Bernd Westphal Albert-Ludwigs-Universität Freiburg, Germany Contents & Goals Last Lecture: DC Syntax and Semantics: Formulae This Lecture:

More information

Real-Time Systems. Lecture 15: The Universality Problem for TBA Dr. Bernd Westphal. Albert-Ludwigs-Universität Freiburg, Germany

Real-Time Systems. Lecture 15: The Universality Problem for TBA Dr. Bernd Westphal. Albert-Ludwigs-Universität Freiburg, Germany Real-Time Systems Lecture 15: The Universality Problem for TBA 2013-06-26 15 2013-06-26 main Dr. Bernd Westphal Albert-Ludwigs-Universität Freiburg, Germany Contents & Goals Last Lecture: Extended Timed

More information

Lecture 11: Timed Automata

Lecture 11: Timed Automata Real-Time Systems Lecture 11: Timed Automata 2014-07-01 11 2014-07-01 main Dr. Bernd Westphal Albert-Ludwigs-Universität Freiburg, Germany Contents & Goals Last Lecture: DC (un)decidability This Lecture:

More information

Real-Time Systems. Lecture 10: Timed Automata Dr. Bernd Westphal. Albert-Ludwigs-Universität Freiburg, Germany main

Real-Time Systems. Lecture 10: Timed Automata Dr. Bernd Westphal. Albert-Ludwigs-Universität Freiburg, Germany main Real-Time Systems Lecture 10: Timed Automata 2013-06-04 10 2013-06-04 main Dr. Bernd Westphal Albert-Ludwigs-Universität Freiburg, Germany Contents & Goals Last Lecture: PLC, PLC automata This Lecture:

More information

A Formal Semantics for OCL 1.4

A Formal Semantics for OCL 1.4 A Formal Semantics for OCL 1.4 María Victoria Cengarle and Alexander Knapp Ludwig Maximilians Universität München {cengarle, knapp}@informatik.uni-muenchen.de Abstract. The OCL 1.4 specification introduces

More information

A Logic Primer. Stavros Tripakis University of California, Berkeley

A Logic Primer. Stavros Tripakis University of California, Berkeley EE 144/244: Fundamental Algorithms for System Modeling, Analysis, and Optimization Fall 2015 A Logic Primer Stavros Tripakis University of California, Berkeley Stavros Tripakis (UC Berkeley) EE 144/244,

More information

A Logic Primer. Stavros Tripakis University of California, Berkeley. Stavros Tripakis (UC Berkeley) EE 144/244, Fall 2014 A Logic Primer 1 / 35

A Logic Primer. Stavros Tripakis University of California, Berkeley. Stavros Tripakis (UC Berkeley) EE 144/244, Fall 2014 A Logic Primer 1 / 35 EE 144/244: Fundamental Algorithms for System Modeling, Analysis, and Optimization Fall 2014 A Logic Primer Stavros Tripakis University of California, Berkeley Stavros Tripakis (UC Berkeley) EE 144/244,

More information

Lecture 2: Axiomatic semantics

Lecture 2: Axiomatic semantics Chair of Software Engineering Trusted Components Prof. Dr. Bertrand Meyer Lecture 2: Axiomatic semantics Reading assignment for next week Ariane paper and response (see course page) Axiomatic semantics

More information

Research Report 326 ISBN ISSN

Research Report 326 ISBN ISSN University of Oslo Department of Informatics How to transform UML neg into a useful construct Ragnhild Kobro Runde, Øystein Haugen, Ketil Stølen Research Report 326 ISBN 82-7368-280-3 ISSN 0806-3036 November

More information

Propositional and Predicate Logic

Propositional and Predicate Logic Formal Verification of Software Propositional and Predicate Logic Bernhard Beckert UNIVERSITÄT KOBLENZ-LANDAU B. Beckert: Formal Verification of Software p.1 Propositional Logic: Syntax Special symbols

More information

A Little Logic. Propositional Logic. Satisfiability Problems. Solving Sudokus. First Order Logic. Logic Programming

A Little Logic. Propositional Logic. Satisfiability Problems. Solving Sudokus. First Order Logic. Logic Programming A Little Logic International Center for Computational Logic Technische Universität Dresden Germany Propositional Logic Satisfiability Problems Solving Sudokus First Order Logic Logic Programming A Little

More information

Lecture 5: Object Diagrams

Lecture 5: Object Diagrams Softwae Design, Modelling and Analysis in UML Lectue 5: Object Diagams 2016-11-10 Pof. D. Andeas Podelski, D. Bend Westphal Albet-Ludwigs-Univesität Feibug, Gemany 5 2016-11-10 main Content Object Constaint

More information

Transition Predicate Abstraction and Fair Termination

Transition Predicate Abstraction and Fair Termination Transition Predicate Abstraction and Fair Termination Andreas Podelski and Andrey Rybalchenko Max-Planck-Institut für Informatik Saarbrücken, Germany POPL 2005 ETH Zürich Can Ali Akgül 2009 Introduction

More information

CSE 20. Lecture 4: Introduction to Boolean algebra. CSE 20: Lecture4

CSE 20. Lecture 4: Introduction to Boolean algebra. CSE 20: Lecture4 CSE 20 Lecture 4: Introduction to Boolean algebra Reminder First quiz will be on Friday (17th January) in class. It is a paper quiz. Syllabus is all that has been done till Wednesday. If you want you may

More information

Formal Methods for Java

Formal Methods for Java Formal Methods for Java Lecture 20: Sequent Calculus Jochen Hoenicke Software Engineering Albert-Ludwigs-University Freiburg January 15, 2013 Jochen Hoenicke (Software Engineering) Formal Methods for Java

More information

Reasoning Under Uncertainty: Introduction to Probability

Reasoning Under Uncertainty: Introduction to Probability Reasoning Under Uncertainty: Introduction to Probability CPSC 322 Lecture 23 March 12, 2007 Textbook 9 Reasoning Under Uncertainty: Introduction to Probability CPSC 322 Lecture 23, Slide 1 Lecture Overview

More information

Static Program Analysis

Static Program Analysis Static Program Analysis Xiangyu Zhang The slides are compiled from Alex Aiken s Michael D. Ernst s Sorin Lerner s A Scary Outline Type-based analysis Data-flow analysis Abstract interpretation Theorem

More information

How do PLC look like? What s special about PLC? What is a PLC? /50 2/50 5/50 6/50 3/ Splc main

How do PLC look like? What s special about PLC? What is a PLC? /50 2/50 5/50 6/50 3/ Splc main http://wikimedia.org (public domain) How do PLC look like? Albert-Ludwigs-Universität Freiburg, Germany Dr. Bernd Westphal 2013-05-29 Lecture 09: PLC Automata Real-ime Systems 4/50 http://wikimedia.org

More information

On Real-time Monitoring with Imprecise Timestamps

On Real-time Monitoring with Imprecise Timestamps On Real-time Monitoring with Imprecise Timestamps David Basin 1, Felix Klaedtke 2, Srdjan Marinovic 1, and Eugen Zălinescu 1 1 Institute of Information Security, ETH Zurich, Switzerland 2 NEC Europe Ltd.,

More information

Version Spaces.

Version Spaces. . Machine Learning Version Spaces Prof. Dr. Martin Riedmiller AG Maschinelles Lernen und Natürlichsprachliche Systeme Institut für Informatik Technische Fakultät Albert-Ludwigs-Universität Freiburg riedmiller@informatik.uni-freiburg.de

More information

Automata, Logic and Games: Theory and Application

Automata, Logic and Games: Theory and Application Automata, Logic and Games: Theory and Application 1. Büchi Automata and S1S Luke Ong University of Oxford TACL Summer School University of Salerno, 14-19 June 2015 Luke Ong Büchi Automata & S1S 14-19 June

More information

Lecture 9: Live Sequence Charts

Lecture 9: Live Sequence Charts Softwaretechnik / Software-Engineering Lecture 9: Live Sequence Charts 2017-06-19 Prof. Dr. Andreas Podelski, Dr. Bernd Westphal Albert-Ludwigs-Universität Freiburg, Germany 9 2017-06-19 main Topic Area

More information

Lecture 10: Live Sequence Charts Cont d

Lecture 10: Live Sequence Charts Cont d Softwaretechnik / Software-Engineering Lecture 10: Live Sequence Charts Cont d 2015-06-15 10 2015-06-15 main Prof. Dr. Andreas Podelski, Dr. Bernd Westphal Albert-Ludwigs-Universität Freiburg, Germany

More information

Concept Learning.

Concept Learning. . Machine Learning Concept Learning Prof. Dr. Martin Riedmiller AG Maschinelles Lernen und Natürlichsprachliche Systeme Institut für Informatik Technische Fakultät Albert-Ludwigs-Universität Freiburg Martin.Riedmiller@uos.de

More information

Lecture 3: Semantics of Propositional Logic

Lecture 3: Semantics of Propositional Logic Lecture 3: Semantics of Propositional Logic 1 Semantics of Propositional Logic Every language has two aspects: syntax and semantics. While syntax deals with the form or structure of the language, it is

More information

Formal Methods for Java

Formal Methods for Java Formal Methods for Java Lecture 12: Soundness of Sequent Calculus Jochen Hoenicke Software Engineering Albert-Ludwigs-University Freiburg June 12, 2017 Jochen Hoenicke (Software Engineering) Formal Methods

More information

A Logical Formulation of the Granular Data Model

A Logical Formulation of the Granular Data Model 2008 IEEE International Conference on Data Mining Workshops A Logical Formulation of the Granular Data Model Tuan-Fang Fan Department of Computer Science and Information Engineering National Penghu University

More information

Static Program Analysis

Static Program Analysis Static Program Analysis Lecture 16: Abstract Interpretation VI (Counterexample-Guided Abstraction Refinement) Thomas Noll Lehrstuhl für Informatik 2 (Software Modeling and Verification) noll@cs.rwth-aachen.de

More information

Seamless Model Driven Development and Tool Support for Embedded Software-Intensive Systems

Seamless Model Driven Development and Tool Support for Embedded Software-Intensive Systems Seamless Model Driven Development and Tool Support for Embedded Software-Intensive Systems Computer Journal Lecture - 22nd June 2009 Manfred Broy Technische Universität München Institut für Informatik

More information

EDA045F: Program Analysis LECTURE 10: TYPES 1. Christoph Reichenbach

EDA045F: Program Analysis LECTURE 10: TYPES 1. Christoph Reichenbach EDA045F: Program Analysis LECTURE 10: TYPES 1 Christoph Reichenbach In the last lecture... Performance Counters Challenges in Dynamic Performance Analysis Taint Analysis Binary Instrumentation 2 / 44 Types

More information

CSE 1400 Applied Discrete Mathematics Definitions

CSE 1400 Applied Discrete Mathematics Definitions CSE 1400 Applied Discrete Mathematics Definitions Department of Computer Sciences College of Engineering Florida Tech Fall 2011 Arithmetic 1 Alphabets, Strings, Languages, & Words 2 Number Systems 3 Machine

More information

Optimal Metric Planning with State Sets in Automata Representation [3]

Optimal Metric Planning with State Sets in Automata Representation [3] Optimal Metric Planning with State Sets in Automata Representation [3] Björn Ulrich Borowsky Stefan Edelkamp Fakultät für Informatik, Technische Universität Dortmund, Germany 2008 (Slides by ) Goal and

More information

Lecture 10: Requirements Engineering. Wrap-Up. Softwaretechnik / Software-Engineering. Pre-Charts (Again)

Lecture 10: Requirements Engineering. Wrap-Up. Softwaretechnik / Software-Engineering. Pre-Charts (Again) Softwaretechnik / Software-Engineering Lecture 10: Requirements Engineering Wrap-Up 2016-06-13 Prof. Dr. Andreas Podelski, Dr. Bernd Westphal Albert-Ludwigs-Universität Freiburg, Germany Pre-Charts (Again)

More information

Fundamentals of Software Engineering

Fundamentals of Software Engineering Fundamentals of Software Engineering First-Order Logic Ina Schaefer Institute for Software Systems Engineering TU Braunschweig, Germany Slides by Wolfgang Ahrendt, Richard Bubel, Reiner Hähnle (Chalmers

More information

Discrete Mathematics

Discrete Mathematics Discrete Mathematics Yi Li Software School Fudan University March 13, 2017 Yi Li (Fudan University) Discrete Mathematics March 13, 2017 1 / 1 Review of Lattice Ideal Special Lattice Boolean Algebra Yi

More information

Consistency of a Programming Logic for a Version of PCF Using Domain Theory

Consistency of a Programming Logic for a Version of PCF Using Domain Theory Consistency of a Programming Logic for a Version of PCF Using Domain Theory Andrés Sicard-Ramírez EAFIT University Logic and Computation Seminar EAFIT University 5 April, 3 May 2013 A Core Functional Programming

More information

ECE473 Lecture 15: Propositional Logic

ECE473 Lecture 15: Propositional Logic ECE473 Lecture 15: Propositional Logic Jeffrey Mark Siskind School of Electrical and Computer Engineering Spring 2018 Siskind (Purdue ECE) ECE473 Lecture 15: Propositional Logic Spring 2018 1 / 23 What

More information

Impartial Anticipation in Runtime-Verification

Impartial Anticipation in Runtime-Verification Impartial Anticipation in Runtime-Verification Wei Dong 1, Martin Leucker 2, and Christian Schallhart 2 1 School of Computer, National University of Defense Technology, P.R.China 2 Institut für Informatik,

More information

Fundamentals of Software Engineering

Fundamentals of Software Engineering Fundamentals of Software Engineering First-Order Logic Ina Schaefer Institute for Software Systems Engineering TU Braunschweig, Germany Slides by Wolfgang Ahrendt, Richard Bubel, Reiner Hähnle (Chalmers

More information

An Introduction to Hybrid Systems Modeling

An Introduction to Hybrid Systems Modeling CS620, IIT BOMBAY An Introduction to Hybrid Systems Modeling Ashutosh Trivedi Department of Computer Science and Engineering, IIT Bombay CS620: New Trends in IT: Modeling and Verification of Cyber-Physical

More information

2. Associative Law: A binary operator * on a set S is said to be associated whenever (A*B)*C = A*(B*C) for all A,B,C S.

2. Associative Law: A binary operator * on a set S is said to be associated whenever (A*B)*C = A*(B*C) for all A,B,C S. BOOLEAN ALGEBRA 2.1 Introduction Binary logic deals with variables that have two discrete values: 1 for TRUE and 0 for FALSE. A simple switching circuit containing active elements such as a diode and transistor

More information

Two-Valued Logic Programs

Two-Valued Logic Programs Two-Valued Logic Programs Vladimir Lifschitz University of Texas at Austin, USA Abstract We define a nonmonotonic formalism that shares some features with three other systems of nonmonotonic reasoning

More information

Lecture Notes on Software Model Checking

Lecture Notes on Software Model Checking 15-414: Bug Catching: Automated Program Verification Lecture Notes on Software Model Checking Matt Fredrikson André Platzer Carnegie Mellon University Lecture 19 1 Introduction So far we ve focused on

More information

Benefits of Interval Temporal Logic for Specification of Concurrent Systems

Benefits of Interval Temporal Logic for Specification of Concurrent Systems Benefits of Interval Temporal Logic for Specification of Concurrent Systems Ben Moszkowski Software Technology Research Laboratory De Montfort University Leicester Great Britain email: benm@dmu.ac.uk http://www.tech.dmu.ac.uk/~benm

More information

Reasoning About Imperative Programs. COS 441 Slides 10b

Reasoning About Imperative Programs. COS 441 Slides 10b Reasoning About Imperative Programs COS 441 Slides 10b Last time Hoare Logic: { P } C { Q } Agenda If P is true in the initial state s. And C in state s evaluates to s. Then Q must be true in s. Program

More information

Operational Semantics

Operational Semantics Operational Semantics Semantics and applications to verification Xavier Rival École Normale Supérieure Xavier Rival Operational Semantics 1 / 50 Program of this first lecture Operational semantics Mathematical

More information

Principles of Knowledge Representation and Reasoning

Principles of Knowledge Representation and Reasoning Principles of Knowledge Representation and Reasoning Modal Logics Bernhard Nebel, Malte Helmert and Stefan Wölfl Albert-Ludwigs-Universität Freiburg May 2 & 6, 2008 Nebel, Helmert, Wölfl (Uni Freiburg)

More information

The non-logical symbols determine a specific F OL language and consists of the following sets. Σ = {Σ n } n<ω

The non-logical symbols determine a specific F OL language and consists of the following sets. Σ = {Σ n } n<ω 1 Preliminaries In this chapter we first give a summary of the basic notations, terminology and results which will be used in this thesis. The treatment here is reduced to a list of definitions. For the

More information

Logic Synthesis and Verification

Logic Synthesis and Verification Logic Synthesis and Verification Boolean Algebra Jie-Hong Roland Jiang 江介宏 Department of Electrical Engineering National Taiwan University Fall 2014 1 2 Boolean Algebra Reading F. M. Brown. Boolean Reasoning:

More information

Predicate Logic: Semantics

Predicate Logic: Semantics Predicate Logic: Semantics Alice Gao Lecture 13 Based on work by J. Buss, L. Kari, A. Lubiw, B. Bonakdarpour, D. Maftuleac, C. Roberts, R. Trefler, and P. Van Beek 1/34 Outline Semantics of Predicate Logic

More information

Automaten und Formale Sprachen Automata and Formal Languages

Automaten und Formale Sprachen Automata and Formal Languages WS 2014/15 Automaten und Formale Sprachen Automata and Formal Languages Ernst W. Mayr Fakultät für Informatik TU München http://www14.in.tum.de/lehre/2014ws/afs/ Wintersemester 2014/15 AFS Chapter 0 Organizational

More information

CS256/Spring 2008 Lecture #11 Zohar Manna. Beyond Temporal Logics

CS256/Spring 2008 Lecture #11 Zohar Manna. Beyond Temporal Logics CS256/Spring 2008 Lecture #11 Zohar Manna Beyond Temporal Logics Temporal logic expresses properties of infinite sequences of states, but there are interesting properties that cannot be expressed, e.g.,

More information

Time and Timed Petri Nets

Time and Timed Petri Nets Time and Timed Petri Nets Serge Haddad LSV ENS Cachan & CNRS & INRIA haddad@lsv.ens-cachan.fr DISC 11, June 9th 2011 1 Time and Petri Nets 2 Timed Models 3 Expressiveness 4 Analysis 1/36 Outline 1 Time

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, also known as fix-point semantics,

More information

CSE507. Satisfiability Modulo Theories. Computer-Aided Reasoning for Software. Emina Torlak

CSE507. Satisfiability Modulo Theories. Computer-Aided Reasoning for Software. Emina Torlak Computer-Aided Reasoning for Software CSE507 Satisfiability Modulo Theories courses.cs.washington.edu/courses/cse507/18sp/ Emina Torlak emina@cs.washington.edu Today Last lecture Practical applications

More information

03 Review of First-Order Logic

03 Review of First-Order Logic CAS 734 Winter 2014 03 Review of First-Order Logic William M. Farmer Department of Computing and Software McMaster University 18 January 2014 What is First-Order Logic? First-order logic is the study of

More information

Software Engineering using Formal Methods

Software Engineering using Formal Methods Software Engineering using Formal Methods First-Order Logic Wolfgang Ahrendt 26th September 2013 SEFM: First-Order Logic 130926 1 / 53 Install the KeY-Tool... KeY used in Friday s exercise Requires: Java

More information

Linking Duration Calculus and TLA

Linking Duration Calculus and TLA Linking Duration Calculus and TLA Yifeng Chen and Zhiming Liu Department of Computer Science, University of Leicester, Leicester LE1 7RH, UK Email: {Y.Chen, Z.Liu}@mcs.le.ac.uk Abstract. Different temporal

More information

Propositional Logic: Syntax

Propositional Logic: Syntax Logic Logic is a tool for formalizing reasoning. There are lots of different logics: probabilistic logic: for reasoning about probability temporal logic: for reasoning about time (and programs) epistemic

More information

07 Equational Logic and Algebraic Reasoning

07 Equational Logic and Algebraic Reasoning CAS 701 Fall 2004 07 Equational Logic and Algebraic Reasoning Instructor: W. M. Farmer Revised: 17 November 2004 1 What is Equational Logic? Equational logic is first-order logic restricted to languages

More information

PROPOSITIONAL LOGIC. VL Logik: WS 2018/19

PROPOSITIONAL LOGIC. VL Logik: WS 2018/19 PROPOSITIONAL LOGIC VL Logik: WS 2018/19 (Version 2018.2) Martina Seidl (martina.seidl@jku.at), Armin Biere (biere@jku.at) Institut für Formale Modelle und Verifikation BOX Game: Rules 1. The game board

More information

Hierarchic Superposition: Completeness without Compactness

Hierarchic Superposition: Completeness without Compactness Hierarchic Superposition: Completeness without Compactness Peter Baumgartner 1 and Uwe Waldmann 2 1 NICTA and Australian National University, Canberra, Australia Peter.Baumgartner@nicta.com.au 2 MPI für

More information

Lecture 3: Duration Calculus I

Lecture 3: Duration Calculus I Real-Time Systems Lecture 3: Duration Calculus I 27--26 Dr. Bernd Westphal Albert-Ludwigs-Universität Freiburg, Germany 3 27--26 main Content Introduction Observables and Evolutions Duration Calculus (DC)

More information

Introduction to Kleene Algebra Lecture 14 CS786 Spring 2004 March 15, 2004

Introduction to Kleene Algebra Lecture 14 CS786 Spring 2004 March 15, 2004 Introduction to Kleene Algebra Lecture 14 CS786 Spring 2004 March 15, 2004 KAT and Hoare Logic In this lecture and the next we show that KAT subsumes propositional Hoare logic (PHL). Thus the specialized

More information

Monadic Second Order Logic and Automata on Infinite Words: Büchi s Theorem

Monadic Second Order Logic and Automata on Infinite Words: Büchi s Theorem Monadic Second Order Logic and Automata on Infinite Words: Büchi s Theorem R. Dustin Wehr December 18, 2007 Büchi s theorem establishes the equivalence of the satisfiability relation for monadic second-order

More information

Constraint Solving for Program Verification: Theory and Practice by Example

Constraint Solving for Program Verification: Theory and Practice by Example Constraint Solving for Program Verification: Theory and Practice by Example Andrey Rybalchenko Technische Universität München Abstract. Program verification relies on the construction of auxiliary assertions

More information

Lecture 9: DC Implementables II

Lecture 9: DC Implementables II Real-Time Systems Lecture 9: DC Implementables II 2017-11-28 Dr. Bernd Westphal Albert-Ludwigs-Universität Freiburg, Germany 9 2017-11-28 main Content Correctness Proof for the Gas Burner Implementables

More information

Halting and Equivalence of Program Schemes in Models of Arbitrary Theories

Halting and Equivalence of Program Schemes in Models of Arbitrary Theories Halting and Equivalence of Program Schemes in Models of Arbitrary Theories Dexter Kozen Cornell University, Ithaca, New York 14853-7501, USA, kozen@cs.cornell.edu, http://www.cs.cornell.edu/~kozen In Honor

More information

Foundations of Artificial Intelligence

Foundations of Artificial Intelligence Foundations of Artificial Intelligence 7. Propositional Logic Rational Thinking, Logic, Resolution Joschka Boedecker and Wolfram Burgard and Frank Hutter and Bernhard Nebel Albert-Ludwigs-Universität Freiburg

More information

Revision of DL-Lite Knowledge Bases

Revision of DL-Lite Knowledge Bases Revision of DL-Lite Knowledge Bases Zhe Wang, Kewen Wang, and Rodney Topor Griffith University, Australia Abstract. We address the revision problem for knowledge bases (KBs) in Description Logics (DLs).

More information

2.2 Lowenheim-Skolem-Tarski theorems

2.2 Lowenheim-Skolem-Tarski theorems Logic SEP: Day 1 July 15, 2013 1 Some references Syllabus: http://www.math.wisc.edu/graduate/guide-qe Previous years qualifying exams: http://www.math.wisc.edu/ miller/old/qual/index.html Miller s Moore

More information

Comp487/587 - Boolean Formulas

Comp487/587 - Boolean Formulas Comp487/587 - Boolean Formulas 1 Logic and SAT 1.1 What is a Boolean Formula Logic is a way through which we can analyze and reason about simple or complicated events. In particular, we are interested

More information

Subsumption of concepts in FL 0 for (cyclic) terminologies with respect to descriptive semantics is PSPACE-complete.

Subsumption of concepts in FL 0 for (cyclic) terminologies with respect to descriptive semantics is PSPACE-complete. Subsumption of concepts in FL 0 for (cyclic) terminologies with respect to descriptive semantics is PSPACE-complete. Yevgeny Kazakov and Hans de Nivelle MPI für Informatik, Saarbrücken, Germany E-mail:

More information

Softwaretechnik. Lecture 13: Design by Contract. Peter Thiemann University of Freiburg, Germany

Softwaretechnik. Lecture 13: Design by Contract. Peter Thiemann University of Freiburg, Germany Softwaretechnik Lecture 13: Design by Contract Peter Thiemann University of Freiburg, Germany 25.06.2012 Table of Contents Design by Contract Contracts for Procedural Programs Contracts for Object-Oriented

More information

Deductive Verification

Deductive Verification Deductive Verification Mooly Sagiv Slides from Zvonimir Rakamaric First-Order Logic A formal notation for mathematics, with expressions involving Propositional symbols Predicates Functions and constant

More information

Softwaretechnik. Lecture 13: Design by Contract. Peter Thiemann University of Freiburg, Germany

Softwaretechnik. Lecture 13: Design by Contract. Peter Thiemann University of Freiburg, Germany Softwaretechnik Lecture 13: Design by Contract Peter Thiemann University of Freiburg, Germany 25.06.2012 Table of Contents Design by Contract Contracts for Procedural Programs Contracts for Object-Oriented

More information

Source Code Metrics for Programmable Logic Controller (PLC) Ladder Diagram (LD) Visual Programming Language

Source Code Metrics for Programmable Logic Controller (PLC) Ladder Diagram (LD) Visual Programming Language Source Code Metrics for Programmable Logic Controller (PLC) Ladder Diagram (LD) Visual Programming Language Lov Kumar lov.kumar@in.abb.com Raoul Jetley raoul.jetley@in.abb.com ABB Corporate Research Center

More information

Part 2: First-Order Logic

Part 2: First-Order Logic Part 2: First-Order Logic First-order logic formalizes fundamental mathematical concepts is expressive (Turing-complete) is not too expressive (e. g. not axiomatizable: natural numbers, uncountable sets)

More information

Requirements-based Test Generation for Predicate Testing

Requirements-based Test Generation for Predicate Testing Requirements-based Test Generation for Predicate Testing W. Eric Wong Department of Computer Science The University of Texas at Dallas ewong@utdallas.edu http://www.utdallas.edu/~ewong 1 Speaker Biographical

More information

An Algebraic Semantics for Duration Calculus

An Algebraic Semantics for Duration Calculus An Algebraic Semantics for Duration Calculus Peter Höfner Institut für Informatik, Universität Augsburg D-86135 Augsburg, Germany hoefner@informatik.uni-augsburg.de Abstract. We present an algebraic semantics

More information

Towards Lightweight Integration of SMT Solvers

Towards Lightweight Integration of SMT Solvers Towards Lightweight Integration of SMT Solvers Andrei Lapets Boston University Boston, USA lapets@bu.edu Saber Mirzaei Boston University Boston, USA smirzaei@bu.edu 1 Introduction A large variety of SMT

More information

Mathematical Foundations of Programming. Nicolai Kraus. Draft of February 15, 2018

Mathematical Foundations of Programming. Nicolai Kraus. Draft of February 15, 2018 Very short lecture notes: Mathematical Foundations of Programming University of Nottingham, Computer Science, module code G54FOP, Spring 2018 Nicolai Kraus Draft of February 15, 2018 What is this? This

More information

Introduction to Artificial Intelligence. Logical Agents

Introduction to Artificial Intelligence. Logical Agents Introduction to Artificial Intelligence Logical Agents (Logic, Deduction, Knowledge Representation) Bernhard Beckert UNIVERSITÄT KOBLENZ-LANDAU Winter Term 2004/2005 B. Beckert: KI für IM p.1 Outline Knowledge-based

More information

Discrete Mathematics Review

Discrete Mathematics Review CS 1813 Discrete Mathematics Discrete Mathematics Review or Yes, the Final Will Be Comprehensive 1 Truth Tables for Logical Operators P Q P Q False False False P Q False P Q False P Q True P Q True P True

More information

On decision problems for timed automata

On decision problems for timed automata On decision problems for timed automata Olivier Finkel Equipe de Logique Mathématique, U.F.R. de Mathématiques, Université Paris 7 2 Place Jussieu 75251 Paris cedex 05, France. finkel@logique.jussieu.fr

More information

A Theoretical Framework for Configuration

A Theoretical Framework for Configuration Belli (Ed.): Proceedings of the IEA/AIE 92, Paderborn 5th Int. Conf. on Industrial & Engineering Applications of AI Lecture Notes in AI, pp. 441-450, 1992, Springer. ISBN 3-540-55601-X 441 A Theoretical

More information

Principles of Program Analysis: A Sampler of Approaches

Principles of Program Analysis: A Sampler of Approaches Principles of Program Analysis: A Sampler of Approaches Transparencies based on Chapter 1 of the book: Flemming Nielson, Hanne Riis Nielson and Chris Hankin: Principles of Program Analysis Springer Verlag

More information

Software Verification 1 Deductive Verification

Software Verification 1 Deductive Verification Software Verification 1 Deductive Verification Prof. Dr. Holger Schlingloff Institut für Informatik der Humboldt Universität und Fraunhofer Institut für offene Kommunikationssysteme FOKUS 21.5.2015 Folie

More information

CVO103: Programming Languages. Lecture 2 Inductive Definitions (2)

CVO103: Programming Languages. Lecture 2 Inductive Definitions (2) CVO103: Programming Languages Lecture 2 Inductive Definitions (2) Hakjoo Oh 2018 Spring Hakjoo Oh CVO103 2018 Spring, Lecture 2 March 13, 2018 1 / 20 Contents More examples of inductive definitions natural

More information

Relational Interfaces and Refinement Calculus for Compositional System Reasoning

Relational Interfaces and Refinement Calculus for Compositional System Reasoning Relational Interfaces and Refinement Calculus for Compositional System Reasoning Viorel Preoteasa Joint work with Stavros Tripakis and Iulia Dragomir 1 Overview Motivation General refinement Relational

More information

A SEQUENT SYSTEM OF THE LOGIC R FOR ROSSER SENTENCES 2. Abstract

A SEQUENT SYSTEM OF THE LOGIC R FOR ROSSER SENTENCES 2. Abstract Bulletin of the Section of Logic Volume 33/1 (2004), pp. 11 21 Katsumi Sasaki 1 Shigeo Ohama A SEQUENT SYSTEM OF THE LOGIC R FOR ROSSER SENTENCES 2 Abstract To discuss Rosser sentences, Guaspari and Solovay

More information

n = p 1 p 2 p r = q 1 q 2 q m, then r = m (i.e. the number of primes in any prime decomposition

n = p 1 p 2 p r = q 1 q 2 q m, then r = m (i.e. the number of primes in any prime decomposition Department of Mathematical Sciences Instructor: Daiva Pucinskaite Discrete Mathematics Factoring Recall. Fundamental Theorem of Arithmetic. Let n be a positive integer n > 1. Then n can be represented

More information

Lecture 15: Software Quality Assurance

Lecture 15: Software Quality Assurance Softwaretechnik / Software-Engineering Lecture 15: Software Quality Assurance 2015-07-09 15 2015-07-09 main Prof. Dr. Andreas Podelski, Dr. Bernd Westphal Albert-Ludwigs-Universität Freiburg, Germany Contents

More information

Propositional Logic: Models and Proofs

Propositional Logic: Models and Proofs Propositional Logic: Models and Proofs C. R. Ramakrishnan CSE 505 1 Syntax 2 Model Theory 3 Proof Theory and Resolution Compiled at 11:51 on 2016/11/02 Computing with Logic Propositional Logic CSE 505

More information

Monoid Modules and Structured Document Algebra

Monoid Modules and Structured Document Algebra Monoid Modules and Structured Document Algebra (Extendend Abstract) Andreas Zelend Institut für Informatik, Universität Augsburg, Germany zelend@informatik.uni-augsburg.de 1 Introduction Feature Oriented

More information