Lecture 2: Distributed Programs and their Correctness

Slides:



Advertisements
Similar presentations
Geometry Chapter 2 Terms.
Advertisements

Pre and Post Condition Rules Definition : If R and S are two assertions, then R is said to be stronger than S if R -> S (R implies S). –Example : the assertion.
1 Discrete Structures Lecture 29 Predicates and Programming Read Ch
Syllabus Every Week: 2 Hourly Exams +Final - as noted on Syllabus
Propositional Logic. Negation Given a proposition p, negation of p is the ‘not’ of p.
מבנה המחשב + מבוא למחשבים ספרתיים תרגול 1#
1 Inference Rules and Proofs Z: Inference Rules and Proofs.
Chapter 9: Boolean Algebra
Adapted from Discrete Math
CSE 311 Foundations of Computing I Lecture 6 Predicate Logic, Logical Inference Spring
CSCI 115 Chapter 2 Logic. CSCI 115 §2.1 Propositions and Logical Operations.
Mathematical Structures A collection of objects with operations defined on them and the accompanying properties form a mathematical structure or system.
Copyright © Curt Hill Truth Tables A way to show Boolean Operations.
A Brief Summary for Exam 1 Subject Topics Propositional Logic (sections 1.1, 1.2) –Propositions Statement, Truth value, Proposition, Propositional symbol,
1 Inference Rules and Proofs (Z); Program Specification and Verification Inference Rules and Proofs (Z); Program Specification and Verification.
CS1502 Formal Methods in Computer Science
Chap. 2 Fundamentals of Logic. Proposition Proposition (or statement): an declarative sentence that is either true or false, but not both. e.g. –Margret.
2.3Logical Implication: Rules of Inference From the notion of a valid argument, we begin a formal study of what we shall mean by an argument and when such.
Lecture 1.2: Equivalences, and Predicate Logic* CS 250, Discrete Structures, Fall 2011 Nitesh Saxena *Adopted from previous lectures by Cinda Heeren, Zeph.
1 CMSC 250 Discrete Structures CMSC 250 Lecture 1.
Fundamentals of Logic 1. What is a valid argument or proof? 2. Study system of logic 3. In proving theorems or solving problems, creativity and insight.
CSE 311 Foundations of Computing I Lecture 7 Logical Inference Autumn 2012 CSE
Boolean Algebras Lecture 27 Section 5.3 Wed, Mar 7, 2007.
Thinking Mathematically
Chapter 2 Logic 2.1 Statements 2.2 The Negation of a Statement 2.3 The Disjunction and Conjunction of Statements 2.4 The Implication 2.5 More on Implications.
Dale Roberts Department of Computer and Information Science, School of Science, IUPUI Dale Roberts, Lecturer Computer Science, IUPUI
Lecture 1.2: Equivalences, and Predicate Logic CS 250, Discrete Structures, Fall 2015 Nitesh Saxena Adopted from previous lectures by Cinda Heeren, Zeph.
Chapter 2 Fundamentals of Logic 1. What is a valid argument or proof?
Lecture 18: Boolean Algebra Boolean Functions. w = Chris is allowed to watch television x = Chris's homework is finished y = it is a school night z =
CSci 2011 Discrete Mathematics Lecture 4 CSci 2011.
CS104:Discrete Structures Chapter 2: Proof Techniques.
3/6/20161 Let’s get started with... Logic !. 3/6/20162 Logic Crucial for mathematical reasoningCrucial for mathematical reasoning Used for designing electronic.
Boolean Algebras Lecture 24 Section 5.3 Wed, Mar 22, 2006.
11/22/2016IT 3271 A formal system:Axioms and Rules, for inferring valid specification x := m; y := n; while ¬(x=y) do if x>y then x := x-y else y := y-x.
2. The Logic of Compound Statements Summary
Lecture 1.2: Equivalences, and Predicate Logic
Advanced Algorithms Analysis and Design
14:332:231 DIGITAL LOGIC DESIGN Boolean Algebra
CSE15 Discrete Mathematics 01/23/17
CSNB 143 Discrete Mathematical Structures
Lecture 1 – Formal Logic.
Thinking Mathematically
6/20/2018 Arab Open University Faculty of Computer Studies M131 - Discrete Mathematics 6/20/2018.
Proposition & Predicates
Y. Davis Geometry Notes Chapter 2.
Rule Exercises Status of the Ball Definitions and Rule 15
Rule Exercises Status of the Ball Definitions and Rule 15
CMSC Discrete Structures
Propositional Equivalences
Lecture 14: Boolean Algebra
CSE 370 – Winter Combinational Logic - 1
CSE 311 Foundations of Computing I
CS 220: Discrete Structures and their Applications
Boolean Algebra Introduction CSCI 240
TRUTH TABLES.
(1.4) An Introduction to Logic
IS 2150 / TEL 2810 Introduction to Security
Inference Rules: Tautologies
Sec 5.5: THE SUBSTITUTION RULE
Negations of quantifiers
Metatheorems Computational Logic Lecture 8
Expressions.
More axioms Disjunction Copyright © 2007 Curt Hill.
MAT 3100 Introduction to Proof
Cs Discrete Mathematics
Predicates and Quantifiers
Logic Logic is a discipline that studies the principles and methods used to construct valid arguments. An argument is a related sequence of statements.
IS 2150 / TEL 2810 Introduction to Security
Proof: [We take the negation and suppose it to be true.]
IS 2150 / TEL 2810 Information Security & Privacy
Presentation transcript:

