Program Verification using Separation Logic Lecture 0 : Course Introduction and Assertion Language. Hongseok Yang (Queen Mary, Univ.

Size: px
Start display at page:

Download "Program Verification using Separation Logic Lecture 0 : Course Introduction and Assertion Language. Hongseok Yang (Queen Mary, Univ."

Transcription

1 Program Verification using Separation Logic Lecture 0 : Course Introduction and Assertion Language Hongseok Yang (Queen Mary, Univ. of London)

2 Dream Automatically verify the memory safety of systems software, such as OS kernels and web servers. The course is about the use of separation logic for realizing this dream.

3 Windows Firewire Driver Q: Is this correct?

4 Windows Firewire Driver Q: Is this correct?

5 Windows Firewire Driver Q: Is this correct?

6 Windows Firewire Driver Q: Is this correct?

7 Windows Firewire Driver Q: Is this correct?

8 Windows Firewire Driver Q: Is this correct?

9 Demo

10 Windows Firewire Driver Q: Is this correct?

11 Windows Firewire Driver Q: Is this correct?

12 BusResetIrp=(...)deviceExtension->Flink2; Windows Firewire Driver Q: Is this correct?

13 if (BusResetIrp->Irp == Irp) { Windows Firewire Driver Q: Is this correct?

14 if (BusResetIrp->Irp == Irp) { Windows Firewire Driver Q: Is this correct? Pb: Dereferences a nonexisting field Irp.

15 Separation Logic A variant of Hoare logic that lets you verify pointermanipulating programs effectively. Philosophy: formalize and exploit good disciplines used by top-ranked systems programmers.

16 Very Rough History 1995, Discoveries in categorical semantics. 1999, Logic of Bunched Implications. 2001, Separation logic. 2003~, Application to data abstraction. 2004~, Application to concurrency. 2005~, Application to program analysis.

17 Outcome of this Course Understand the basic principles of separation logic. Should be able to build a simple automatic verifier based on separation logic.

18 Schedule Lecture 0: Assertion language. Lecture 3: Frame rule. Lecture 4: Concurrency. Lecture 1: Proof rules in sep. logic. Lecture 2: Simple automatic verifier.

19 Starting Point Should be able to express properties at each program point effectively. x = create_list(); y = create_list(); z = create_sorted_list(); x = append_list(x,y); free_list(x); traverse_list(z);

20 Starting Point Should be able to express properties at each program point effectively. 1. lists x,y,z. 2. lists x,y: disjoint. 3. lists y,z: disjoint. 4. lists x,z: disjoint. 5. list z sorted. x = create_list(); y = create_list(); z = create_sorted_list(); x = append_list(x,y); free_list(x); traverse_list(z);

21 Starting Point Should be able to express properties at each program point effectively. 1. lists x,y,z. 2. lists x,y: disjoint. 3. lists y,z: disjoint. 4. lists x,z: disjoint. 5. list z sorted. x = create_list(); y = create_list(); z = create_sorted_list(); x = append_list(x,y); free_list(x); traverse_list(z); 1. lists x,y,z. 2. list x contains y. 3. lists x,z: disjoint. 4. list z sorted.

22 Should be able to express properties at each program point effectively. 1. lists x,y,z. 2. lists x,y: disjoint. 3. lists y,z: disjoint. 4. lists x,z: disjoint. 5. list z sorted. Starting Point x = create_list(); y = create_list(); z = create_sorted_list(); x = append_list(x,y); free_list(x); traverse_list(z); Express implicit/explicit, statedependent separation effectively. 1. lists x,y,z. 2. list x contains y. 3. lists x,z: disjoint. 4. list z sorted.

23 Toolkit of Separation-Logic Maniac 1. A class of (separation) properties to express. 2. Pick a storage model with separation built-in. Means to find a partial commutative monoid. 3. Apply a general method for constructing an assertion language with separating connectives.

24 Toolkit of Separation-Logic Maniac 1. A class of (separation) properties to express. 2. Pick a storage model with separation built-in. Means to find a partial commutative monoid. 3. Apply a general method for constructing an assertion language with separating connectives.

25 Storage Model with Separation ( ) Principle: Find a local description of state (or resource). Define a splitting ( operator. ) ( Technical, find a partial commutative monoid. E.g. Global heap model: [1:0, 2:0, 3:0,...], [1:3, 2:0, 3:4, 4:0, 5:0,...] Local heap model: Heaps = def Locs Vals Heaps = def Locs fin Vals [], [2:0, 5:0], [1:3, 3:4, 4:0], [1:3, 3:4, 4:0, 8:0, 9:8]

26 Partial Commutative Monoid A set M together with Should satisfy: identity: e * m = m * e = m commutativity: m * m = m * m associativity: m * (m * m ) = (m * m ) * m a unit e in M and a partial binary operator * on M. m = m * m implies that m and m are separate.

27 PCM Structure of Heaps { } Heaps = def Locs fin Vals = Separateness predicates h#h : h 1 #h 2 def dom(h 1 ) dom(h 2 ) = { if # { def h1 h = 2 if h 1 #h 2 undefined otherwise Partial heap combining operator h*h : h 1 h 2 The empty heap [] is the unit for *.

28 1) [] * [11:98] = [11:98] 2) [6:11, 98:0] * [11:98] = [6:11, 11:98, 98:0] 3) [6:11, 11:0] * [11:98] = undefined 4) [11:98] * [11:98] { = undefined } PCM Structure of Heaps Heaps = def Locs fin Vals = Separateness predicates h#h : h 1 #h 2 def dom(h 1 ) dom(h 2 ) = { if # { def h1 h = 2 if h 1 #h 2 undefined otherwise Partial heap combining operator h*h : h 1 h 2 The empty heap [] is the unit for *.

29 Storage Model in Detail Vars = def {x, y, z,...} Locs = def {1, 2, 3, 4,...} Vals Locs Heaps = def Locs fin Vals Stacks = def Vars Vals States = def Stacks Heaps

30 Storage Model in Detail Vars = def {x, y, z,...} Locs = def {1, 2, 3, 4,...} Vals Locs Heaps = def Locs fin Vals Stacks = def Vars Vals States = def Stacks Heaps 1) Each state consists of stack s and heap h. 2) Complete stacks, but partial finite heaps. 3) Allows pointer arithmetic, but no &x in C.

31 Storage Model in Detail Vars = def {x, y, z,...} Locs = def {1, 2, 3, 4,...} Vals Locs Heaps = def Locs fin Vals Stacks = def Vars Vals States = def Stacks Heaps 1) Each state consists of stack s and heap h. 2) Complete stacks, but partial finite local heaps. 3) Allows pointer arithmetic, but no &x in C.

32 Storage Model in Detail Vars = def {x, y, z,...} Locs = def {1, 2, 3, 4,...} Vals Locs Heaps = def Locs fin Vals Stacks = def Vars Vals States = def Stacks Heaps 1) Each state consists of stack s and heap h. 2) Complete stacks, but partial finite local heaps. 3) Allows pointer arithmetic, but not &x in C.

