# Week 12 Tutorial Separation Logic

Save this PDF as:

Size: px
Start display at page:

## 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 re-namings 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

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

### Rigorous Software Development CSCI-GA 3033-009

Rigorous Software Development CSCI-GA 3033-009 Instructor: Thomas Wies Spring 2013 Lecture 11 Semantics of Programming Languages Denotational Semantics Meaning of a program is defined as the mathematical

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

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

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

### (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 first-order logic will use the following symbols: variables connectives (,,,,

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

### Guide 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 -6-5 -4-3 -2-1 0

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

### ON FUNCTIONAL SYMBOL-FREE LOGIC PROGRAMS

PROCEEDINGS OF THE YEREVAN STATE UNIVERSITY Physical and Mathematical Sciences 2012 1 p. 43 48 ON FUNCTIONAL SYMBOL-FREE LOGIC PROGRAMS I nf or m at i cs L. A. HAYKAZYAN * Chair of Programming and Information

### CHAPTER 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:

### Relational Calculus. Chapter Comp 521 Files and Databases Spring

Relational Calculus Chapter 4.3-4.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

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

### 2. The Language of First-order Logic

2. The Language of First-order 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

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

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

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

### 2. 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

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

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

### 2.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

### 3. 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)

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

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

### INCIDENCE-BETWEENNESS GEOMETRY

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

### Java+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 Urbana-Champaign 6th International Workshop on Rewriting Logic and its Applications,

### o-minimality and Uniformity in n 1 Graphs

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

### Row 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 in-class presentation

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

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

### The 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,

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

### Lecture Notes on Linear Search

Lecture Notes on Linear Search 15-122: Principles of Imperative Computation Frank Pfenning Lecture 5 January 29, 2013 1 Introduction One of the fundamental and recurring problems in computer science is

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

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

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

### Constructing Contracts: Making Discrete Mathematics Relevant to Beginning Programmers

Constructing Contracts: Making Discrete Mathematics Relevant to Beginning Programmers TIMOTHY S. GEGG-HARRISON Winona State University Although computer scientists understand the importance of discrete

### Scalable Automated Symbolic Analysis of Administrative Role-Based Access Control Policies by SMT solving

Scalable Automated Symbolic Analysis of Administrative Role-Based Access Control Policies by SMT solving Alessandro Armando 1,2 and Silvio Ranise 2, 1 DIST, Università degli Studi di Genova, Italia 2 Security

### Elementary 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,

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

### First-Order Stable Model Semantics and First-Order Loop Formulas

Journal of Artificial Intelligence Research 42 (2011) 125-180 Submitted 03/11; published 10/11 First-Order Stable Model Semantics and First-Order Loop Formulas Joohyung Lee Yunsong Meng School of Computing,

### Induction. 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

### Problems on Discrete Mathematics 1

Problems on Discrete Mathematics 1 Chung-Chih 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

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

### Rigorous. 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

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

### PROPERTECHNIQUEOFSOFTWARE INSPECTIONUSING GUARDED COMMANDLANGUAGE

International Journal of Computer ScienceandCommunication Vol. 2, No. 1, January-June2011, pp. 153-157 PROPERTECHNIQUEOFSOFTWARE INSPECTIONUSING GUARDED COMMANDLANGUAGE Neeraj Kumar Singhania University,

### 4.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,

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

### INTRODUCTORY SET THEORY

M.Sc. program in mathematics INTRODUCTORY SET THEORY Katalin Károlyi Department of Applied Analysis, Eötvös Loránd University H-1088 Budapest, Múzeum krt. 6-8. CONTENTS 1. SETS Set, equal sets, subset,

### Applications of Methods of Proof

CHAPTER 4 Applications of Methods of Proof 1. Set Operations 1.1. Set Operations. The set-theoretic operations, intersection, union, and complementation, defined in Chapter 1.1 Introduction to Sets are

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

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

### Correspondence analysis for strong three-valued logic

Correspondence analysis for strong three-valued logic A. Tamminga abstract. I apply Kooi and Tamminga s (2012) idea of correspondence analysis for many-valued logics to strong three-valued logic (K 3 ).

### Likewise, 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

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

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

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

### 1.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

### CSL105: Discrete Mathematical Structures. Ragesh Jaiswal, CSE, IIT Delhi

Propositional Logic: logical operators Negation ( ) Conjunction ( ) Disjunction ( ). Exclusive or ( ) Conditional statement ( ) Bi-conditional statement ( ): Let p and q be propositions. The biconditional

### High Integrity Software Conference, Albuquerque, New Mexico, October 1997.

Meta-Amphion: Scaling up High-Assurance Deductive Program Synthesis Steve Roach Recom Technologies NASA Ames Research Center Code IC, MS 269-2 Moffett Field, CA 94035 sroach@ptolemy.arc.nasa.gov Jeff Van

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

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

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

### 9.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 so-called because when the scalar product of

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

### Smallfoot: 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

### Predicate 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,

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

### Logic in general. Inference rules and theorem proving

Logical Agents Knowledge-based agents Logic in general Propositional logic Inference rules and theorem proving First order logic Knowledge-based agents Inference engine Knowledge base Domain-independent

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

### def: 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

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

### 15-150 Lecture 11: Tail Recursion; Continuations

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

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

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

### 5544 = 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

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

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

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

### Get 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 pre-intermediate level (equivalent to band 3 or 4) to acquire the skills they need to achieve a higher score. It is easy

### i. Node Y Represented by a block or part. SysML::Block,

OMG SysML Requirements Traceability (informative) This document has been published as OMG document ptc/07-03-09 so it can be referenced by Annex E of the OMG SysML specification. This document describes

### SJÄ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

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

### , 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 Simeon-Denis Poisson (1781 1840). In addition, poisson is French for fish. In this chapter we will

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

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

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

### Formalization 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:

### Verifying 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 TR-2008-112 ISSN 1600 6100 October 2008 Copyright c 2008, Kasper Svendsen,

### Virtual Time and Timeout in Client-Server Networks

Virtual Time and Timeout in Client-Server Networks Jayadev Misra July 13, 2011 Contents 1 Introduction 2 1.1 Background.............................. 2 1.1.1 Causal Model of Virtual Time...............

### Inter-process Buffers in Separation Logic with Rely-Guarantee

Under consideration for publication in Formal Aspects of Computing Inter-process Buffers in Separation Logic with Rely-Guarantee Richard Bornat and Hasan Amjad Middlesex University, London, UK Abstract.

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

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

### Predicate 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: INGK401-K5; INHK401; INJK401-K4 University of Debrecen, Faculty of Informatics kadek.tamas@inf.unideb.hu 1 / 19 Alphabets Logical

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

### NP-Completeness and Cook s Theorem

NP-Completeness 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:

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