PredicatesAndProgramming

PredicatesAndProgramming - COM SFWR 707 Formal Specication...

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

View Full Document Right Arrow Icon
COM SFWR 707 Formal Specification Techniques Dr. R. Khedri COM SFWR 707 Formal Specification 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 Specification Techniques
Background image of page 1

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

View Full DocumentRight Arrow Icon
COM SFWR 707 Formal Specification Techniques Dr. R. Khedri Introduction Universal quantification Existential quantification Part I Predicate Calculus Dr. R. Khedri COM SFWR 707 Formal Specification Techniques
Background image of page 2
COM SFWR 707 Formal Specification Techniques Dr. R. Khedri Introduction Universal quantification Existential quantification Program Verification 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 Specification Techniques
Background image of page 3

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

View Full DocumentRight Arrow Icon
COM SFWR 707 Formal Specification Techniques Dr. R. Khedri Introduction Universal quantification Existential quantification Program Verification 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 quantification 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 Specification Techniques
Background image of page 4
COM SFWR 707 Formal Specification Techniques Dr. R. Khedri Introduction Universal quantification Existential quantification Program Verification Introduction The pure predicate calculus includes 1 The axioms of propositional calculus 2 The axioms for quantifications ( 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 quantification: 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 Specification Techniques
Background image of page 5

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

View Full DocumentRight Arrow Icon
COM SFWR 707 Formal Specification Techniques Dr. R. Khedri Introduction Universal quantification Existential quantification Program Verification Introduction In the pure predicate calculus, the function symbols ( <, >, + , · , etc.) are uninterpreted except for equality = the logic provides no specific 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 Specification Techniques
Background image of page 6
COM SFWR 707 Formal Specification Techniques Dr. R. Khedri Introduction Universal quantification Existential quantification Program Verification Introduction We get a theory by adding axioms that give meanings
Background image of page 7

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

View Full DocumentRight Arrow Icon
Image of page 8
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 Right Arrow Icon
Ask a homework question - tutors are online