33 E.g. 1) ([x:0,y:0,...], []) 2) ([x:6,y:98,...], [6:11, 11:98, 98:0]) 3) ([x:6,y:98,...], [6:11, 11:12, 12:0, 98:99, 99:100]) Storage Model in Detail Vars = def {x, y, z,...} Locs = def {1, 2, 3, 4,...} Vals Locs Heaps = def Locs fin Vals Stacks = def Vars Vals States = def Stacks Heaps 1) Each state consists of stack s and heap h. 2) Complete stacks, but partial finite local heaps. 3) Allows pointer arithmetic, but not &x in C.

34 Storage Model in Detail Vars = def {x, y, z,...} Locs = def {1, 2, 3, 4,...} Vals Locs Heaps = def Locs fin Vals Stacks = def Vars Vals States = def Stacks Heaps

35 Storage Model in Detail General Vars = def {x, y, z,...} Locs = def {1, 2, 3, 4,...} Vals Locs Heaps = def Locs fin Vals Stacks = def Vars Vals States = def Stacks Heaps

36 Storage Model in Detail General Vars = def {x, y, z,...} Locs = def {1, 2, 3, 4,...} Vals Locs Heaps = def Locs fin Vals Stacks = def Vars Vals States = def Stacks Heaps

37 Storage Model in Detail ( ) General Vars = def {x, y, z,...} Locs = def {1, 2, 3, 4,...} Vals Locs Heaps = def Locs fin Vals Stacks = def Vars Vals States = def Stacks Heaps States = def Stacks M

38 Toolkit of Separation-Logic Maniac 1. A class of (separation) properties to express. 2. Pick a storage model with separation built-in. Means to find a partial commutative monoid. 3. Apply a general method for constructing an assertion language with separating connectives.

39 General Method Constructs an assertion language and its semantics. Each assertion P specifies a set of states: Recipe: Meaning of P States 1. Re-use all the connectives from classical logic. 2. Add separating connectives: emp, P * Q, P -* Q 3. Define semantics using the PCM structure.

40 General Method Constructs an assertion language and its semantics. Each assertion P specifies a set of states: Recipe: Meaning of P States 1. Re-use all the connectives from classical logic. 2. Add separating connectives: emp, P * Q, P -* Q 3. Define semantics using the PCM structure. States = def Stacks M

41 General Method Constructs an assertion language and its semantics. Each assertion P specifies a set of states: Recipe: Meaning of P States 1. Re-use all the connectives from classical logic. 2. Add separating connectives: emp, P * Q, P -* Q 3. Define semantics using the PCM structure. Ignore separating implication. HW: Include the separating implication. States = def Stacks M

