Lecture 4: OCL Semantics

Size: px
Start display at page:

Download "Lecture 4: OCL Semantics"

Transcription

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

2 Content The Object Constraint Language (OCL): Semantics Overview OCL Types Arithmetic / Logical Operators OCL Expressions Iterate A Complete Example Scontent 2/29

3 Recall Soclsyn OCL Syntax 1/4: Expressions expr ::= w : (w) expr 1 = expr 2 : Bool oclisunde ned (expr 1 ) : Bool {expr 1,...,expr n } : Set( ) isempty(expr 1 ) : Set( ) Bool size(expr 1 ) : Set( ) Int allinstances C : Set( C) Where, given S = (T, C,V,atr), w W {self C : C C C} is a set of typed logical variables, w has type (w) is any type from T T B T C {Set( 0) 0 T T B T C} T B is a set of (OCL) basic types, in the following we use T B = {Bool,Int,String} T C = { C C C} is the set of object types, Set( 0) denotes the set-of- 0 type for 0 T B T C (sufficient because of flattening (cf. standard)). v(expr 1 ) : C where v : atr(c), T, r 1(expr 1 ) : C D where r 1 : D 0,1 atr(c),c,d C, r 2(expr 1 ) : C Set( D) where r 2 : D atr(c),c,d C. 7/ Soclsyn OCL Syntax 2/4: Constants & Arithmetics For example: expr ::=... true, false : Bool expr 1 {and,or,implies}expr 2 : Bool Bool Bool notexpr 1 : Bool Bool 0, 1,1, 2,2,... : Int expr 1 {+,,...}expr 2 : Int Int Int expr 1 {<,,...}expr 2 : Int Int Bool OclUnde ned : Generalised notation: with {+,,...} expr ::= (expr 1,...,expr n ) : 1 n 10/24 OCL Syntax 3/4: Iterate OCL Syntax 4/4: Context or, with a little renaming, expr ::= expr 1 ->iterate(w 1 :T 1 ;w 2 :T 2 =expr 2 expr 3 ) Syntax: (Assuming signature S = (T, C,V,atr).) context ::= contextw 1 :T 1,...,w n :T n inv :expr wheret i C andw i : Ti W for all1 i n,n Sthetask Soclsyn where expr ::= expr 1 ->iterate(iter :T 1 ;result :T 2 =expr 2 expr 3 ) expr 1 is of a collection type (here: a setset( 0) for some 0), iter W is called iterator, of the type denoted byt 1 (ift 1 is omitted, 0 is assumed as type ofiter) result W is called result variable, gets type 2 denoted byt 2, expr 2 in an expression of type 2 giving the initial value forresult, (OclUnde ned 2, if omitted) expr 3 is an expression of type 2, in particulariter andresult may appear inexpr 3. 12/ Soclsyn Semantics: contextw 1 : C 1,...,w n : C n inv :expr is (just) an abbreviation for allinstances C1 ->forall(w 1 : C1... allinstances Cn ->forall(w n : Cn expr )... ) 17/24 3/29

4 OCL Semantics: The Task Given an OCL expression (over signature S ), e.g. expr 1 = context CP inv : wen implies dd.wis > 0 and a system state σ 1 = {7 VM {dd {1 DD },cp {3 DD,5 DD }}, 1 DD {wis 13}, 3 CP {dd {1 DD },wen true}, 5 CP {dd {1 DD },wen false}} Σ D S and a valuation of the logical variables β 1 : W I(T T B T C ), compute the value I expr 1 (σ 1,β 1 ) {true, false, Bool } ofexpr 1 inσ 1 underβ 1. More general: Define the interpretationi expr (σ,β) ofexpr inσ underβ: I (, ) : OCLExpressions(S) Σ D S (W I(T T B T C )) I(Bool) Sthetask 4/29

5 OCL Semantics OMG (2006) 5/ main

6 Basically business as usual... (i) Equip each OCL (!) type with a reasonable domain, i.e. define function I with dom(i) = T T B T C (ii) Equip each set typeset(τ 0 ) with reasonable domain, i.e. define function I with dom(i) = {Set(τ 0 ) τ 0 T T B T C } (iii) Equip each arithmetical operation with a reasonable interpretation (that is, with a function operating on the corresponding domains), i.e. define function I with dom(i) = {+,,,...}, e.g.,i(+) I(Int) I(Int) I(Int) (iv) Same game for set operations: define function I with dom(i) = {isempty,...} (v) Equip each expression with a reasonable interpretation, i.e. define function I : Expr Σ D S (W I(T T B T C )) I(Bool) Soclsem...except for OCL being a three-valued logic, and the iterate expression. 6/29

7 (i) Domains of OCL and (!) Model Basic Types Recall: OCL basic types 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. Given signature S with model basic types T and domain D, set for each model basic typet T. I(T) := D(T) { T } Soclsemtypes 7/29

8 OCL and Model Types?! An Example. S = ({Bool,Nat},{VM,CP,DD}, {cp : CP,dd : DD 0,1,wen : Bool,wis : Nat}, {VM {cp,dd},cp {wen,dd},dd {wis}) Soclsemtypes 8/29

9 (i) Domains of Object and (ii) Set Types Letτ C be an (OCL) object type for a classc C. We set I(τ C ) := D(C) { τc } Letτ be a type from T T B T C. We set I(Set(τ)) := 2 I(τ) { Set(τ) } Note: in the OCL standard, only finite subsets of I(τ). Infinity doesn t scare us, so we simply allow it Soclsemtypes 9/29

10 (iii) 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 forx 1,x 2 I(τ)): true, ifx 1 τ x 2 andx 1 = x 2 I(= τ )(x 1,x 2 ) := false, ifx 1 τ x 2 andx 1 x 2, otherwise Bool Logical connectives, e.g. I(and)(, ) : {true, false, } {true, false, } {true, false, } is defined by the following truth table: Soclsemarith x 1 true true true false false false x 2 true false true false true false I(and)(x 1,x 2 ) true false false false false false We assume common logical connectives not, or,... with the canonical 3-valued interpretation. 10/29