Lecture 2: Distributed Programs and their Correctness Anish Arora CSE 6333 1

    Table of Precedence + ─ = < >    Highest [x := E] substitution . function application + ─ unary prefix operators x / mod gcd binary arith. operators + ─ = < >        Lowest  2

Equivalence  Associativity : (P  Q)  R  P  (Q  R) Symmetry : P  Q  Q  P Identity : true  Q  Q Note:  is not ‘conjunctional’ P  Q  R ? P  Q  Q  R Example: Tom has 2 eyes  Tom has 1 eye  Tom has no eyes ? (Tom has 2 eyes  Tom has 1 eye)  (Tom has 1 eye  Tom has no eyes)

Negation  false   true  (P  Q)   P  Q P  Q   (P  Q) Theorem : (P Q)  (Q P) Proof: (P Q)  (Q P) = { axiom : definition of }  (P  Q)   (Q  P) = { axiom :  (P  Q)   P  Q }  P  Q   Q  P = {  is symmetric, associative }  P  P   Q  Q =  (P  P)   (Q  Q) { definition of false : false   true} = false  false = true

Disjunction  , Conjunction  Symmetry : P  Q  Q  P Associativity : (P  Q)  R  P  (Q  R) Idempotence : P  P  P Distributivity of  over  : P  (Q  R)  P  Q  P  R Excluded miracle : P  P The Golden Rule: P  Q  P  Q  P  Q P  Q  P  Q  P  Q P  Q  P  Q  P  Q Note : P  Q  P  Q  P P  Q  Q  P  Q

Quantification : Universal , Existential  (x : R : P)  (x : true : R  P) (x : R : true)  true (x : R : P)   (x : R :  P) (x : R : P)  (x : true : R  P) (x : R : false)  false Q: (x : false : R)  ?

Reasoning with Hoare Triples {P} g  skip {P} is true {P[x := E]} true  x := E {P} rule of textual substitution {P} g  st {Q} equivales {P g} true  st {Q} and (P g)  Q {P} g  st {P} equivales {P  g} true  st {P}

Reasoning with Hoare Triples (contd.) P  Q and {Q} g  st {R} implies {P} g  st {R} {P} g  st {Q} and Q  R implies {P} g  st {R} {P} g  st {R} and {Q} g  st {R} implies {P  Q} g  st {R} {P} g  st {Q} and {P} g  st {R} implies {P} g  st {Q  R}