42 Assertion for Our Storage Model Stacks = Vars Vals States = def Stacks Heaps Specifies a set of states: Syntax of expressions E and assertions P { Meaning of P States E, F ::= x n E+F E... Heap-independent Exprs P, Q ::= E = F E F E F Atomic Predicates emp P Q Separating Connectives true P Q P x. P Classical Logic

43 Assertion for Our Storage Model Stacks = Vars Vals States = def Stacks Heaps Specifies a set of states: Meaning of P States Syntax of expressions E and assertions P { E, F ::= x n E+F E... Heap-independent Exprs P, Q ::= E = F E F E F Atomic Predicates emp P Q Separating Connectives true P Q P x. P Classical Logic E F

44 E.g. Assertion 1 0, x y for Our Storage Model ([x:1,y:0,...], [1:0]), ([x:1,y:2,...], Stacks = Vars Vals [1:0]), ([x:1,y:2,...], Specifies a set [1:2]), of states: States = def Stacks Heaps { Meaning of P States ([x:1,y:0,...], [1:0, 2:0]) Syntax of expressions E and assertions P E, F ::= x n E+F E... Heap-independent Exprs P, Q ::= E = F E F E F Atomic Predicates emp P Q Separating Connectives true P Q P x. P Classical Logic E F

45 Assertion for Our Storage Model Stacks = Vars Vals States = def Stacks Heaps Specifies a set of states: Syntax of expressions E and assertions P { Meaning of P States E, F ::= x n E+F E... Heap-independent Exprs P, Q ::= E = F E F E F Atomic Predicates emp P Q Separating Connectives true P Q P x. P Classical Logic

46 Assertion for Our Storage Model Stacks = Vars Vals States = def Stacks Heaps Specifies a set of states: Syntax of expressions E and assertions P { Meaning of P States E, F ::= x n E+F E... Heap-independent Exprs P, Q ::= E = F E F E F Atomic Predicates emp P Q Separating Connectives true P Q P x. P Classical Logic E.g. emp ([x:1,y:0,...], []), ([x:1,y:1,...], [1:0])

47 Assertion for Our Storage Model Stacks = Vars Vals States = def Stacks Heaps Specifies a set of states: Syntax of expressions E and assertions P { Meaning of P States E, F ::= x n E+F E... Heap-independent Exprs P, Q ::= E = F E F E F Atomic Predicates emp P Q Separating Connectives true P Q P x. P Classical Logic

48 Assertion for Our Storage Model Stacks = Vars Vals States = def Stacks Heaps Specifies a set of states: Syntax of expressions E and assertions P { Meaning of P States E, F ::= x n E+F E... Heap-independent Exprs P, Q ::= E = F E F E F Atomic Predicates emp P Q Separating Connectives true P Q P x. P Classical Logic P Q

49 E.g , x y y x, x 0 x 0 ([x:1,y:2,...], Assertion [1:0, for 2:0]), Our Storage Model ([x:1,y:2,...], [1:2, 2:1]), Stacks = Vars Vals ([x:2,y:1,...], Specifies a [1:2, set of 2:1]) states: States = def Stacks Heaps Meaning of P States Syntax of expressions E and assertions P { E, F ::= x n E+F E... Heap-independent Exprs P, Q ::= E = F E F E F Atomic Predicates emp P Q Separating Connectives true P Q P x. P Classical Logic P Q

50 E.g , x y y x, x 0 x 0 ([x:1,y:2,...], Assertion [1:0, for 2:0]), Our Storage Model ([x:1,y:2,...], [1:2, 2:1]), Stacks = Vars Vals ([x:2,y:1,...], Specifies a [1:2, set of 2:1]) states: States = def Stacks Heaps Meaning of P States Syntax of expressions E and assertions P { E, F ::= x n E+F E... Heap-independent Exprs P, Q ::= E = F E F E F Atomic Predicates emp P Q Separating Connectives true P Q P x. P Classical Logic P Q Can express the separation of arbitrary formulas in a state-dependent manner.

51 Assertion for Our Storage Model Stacks = Vars Vals States = def Stacks Heaps Specifies a set of states: Syntax of expressions E and assertions P 1) Usual connectives from classical logic. 2) All other connectives are definable. 3) E.g. (x 0) x.(x x ) (x 0). { Meaning of P States E, F ::= x n E+F E... Heap-independent Exprs P, Q ::= E = F E F E F Atomic Predicates emp P Q Separating Connectives true P Q P x. P Classical Logic

52 Semantics of Assertions Expressions mean maps from stacks to values. Semantics of assertions ( ) given = by satisfaction relation between states and assertions. s in Stacks, h in Heaps. [E ] : Stacks Vals (s, h) = P

53 Semantics of Assertions (s, h) = E F iff [[E]]s, [[F ]]s Integers and [[E]]s [[F ]]s (s, h) = E F iff dom(h) ={[[E]]s} and h([[e]]s) = [[F ]]s (s, h) = emp iff h = [] (i.e., dom(h) = ) (s, h) = P Q iff h 0 h 1. h 0 h 1 = h, (s, h 0 ) = P and (s, h 1 ) = Q (s, h) = true always (s, h) = P Q iff (s, h) = P and (s, h) = Q (s, h) = P iff not ((s, h) = P ) (s, h) = x. P iff v Vals. (s[x v],h) = P )

54 Semantics of Assertions (s, h) = E F iff [[E]]s, [[F ]]s Integers and [[E]]s [[F ]]s (s, h) = E F iff dom(h) ={[[E]]s} and h([[e]]s) = [[F ]]s (s, h) = emp iff h = [] (i.e., dom(h) = ) (s, h) = P Q iff h 0 h 1. h 0 h 1 = h, (s, h 0 ) = P and (s, h 1 ) = Q (s, h) = true always (s, h) = P Q iff (s, h) = P and (s, h) = Q (s, h) = P iff not ((s, h) = P ) (s, h) = x. P iff v Vals. (s[x v],h) = P ) ([x:1,y:2,...], [1:2]) = x y, but ([x:1,y:2,...], [1:2, 2:1]) = x y ([x:1,y:2,...], []) = emp ([x:1,y:2,...], [1:2, 2:1]) = x y y x

55 Assertions for Any Storage Models Semantics of Assertions (s, h) = E F iff [[E]]s, [[F ]]s Integers and [[E]]s [[F ]]s (s, h) = E F iff dom(h) ={[[E]]s} and h([[e]]s) = [[F ]]s (s, h) = emp iff h = [] (i.e., dom(h) = ) (s, h) = P Q iff h 0 h 1. h 0 h 1 = h, (s, h 0 ) = P and (s, h 1 ) = Q (s, h) = true always (s, h) = P Q iff (s, h) = P and (s, h) = Q (s, h) = P iff not ((s, h) = P ) (s, h) = x. P iff v Vals. (s[x v],h) = P )

56 Assertions for Any Storage Models Semantics of Assertions (s, h) = E F iff [[E]]s, [[F ]]s Integers and [[E]]s [[F ]]s (s, h) = E F iff dom(h) ={[[E]]s} and h([[e]]s) = [[F ]]s (s, h) = emp iff h = [] (i.e., dom(h) = ) (s, h) = P Q iff h 0 h 1. h 0 h 1 = h, (s, h 0 ) = P and (s, h 1 ) = Q (s, h) = true always (s, h) = P Q iff (s, h) = P and (s, h) = Q (s, h) = P iff not ((s, h) = P ) (s, h) = x. P iff v Vals. (s[x v],h) = P ) Replace basic predicates appropriately. Interpret emp and * by the PCM structure of the model. Keep the rest.

57 Assertions for Any Storage Models Semantics of Assertions (s, h) = E F iff [[E]]s, [[F ]]s Integers and [[E]]s [[F ]]s (s, h) = E F iff dom(h) ={[[E]]s} and h([[e]]s) = [[F ]]s (s, h) = emp iff h = [] (i.e., dom(h) = ) (s, h) = P Q iff h 0 h 1. h 0 h 1 = h, (s, h 0 ) = P and (s, h 1 ) = Q (s, h) = true always (s, h) = P Q iff (s, h) = P and (s, h) = Q (s, h) = P iff not ((s, h) = P ) (s, h) = x. P iff v Vals. (s[x v],h) = P ) h = e Replace basic predicates appropriately. Interpret emp and * by the PCM structure of the model. Keep the rest.

58 Assertions for Any Storage Models Semantics of Assertions (s, h) = E F iff [[E]]s, [[F ]]s Integers and [[E]]s [[F ]]s (s, h) = E F iff dom(h) ={[[E]]s} and h([[e]]s) = [[F ]]s (s, h) = emp iff h = [] (i.e., dom(h) = ) (s, h) = P Q iff h 0 h 1. h 0 h 1 = h, (s, h 0 ) = P and (s, h 1 ) = Q (s, h) = true always (s, h) = P Q iff (s, h) = P and (s, h) = Q (s, h) = P iff not ((s, h) = P ) (s, h) = x. P iff v Vals. (s[x v],h) = P ) h = e Replace basic predicates appropriately. Interpret emp and * by the PCM structure of the model. Keep the rest.

59 Assertions for Any Storage Models Semantics of Assertions This recipe is standard, and used frequently. E.g. Bornat&Parkinson s permission. (s, h) = E F iff [[E]]s, [[F ]]s Integers and [[E]]s [[F ]]s (s, h) = E F Vafeiadis&Parkinson s iff dom(h) ={[[E]]s} and RGSep. h([[e]]s) = [[F ]]s (s, h) = emp iff h = [] (i.e., dom(h) = ) (s, h) = P Q iff h 0 h 1. h 0 h 1 = h, (s, h 0 ) = P and (s, h 1 ) = Q (s, h) = true always (s, h) = P Q iff (s, h) = P and (s, h) = Q (s, h) = P iff not ((s, h) = P ) (s, h) = x. P iff v Vals. (s[x v],h) = P ) h = e Replace basic predicates appropriately. Interpret emp and * by the PCM structure of the model. Keep the rest.

60 Benefits Reminder: Goal: Effective way to express separation. Recipe: First, PCM. Next, separating connectives. Gives a very flexible way of expressing separation. Well-known proof rules for implication. Can re-use another, more important part of sep. logic, which is about program verification.

61 P emp P P Q Q P P (Q R) P (Q R) Benefits P ( i Q i) i (P Q i) P ( x.q(x)) x.p Q(x) P P Q Q P Q P Q Reminder: Goal: Effective way to express separation. Recipe: First, PCM. Next, separating connectives. Gives a very flexible way of expressing separation. Well-known proof rules for implication. Can re-use another, more important part of sep. logic, which is about program verification.

62 List Segment Predicate Least fixpoint of the following equivalence: ls α (E, F ) (α = [] E = F emp) ( x α. α = E::α (E x ) ls α (x, F )) E, a0 a1 a2 a3 F The induction occurs positively, so it exists. Also, consider a variant that hides alpha: ls (E, F ) (E = F emp) ( x.e x ls α (x,f))

63 Back to Original Example Express properties at each program point. 1. lists x,y,z. 2. lists x,y: disjoint. 3. lists y,z: disjoint. 4. lists x,z: disjoint. 5. list z sorted. x = create_list(); y = create_list(); z = create_sorted_list(); x = append_list(x,y); free_list(x); traverse_list(z); 1. lists x,y,z. 2. list x contains y. 3. lists x,z: disjoint. 4. list z sorted.

64 Back to Original Example Express properties at each program point. ls(x, 0) ls(y, 0) ( α. sorted(α) ls α (z,0)) ( ) ( 0) ( ( ) ( 0)) x = create_list(); 1. lists x,y,z. 2. lists x,y: disjoint. 3. lists y,z: disjoint. 4. lists x,z: disjoint. 5. list z sorted. y = create_list(); z = create_sorted_list(); x = append_list(x,y); free_list(x); traverse_list(z); 1. lists x,y,z. 2. list x contains y. 3. lists x,z: disjoint. 4. list z sorted.