11 (iii) Interpretation of OclIsUndefined The is-undefined predicate (defined point-wise for x I(τ)): { true, ifx = τ I(oclIsUndefined τ )(x) := false, otherwise Note: I(oclIsUndefined τ ) is definite, i.e., it never yields. Integer operations (defined point-wise forx 1,x 2 I(Int)): { x 1 +x 2, ifx 1 x 2 I(+)(x 1,x 2 ) :=, otherwise Note: There is a common principle. The interpretation of an operation (symbol) Soclsemarith ω : τ 1...τ n τ, n 0 is a function I(ω) : I(τ 1 ) I(τ n ) I(τ) on corresponding semantical domain(s) of OCL (!) types. 11/29

12 (iv) Interpretation of Set Operations Basically the same principle as with arithmetic operations... Letτ T T B T C. Set comprehension (x 1,...,x n I(τ)): I({} τ n)(x 1,...,x n ) := {x 1,...,x n } for alln N 0 Empty-ness check (x I(Set(τ))): I(isEmpty τ )(x) := true Bool false, ifx =, ifx = Set(τ), otherwise Soclsemarith Counting (x I(Set(τ))): I(size τ )(x) := { x Int, ifx Set(τ), otherwise 12/29

13 (v) Interpretation of OCL Expressions Soclsyn OCL Syntax 1/4: Expressions expr ::= w : (w) expr 1 = expr 2 : Bool oclisunde ned (expr 1 ) : Bool {expr 1,...,expr n } : Set( ) isempty(expr 1 ) : Set( ) Bool size(expr 1 ) : Set( ) Int allinstances C : Set( C) Where, given S = (T, C,V,atr), w W {self C : C C C} is a set of typed logical variables, w has type (w) is any type from T T B T C {Set( 0) 0 T T B T C} T B is a set of (OCL) basic types, in the following we use T B = {Bool,Int,String} T C = { C C C} is the set of object types, Set( 0) denotes the set-of- 0 type for 0 T B T C (sufficient because of flattening (cf. standard)). v(expr 1 ) : C where v : atr(c), T, r 1(expr 1 ) : C D where r 1 : D 0,1 atr(c),c,d C, r 2(expr 1 ) : C Set( D) where r 2 : D atr(c),c,d C. 7/ Soclsyn OCL Syntax 2/4: Constants & Arithmetics For example: expr ::=... true, false : Bool expr 1 {and,or,implies}expr 2 : Bool Bool Bool notexpr 1 : Bool Bool 0, 1,1, 2,2,... : Int expr 1 {+,,...}expr 2 : Int Int Int expr 1 {<,,...}expr 2 : Int Int Bool OclUnde ned : Generalised notation: with {+,,...} expr ::= (expr 1,...,expr n ) : 1 n 10/24 OCL Syntax 3/4: Iterate OCL Syntax 4/4: Context or, with a little renaming, expr ::= expr 1 ->iterate(w 1 :T 1 ;w 2 :T 2 =expr 2 expr 3 ) Syntax: (Assuming signature S = (T, C,V,atr).) context ::= contextw 1 :T 1,...,w n :T n inv :expr wheret i C andw i : Ti W for all1 i n,n Soclsemexpr Soclsyn where expr ::= expr 1 ->iterate(iter :T 1 ;result :T 2 =expr 2 expr 3 ) expr 1 is of a collection type (here: a setset( 0) for some 0), iter W is called iterator, of the type denoted byt 1 (ift 1 is omitted, 0 is assumed as type ofiter) result W is called result variable, gets type 2 denoted byt 2, expr 2 in an expression of type 2 giving the initial value forresult, (OclUnde ned 2, if omitted) expr 3 is an expression of type 2, in particulariter andresult may appear inexpr 3. 12/ Soclsyn Semantics: contextw 1 : C 1,...,w n : C n inv :expr is (just) an abbreviation for allinstances C1 ->forall(w 1 : C1... allinstances Cn ->forall(w n : Cn expr )... ) 17/24 13/29

14 Valuations of Logical Variables Recall: we have typed logical variables(w )W,τ(w) is the type ofw. Byβ, we denote a valuation of the logical variables, i.e. for eachw W, β(w) I(τ(w)) Soclsemexpr 14/29

15 (v) Interpretation of OCL Expressions 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 Soclsemexpr 15/29

16 Example S = ({Bool,Nat},{VM,CP,DD}, {cp : CP,dd : DD 0,1,wen : Bool,wis : Nat}, {VM {cp,dd},cp {wen,dd},dd {wis}) σ 1 = {7 VM {dd {1 DD },cp {3 DD,5 DD }}, 1 DD {wis 13}, 3 CP {dd {1 DD },wen true}, 5 CP {dd {1 DD },wen false}} I w (σ,β) := β(w) I allinstances C (σ,β) := dom(σ) D(C) I ω(expr 1,...,expr n ) (σ,β) := I(ω)(I expr 1 (σ,β),...i expr n (σ,β)) I allinstances CP (σ 1,β) I allinstances CP ->size (σ 1,β) Soclsemexpr β 1 := {3 CP }, I self (σ 1,β 1 ) 16/29

17 (v) Interpretation of OCL Expressions 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 ) Assumeexpr 1 : τ C for somec C. Setu 1 := I expr 1 (σ,β) D(τ C ). I v(expr 1 ) (σ,β) := { σ(u 1 )(v), ifu 1 dom(σ), otherwise Soclsemexpr 17/29

18 Example S = ({Bool,Nat},{VM,CP,DD}, {cp : CP,dd : DD 0,1,wen : Bool,wis : Nat}, {VM {cp,dd},cp {wen,dd},dd {wis}) σ 1 = {7 VM {dd {1 DD },cp {3 DD,5 DD }}, 1 DD {wis 13}, 3 CP {dd {1 DD },wen true}, 5 CP {dd {1 DD },wen false}} Assumeexpr 1 : τ C for somec C. Setu 1 := I expr 1 (σ,β) D(τ C ). { σ(u 1 )(v), ifu 1 dom(σ) I v(expr 1 ) (σ,β) :=, otherwise β 1 := {3 CP }, I wen(self) (σ 1,β 1 ) Soclsemexpr 18/29

19 (v) Interpretation of OCL Expressions 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 ) Assumeexpr 1 : τ C for somec C. Setu 1 := I expr 1 (σ,β) D(τ C ). I v(expr 1 ) (σ,β) := { σ(u 1 )(v), ifu 1 dom(σ), otherwise I r 1 (expr 1 ) (σ,β) := { u, ifu 1 dom(σ) andσ(u 1 )(r 1 ) = {u}, otherwise I r 2 (expr 1 ) (σ,β) := { σ(u 1 )(r 2 ), ifu 1 dom(σ), otherwise Soclsemexpr Recall: σ evaluatesr 2 of typec to a set. 19/29

20 Iterate: Intuitive Semantics expr ::= expr 1 ->iterate(iter :T 1 ; result :T 2 =expr 2 expr 3 ) Set(τ 0 )hlp := expr 1 ; τ 1 iter; τ 2 result := expr 2 ; while (!hlp.empty()) do iter := hlp.pop(); result := expr 3 ; od; return result; Soclsemiter 20/29

21 Iterate: Intuitive Semantics expr ::= expr 1 ->iterate(iter :T 1 ; result :T 2 =expr 2 expr 3 ) Set(τ 0 )hlp := expr 1 ; τ 1 iter; τ 2 result := expr 2 ; while (!hlp.empty()) do iter := hlp.pop(); result := expr 3 ; od; return result; Soclsemiter Recall: In our (simplified) setting, we always haveexpr 1 : Set(τ 0 ) andτ 1 = τ 0. In the type hierarchy of full OCL with inheritance andoclany,τ 0 andτ 1 may be different and still type consistent. 20/29

22 (v) Interpretation of OCL Expressions 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 (σ,β), ifi 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} andx whereβ = β [v 1 x, v 2 iterate(hlp,v 1,v 2,expr 3,σ,β [hlp X])] Soclsemiter Quiz: Is (our) I a function? 21/29

23 Example S = ({Bool,Nat},{VM,CP,DD}, {cp : CP,dd : DD 0,1,wen : Bool,wis : Nat}, {VM {cp,dd},cp {wen,dd},dd {wis}) σ 1 = {7 VM {dd {1 DD },cp {3 DD,5 DD }}, 1 DD {wis 13}, 3 CP {dd {1 DD },wen true}, 5 CP {dd {1 DD },wen false}} context CP inv : wen implies dd.wis > Soclsemexa 22/29

24 Example S = ({Bool,Nat},{VM,CP,DD}, {cp : CP,dd : DD 0,1,wen : Bool,wis : Nat}, {VM {cp,dd},cp {wen,dd},dd {wis}) σ 1 = {7 VM {dd {1 DD },cp {3 DD,5 DD }}, 1 DD {wis 13}, 3 CP {dd {1 DD },wen true}, 5 CP {dd {1 DD },wen false}} context CP inv : wen implies dd.wis > 0 allinstances CP ->forall(self self.wen implies self.dd.wis > 0) Soclsemexa 22/29

25 Example S = ({Bool,Nat},{VM,CP,DD}, {cp : CP,dd : DD 0,1,wen : Bool,wis : Nat}, {VM {cp,dd},cp {wen,dd},dd {wis}) σ 1 = {7 VM {dd {1 DD },cp {3 DD,5 DD }}, 1 DD {wis 13}, 3 CP {dd {1 DD },wen true}, 5 CP {dd {1 DD },wen false}} context CP inv : wen implies dd.wis > 0 allinstances CP ->iterate(self;r : Bool = true and(r,implies(wen(self),>(wis(dd(self)),0)))) Soclsemexa 22/29

26 Tell Them What You ve Told Them... Given an OCL expression expr, and a system stateσ, and a valuation β of the logical variables we can compute the value I expr (σ,β) {true, false, Bool } ofexpr inσ underβ using the interpretation function I (, ) : OCLExpressions(S) Σ D S (W I(T T B T C )) I(Bool) Sttwytt 23/29

27 User s Guide Example: Approach: Task: Given a square with side length a = What is the length of the longest The lectures straight isline supposed fully inside to work the square? as a lecture: spoken word+slides+discussion It is not our goal to make any of the three work in isolation. Submission A: Submission B: Interaction: 27 The length of the longest straight line fully inside the square with side lengtha = 19.1 is (rounded). The longest straight line inside the square is the diagonal. By Pythagoras, its length is a2 + a 2. Insertinga = 19.1 yields Absence often moaned but it takes two: please ask/comment immediately. (rounded). Exercise submissions: Each task is a tiny little scientific work: (i) Briefly rephrase the task in your own words. (ii) State your claimed solution main Sformalia (iii) Convince your reader that your proposal is a solution (proofs are very convincing). 31/34 24/29

28 User s Guide Example: Approach: Task: Given a square with side length a = What is the length of the longest The lectures straight isline supposed fully inside to work the square? as a lecture: spoken word+slides+discussion It is not our goal to make any of the three work in isolation. Submission A: Submission B: Interaction: 27 Absence often moaned but it takes two: please ask/comment immediately. The length of the longest straight line fully inside the square with side lengtha = 19.1 is (rounded). The longest straight line inside the square is the diagonal. By Pythagoras, its length is a2 + a 2. Insertinga = 19.1 yields (rounded). Exercise submissions: Each task is a tiny little scientific work: (i) Briefly rephrase the task in your own words. (ii) State your claimed solution main Sformalia (iii) Convince your reader that your proposal is a solution (proofs are very convincing). 31/34 25/29

29 Formalia: Exercises and Tutorials You should work in groups of approx. 3, clearly give names on submission. Please submit via ILIAS (cf. homepage); paper submissions are tolerated. Schedule: Week N, Thursday, 8 10 Lecture A1 (exercise sheet A online) Week N + 1, Tuesday 8 10 Lecture A2 Thursday 8 10 Lecture A3 Week N + 2, Monday, 12:00 (exercises A early submission) Tuesday, 8:00 (exercises A late submission) 8 10 Tutorial A Thursday 8 10 Lecture B1 (exercise sheet B online)... Rating system: most complicated rating system ever Admission points (good-will rating, upper bound) ( reasonable proposal given student s knowledge before tutorial ) Exam-like points (evil rating, lower bound) ( reasonable proposal given student s knowledge after tutorial ) 10% bonus for early submission main Sformalia Tutorial: Plenary, not recorded. Together develop one good solution based on selection of early submissions (anonymous) there is no Musterlösung for modelling tasks. 29/34 26/29

30 27/ Sblank

31 References 28/ main

32 References OMG (2006). Object Constraint Language, version 2.0. Technical Report formal/ OMG (2007a). Unified modeling language: Infrastructure, version Technical Report formal/ OMG (2007b). Unified modeling language: Superstructure, version Technical Report formal/ main 29/29

Lecture 04: OCL Semantics

Lecture 04: OCL Semantics Software Design, Modelling and Analysis in UML Lecture 04: OCL Semantics 2014-10-30 Prof. Dr. Andreas Podelski, Dr. Bernd Westphal 04 2014-10-30 main Albert-Ludwigs-Universität Freiburg, Germany Contents

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 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 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

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

we could choose to work with the following symbols for natural numbers: Syntax: zero,one,two,...,twentyseven,...

we could choose to work with the following symbols for natural numbers: Syntax: zero,one,two,...,twentyseven,... 3 27--26 main 27--7 Snoncontent 2 27--9 Sdcpreview 3 27--26 Scontent Content Real- Systems Lecture 3: Duration Calculus I 27--26 Dr. Bernd Westphal Albert-Ludwigs-Universität Freiburg, Germany Symbols

More information

Propositional Logic: Semantics and an Example

Propositional Logic: Semantics and an Example Propositional Logic: Semantics and an Example CPSC 322 Logic 2 Textbook 5.2 Propositional Logic: Semantics and an Example CPSC 322 Logic 2, Slide 1 Lecture Overview 1 Recap: Syntax 2 Propositional Definite

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

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

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 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

Propositions. c D. Poole and A. Mackworth 2010 Artificial Intelligence, Lecture 5.1, Page 1

Propositions. c D. Poole and A. Mackworth 2010 Artificial Intelligence, Lecture 5.1, Page 1 Propositions An interpretation is an assignment of values to all variables. A model is an interpretation that satisfies the constraints. Often we don t want to just find a model, but want to know what

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

Lecture 4: Proposition, Connectives and Truth Tables

Lecture 4: Proposition, Connectives and Truth Tables Discrete Mathematics (II) Spring 2017 Lecture 4: Proposition, Connectives and Truth Tables Lecturer: Yi Li 1 Overview In last lecture, we give a brief introduction to mathematical logic and then redefine

More information

Introduction to Metalogic

Introduction to Metalogic Philosophy 135 Spring 2008 Tony Martin Introduction to Metalogic 1 The semantics of sentential logic. The language L of sentential logic. Symbols of L: Remarks: (i) sentence letters p 0, p 1, p 2,... (ii)

More information

IST 4 Information and Logic

IST 4 Information and Logic IST 4 Information and Logic mon tue wed thr fri sun T = today 3 M oh x= hw#x out oh M 7 oh oh 2 M2 oh oh x= hw#x due 24 oh oh 2 oh = office hours oh oh T M2 8 3 oh midterms oh oh Mx= MQx out 5 oh 3 4 oh

More information

Logic Propositional logic; First order/predicate logic

Logic Propositional logic; First order/predicate logic Logic Propositional logic; First order/predicate logic School of Athens Fresco by Raphael Wikimedia Commons Discrete Structures (CS 173) Madhusudan Parthasarathy, University of Illinois Mathematical logic

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

Introduction to Metalogic 1

Introduction to Metalogic 1 Philosophy 135 Spring 2012 Tony Martin Introduction to Metalogic 1 1 The semantics of sentential logic. The language L of sentential logic. Symbols of L: (i) sentence letters p 0, p 1, p 2,... (ii) connectives,

More information

1 FUNDAMENTALS OF LOGIC NO.10 HERBRAND THEOREM Tatsuya Hagino hagino@sfc.keio.ac.jp lecture URL https://vu5.sfc.keio.ac.jp/slide/ 2 So Far Propositional Logic Logical connectives (,,, ) Truth table Tautology

More information

Welcome to MAT 137! Course website:

Welcome to MAT 137! Course website: Welcome to MAT 137! Course website: http://uoft.me/ Read the course outline Office hours to be posted here Online forum: Piazza Precalculus review: http://uoft.me/precalc If you haven t gotten an email

More information

Logic in Computer Science. Frank Wolter

Logic in Computer Science. Frank Wolter Logic in Computer Science Frank Wolter Meta Information Slides, exercises, and other relevant information are available at: http://www.liv.ac.uk/~frank/teaching/comp118/comp118.html The module has 18 lectures.

More information

WUCT121. Discrete Mathematics. Numbers

WUCT121. Discrete Mathematics. Numbers WUCT121 Discrete Mathematics Numbers 1. Natural Numbers 2. Integers and Real Numbers 3. The Principle of Mathematical Induction 4. Elementary Number Theory 5. Congruence Arithmetic WUCT121 Numbers 1 Section

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

Math 31 Lesson Plan. Day 2: Sets; Binary Operations. Elizabeth Gillaspy. September 23, 2011

Math 31 Lesson Plan. Day 2: Sets; Binary Operations. Elizabeth Gillaspy. September 23, 2011 Math 31 Lesson Plan Day 2: Sets; Binary Operations Elizabeth Gillaspy September 23, 2011 Supplies needed: 30 worksheets. Scratch paper? Sign in sheet Goals for myself: Tell them what you re going to tell

More information

CS Lecture 19: Logic To Truth through Proof. Prof. Clarkson Fall Today s music: Theme from Sherlock

CS Lecture 19: Logic To Truth through Proof. Prof. Clarkson Fall Today s music: Theme from Sherlock CS 3110 Lecture 19: Logic To Truth through Proof Prof. Clarkson Fall 2014 Today s music: Theme from Sherlock Review Current topic: How to reason about correctness of code Last week: informal arguments

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

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

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

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

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

Logic for Computer Science - Week 4 Natural Deduction

Logic for Computer Science - Week 4 Natural Deduction Logic for Computer Science - Week 4 Natural Deduction 1 Introduction In the previous lecture we have discussed some important notions about the semantics of propositional logic. 1. the truth value of a

More information

COMP 2600: Formal Methods for Software Engineeing

COMP 2600: Formal Methods for Software Engineeing COMP 2600: Formal Methods for Software Engineeing Dirk Pattinson Semester 2, 2013 What do we mean by FORMAL? Oxford Dictionary in accordance with convention or etiquette or denoting a style of writing

More information

Formal Epistemology: Lecture Notes. Horacio Arló-Costa Carnegie Mellon University

Formal Epistemology: Lecture Notes. Horacio Arló-Costa Carnegie Mellon University Formal Epistemology: Lecture Notes Horacio Arló-Costa Carnegie Mellon University hcosta@andrew.cmu.edu Logical preliminaries Let L 0 be a language containing a complete set of Boolean connectives, including

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

Selected problems from past exams

Selected problems from past exams Discrete Structures CS2800 Prelim 1 s Selected problems from past exams 1. True/false. For each of the following statements, indicate whether the statement is true or false. Give a one or two sentence

More information

Phil Introductory Formal Logic

Phil Introductory Formal Logic Phil 134 - Introductory Formal Logic Lecture 7: Deduction At last, it is time to learn about proof formal proof as a model of reasoning demonstrating validity metatheory natural deduction systems what

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

Informatics 1 - Computation & Logic: Tutorial 3

Informatics 1 - Computation & Logic: Tutorial 3 Informatics 1 - Computation & Logic: Tutorial 3 Counting Week 5: 16-20 October 2016 Please attempt the entire worksheet in advance of the tutorial, and bring all work with you. Tutorials cannot function

More information

Propositional logic (revision) & semantic entailment. p. 1/34

Propositional logic (revision) & semantic entailment. p. 1/34 Propositional logic (revision) & semantic entailment p. 1/34 Reading The background reading for propositional logic is Chapter 1 of Huth/Ryan. (This will cover approximately the first three lectures.)

More information

RYERSON UNIVERSITY DEPARTMENT OF MATHEMATICS

RYERSON UNIVERSITY DEPARTMENT OF MATHEMATICS RYERSON UNIVERSITY DEPARTMENT OF MATHEMATICS MTH 110 Final Exam December 6, 2008 Total marks: 100 Time allowed: 3 Hours. NAME (Print): STUDENT #: SIGNATURE: Circle your Lab Section: Section 1 Section 2

More information

CS 70 Discrete Mathematics and Probability Theory Fall 2016 Seshia and Walrand Midterm 1 Solutions

CS 70 Discrete Mathematics and Probability Theory Fall 2016 Seshia and Walrand Midterm 1 Solutions CS 70 Discrete Mathematics and Probability Theory Fall 2016 Seshia and Walrand Midterm 1 Solutions PRINT Your Name: Answer: Oski Bear SIGN Your Name: PRINT Your Student ID: CIRCLE your exam room: Dwinelle

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

Reasoning Under Uncertainty: Introduction to Probability

Reasoning Under Uncertainty: Introduction to Probability Reasoning Under Uncertainty: Introduction to Probability CPSC 322 Uncertainty 1 Textbook 6.1 Reasoning Under Uncertainty: Introduction to Probability CPSC 322 Uncertainty 1, Slide 1 Lecture Overview 1

More information

2 Truth Tables, Equivalences and the Contrapositive

2 Truth Tables, Equivalences and the Contrapositive 2 Truth Tables, Equivalences and the Contrapositive 12 2 Truth Tables, Equivalences and the Contrapositive 2.1 Truth Tables In a mathematical system, true and false statements are the statements of the

More information

COMPUTER SCIENCE TRIPOS

COMPUTER SCIENCE TRIPOS CST.2016.6.1 COMPUTER SCIENCE TRIPOS Part IB Thursday 2 June 2016 1.30 to 4.30 COMPUTER SCIENCE Paper 6 Answer five questions. Submit the answers in five separate bundles, each with its own cover sheet.

More information

15-424/ Recitation 1 First-Order Logic, Syntax and Semantics, and Differential Equations Notes by: Brandon Bohrer

15-424/ Recitation 1 First-Order Logic, Syntax and Semantics, and Differential Equations Notes by: Brandon Bohrer 15-424/15-624 Recitation 1 First-Order Logic, Syntax and Semantics, and Differential Equations Notes by: Brandon Bohrer (bbohrer@cs.cmu.edu) 1 Agenda Admin Everyone should have access to both Piazza and

More information

2. Introduction to commutative rings (continued)

2. Introduction to commutative rings (continued) 2. Introduction to commutative rings (continued) 2.1. New examples of commutative rings. Recall that in the first lecture we defined the notions of commutative rings and field and gave some examples of

More information

3. Only sequences that were formed by using finitely many applications of rules 1 and 2, are propositional formulas.

3. Only sequences that were formed by using finitely many applications of rules 1 and 2, are propositional formulas. 1 Chapter 1 Propositional Logic Mathematical logic studies correct thinking, correct deductions of statements from other statements. Let us make it more precise. A fundamental property of a statement is

More information

Doc112: Hardware. Department of Computing, Imperial College London. Doc112: Hardware Lecture 1 Slide 1

Doc112: Hardware. Department of Computing, Imperial College London. Doc112: Hardware Lecture 1 Slide 1 Doc112: Hardware Department of Computing, Imperial College London Doc112: Hardware Lecture 1 Slide 1 First Year Computer Hardware Course Lecturers Duncan Gillies Bjoern Schuller Doc112: Hardware Lecture

More information

Predicate logic. Predicates and Boolean Expressions. V =100 I expresses a relationship between quantities identified

Predicate logic. Predicates and Boolean Expressions. V =100 I expresses a relationship between quantities identified Predicate logic (Reading Gossett Section 2.6) Predicates and Boolean Expressions Recall that a statement or proposition is an assertion thatmaybelabelledtrueorfalse And that statements may depend on one

More information

CITS2211 Discrete Structures (2017) Cardinality and Countability

CITS2211 Discrete Structures (2017) Cardinality and Countability CITS2211 Discrete Structures (2017) Cardinality and Countability Highlights What is cardinality? Is it the same as size? Types of cardinality and infinite sets Reading Sections 45 and 81 84 of Mathematics

More information

Introduction to Theoretical Computer Science

Introduction to Theoretical Computer Science Introduction to Theoretical Computer Science Zdeněk Sawa Department of Computer Science, FEI, Technical University of Ostrava 17. listopadu 15, Ostrava-Poruba 708 33 Czech republic February 11, 2018 Z.

More information

Announcements. CS243: Discrete Structures. Propositional Logic II. Review. Operator Precedence. Operator Precedence, cont. Operator Precedence Example

Announcements. CS243: Discrete Structures. Propositional Logic II. Review. Operator Precedence. Operator Precedence, cont. Operator Precedence Example Announcements CS243: Discrete Structures Propositional Logic II Işıl Dillig First homework assignment out today! Due in one week, i.e., before lecture next Tuesday 09/11 Weilin s Tuesday office hours are

More information

Chapter 2. Logical Notation. Bahar Aameri. Department of Computer Science University of Toronto. Jan 16, Mathematical Expression and Reasoning 1

Chapter 2. Logical Notation. Bahar Aameri. Department of Computer Science University of Toronto. Jan 16, Mathematical Expression and Reasoning 1 Chapter 2 Logical Notation Bahar Aameri Department of Computer Science University of Toronto Jan 16, 2015 Mathematical Expression and Reasoning 1 Announcements Assignment 1: Assignment 1 will be posted

More information

Types and Programming Languages (15-814), Fall 2018 Assignment 4: Data Representation (Sample Solutions)

Types and Programming Languages (15-814), Fall 2018 Assignment 4: Data Representation (Sample Solutions) Types and Programming Languages (15-814), Fall 2018 Assignment 4: Data Representation (Sample Solutions) Contact: 15-814 Course Staff Due Tuesday, October 16, 2018, 10:30am This assignment is due by 10:30am

More information

Mathematics for linguists

Mathematics for linguists Mathematics for linguists WS 2009/2010 University of Tübingen December 8, 2009 Gerhard Jäger Mathematics for linguists p. 1 Sentences and statements (1) You again! (2) Has the lecture already started?

More information

Write the negation of each of the following propositions without using any form of the word not :

Write the negation of each of the following propositions without using any form of the word not : Write the negation of each of the following propositions without using any form of the word not : Today is Thursday Today is Monday or Tuesday or Wednesday or Friday or Saturday or Sunday 2 + 1 = 3 2+1

More information

FINAL EXAM PRACTICE PROBLEMS CMSC 451 (Spring 2016)

FINAL EXAM PRACTICE PROBLEMS CMSC 451 (Spring 2016) FINAL EXAM PRACTICE PROBLEMS CMSC 451 (Spring 2016) The final exam will be on Thursday, May 12, from 8:00 10:00 am, at our regular class location (CSI 2117). It will be closed-book and closed-notes, except

More information

COMP9414: Artificial Intelligence Propositional Logic: Automated Reasoning

COMP9414: Artificial Intelligence Propositional Logic: Automated Reasoning COMP9414, Monday 26 March, 2012 Propositional Logic 2 COMP9414: Artificial Intelligence Propositional Logic: Automated Reasoning Overview Proof systems (including soundness and completeness) Normal Forms

More information

PHIL 50 - Introduction to Logic

PHIL 50 - Introduction to Logic Truth Validity Logical Consequence Equivalence V ψ ψ φ 1, φ 2,, φ k ψ φ ψ PHIL 50 - Introduction to Logic Marcello Di Bello, Stanford University, Spring 2014 Week 2 Friday Class Overview of Key Notions

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

Summer Math Packet for Students Entering 6th Grade. Please have your student complete this packet and return it to school on Tuesday, September 4.

Summer Math Packet for Students Entering 6th Grade. Please have your student complete this packet and return it to school on Tuesday, September 4. Summer Math Packet for Students Entering 6th Grade Please have your student complete this packet and return it to school on Tuesday, September. Work on your packet gradually. Complete one to two pages

More information

Automated Reasoning Lecture 5: First-Order Logic

Automated Reasoning Lecture 5: First-Order Logic Automated Reasoning Lecture 5: First-Order Logic Jacques Fleuriot jdf@inf.ac.uk Recap Over the last three lectures, we have looked at: Propositional logic, semantics and proof systems Doing propositional

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

02 Propositional Logic

02 Propositional Logic SE 2F03 Fall 2005 02 Propositional Logic Instructor: W. M. Farmer Revised: 25 September 2005 1 What is Propositional Logic? Propositional logic is the study of the truth or falsehood of propositions or

More information

INTRODUCTION TO LOGIC. Propositional Logic. Examples of syntactic claims

INTRODUCTION TO LOGIC. Propositional Logic. Examples of syntactic claims Introduction INTRODUCTION TO LOGIC 2 Syntax and Semantics of Propositional Logic Volker Halbach In what follows I look at some formal languages that are much simpler than English and define validity of

More information

The Importance of Being Formal. Martin Henz. February 5, Propositional Logic

The Importance of Being Formal. Martin Henz. February 5, Propositional Logic The Importance of Being Formal Martin Henz February 5, 2014 Propositional Logic 1 Motivation In traditional logic, terms represent sets, and therefore, propositions are limited to stating facts on sets

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

The semantics of propositional logic

The semantics of propositional logic The semantics of propositional logic Readings: Sections 1.3 and 1.4 of Huth and Ryan. In this module, we will nail down the formal definition of a logical formula, and describe the semantics of propositional

More information

Lecture Overview. 2 Weak Induction

Lecture Overview. 2 Weak Induction COMPSCI 30: Discrete Mathematics for Computer Science February 18, 019 Lecturer: Debmalya Panigrahi Lecture 11 Scribe: Kevin Sun 1 Overview In this lecture, we study mathematical induction, which we often

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

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

MAT01A1. Numbers, Inequalities and Absolute Values. (Appendix A)

MAT01A1. Numbers, Inequalities and Absolute Values. (Appendix A) MAT01A1 Numbers, Inequalities and Absolute Values (Appendix A) Dr Craig 8 February 2017 Leftovers from yesterday: lim n i=1 3 = lim n n 3 = lim n n n 3 i ) 2 ] + 1 n[( n ( n i 2 n n + 2 i=1 i=1 3 = lim

More information

DR.RUPNATHJI( DR.RUPAK NATH )

DR.RUPNATHJI( DR.RUPAK NATH ) Contents 1 Sets 1 2 The Real Numbers 9 3 Sequences 29 4 Series 59 5 Functions 81 6 Power Series 105 7 The elementary functions 111 Chapter 1 Sets It is very convenient to introduce some notation and terminology

More information

Topic 1: Propositional logic

Topic 1: Propositional logic Topic 1: Propositional logic Guy McCusker 1 1 University of Bath Logic! This lecture is about the simplest kind of mathematical logic: propositional calculus. We discuss propositions, which are statements

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

CSCE 222 Discrete Structures for Computing. Review for the Final. Hyunyoung Lee

CSCE 222 Discrete Structures for Computing. Review for the Final. Hyunyoung Lee CSCE 222 Discrete Structures for Computing Review for the Final! Hyunyoung Lee! 1 Final Exam Section 501 (regular class time 8:00am) Friday, May 8, starting at 1:00pm in our classroom!! Section 502 (regular

More information

CS 2800: Logic and Computation Fall 2010 (Lecture 13)

CS 2800: Logic and Computation Fall 2010 (Lecture 13) CS 2800: Logic and Computation Fall 2010 (Lecture 13) 13 October 2010 1 An Introduction to First-order Logic In Propositional(Boolean) Logic, we used large portions of mathematical language, namely those

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

Logical Structures in Natural Language: Propositional Logic II (Truth Tables and Reasoning

Logical Structures in Natural Language: Propositional Logic II (Truth Tables and Reasoning Logical Structures in Natural Language: Propositional Logic II (Truth Tables and Reasoning Raffaella Bernardi Università degli Studi di Trento e-mail: bernardi@disi.unitn.it Contents 1 What we have said

More information

Propositional Logic and Semantics

Propositional Logic and Semantics Propositional Logic and Semantics English is naturally ambiguous. For example, consider the following employee (non)recommendations and their ambiguity in the English language: I can assure you that no

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

Handbook of Logic and Proof Techniques for Computer Science

Handbook of Logic and Proof Techniques for Computer Science Steven G. Krantz Handbook of Logic and Proof Techniques for Computer Science With 16 Figures BIRKHAUSER SPRINGER BOSTON * NEW YORK Preface xvii 1 Notation and First-Order Logic 1 1.1 The Use of Connectives

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

Overview, cont. Overview, cont. Logistics. Optional Reference #1. Optional Reference #2. Workload and Grading

Overview, cont. Overview, cont. Logistics. Optional Reference #1. Optional Reference #2. Workload and Grading Course staff CS389L: Automated Logical Reasoning Lecture 1: ntroduction and Review of Basics şıl Dillig nstructor: şil Dillig E-mail: isil@cs.utexas.edu Office hours: Thursday after class until 6:30 pm

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

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

Your quiz in recitation on Tuesday will cover 3.1: Arguments and inference. Your also have an online quiz, covering 3.1, due by 11:59 p.m., Tuesday.

Your quiz in recitation on Tuesday will cover 3.1: Arguments and inference. Your also have an online quiz, covering 3.1, due by 11:59 p.m., Tuesday. Friday, February 15 Today we will begin Course Notes 3.2: Methods of Proof. Your quiz in recitation on Tuesday will cover 3.1: Arguments and inference. Your also have an online quiz, covering 3.1, due

More information

MAT01A1. Numbers, Inequalities and Absolute Values. (Appendix A)

MAT01A1. Numbers, Inequalities and Absolute Values. (Appendix A) MAT01A1 Numbers, Inequalities and Absolute Values (Appendix A) Dr Craig 7 February 2018 Leftovers from yesterday: lim n i=1 3 = lim n n 3 = lim n n n 3 i ) 2 ] + 1 n[( n ( n i 2 n n + 2 i=1 i=1 3 = lim

More information

Lecture 12. Statement Logic as a word algebra on the set of atomic statements. Lindenbaum algebra.

Lecture 12. Statement Logic as a word algebra on the set of atomic statements. Lindenbaum algebra. V. Borschev and B. Partee, October 26, 2006 p. 1 Lecture 12. Statement Logic as a word algebra on the set of atomic statements. Lindenbaum algebra. 0. Preliminary notes...1 1. Freedom for algebras. Word

More information

Propositional and Predicate Logic

Propositional and Predicate Logic Propositional and Predicate Logic CS 536-05: Science of Programming This is for Section 5 Only: See Prof. Ren for Sections 1 4 A. Why Reviewing/overviewing logic is necessary because we ll be using it

More information

Propositional Definite Clause Logic: Syntax, Semantics and Bottom-up Proofs

Propositional Definite Clause Logic: Syntax, Semantics and Bottom-up Proofs Propositional Definite Clause Logic: Syntax, Semantics and Bottom-up Proofs Computer Science cpsc322, Lecture 20 (Textbook Chpt 5.1.2-5.2.2 ) June, 6, 2017 CPSC 322, Lecture 20 Slide 1 Lecture Overview

More information

Price: $25 (incl. T-Shirt, morning tea and lunch) Visit:

Price: $25 (incl. T-Shirt, morning tea and lunch) Visit: Three days of interesting talks & workshops from industry experts across Australia Explore new computing topics Network with students & employers in Brisbane Price: $25 (incl. T-Shirt, morning tea and

More information

Friendly Logics, Fall 2015, Lecture Notes 1

Friendly Logics, Fall 2015, Lecture Notes 1 Friendly Logics, Fall 2015, Lecture Notes 1 Val Tannen 1 Some references Course Web Page: http://www.cis.upenn.edu/~val/cis682. I have posted there the remarkable On the Unusual Effectiveness of Logic

More information

Axiomatic set theory. Chapter Why axiomatic set theory?

Axiomatic set theory. Chapter Why axiomatic set theory? Chapter 1 Axiomatic set theory 1.1 Why axiomatic set theory? Essentially all mathematical theories deal with sets in one way or another. In most cases, however, the use of set theory is limited to its

More information

Limitations of OCAML records

Limitations of OCAML records Limitations of OCAML records The record types must be declared before they are used; a label e can belong to only one record type (otherwise fun x x.e) would have several incompatible types; we cannot

More information

Lecture 12 : Recurrences DRAFT

Lecture 12 : Recurrences DRAFT CS/Math 240: Introduction to Discrete Mathematics 3/1/2011 Lecture 12 : Recurrences Instructor: Dieter van Melkebeek Scribe: Dalibor Zelený DRAFT Last few classes we talked about program correctness. We

More information

ITI Introduction to Computing II

ITI Introduction to Computing II (with contributions from R. Holte) School of Electrical Engineering and Computer Science University of Ottawa Version of January 11, 2015 Please don t print these lecture notes unless you really need to!

More information