PredicatesAndProgramming

# PredicatesAndProgramming - COM SFWR 707 Formal Specication...

This preview shows pages 1–8. Sign up to view the full content.

COM SFWR 707 Formal Speciﬁcation Techniques Dr. R. Khedri COM SFWR 707 Formal Speciﬁcation Techniques Dr. Ridha Khedri Department of Computing and Software, McMaster University Canada L8S 4L7, Hamilton, Ontario Acknowledgments : Material based on A Logical Approach to Discrete Math by D. Gries and F. B. Schneider. Dr. R. Khedri COM SFWR 707 Formal Speciﬁcation Techniques

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

View Full Document
COM SFWR 707 Formal Speciﬁcation Techniques Dr. R. Khedri Introduction Universal quantiﬁcation Existential quantiﬁcation Part I Predicate Calculus Dr. R. Khedri COM SFWR 707 Formal Speciﬁcation Techniques
COM SFWR 707 Formal Speciﬁcation Techniques Dr. R. Khedri Introduction Universal quantiﬁcation Existential quantiﬁcation Program Veriﬁcation Introduction Predicate logic is an extension of propositional logic It allows the use of variables of types other than IB This extension leads to a logic with enhanced expressive Propositional calculus permits reasoning about formulas constructed from boolean variables and boolean operators Predicate calculus permits reasoning about a more expressive class of formulas Dr. R. Khedri COM SFWR 707 Formal Speciﬁcation Techniques

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

View Full Document
COM SFWR 707 Formal Speciﬁcation Techniques Dr. R. Khedri Introduction Universal quantiﬁcation Existential quantiﬁcation Program Veriﬁcation Introduction A predicate-calculus formula is a boolean expression in which some boolean variables may have been replaced by: Predicates : applications of boolean functions whose arguments may be of types other than IB Universal and existential quantiﬁcation Example 1 x < y x = z = q ( x , z + x ) 2 ( x , y | : f ( x , y ) = f ( y , x ) ) Dr. R. Khedri COM SFWR 707 Formal Speciﬁcation Techniques
COM SFWR 707 Formal Speciﬁcation Techniques Dr. R. Khedri Introduction Universal quantiﬁcation Existential quantiﬁcation Program Veriﬁcation Introduction The pure predicate calculus includes 1 The axioms of propositional calculus 2 The axioms for quantiﬁcations ( x | R : P ) and ( x | R : P ) 3 The inference rules of the predicate calculus 1 Substitution: E E [ v := F ] 2 Transitivity: X = Y , Y = Z X = Z 3 Leibniz: X = Y E [ z := X ]= E [ z := Y ] 4 Leibniz for quantiﬁcation: P = Q * ( x | E [ z := P ] : S ) = * ( x | E [ z := Q ] : S ) R = P = Q * ( x | R : E [ z := P ] ) = * ( x | R : E [ z := Q ] ) Dr. R. Khedri COM SFWR 707 Formal Speciﬁcation Techniques

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

View Full Document
COM SFWR 707 Formal Speciﬁcation Techniques Dr. R. Khedri Introduction Universal quantiﬁcation Existential quantiﬁcation Program Veriﬁcation Introduction In the pure predicate calculus, the function symbols ( <, >, + , · , etc.) are uninterpreted except for equality = the logic provides no speciﬁc rules for manipulating function symbols general rules for manipulation that are sound independently of the meanings of the function symbols so, the pure predicate calculus is sound in all domains that may be of interest Dr. R. Khedri COM SFWR 707 Formal Speciﬁcation Techniques
COM SFWR 707 Formal Speciﬁcation Techniques Dr. R. Khedri Introduction Universal quantiﬁcation Existential quantiﬁcation Program Veriﬁcation Introduction We get a theory by adding axioms that give meanings

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

## This note was uploaded on 03/31/2010 for the course CAS 707 taught by Professor Ridhakhedri during the Spring '10 term at McMaster University.

### Page1 / 88

PredicatesAndProgramming - COM SFWR 707 Formal Specication...

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

View Full Document
Ask a homework question - tutors are online