65 Back to Original Example Express properties at each program point. ls(x, 0) ls(y, 0) ( α. sorted(α) ls α (z,0)) ( ) ( 0) ( ( ) ( 0)) x = create_list(); 1. lists x,y,z. 2. lists x,y: disjoint. 3. lists y,z: disjoint. 4. lists x,z: disjoint. 5. list z sorted. y = create_list(); z = create_sorted_list(); x = append_list(x,y); free_list(x); traverse_list(z); 1. lists x,y,z. 2. list x contains y. 3. lists x,z: disjoint. 4. list z sorted. ls(x, y) ls(y, 0) ( α. sorted(α) ls α (z,0))

66 Separating Implication P -* Q is the weakest assertion A s.t. P * A Q Equivalently, P -* Q is the unique assertion s.t. P * A Q if and only if A P -* Q. Q1: Define the satisfaction relation for P -* Q. Q2: Define the satisfaction relation for (P -* Q). Q3: Give intuitive meanings of both connectives.

67 Reference Reynolds s LICS 2001 paper. Biering et al s ESOP 2005 paper.

Program Verification Using Separation Logic

Program Verification Using Separation Logic Program Verification Using Separation Logic Cristiano Calcagno Adapted from material by Dino Distefano Lecture 1 Goal of the course Study Separation Logic having automatic verification in mind Learn how

More information

Relational Parametricity and Separation Logic. Hongseok Yang, Queen Mary, Univ. of London Lars Birkedal, IT Univ. of Copenhagen

Relational Parametricity and Separation Logic. Hongseok Yang, Queen Mary, Univ. of London Lars Birkedal, IT Univ. of Copenhagen Relational Parametricity and Separation Logic Hongseok Yang, Queen Mary, Univ. of London Lars Birkedal, IT Univ. of Copenhagen Challenge Develop a theory of data abstraction for pointer programs. When

More information

A Short Introduction to Hoare Logic

A Short Introduction to Hoare Logic A Short Introduction to Hoare Logic Supratik Chakraborty I.I.T. Bombay June 23, 2008 Supratik Chakraborty (I.I.T. Bombay) A Short Introduction to Hoare Logic June 23, 2008 1 / 34 Motivation Assertion checking

More information

Lectures on Separation Logic. Lecture 2: Foundations

Lectures on Separation Logic. Lecture 2: Foundations Lectures on Separation Logic. Lecture 2: Foundations Peter O Hearn Queen Mary, University of London Marktoberdorf Summer School, 2011 Outline for this lecture Part I : Assertions and Their Semantics Part

More information

Separation Logic and the Mashup Isolation Problem

Separation Logic and the Mashup Isolation Problem Separation Logic and the Mashup Isolation Problem Dept. of Computer Science, Stanford University Phd Qualifier Exam Talk Outline 1 Background Hoare Logic Intuition behind Separation Logic 2 The Mashup

More information

Computability and Complexity Results for a Spatial Assertion Language for Data Structures

Computability and Complexity Results for a Spatial Assertion Language for Data Structures Computability and Complexity Results for a Spatial Assertion Language for Data Structures Cristiano Calcagno 12, Hongseok Yang 3, and Peter W. O Hearn 1 1 Queen Mary, University of London 2 DISI, University

More information

From Separation Logic to Systems Software

From Separation Logic to Systems Software From Separation Logic to Systems Software Peter O Hearn, Queen Mary Based on work of the SpaceInvader team: Cristiano Calcagno, Dino Distefano, Hongseok Yang, and me Special thanks to our SLAyer colleagues

More information

Design of Distributed Systems Melinda Tóth, Zoltán Horváth

Design of Distributed Systems Melinda Tóth, Zoltán Horváth Design of Distributed Systems Melinda Tóth, Zoltán Horváth Design of Distributed Systems Melinda Tóth, Zoltán Horváth Publication date 2014 Copyright 2014 Melinda Tóth, Zoltán Horváth Supported by TÁMOP-412A/1-11/1-2011-0052

More information

Completeness of Pointer Program Verification by Separation Logic

Completeness of Pointer Program Verification by Separation Logic ISSN 1346-5597 NII Technical Report Completeness of Pointer Program Verification by Separation Logic Makoto Tatsuta, Wei-Ngan Chin, and Mahmudul Faisal Al Ameen NII-2009-013E June 2009 Completeness of

More information

Flow Interfaces Compositional Abstractions of Concurrent Data Structures. Siddharth Krishna, Dennis Shasha, and Thomas Wies

Flow Interfaces Compositional Abstractions of Concurrent Data Structures. Siddharth Krishna, Dennis Shasha, and Thomas Wies Flow Interfaces Compositional Abstractions of Concurrent Data Structures Siddharth Krishna, Dennis Shasha, and Thomas Wies Background Verifying programs, separation logic, inductive predicates Verifying

More information

Flow Interfaces Compositional Abstractions of Concurrent Data Structures. Siddharth Krishna, Dennis Shasha, and Thomas Wies

Flow Interfaces Compositional Abstractions of Concurrent Data Structures. Siddharth Krishna, Dennis Shasha, and Thomas Wies Flow Interfaces Compositional Abstractions of Concurrent Data Structures Siddharth Krishna, Dennis Shasha, and Thomas Wies Background Verifying programs, separation logic, inductive predicates Slides courtesy

More information

A Decidable Fragment of Separation Logic

A Decidable Fragment of Separation Logic A Decidable Fragment of Separation Logic Josh Berdine 1, Cristiano Calcagno 2, and Peter W. O Hearn 1 1 Queen Mary, University of London {berdine,ohearn}@dcs.qmul.ac.uk 2 Imperial College, London ccris@doc.ic.ac.uk

More information

AN INTRODUCTION TO SEPARATION LOGIC. 2. Assertions

AN INTRODUCTION TO SEPARATION LOGIC. 2. Assertions AN INTRODUCTION TO SEPARATION LOGIC 2. Assertions John C. Reynolds Carnegie Mellon University January 7, 2011 c 2011 John C. Reynolds Pure Assertions An assertion p is pure iff, for all stores s and all

More information

Theories of Programming Languages Assignment 5

Theories of Programming Languages Assignment 5 Theories of Programming Languages Assignment 5 December 17, 2012 1. Lambda-Calculus (see Fig. 1 for initions of = β, normal order evaluation and eager evaluation). (a) Let Ω = ((λx. x x) (λx. x x)), and

More information

Universität Augsburg

Universität Augsburg Universität Augsburg Algebraic Separation Logic H.-H. Dang P. Höfner B. Möller Report 2010-06 July 2010 Institut für Informatik D-86135 Augsburg Copyright c H.-H. Dang P. Höfner B. Möller Institut für

More information

Axiomatic Semantics. Operational semantics. Good for. Not good for automatic reasoning about programs

Axiomatic Semantics. Operational semantics. Good for. Not good for automatic reasoning about programs Review Operational semantics relatively l simple many flavors (small vs. big) not compositional (rule for while) Good for describing language implementation reasoning about properties of the language eg.

More information

Automatic Parallelization with Separation Logic

Automatic Parallelization with Separation Logic Automatic Parallelization with Separation Logic Mohammad Raza, Cristiano Calcagno, and Philippa Gardner Department of Computing, Imperial College London 180 Queen s Gate, London SW7 2AZ, UK {mraza,ccris,pg}@doc.ic.ac.uk

