Week 12 Tutorial Separation Logic


 Posy Hart
 2 years ago
 Views:
Transcription
1 Department of Computer Science, Australian National University COMP2600 Formal Methods in Software Engineering Semester 2, 2015 Week 12 Tutorial Separation Logic You should hand in attempts to the questions indicated by (*) to your tutor at the start of each tutorial. Showing effort at answering the indicated questions will contribute to the 4% Tutorial Preparation component of the course; your attempts will not be marked for correctness. You may collaborate with your fellow students or others, so long as you hand in your work individually and clearly indicate who you have worked with. Question 1. Recall that the notation e(v/x) means replace all free occurrences of x in e by v. Other people will often use e[v/x] or even e{v/x} or even e[x := v] but each of these might cause confusion because we use [.] in our new assignment command, and use {.} to enclose our pre and post conditions, and use := as our assignment statement. Hence this notation. A version amenable to pronunciation in the order in which they appear is: e with v for free occurrences of x. For example, ( x.p(x))(2/x) is x.p(x) because the occurrence of x in p(x) is not free, it is bound by the universal quantifier x. Fill out the right hand side of each equality below, where the first one has been done for you. That is, replacing all free occurrences of x in 2 gives 2 because there are no such free occurrences. You only need to write down the whole equality, reasons are optional. (a). 2(4/x) = 2 (b). x(2/x) = 2 (c). x(y/x) = y (d). x(2/y) = x (e). (x + 1)(v/x) = (v + 1) (f). x(x/x) = x Question 2. * Prove the following Separation Logic triples by instantiating P and Q using the axiom indicate to its right. As your solution, write out the whole triple on one Separation Logic 1
2 line. You do not need any other rules of Separation Logic or Hoare Logic. You can use multiple lines if you want to do it piece by piece, but justify each step. The first two have been done for you to show you how to set out your solution. Please use an abbreviation which uses the first three letters from each word in the name of the axiom, but ending in Axm as shown in the example. Please use the axioms as they are shown in the Appendix as this will make it easier to mark such questions in the quiz, assignment and exam: that is, do not use renamings of these axioms. (a). {P } x := 1 {Q} via Derived Floyd Store Axiom (1) {emp} x := 1 {x = 1 emp} (DerFloStoAxm) (b). {P } x := y {Q} via Floyd Store Axiom (1) {x = v emp} x := y {x = y(v/x) emp} (FloStoAxm) (2) {x = v emp} x := y {x = y emp} (Substitution) Here, Substitution is used in the same sense as Basic Arithmetic ie there is no explicit rule for substitution in separation logic. Giving only line (2) as a solution is okay but giving only line (1) is not okay. (c). {P } x := x + 1 {Q} via Floyd Store Axiom (1) {x = v emp} x := x + 1 {x = (x + 1)(v/x) emp} (FloStoAxm) (2) {x = v emp} x := x + 1 {x = v + 1 emp} (Substitution) (d). Why can you not use the Derived Floyd Store Axiom for part (c)? At most two line sentence as answer please. These instructions are to let you know how the tutors will be asked to mark such question. If you write more than two lines, you will get no marks for such questions in the exam or assignment. Because e is x + 1 and x appears free in it. (e). {P } x := [7] {Q} using the Derived Fetch Assignment Axiom. (1) {7 v 2 } x := [7] {(x = v 2 ) 7 v 2 } (DerFetAssAxm) (f). {P } x := [x] {Q} using Fetch Assignment Axiom. (1) {(x = v 1 ) x v 2 } x := [x] {(x = v 2 ) x(v 1 /x) v 2 } (FetAssAxm) (2) {(x = v 1 ) x v 2 } x := [x] {(x = v 2 ) v 1 v 2 } (Subst) (g). {P } x := [x + 1] {Q} using the Fetch Assignment Axiom (1) {(x = v 1 ) (x + 1) v 2 } x := [x + 1] {(x = v 2 ) (x + 1)(v 1 /x) v 2 } (FetAssAxm) (2) {(x = v 1 ) (x + 1) v 2 } x := [x + 1] {(x = v 2 ) (v 1 + 1) v 2 } (Subst) Separation Logic 2
3 (h). {P } [x] := 7 {Q} using the Heap Assignment Axiom (1) {x } [x] := 7 {x 7} (HeaAssAxm) (i). {P } [x] := x {Q} using the Heap Assignment Axiom (1) {x } [x] := x {x x} (HeaAssAxm) (j). {P } x := cons(1) {Q} using the Derived Allocation Assignment Axiom (1) {emp} x := cons(1) {x 1} (DerAllAssAxm) (k). {P } x := cons(x + 1) {Q} using the Allocation Assignment Axiom (1) {(x = v) emp} x := cons(x + 1) {x (x + 1)(v/x)} (AllAssAxm) (2) {(x = v) emp} x := cons(x + 1) {x (v + 1)} (Subst) (l). {P } dispose(x) {Q} using the Dispose Axiom (1) {x } dispose(x) {emp} (DisAxm) Question 3. The Dispose Axiom uses an abbreviation which says z.e z and z does not appear in e. Write down an appropriate version of the Dispose Axiom to use if in part (l) of the previous question, the command was dispose(z)? Just need to rename z to any other name, other than z: e.g. {e } dispose(e) {emp} where (e ) abbreviates ( y. e y) and y does not occur in e Question 4. Suppose that we are given some fixed store St which maps x and y to St(x) and St(y), and that these are different locations: that is, St(x) St(y). Suppose that dom(hp1) = St(x) and Hp1(St(x)) = 1 and dom(hp2) = St(y) and Hp2(St(y)) = 2. That is, each of Hp1 and Hp2 are singleton heaps, they are disjoint, and Hp1 maps the location St(x) to the value 1 and Hp2 maps the location St(y) to the value 2. The notation Hp1 Hp2 means the heap that is formed by combining heaps Hp1 and Hp2. Let Hp = (Hp1 Hp2): that is, the heap Hp is the combination of the heaps Hp1 and Hp2. Each of the statements below are made true by none, one, or more of the heaps Hp1, Hp2 and Hp. Separation Logic 3
4 For each part, put down exactly one of the following as your answer: none; Hp1; Hp2; both Hp1 and Hp2; Hp; all. You may add a two or three line explanation if you wish to make your answer clear. The first two have been done for you to show you what I mean. (a). x 1 Answer: Hp1 (b). y 2 Answer: Hp2 (c). T rue Answer: all, since any heap makes T rue true (d). x 1 y 2 Answer: None. Because each conjunct demands that the heap is a singleton. So their conjunction can only be true in a singleton. But each single heap makes one of the conjuncts false. (e). x 1 y 2 Answer: Hp. Because the solution must be a heap that can be partitioned into two singleton heaps, with one subheap making the first conjunct true and the other making the second conjunct true. (f). x 1 y 2 Answer: both Hp1 and Hp2. Because the first disjunct is made true by Hp1 and the second disjunct is made true by Hp2, so each makes the whole disjunct true. Note that neither disjunct is made true by Hp since it is not a singleton heap. Question 5. Is the following instance a legal instance of the Frame Rule? If so, why and if not, why not? Two lines at most. {emp} x := cons(1) {x 1} {emp (x 1)} x := cons(1) {(x 1) (x 1)} No, the command modifies x and R contains a free occurrence of x Question 6. In firstorder logic, we know that A B A is valid. The semantics of A B is given below: Semantics: (St, Hp) = A B if Hp can be partitioned into two disjoint heaps Hp 1 and Hp 2 and (St, Hp 1 ) = A and (St, Hp 2 ) = B. Explain why the following does not hold under these semantics: (x 1 y 2) x 1. No more than two lines. LHS true iff Hp is of size 2. RHS true iff Hp is of size 1. Separation Logic 4
5 7 Appendix: Separation Logic Rules Floyd Store Axiom for Separation Logic: replaces Hoare (Store) Axiom {x = v emp} x := e {x = e(v/x) emp} where v is an auxiliary variable which does not occur in e Derived Floyd Store Axiom for Separation Logic: {emp} x := e {x = e emp} where x does not occur in e Fetch Assignment Axiom {(x = v 1 ) (e v 2 )} x := [e] {(x = v 2 ) (e(v 1 /x) v 2 )} where v 1 and v 2 are auxiliary variables which do not occur in e Derived Fetch Assignment Axiom {(e v 2 )} x := [e] {(x = v 2 ) (e v 2 )} where v 2 and x do not occur in e Heap Assignment Axiom {e } [e] := e 1 {e e 1 } where (e ) abbreviates ( z. e z) and z does not occur in e Allocation Assignment Axiom {x = v emp} x := cons(e 1, e 2,, e n ) {x e 1 (v/x), e 2 (v/x),, e n (v/x)} where v is an auxiliary variable different from x and not appearing in e 1, e 2,, e n Derived Allocation Assignment Axiom {emp} x := cons(e 1, e 2,, e n ) {x e 1, e 2,, e n } where x does not appear in e 1, e 2,, e n Dispose Axiom {e } dispose(e) {emp} where (e ) abbreviates ( z. e z) and z does not occur in e The Frame Rule: {P } S {Q} {P R} S {Q R} where no variable modified by S appears free in R Other Rules: the Hoare for Sequencing, Conditionals, While, PreCondition Strengthening, PostCondition Weakening, PreCondition Equivalence, Post Condition Equivalence are in this calculus but are not shown as they are not needed for this assignment. Separation Logic 5
Discrete Mathematics and Probability Theory Fall 2009 Satish Rao, David Tse Note 2
CS 70 Discrete Mathematics and Probability Theory Fall 2009 Satish Rao, David Tse Note 2 Proofs Intuitively, the concept of proof should already be familiar We all like to assert things, and few of us
More informationRigorous Software Development CSCIGA 3033009
Rigorous Software Development CSCIGA 3033009 Instructor: Thomas Wies Spring 2013 Lecture 11 Semantics of Programming Languages Denotational Semantics Meaning of a program is defined as the mathematical
More informationThe Foundations: Logic and Proofs. Chapter 1, Part III: Proofs
The Foundations: Logic and Proofs Chapter 1, Part III: Proofs Rules of Inference Section 1.6 Section Summary Valid Arguments Inference Rules for Propositional Logic Using Rules of Inference to Build Arguments
More informationHandout #1: Mathematical Reasoning
Math 101 Rumbos Spring 2010 1 Handout #1: Mathematical Reasoning 1 Propositional Logic A proposition is a mathematical statement that it is either true or false; that is, a statement whose certainty or
More information4 Domain Relational Calculus
4 Domain Relational Calculus We now present two relational calculi that we will compare to RA. First, what is the difference between an algebra and a calculus? The usual story is that the algebra RA is
More information(LMCS, p. 317) V.1. First Order Logic. This is the most powerful, most expressive logic that we will examine.
(LMCS, p. 317) V.1 First Order Logic This is the most powerful, most expressive logic that we will examine. Our version of firstorder logic will use the following symbols: variables connectives (,,,,
More informationChapter 3. Cartesian Products and Relations. 3.1 Cartesian Products
Chapter 3 Cartesian Products and Relations The material in this chapter is the first real encounter with abstraction. Relations are very general thing they are a special type of subset. After introducing
More informationGuide to SRW Section 1.7: Solving inequalities
Guide to SRW Section 1.7: Solving inequalities When you solve the equation x 2 = 9, the answer is written as two very simple equations: x = 3 (or) x = 3 The diagram of the solution is 65 43 21 0
More informationPOWER SETS AND RELATIONS
POWER SETS AND RELATIONS L. MARIZZA A. BAILEY 1. The Power Set Now that we have defined sets as best we can, we can consider a sets of sets. If we were to assume nothing, except the existence of the empty
More informationON FUNCTIONAL SYMBOLFREE LOGIC PROGRAMS
PROCEEDINGS OF THE YEREVAN STATE UNIVERSITY Physical and Mathematical Sciences 2012 1 p. 43 48 ON FUNCTIONAL SYMBOLFREE LOGIC PROGRAMS I nf or m at i cs L. A. HAYKAZYAN * Chair of Programming and Information
More informationCHAPTER 2. Logic. 1. Logic Definitions. Notation: Variables are used to represent propositions. The most common variables used are p, q, and r.
CHAPTER 2 Logic 1. Logic Definitions 1.1. Propositions. Definition 1.1.1. A proposition is a declarative sentence that is either true (denoted either T or 1) or false (denoted either F or 0). Notation:
More informationRelational Calculus. Chapter Comp 521 Files and Databases Spring
Relational Calculus Chapter 4.34.5 Comp 521 Files and Databases Spring 2010 1 Relational Calculus Comes in two flavors: Tuple relational calculus (TRC) and Domain relational calculus (DRC). Calculus has
More information8 Divisibility and prime numbers
8 Divisibility and prime numbers 8.1 Divisibility In this short section we extend the concept of a multiple from the natural numbers to the integers. We also summarize several other terms that express
More information2. The Language of Firstorder Logic
2. The Language of Firstorder Logic KR & R Brachman & Levesque 2005 17 Declarative language Before building system before there can be learning, reasoning, planning, explanation... need to be able to
More informationMathematical Induction
Mathematical Induction In logic, we often want to prove that every member of an infinite set has some feature. E.g., we would like to show: N 1 : is a number 1 : has the feature Φ ( x)(n 1 x! 1 x) How
More informationCHAPTER 3. Methods of Proofs. 1. Logical Arguments and Formal Proofs
CHAPTER 3 Methods of Proofs 1. Logical Arguments and Formal Proofs 1.1. Basic Terminology. An axiom is a statement that is given to be true. A rule of inference is a logical rule that is used to deduce
More informationIntroduction to Proofs
Chapter 1 Introduction to Proofs 1.1 Preview of Proof This section previews many of the key ideas of proof and cites [in brackets] the sections where they are discussed thoroughly. All of these ideas are
More information2. Methods of Proof Types of Proofs. Suppose we wish to prove an implication p q. Here are some strategies we have available to try.
2. METHODS OF PROOF 69 2. Methods of Proof 2.1. Types of Proofs. Suppose we wish to prove an implication p q. Here are some strategies we have available to try. Trivial Proof: If we know q is true then
More informationPredicate Logic. Example: All men are mortal. Socrates is a man. Socrates is mortal.
Predicate Logic Example: All men are mortal. Socrates is a man. Socrates is mortal. Note: We need logic laws that work for statements involving quantities like some and all. In English, the predicate is
More informationPropositional Logic. A proposition is a declarative sentence (a sentence that declares a fact) that is either true or false, but not both.
irst Order Logic Propositional Logic A proposition is a declarative sentence (a sentence that declares a fact) that is either true or false, but not both. Are the following sentences propositions? oronto
More information2.1 Sets, power sets. Cartesian Products.
Lecture 8 2.1 Sets, power sets. Cartesian Products. Set is an unordered collection of objects.  used to group objects together,  often the objects with similar properties This description of a set (without
More information3. Mathematical Induction
3. MATHEMATICAL INDUCTION 83 3. Mathematical Induction 3.1. First Principle of Mathematical Induction. Let P (n) be a predicate with domain of discourse (over) the natural numbers N = {0, 1,,...}. If (1)
More informationReal Roots of Univariate Polynomials with Real Coefficients
Real Roots of Univariate Polynomials with Real Coefficients mostly written by Christina Hewitt March 22, 2012 1 Introduction Polynomial equations are used throughout mathematics. When solving polynomials
More informationCmSc 175 Discrete Mathematics Lesson 10: SETS A B, A B
CmSc 175 Discrete Mathematics Lesson 10: SETS Sets: finite, infinite, : empty set, U : universal set Describing a set: Enumeration = {a, b, c} Predicates = {x P(x)} Recursive definition, e.g. sequences
More informationINCIDENCEBETWEENNESS GEOMETRY
INCIDENCEBETWEENNESS GEOMETRY MATH 410, CSUSM. SPRING 2008. PROFESSOR AITKEN This document covers the geometry that can be developed with just the axioms related to incidence and betweenness. The full
More informationJava+ITP: A Verification Tool Based on Hoare Logic and Algebraic Semantics
: A Verification Tool Based on Hoare Logic and Algebraic Semantics Department of Computer Science University of Illinois at UrbanaChampaign 6th International Workshop on Rewriting Logic and its Applications,
More informationominimality and Uniformity in n 1 Graphs
ominimality and Uniformity in n 1 Graphs Reid Dale July 10, 2013 Contents 1 Introduction 2 2 Languages and Structures 2 3 Definability and Tame Geometry 4 4 Applications to n 1 Graphs 6 5 Further Directions
More informationRow Echelon Form and Reduced Row Echelon Form
These notes closely follow the presentation of the material given in David C Lay s textbook Linear Algebra and its Applications (3rd edition) These notes are intended primarily for inclass presentation
More informationWe now explore a third method of proof: proof by contradiction.
CHAPTER 6 Proof by Contradiction We now explore a third method of proof: proof by contradiction. This method is not limited to proving just conditional statements it can be used to prove any kind of statement
More informationChange of Continuous Random Variable
Change of Continuous Random Variable All you are responsible for from this lecture is how to implement the Engineer s Way (see page 4) to compute how the probability density function changes when we make
More informationThe Language of Mathematics
CHPTER 2 The Language of Mathematics 2.1. Set Theory 2.1.1. Sets. set is a collection of objects, called elements of the set. set can be represented by listing its elements between braces: = {1, 2, 3,
More informationCHAPTER 1. Logic, Proofs Propositions
CHAPTER 1 Logic, Proofs 1.1. Propositions A proposition is a declarative sentence that is either true or false (but not both). For instance, the following are propositions: Paris is in France (true), London
More informationLecture Notes on Linear Search
Lecture Notes on Linear Search 15122: Principles of Imperative Computation Frank Pfenning Lecture 5 January 29, 2013 1 Introduction One of the fundamental and recurring problems in computer science is
More informationThis asserts two sets are equal iff they have the same elements, that is, a set is determined by its elements.
3. Axioms of Set theory Before presenting the axioms of set theory, we first make a few basic comments about the relevant first order logic. We will give a somewhat more detailed discussion later, but
More informationDiscrete Mathematics and Probability Theory Fall 2009 Satish Rao,David Tse Note 11
CS 70 Discrete Mathematics and Probability Theory Fall 2009 Satish Rao,David Tse Note Conditional Probability A pharmaceutical company is marketing a new test for a certain medical condition. According
More informationSummary Last Lecture. Automated Reasoning. Outline of the Lecture. Definition sequent calculus. Theorem (Normalisation and Strong Normalisation)
Summary Summary Last Lecture sequent calculus Automated Reasoning Georg Moser Institute of Computer Science @ UIBK Winter 013 (Normalisation and Strong Normalisation) let Π be a proof in minimal logic
More informationConstructing Contracts: Making Discrete Mathematics Relevant to Beginning Programmers
Constructing Contracts: Making Discrete Mathematics Relevant to Beginning Programmers TIMOTHY S. GEGGHARRISON Winona State University Although computer scientists understand the importance of discrete
More informationScalable Automated Symbolic Analysis of Administrative RoleBased Access Control Policies by SMT solving
Scalable Automated Symbolic Analysis of Administrative RoleBased Access Control Policies by SMT solving Alessandro Armando 1,2 and Silvio Ranise 2, 1 DIST, Università degli Studi di Genova, Italia 2 Security
More informationElementary Number Theory We begin with a bit of elementary number theory, which is concerned
CONSTRUCTION OF THE FINITE FIELDS Z p S. R. DOTY Elementary Number Theory We begin with a bit of elementary number theory, which is concerned solely with questions about the set of integers Z = {0, ±1,
More informationFormal Engineering for Industrial Software Development
Shaoying Liu Formal Engineering for Industrial Software Development Using the SOFL Method With 90 Figures and 30 Tables Springer Contents Introduction 1 1.1 Software Life Cycle... 2 1.2 The Problem 4 1.3
More informationFirstOrder Stable Model Semantics and FirstOrder Loop Formulas
Journal of Artificial Intelligence Research 42 (2011) 125180 Submitted 03/11; published 10/11 FirstOrder Stable Model Semantics and FirstOrder Loop Formulas Joohyung Lee Yunsong Meng School of Computing,
More informationInduction. Margaret M. Fleck. 10 October These notes cover mathematical induction and recursive definition
Induction Margaret M. Fleck 10 October 011 These notes cover mathematical induction and recursive definition 1 Introduction to induction At the start of the term, we saw the following formula for computing
More informationProblems on Discrete Mathematics 1
Problems on Discrete Mathematics 1 ChungChih Li 2 Kishan Mehrotra 3 Syracuse University, New York L A TEX at January 11, 2007 (Part I) 1 No part of this book can be reproduced without permission from
More informationWHAT ARE MATHEMATICAL PROOFS AND WHY THEY ARE IMPORTANT?
WHAT ARE MATHEMATICAL PROOFS AND WHY THEY ARE IMPORTANT? introduction Many students seem to have trouble with the notion of a mathematical proof. People that come to a course like Math 216, who certainly
More informationRigorous. Development. Software. Program Verification. & Springer. An Introduction to. Jorge Sousa Pinto. Jose Bacelar Almeida Maria Joao Frade
Jose Bacelar Almeida Maria Joao Frade Jorge Sousa Pinto Simao Melo de Sousa Rigorous Software Development An Introduction to Program Verification & Springer Contents 1 Introduction 1 1.1 A Formal Approach
More informationInvalidity in Predicate Logic
Invalidity in Predicate Logic So far we ve got a method for establishing that a predicate logic argument is valid: do a derivation. But we ve got no method for establishing invalidity. In propositional
More informationPROPERTECHNIQUEOFSOFTWARE INSPECTIONUSING GUARDED COMMANDLANGUAGE
International Journal of Computer ScienceandCommunication Vol. 2, No. 1, JanuaryJune2011, pp. 153157 PROPERTECHNIQUEOFSOFTWARE INSPECTIONUSING GUARDED COMMANDLANGUAGE Neeraj Kumar Singhania University,
More information4.1. Definitions. A set may be viewed as any well defined collection of objects, called elements or members of the set.
Section 4. Set Theory 4.1. Definitions A set may be viewed as any well defined collection of objects, called elements or members of the set. Sets are usually denoted with upper case letters, A, B, X, Y,
More informationSemantics for the Predicate Calculus: Part I
Semantics for the Predicate Calculus: Part I (Version 0.3, revised 6:15pm, April 14, 2005. Please report typos to hhalvors@princeton.edu.) The study of formal logic is based on the fact that the validity
More informationINTRODUCTORY SET THEORY
M.Sc. program in mathematics INTRODUCTORY SET THEORY Katalin Károlyi Department of Applied Analysis, Eötvös Loránd University H1088 Budapest, Múzeum krt. 68. CONTENTS 1. SETS Set, equal sets, subset,
More informationApplications of Methods of Proof
CHAPTER 4 Applications of Methods of Proof 1. Set Operations 1.1. Set Operations. The settheoretic operations, intersection, union, and complementation, defined in Chapter 1.1 Introduction to Sets are
More informationPart 1 Expressions, Equations, and Inequalities: Simplifying and Solving
Section 7 Algebraic Manipulations and Solving Part 1 Expressions, Equations, and Inequalities: Simplifying and Solving Before launching into the mathematics, let s take a moment to talk about the words
More informationChapter 9. Systems of Linear Equations
Chapter 9. Systems of Linear Equations 9.1. Solve Systems of Linear Equations by Graphing KYOTE Standards: CR 21; CA 13 In this section we discuss how to solve systems of two linear equations in two variables
More informationCorrespondence analysis for strong threevalued logic
Correspondence analysis for strong threevalued logic A. Tamminga abstract. I apply Kooi and Tamminga s (2012) idea of correspondence analysis for manyvalued logics to strong threevalued logic (K 3 ).
More informationLikewise, we have contradictions: formulas that can only be false, e.g. (p p).
CHAPTER 4. STATEMENT LOGIC 59 The rightmost column of this truth table contains instances of T and instances of F. Notice that there are no degrees of contingency. If both values are possible, the formula
More informationCartesian Products and Relations
Cartesian Products and Relations Definition (Cartesian product) If A and B are sets, the Cartesian product of A and B is the set A B = {(a, b) :(a A) and (b B)}. The following points are worth special
More informationMath 223 Abstract Algebra Lecture Notes
Math 223 Abstract Algebra Lecture Notes Steven Tschantz Spring 2001 (Apr. 23 version) Preamble These notes are intended to supplement the lectures and make up for the lack of a textbook for the course
More informationAn Innocent Investigation
An Innocent Investigation D. Joyce, Clark University January 2006 The beginning. Have you ever wondered why every number is either even or odd? I don t mean to ask if you ever wondered whether every number
More information1.4 Factors and Prime Factorization
1.4 Factors and Prime Factorization Recall from Section 1.2 that the word factor refers to a number which divides into another number. For example, 3 and 6 are factors of 18 since 3 6 = 18. Note also that
More informationCSL105: Discrete Mathematical Structures. Ragesh Jaiswal, CSE, IIT Delhi
Propositional Logic: logical operators Negation ( ) Conjunction ( ) Disjunction ( ). Exclusive or ( ) Conditional statement ( ) Biconditional statement ( ): Let p and q be propositions. The biconditional
More informationHigh Integrity Software Conference, Albuquerque, New Mexico, October 1997.
MetaAmphion: Scaling up HighAssurance Deductive Program Synthesis Steve Roach Recom Technologies NASA Ames Research Center Code IC, MS 2692 Moffett Field, CA 94035 sroach@ptolemy.arc.nasa.gov Jeff Van
More informationUndergraduate Notes in Mathematics. Arkansas Tech University Department of Mathematics
Undergraduate Notes in Mathematics Arkansas Tech University Department of Mathematics An Introductory Single Variable Real Analysis: A Learning Approach through Problem Solving Marcel B. Finan c All Rights
More informationAppendix F: Mathematical Induction
Appendix F: Mathematical Induction Introduction In this appendix, you will study a form of mathematical proof called mathematical induction. To see the logical need for mathematical induction, take another
More informationMATH 2300 review problems for Exam 3 ANSWERS
MATH 300 review problems for Exam 3 ANSWERS. Check whether the following series converge or diverge. In each case, justify your answer by either computing the sum or by by showing which convergence test
More information9.4. The Scalar Product. Introduction. Prerequisites. Learning Style. Learning Outcomes
The Scalar Product 9.4 Introduction There are two kinds of multiplication involving vectors. The first is known as the scalar product or dot product. This is socalled because when the scalar product of
More informationSections 2.1, 2.2 and 2.4
SETS Sections 2.1, 2.2 and 2.4 Chapter Summary Sets The Language of Sets Set Operations Set Identities Introduction Sets are one of the basic building blocks for the types of objects considered in discrete
More informationSmallfoot: Modular Automatic Assertion Checking with Separation Logic
In: FMCO 2005, LNCS 4111, pp. 115 137. Smallfoot: Modular Automatic Assertion Checking with Separation Logic Josh Berdine 1, Cristiano Calcagno 2, and Peter W. O Hearn 3 1 Microsoft Research 2 Imperial
More informationPredicate Calculus. There are certain arguments that seem to be perfectly logical, yet they cannot be expressed by using propositional calculus.
Predicate Calculus (Alternative names: predicate logic, first order logic, elementary logic, restricted predicate calculus, restricted functional calculus, relational calculus, theory of quantification,
More information3 Extending the Refinement Calculus
Building BSP Programs Using the Refinement Calculus D.B. Skillicorn? Department of Computing and Information Science Queen s University, Kingston, Canada skill@qucis.queensu.ca Abstract. We extend the
More informationLogic in general. Inference rules and theorem proving
Logical Agents Knowledgebased agents Logic in general Propositional logic Inference rules and theorem proving First order logic Knowledgebased agents Inference engine Knowledge base Domainindependent
More informationBasic Proof Techniques
Basic Proof Techniques David Ferry dsf43@truman.edu September 13, 010 1 Four Fundamental Proof Techniques When one wishes to prove the statement P Q there are four fundamental approaches. This document
More informationdef: An axiom is a statement that is assumed to be true, or in the case of a mathematical system, is used to specify the system.
Section 1.5 Methods of Proof 1.5.1 1.5 METHODS OF PROOF Some forms of argument ( valid ) never lead from correct statements to an incorrect. Some other forms of argument ( fallacies ) can lead from true
More informationLogic in Computer Science: Logic Gates
Logic in Computer Science: Logic Gates Lila Kari The University of Western Ontario Logic in Computer Science: Logic Gates CS2209, Applied Logic for Computer Science 1 / 49 Logic and bit operations Computers
More information15150 Lecture 11: Tail Recursion; Continuations
15150 Lecture 11: Tail Recursion; Continuations Lecture by Dan Licata February 21, 2011 In this lecture we will discuss space usage: analyzing the memory it takes your program to run tail calls and tail
More informationCOMPUTER SCIENCE TRIPOS
CST.98.5.1 COMPUTER SCIENCE TRIPOS Part IB Wednesday 3 June 1998 1.30 to 4.30 Paper 5 Answer five questions. No more than two questions from any one section are to be answered. Submit the answers in five
More informationMath 4310 Handout  Quotient Vector Spaces
Math 4310 Handout  Quotient Vector Spaces Dan Collins The textbook defines a subspace of a vector space in Chapter 4, but it avoids ever discussing the notion of a quotient space. This is understandable
More information5544 = 2 2772 = 2 2 1386 = 2 2 2 693. Now we have to find a divisor of 693. We can try 3, and 693 = 3 231,and we keep dividing by 3 to get: 1
MATH 13150: Freshman Seminar Unit 8 1. Prime numbers 1.1. Primes. A number bigger than 1 is called prime if its only divisors are 1 and itself. For example, 3 is prime because the only numbers dividing
More informationLecture 1. Basic Concepts of Set Theory, Functions and Relations
September 7, 2005 p. 1 Lecture 1. Basic Concepts of Set Theory, Functions and Relations 0. Preliminaries...1 1. Basic Concepts of Set Theory...1 1.1. Sets and elements...1 1.2. Specification of sets...2
More informationSection 3.7 Rational Functions
Section 3.7 Rational Functions A rational function is a function of the form where P and Q are polynomials. r(x) = P(x) Q(x) Rational Functions and Asymptotes The domain of a rational function consists
More informationMathematics for Computer Science/Software Engineering. Notes for the course MSM1F3 Dr. R. A. Wilson
Mathematics for Computer Science/Software Engineering Notes for the course MSM1F3 Dr. R. A. Wilson October 1996 Chapter 1 Logic Lecture no. 1. We introduce the concept of a proposition, which is a statement
More informationGet Ready for IELTS Writing. About Get Ready for IELTS Writing. Part 1: Language development. Part 2: Skills development. Part 3: Exam practice
About Collins Get Ready for IELTS series has been designed to help learners at a preintermediate level (equivalent to band 3 or 4) to acquire the skills they need to achieve a higher score. It is easy
More informationi. Node Y Represented by a block or part. SysML::Block,
OMG SysML Requirements Traceability (informative) This document has been published as OMG document ptc/070309 so it can be referenced by Annex E of the OMG SysML specification. This document describes
More informationSJÄLVSTÄNDIGA ARBETEN I MATEMATIK
SJÄLVSTÄNDIGA ARBETEN I MATEMATIK MATEMATISKA INSTITUTIONEN, STOCKHOLMS UNIVERSITET Automated Theorem Proving av Tom Everitt 2010  No 8 MATEMATISKA INSTITUTIONEN, STOCKHOLMS UNIVERSITET, 106 91 STOCKHOLM
More information26 Integers: Multiplication, Division, and Order
26 Integers: Multiplication, Division, and Order Integer multiplication and division are extensions of whole number multiplication and division. In multiplying and dividing integers, the one new issue
More information, for x = 0, 1, 2, 3,... (4.1) (1 + 1/n) n = 2.71828... b x /x! = e b, x=0
Chapter 4 The Poisson Distribution 4.1 The Fish Distribution? The Poisson distribution is named after SimeonDenis Poisson (1781 1840). In addition, poisson is French for fish. In this chapter we will
More information1 Error in Euler s Method
1 Error in Euler s Method Experience with Euler s 1 method raises some interesting questions about numerical approximations for the solutions of differential equations. 1. What determines the amount of
More informationChapter 7: Functional Programming Languages
Chapter 7: Functional Programming Languages Aarne Ranta Slides for the book Implementing Programming Languages. An Introduction to Compilers and Interpreters, College Publications, 2012. Fun: a language
More information+ Section 6.2 and 6.3
Section 6.2 and 6.3 Learning Objectives After this section, you should be able to DEFINE and APPLY basic rules of probability CONSTRUCT Venn diagrams and DETERMINE probabilities DETERMINE probabilities
More informationFormalization of the CRM: Initial Thoughts
Formalization of the CRM: Initial Thoughts Carlo Meghini Istituto di Scienza e Tecnologie della Informazione Consiglio Nazionale delle Ricerche Pisa CRM SIG Meeting Iraklio, October 1st, 2014 Outline Overture:
More informationVerifying design patterns in Hoare Type Theory. Kasper Svendsen, Alexandre Buisse and Lars Birkedal
Verifying design patterns in Hoare Type Theory Kasper Svendsen, Alexre Buisse Lars Birkedal IT University Technical Report Series TR2008112 ISSN 1600 6100 October 2008 Copyright c 2008, Kasper Svendsen,
More informationVirtual Time and Timeout in ClientServer Networks
Virtual Time and Timeout in ClientServer Networks Jayadev Misra July 13, 2011 Contents 1 Introduction 2 1.1 Background.............................. 2 1.1.1 Causal Model of Virtual Time...............
More informationInterprocess Buffers in Separation Logic with RelyGuarantee
Under consideration for publication in Formal Aspects of Computing Interprocess Buffers in Separation Logic with RelyGuarantee Richard Bornat and Hasan Amjad Middlesex University, London, UK Abstract.
More information3 Contour integrals and Cauchy s Theorem
3 ontour integrals and auchy s Theorem 3. Line integrals of complex functions Our goal here will be to discuss integration of complex functions = u + iv, with particular regard to analytic functions. Of
More informationThe Workflow Management Coalition Specification Workflow Management Coalition Terminology & Glossary
The Workflow Management Coalition Specification Workflow Management Coalition Terminology & Glossary Workflow The automation of a business process, in whole or part, during which documents, information
More informationPredicate logic. Logic in computer science. Logic in Computer Science (lecture) PART II. first order logic
PART II. Predicate logic first order logic Logic in computer science Seminar: INGK401K5; INHK401; INJK401K4 University of Debrecen, Faculty of Informatics kadek.tamas@inf.unideb.hu 1 / 19 Alphabets Logical
More informationFormal Languages and Automata Theory  Regular Expressions and Finite Automata 
Formal Languages and Automata Theory  Regular Expressions and Finite Automata  Samarjit Chakraborty Computer Engineering and Networks Laboratory Swiss Federal Institute of Technology (ETH) Zürich March
More informationNPCompleteness and Cook s Theorem
NPCompleteness and Cook s Theorem Lecture notes for COM3412 Logic and Computation 15th January 2002 1 NP decision problems The decision problem D L for a formal language L Σ is the computational task:
More informationA Note on Context Logic
A Note on Context Logic Philippa Gardner Imperial College London This note describes joint work with Cristiano Calcagno and Uri Zarfaty. It introduces the general theory of Context Logic, and has been
More informationAnnouncements. CompSci 230 Discrete Math for Computer Science Sets. Introduction to Sets. Sets
CompSci 230 Discrete Math for Computer Science Sets September 12, 2013 Prof. Rodger Slides modified from Rosen 1 nnouncements Read for next time Chap. 2.32.6 Homework 2 due Tuesday Recitation 3 on Friday
More informationAndrew Pitts chapter for D. Sangorgi and J. Rutten (eds), Advanced Topics in Bisimulation and Coinduction, Cambridge Tracts in Theoretical Computer
Andrew Pitts chapter for D. Sangorgi and J. Rutten (eds), Advanced Topics in Bisimulation and Coinduction, Cambridge Tracts in Theoretical Computer Science No. 52, chapter 5, pages 197 232 ( c 2011 CUP)
More information