More information

Separation Logic and Graphical Models

Separation Logic and Graphical Models Separation Logic and Graphical Models John Wickerson and Tony Hoare Semantics Lunch, 25th October 2010 1 Trace composition Problem: Composition is non-deterministic. 2 Trace composition Problem: Composition

More information

Digital Logic Design ENEE x. Lecture 12

Digital Logic Design ENEE x. Lecture 12 Digital Logic Design ENEE 244-010x Lecture 12 Announcements HW5 due today HW6 up on course webpage, due at the beginning of class on Wednesday, 10/28. Agenda Last time: Quine-McClusky (4.8) Petrick s Method

More information

Concurrent separation logic and operational semantics

Concurrent separation logic and operational semantics MFPS 2011 Concurrent separation logic and operational semantics Viktor Vafeiadis Max Planck Institute for Software Systems (MPI-SWS), Germany Abstract This paper presents a new soundness proof for concurrent

More information

Collecting garbage concurrently (but correctly)

Collecting garbage concurrently (but correctly) Collecting garbage concurrently (but correctly) Kamal Lodaya The Institute of Mathematical Sciences, Chennai Joint work with Kalpesh Kapoor (IIT, Guwahati) and Uday Reddy (U. Birmingham) 1 First order

More information

A Brief History of Shared memory C M U

A Brief History of Shared memory C M U A Brief History of Shared memory S t e p h e n B r o o k e s C M U 1 Outline Revisionist history Rational reconstruction of early models Evolution of recent models A unifying framework Fault-detecting

More information

An Entailment Checker for Separation Logic with Inductive Definitions

An Entailment Checker for Separation Logic with Inductive Definitions An Entailment Checker for Separation Loic with Inductive Definitions Radu Iosif, Cristina Serban Université de Grenoble Alpes, CNRS, VERIMAG July 18, 2018 Cristina Serban (VERIMAG) An Entailment Checker

More information

Introduction to Logic in Computer Science: Autumn 2006

Introduction to Logic in Computer Science: Autumn 2006 Introduction to Logic in Computer Science: Autumn 2006 Ulle Endriss Institute for Logic, Language and Computation University of Amsterdam Ulle Endriss 1 Plan for Today Today s class will be an introduction

More information

A Logic Primer. Stavros Tripakis University of California, Berkeley. Stavros Tripakis (UC Berkeley) EE 144/244, Fall 2014 A Logic Primer 1 / 35

A Logic Primer. Stavros Tripakis University of California, Berkeley. Stavros Tripakis (UC Berkeley) EE 144/244, Fall 2014 A Logic Primer 1 / 35 EE 144/244: Fundamental Algorithms for System Modeling, Analysis, and Optimization Fall 2014 A Logic Primer Stavros Tripakis University of California, Berkeley Stavros Tripakis (UC Berkeley) EE 144/244,

More information

Chapter 2. Assertions. An Introduction to Separation Logic c 2011 John C. Reynolds February 3, 2011

Chapter 2. Assertions. An Introduction to Separation Logic c 2011 John C. Reynolds February 3, 2011 Chapter 2 An Introduction to Separation Logic c 2011 John C. Reynolds February 3, 2011 Assertions In this chapter, we give a more detailed exposition of the assertions of separation logic: their meaning,

More information

Axioms of Kleene Algebra

Axioms of Kleene Algebra Introduction to Kleene Algebra Lecture 2 CS786 Spring 2004 January 28, 2004 Axioms of Kleene Algebra In this lecture we give the formal definition of a Kleene algebra and derive some basic consequences.

More information

A field F is a set of numbers that includes the two numbers 0 and 1 and satisfies the properties:

A field F is a set of numbers that includes the two numbers 0 and 1 and satisfies the properties: Byte multiplication 1 Field arithmetic A field F is a set of numbers that includes the two numbers 0 and 1 and satisfies the properties: F is an abelian group under addition, meaning - F is closed under

More information

Fundamentals of Software Engineering

Fundamentals of Software Engineering Fundamentals of Software Engineering First-Order Logic Ina Schaefer Institute for Software Systems Engineering TU Braunschweig, Germany Slides by Wolfgang Ahrendt, Richard Bubel, Reiner Hähnle (Chalmers

More information

Software Engineering using Formal Methods

Software Engineering using Formal Methods Software Engineering using Formal Methods First-Order Logic Wolfgang Ahrendt 26th September 2013 SEFM: First-Order Logic 130926 1 / 53 Install the KeY-Tool... KeY used in Friday s exercise Requires: Java

More information

Predicate Logic. Xinyu Feng 09/26/2011. University of Science and Technology of China (USTC)

Predicate Logic. Xinyu Feng 09/26/2011. University of Science and Technology of China (USTC) University of Science and Technology of China (USTC) 09/26/2011 Overview Predicate logic over integer expressions: a language of logical assertions, for example x. x + 0 = x Why discuss predicate logic?

More information

Modular Labelled Sequent Calculi for Abstract Separation Logics

Modular Labelled Sequent Calculi for Abstract Separation Logics Modular Labelled Sequent Calculi for Abstract Separation Logics ZHÉ HÓU, Griffith University, Australia RANALD CLOUSTON, Aarhus University, Denmark RAJEEV GORÉ, The Australian National University, Australia

More information

Matching Logic: Syntax and Semantics

Matching Logic: Syntax and Semantics Matching Logic: Syntax and Semantics Grigore Roșu 1 and Traian Florin Șerbănuță 2 1 University of Illinois at Urbana-Champaign, USA grosu@illinois.edu 2 University of Bucharest, Romania traian.serbanuta@unibuc.ro

More information

Compositional Entailment Checking for a Fragment of Separation Logic

Compositional Entailment Checking for a Fragment of Separation Logic Compositional Entailment Checking for a Fragment of Separation Logic Constantin Enea 1, Ondřej Lengál 2, Mihaela Sighireanu 1, and Tomáš Vojnar 2 1 Univ. Paris Diderot, LIAFA CNRS UMR 7089 2 FIT, Brno

More information

Hoare Examples & Proof Theory. COS 441 Slides 11

Hoare Examples & Proof Theory. COS 441 Slides 11 Hoare Examples & Proof Theory COS 441 Slides 11 The last several lectures: Agenda Denotational semantics of formulae in Haskell Reasoning using Hoare Logic This lecture: Exercises A further introduction

More information

Predicate Logic. x. x + 0 = x. Predicate logic over integer expressions: a language of logical assertions, for example. Why discuss predicate logic?

Predicate Logic. x. x + 0 = x. Predicate logic over integer expressions: a language of logical assertions, for example. Why discuss predicate logic? Predicate Logic Predicate logic over integer expressions: a language of logical assertions, for example x. x + 0 = x Why discuss predicate logic? It is an example of a simple language It has simple denotational

More information

Weakest Precondition Calculus

Weakest Precondition Calculus Weakest Precondition Calculus COMP2600 Formal Methods for Software Engineering Rajeev Goré Australian National University Semester 2, 2016 (Most lecture slides due to Ranald Clouston) COMP 2600 Weakest

More information

Automata-Theoretic Model Checking of Reactive Systems

Automata-Theoretic Model Checking of Reactive Systems Automata-Theoretic Model Checking of Reactive Systems Radu Iosif Verimag/CNRS (Grenoble, France) Thanks to Tom Henzinger (IST, Austria), Barbara Jobstmann (CNRS, Grenoble) and Doron Peled (Bar-Ilan University,

More information

Benefits of Interval Temporal Logic for Specification of Concurrent Systems

Benefits of Interval Temporal Logic for Specification of Concurrent Systems Benefits of Interval Temporal Logic for Specification of Concurrent Systems Ben Moszkowski Software Technology Research Laboratory De Montfort University Leicester Great Britain email: benm@dmu.ac.uk http://www.tech.dmu.ac.uk/~benm

More information

Recent developments in concurrent program logics

Recent developments in concurrent program logics Recent developments in concurrent program logics Viktor Vafeiadis University of Cambridge PSPL 2010 Why program logic? Reasoning framework Capture common reasoning principles Reduce accidental proof complexity

More information

List reversal: back into the frying pan

List reversal: back into the frying pan List reversal: back into the frying pan Richard Bornat March 20, 2006 Abstract More than thirty years ago Rod Burstall showed how to do a proof of a neat little program, shown in a modern notation in figure

More information

A PROOF SYSTEM FOR SEPARATION LOGIC WITH MAGIC WAND

A PROOF SYSTEM FOR SEPARATION LOGIC WITH MAGIC WAND A PROOF SYSTEM FOR SEPARATION LOGIC WITH MAGIC WAND WONYEOL LEE, JINEON BAEK, AND SUNGWOO PARK Stanford, USA e-mail address: wonyeol@stanfordedu POSTECH, Republic of Korea e-mail address: gok01172@postechackr

More information

Software Engineering

Software Engineering Software Engineering Lecture 07: Design by Contract Peter Thiemann University of Freiburg, Germany 02.06.2014 Table of Contents Design by Contract Contracts for Procedural Programs Contracts for Object-Oriented

More information

Lecture 2: Axiomatic semantics

Lecture 2: Axiomatic semantics Chair of Software Engineering Trusted Components Prof. Dr. Bertrand Meyer Lecture 2: Axiomatic semantics Reading assignment for next week Ariane paper and response (see course page) Axiomatic semantics

More information

Introduction to Permission-Based Program Logics Part II Concurrent Programs

Introduction to Permission-Based Program Logics Part II Concurrent Programs Introduction to Permission-Based Program Logics Part II Concurrent Programs Thomas Wies New York University Example: Lock-Coupling List 2 3 5 7 8 9 There is one lock per node; threads acquire locks in

More information

Fundamentals of Software Engineering

Fundamentals of Software Engineering Fundamentals of Software Engineering First-Order Logic Ina Schaefer Institute for Software Systems Engineering TU Braunschweig, Germany Slides by Wolfgang Ahrendt, Richard Bubel, Reiner Hähnle (Chalmers

More information

Information and Computation

Information and Computation Information and Computation 211 2012) 106 137 Contents lists available at SciVerse ScienceDirect Information and Computation www.elsevier.com/locate/yinco On the almighty wand Rémi Brochenin a, Stéphane

More information

Programming Languages

Programming Languages CSE 230: Winter 2008 Principles of Programming Languages Lecture 6: Axiomatic Semantics Deriv. Rules for Hoare Logic `{A} c {B} Rules for each language construct ` {A} c 1 {B} ` {B} c 2 {C} ` {A} skip

More information

Abstractions and Decision Procedures for Effective Software Model Checking

Abstractions and Decision Procedures for Effective Software Model Checking Abstractions and Decision Procedures for Effective Software Model Checking Prof. Natasha Sharygina The University of Lugano, Carnegie Mellon University Microsoft Summer School, Moscow, July 2011 Lecture

More information

THE AUSTRALIAN NATIONAL UNIVERSITY Second Semester COMP2600/COMP6260 (Formal Methods for Software Engineering)

THE AUSTRALIAN NATIONAL UNIVERSITY Second Semester COMP2600/COMP6260 (Formal Methods for Software Engineering) THE AUSTRALIAN NATIONAL UNIVERSITY Second Semester 2016 COMP2600/COMP6260 (Formal Methods for Software Engineering) Writing Period: 3 hours duration Study Period: 15 minutes duration Permitted Materials:

More information

Lecture Notes: Axiomatic Semantics and Hoare-style Verification

Lecture Notes: Axiomatic Semantics and Hoare-style Verification Lecture Notes: Axiomatic Semantics and Hoare-style Verification 17-355/17-665/17-819O: Program Analysis (Spring 2018) Claire Le Goues and Jonathan Aldrich clegoues@cs.cmu.edu, aldrich@cs.cmu.edu It has

More information

Axiomatic Semantics. Lecture 9 CS 565 2/12/08

Axiomatic Semantics. Lecture 9 CS 565 2/12/08 Axiomatic Semantics Lecture 9 CS 565 2/12/08 Axiomatic Semantics Operational semantics describes the meaning of programs in terms of the execution steps taken by an abstract machine Denotational semantics

More information

Notes on Monoids and Automata

Notes on Monoids and Automata Notes on Monoids and Automata Uday S. Reddy November 9, 1994 In this article, I define a semantics for Algol programs with Reynolds s syntactic control of interference?;? in terms of comonoids in coherent

More information

Lecture 3: Semantics of Propositional Logic

Lecture 3: Semantics of Propositional Logic Lecture 3: Semantics of Propositional Logic 1 Semantics of Propositional Logic Every language has two aspects: syntax and semantics. While syntax deals with the form or structure of the language, it is

More information

Local Reasoning about Data Update

Local Reasoning about Data Update Local Reasoning about Data Update Cristiano Calcagno, Philippa Gardner and Uri Zarfaty Department of Computing Imperial College London London, UK {ccris,pg,udz}@doc.ic.ac.uk Abstract We present local Hoare

More information

A Logic Primer. Stavros Tripakis University of California, Berkeley

A Logic Primer. Stavros Tripakis University of California, Berkeley EE 144/244: Fundamental Algorithms for System Modeling, Analysis, and Optimization Fall 2015 A Logic Primer Stavros Tripakis University of California, Berkeley Stavros Tripakis (UC Berkeley) EE 144/244,

More information

Trace semantics: towards a unification of parallel paradigms Stephen Brookes. Department of Computer Science Carnegie Mellon University

Trace semantics: towards a unification of parallel paradigms Stephen Brookes. Department of Computer Science Carnegie Mellon University Trace semantics: towards a unification of parallel paradigms Stephen Brookes Department of Computer Science Carnegie Mellon University MFCSIT 2002 1 PARALLEL PARADIGMS State-based Shared-memory global

More information

Automated Reasoning Lecture 5: First-Order Logic

Automated Reasoning Lecture 5: First-Order Logic Automated Reasoning Lecture 5: First-Order Logic Jacques Fleuriot jdf@inf.ac.uk Recap Over the last three lectures, we have looked at: Propositional logic, semantics and proof systems Doing propositional

More information

Equational Logic. Chapter Syntax Terms and Term Algebras

Equational Logic. Chapter Syntax Terms and Term Algebras Chapter 2 Equational Logic 2.1 Syntax 2.1.1 Terms and Term Algebras The natural logic of algebra is equational logic, whose propositions are universally quantified identities between terms built up from

More information

Introduction to first-order logic:

Introduction to first-order logic: Introduction to first-order logic: First-order structures and languages. Terms and formulae in first-order logic. Interpretations, truth, validity, and satisfaction. Valentin Goranko DTU Informatics September

More information

MATH 433 Applied Algebra Lecture 22: Semigroups. Rings.

MATH 433 Applied Algebra Lecture 22: Semigroups. Rings. MATH 433 Applied Algebra Lecture 22: Semigroups. Rings. Groups Definition. A group is a set G, together with a binary operation, that satisfies the following axioms: (G1: closure) for all elements g and

More information

Hoare Logic (I): Axiomatic Semantics and Program Correctness

Hoare Logic (I): Axiomatic Semantics and Program Correctness Hoare Logic (I): Axiomatic Semantics and Program Correctness (Based on [Apt and Olderog 1991; Gries 1981; Hoare 1969; Kleymann 1999; Sethi 199]) Yih-Kuen Tsay Dept. of Information Management National Taiwan

More information

Rémi Brochenin Stéphane Demri Étienne Lozes. On the Almighty Wand. Research Report LSV-08-26

Rémi Brochenin Stéphane Demri Étienne Lozes. On the Almighty Wand. Research Report LSV-08-26 Rémi Brochenin Stéphane Demri Étienne Lozes On the Almighty Wand Research Report LSV-08-26 September 2008 On the Almighty Wand Rémi Brochenin & Stéphane Demri & Etienne Lozes LSV, ENS Cachan, CNRS, INRIA

More information

An Introduction to Modal Logic III

An Introduction to Modal Logic III An Introduction to Modal Logic III Soundness of Normal Modal Logics Marco Cerami Palacký University in Olomouc Department of Computer Science Olomouc, Czech Republic Olomouc, October 24 th 2013 Marco Cerami

More information

Hoare Logic: Part II

Hoare Logic: Part II Hoare Logic: Part II COMP2600 Formal Methods for Software Engineering Jinbo Huang Australian National University COMP 2600 Hoare Logic II 1 Factorial {n 0} fact := 1; i := n; while (i >0) do fact := fact

More information

Bi-Abduction. Philippa Gardner (Imperial College London) Separation Logic 1 / 17. Bi-Abduction

Bi-Abduction. Philippa Gardner (Imperial College London) Separation Logic 1 / 17. Bi-Abduction 8 Bi-abduction and Abstraction Slide 1 In the last lecture, we saw how frame inference lets us verify that the pre- and post-conditions and loop invariants of a given program are correct. Abstraction lets

More information

Spring 2016 Program Analysis and Verification. Lecture 3: Axiomatic Semantics I. Roman Manevich Ben-Gurion University

Spring 2016 Program Analysis and Verification. Lecture 3: Axiomatic Semantics I. Roman Manevich Ben-Gurion University Spring 2016 Program Analysis and Verification Lecture 3: Axiomatic Semantics I Roman Manevich Ben-Gurion University Warm-up exercises 1. Define program state: 2. Define structural semantics configurations:

More information

03 Review of First-Order Logic

03 Review of First-Order Logic CAS 734 Winter 2014 03 Review of First-Order Logic William M. Farmer Department of Computing and Software McMaster University 18 January 2014 What is First-Order Logic? First-order logic is the study of

More information

Matching Logic: A Logic for Structural Reasoning

Matching Logic: A Logic for Structural Reasoning Matching Logic: A Logic for Structural Reasoning Grigore Roşu University of Illinois at Urbana-Champaign grosu@illinois.edu Abstract Matching logic is a first-order logic (FOL) variant to reason about

More information

CprE 281: Digital Logic

CprE 281: Digital Logic CprE 281: Digital Logic Instructor: Alexander Stoytchev http://www.ece.iastate.edu/~alexs/classes/ Boolean Algebra CprE 281: Digital Logic Iowa State University, Ames, IA Copyright Alexander Stoytchev

More information

In this episode of The Verification Corner, Rustan Leino talks about Loop Invariants. He gives a brief summary of the theoretical foundations and

In this episode of The Verification Corner, Rustan Leino talks about Loop Invariants. He gives a brief summary of the theoretical foundations and In this episode of The Verification Corner, Rustan Leino talks about Loop Invariants. He gives a brief summary of the theoretical foundations and shows how a program can sometimes be systematically constructed

More information

Model Checking with CTL. Presented by Jason Simas

Model Checking with CTL. Presented by Jason Simas Model Checking with CTL Presented by Jason Simas Model Checking with CTL Based Upon: Logic in Computer Science. Huth and Ryan. 2000. (148-215) Model Checking. Clarke, Grumberg and Peled. 1999. (1-26) Content

More information

Softwaretechnik. Lecture 13: Design by Contract. Peter Thiemann University of Freiburg, Germany

Softwaretechnik. Lecture 13: Design by Contract. Peter Thiemann University of Freiburg, Germany Softwaretechnik Lecture 13: Design by Contract Peter Thiemann University of Freiburg, Germany 25.06.2012 Table of Contents Design by Contract Contracts for Procedural Programs Contracts for Object-Oriented

More information

MAT2345 Discrete Math

MAT2345 Discrete Math Fall 2013 General Syllabus Schedule (note exam dates) Homework, Worksheets, Quizzes, and possibly Programs & Reports Academic Integrity Do Your Own Work Course Web Site: www.eiu.edu/~mathcs Course Overview

More information

CS522 - Programming Language Semantics

CS522 - Programming Language Semantics 1 CS522 - Programming Language Semantics Simply Typed Lambda Calculus Grigore Roşu Department of Computer Science University of Illinois at Urbana-Champaign 2 We now discuss a non-trivial extension of

More information

Softwaretechnik. Lecture 13: Design by Contract. Peter Thiemann University of Freiburg, Germany

Softwaretechnik. Lecture 13: Design by Contract. Peter Thiemann University of Freiburg, Germany Softwaretechnik Lecture 13: Design by Contract Peter Thiemann University of Freiburg, Germany 25.06.2012 Table of Contents Design by Contract Contracts for Procedural Programs Contracts for Object-Oriented

More information

Axiomatisation of Hybrid Logic

Axiomatisation of Hybrid Logic Imperial College London Department of Computing Axiomatisation of Hybrid Logic by Louis Paternault Submitted in partial fulfilment of the requirements for the MSc Degree in Advanced Computing of Imperial

More information

Towards a Program Logic for JavaScript

Towards a Program Logic for JavaScript Towards a Program Logic for JavaScript Philippa Gardner, Sergio Maffeis, Gareth Smith {pg,maffeis,gds}@docicacuk Abstract JavaScript has become the most widely used language for client-side web programming

More information

CS 514, Mathematics for Computer Science Mid-semester Exam, Autumn 2017 Department of Computer Science and Engineering IIT Guwahati

CS 514, Mathematics for Computer Science Mid-semester Exam, Autumn 2017 Department of Computer Science and Engineering IIT Guwahati CS 514, Mathematics for Computer Science Mid-semester Exam, Autumn 2017 Department of Computer Science and Engineering IIT Guwahati Important 1. No questions about the paper will be entertained during

More information

A Semantic Foundation for Hidden State

A Semantic Foundation for Hidden State A Semantic Foundation for Hidden State Jan Schwinghammer 1, Hongseok Yang 2, Lars Birkedal 3, François Pottier 4, and Bernhard Reus 5 1 Saarland Univ. 2 Queen Mary Univ. of London 3 IT Univ. of Copenhagen

More information

Model Checking for Symbolic-Heap Separation Logic with Inductive Predicates

Model Checking for Symbolic-Heap Separation Logic with Inductive Predicates Model Checking for Symbolic-Heap Separation Logic with Inductive Predicates James Brotherston University College London, UK J.Brotherston@ucl.ac.uk Nikos Gorogiannis Middlesex University, UK nikos.gorogiannis@gmail.com

More information

Principles of Program Analysis: Data Flow Analysis

Principles of Program Analysis: Data Flow Analysis Principles of Program Analysis: Data Flow Analysis Transparencies based on Chapter 2 of the book: Flemming Nielson, Hanne Riis Nielson and Chris Hankin: Principles of Program Analysis. Springer Verlag

More information

Separation and Information Hiding

Separation and Information Hiding Separation and Information Hiding PETER W. O HEARN and HONGSEOK YANG Queen Mary, University of London and JOHN C. REYNOLDS Carnegie Mellon University 11 We investigate proof rules for information hiding,

More information

Predicate Logic. Xinyu Feng 11/20/2013. University of Science and Technology of China (USTC)

Predicate Logic. Xinyu Feng 11/20/2013. University of Science and Technology of China (USTC) University of Science and Technology of China (USTC) 11/20/2013 Overview Predicate logic over integer expressions: a language of logical assertions, for example x. x + 0 = x Why discuss predicate logic?

More information

Lecture 03: Duration Calculus I

Lecture 03: Duration Calculus I Real-Time Systems Lecture 03: Duration Calculus I 2014-05-08 Dr. Bernd Westphal 03 2014-05-08 main Albert-Ludwigs-Universität Freiburg, Germany Contents & Goals Last Lecture: Model of timed behaviour:

More information

Preliminaries. Introduction to EF-games. Inexpressivity results for first-order logic. Normal forms for first-order logic

Preliminaries. Introduction to EF-games. Inexpressivity results for first-order logic. Normal forms for first-order logic Introduction to EF-games Inexpressivity results for first-order logic Normal forms for first-order logic Algorithms and complexity for specific classes of structures General complexity bounds Preliminaries

More information

Structuring the verification of heap-manipulating programs

Structuring the verification of heap-manipulating programs Structuring the verification of heap-manipulating programs Aleksandar Nanevski (IMDEA Madrid) Viktor Vafeiadis (MSR / Univ. of Cambridge) Josh Berdine (MSR Cambridge) Hoare/Separation Logic Hoare logic

More information

Propositional and Predicate Logic

Propositional and Predicate Logic Formal Verification of Software Propositional and Predicate Logic Bernhard Beckert UNIVERSITÄT KOBLENZ-LANDAU B. Beckert: Formal Verification of Software p.1 Propositional Logic: Syntax Special symbols

More information

Hoare Logic: Reasoning About Imperative Programs

Hoare Logic: Reasoning About Imperative Programs Hoare Logic: Reasoning About Imperative Programs COMP1600 / COMP6260 Dirk Pattinson Australian National University Semester 2, 2018 Programming Paradigms Functional. (Haskell, SML, OCaml,... ) main paradigm:

More information

Separation Logic and the Mashup Isolation Problem

Separation Logic and the Mashup Isolation Problem Separation Logic and the Mashup Isolation Problem Ankur Taly Computer Science Department, Stanford University Abstract. This work was done as part of my PhD qualifier exam. My qualifier exam problem was

More information

Foundations of Mathematics MATH 220 FALL 2017 Lecture Notes

Foundations of Mathematics MATH 220 FALL 2017 Lecture Notes Foundations of Mathematics MATH 220 FALL 2017 Lecture Notes These notes form a brief summary of what has been covered during the lectures. All the definitions must be memorized and understood. Statements

More information

COMPUTER SCIENCE TEMPORAL LOGICS NEED THEIR CLOCKS

COMPUTER SCIENCE TEMPORAL LOGICS NEED THEIR CLOCKS Bulletin of the Section of Logic Volume 18/4 (1989), pp. 153 160 reedition 2006 [original edition, pp. 153 160] Ildikó Sain COMPUTER SCIENCE TEMPORAL LOGICS NEED THEIR CLOCKS In this paper we solve some

More information

Nested Hoare Triples and Frame Rules for Higher-order Store

Nested Hoare Triples and Frame Rules for Higher-order Store Nested Hoare Triples and Frame Rules for Higher-order Store Jan Schwinghammer 1, Lars Birkedal 2, Bernhard Reus 3, and Hongseok Yang 4 1 Saarland University, Saarbrücken 2 IT University of Copenhagen 3

More information

QPEL Quantum Program and Effect Language

QPEL Quantum Program and Effect Language QPEL Quantum Program and Effect Language QPL 2014 Kyoto Robin Adams r.adams@cs.ru.nl 5 June 2014 R Adams 5 June 2014 QPEL 1 / 32 Introduction QPEL (Quantum Program and Effect language) is a formal system

More information

CSC 7101: Programming Language Structures 1. Axiomatic Semantics. Stansifer Ch 2.4, Ch. 9 Winskel Ch.6 Slonneger and Kurtz Ch. 11.

CSC 7101: Programming Language Structures 1. Axiomatic Semantics. Stansifer Ch 2.4, Ch. 9 Winskel Ch.6 Slonneger and Kurtz Ch. 11. Axiomatic Semantics Stansifer Ch 2.4, Ch. 9 Winskel Ch.6 Slonneger and Kurtz Ch. 11 1 Overview We ll develop proof rules, such as: { I b } S { I } { I } while b do S end { I b } That allow us to verify

More information

On the Complexity of Pointer Arithmetic in Separation Logic

On the Complexity of Pointer Arithmetic in Separation Logic On the Complexity of Pointer Arithmetic in Separation Logic James Brotherston 1 and Max Kanovich 1,2 1 University College London, UK 2 National Research University Higher School of Economics, Russian Federation

More information

0.Axioms for the Integers 1

0.Axioms for the Integers 1 0.Axioms for the Integers 1 Number theory is the study of the arithmetical properties of the integers. You have been doing arithmetic with integers since you were a young child, but these mathematical

More information

Applied Logic for Computer Scientists. Answers to Some Exercises

Applied Logic for Computer Scientists. Answers to Some Exercises Applied Logic for Computer Scientists Computational Deduction and Formal Proofs Springer, 2017 doi: http://link.springer.com/book/10.1007%2f978-3-319-51653-0 Answers to Some Exercises Mauricio Ayala-Rincón

More information

Constraint Solving for Program Verification: Theory and Practice by Example

Constraint Solving for Program Verification: Theory and Practice by Example Constraint Solving for Program Verification: Theory and Practice by Example Andrey Rybalchenko Technische Universität München Abstract. Program verification relies on the construction of auxiliary assertions

More information

Boolean bunched logic: its semantics and completeness

Boolean bunched logic: its semantics and completeness Boolean bunched logic: its semantics and completeness James Brotherston Programming Principles, Logic and Verification Group Dept. of Computer Science University College London, UK J.Brotherston@ucl.ac.uk

More information