Towards a General Theory of Local Actions Hongseok Yang Seoul National University Peter O’Hearn Queen Mary, University of London.

Slides:



Advertisements
Similar presentations
Soundness of Higher-order Frame Rules (How did category theory help me?) Hongseok Yang Seoul National University Joint work with Lars Birkedal and Noah.
Advertisements

Modal Logic with Variable Modalities & its Applications to Querying Knowledge Bases Evgeny Zolin The University of Manchester
An Abstract Interpretation Framework for Refactoring P. Cousot, NYU, ENS, CNRS, INRIA R. Cousot, ENS, CNRS, INRIA F. Logozzo, M. Barnett, Microsoft Research.
Introduction The concept of transform appears often in the literature of image processing and data compression. Indeed a suitable discrete representation.
Artificial Intelligence Chapter 13 The Propositional Calculus Biointelligence Lab School of Computer Sci. & Eng. Seoul National University.
Language and Automata Theory
Techniques for Proving the Completeness of a Proof System Hongseok Yang Seoul National University Cristiano Calcagno Imperial College.
1 Turing Machines and Equivalent Models Section 13.2 The Church-Turing Thesis.
CS 345: Chapter 9 Algorithmic Universality and Its Robustness
- Vasvi Kakkad.  Formal -  Tool for mathematical analysis of language  Method for precisely designing language  Well formed model for describing and.
1 PROPERTIES OF A TYPE ABSTRACT INTERPRETATER. 2 MOTIVATION OF THE EXPERIMENT § a well understood case l type inference in functional programming à la.
The Logic of Intelligence Pei Wang Department of Computer and Information Sciences Temple University.
© M. Winter COSC 4P41 – Functional Programming Testing vs Proving Testing –uses a set of “typical” examples, –symbolic testing, –may find errors,
Formal Semantics of Programming Languages 虞慧群 Topic 5: Axiomatic Semantics.
Tutorial on Widening (and Narrowing) Hongseok Yang Seoul National University.
Instructor: Hayk Melikya
1 Temporal Claims A temporal claim is defined in Promela by the syntax: never { … body … } never is a keyword, like proctype. The body is the same as for.
Comp 205: Comparative Programming Languages Semantics of Imperative Programming Languages denotational semantics operational semantics logical semantics.
1. Introduction Consistency of learning processes To explain when a learning machine that minimizes empirical risk can achieve a small value of actual.
1 Basic abstract interpretation theory. 2 The general idea §a semantics l any definition style, from a denotational definition to a detailed interpreter.
Programming Language Semantics Denotational Semantics Chapter 5 Based on a lecture by Martin Abadi.
CAS LX 502 Semantics 1b. The Truth Ch. 1.
Programming Language Semantics Mooly SagivEran Yahav Schrirber 317Open space html://
Programming Language Semantics Denotational Semantics Chapter 5 Part II.
A Denotational Semantics For Dataflow with Firing Edward A. Lee Jike Chong Wei Zheng Paper Discussion for.
The Complexity of Adding Failsafe Fault-tolerance Sandeep S. Kulkarni Ali Ebnenasir.
Bogazici University Dept. Of ME. Laplace Transforms Very useful in the analysis and design of LTI systems. Operations of differentiation and integration.
Theory and Applications
Programming Language Semantics Denotational Semantics Chapter 5 Part III Based on a lecture by Martin Abadi.
Course Outline Traditional Static Program Analysis –Theory Compiler Optimizations; Control Flow Graphs Data-flow Analysis: Data-flow frameworks –Classic.
9-Aug-15 Vocabulary. Programming Vocabulary Watch closely, you might even want to take some notes. There’s a short quiz at the end of this presentation!
An Information Theory based Modeling of DSMLs Zekai Demirezen 1, Barrett Bryant 1, Murat M. Tanik 2 1 Department of Computer and Information Sciences,
By: Er. Sukhwinder kaur.  Computation Computation  Algorithm Algorithm  Objectives Objectives  What do we study in Theory of Computation ? What do.
Solving fixpoint equations
A Z Approach in Validating ORA-SS Data Models Scott Uk-Jin Lee Jing Sun Gillian Dobbie Yuan Fang Li.
Formal Semantics of Programming Languages 虞慧群 Topic 3: Principles of Induction.
Complexity A decidable problem is computationally solvable. But what resources are needed to solve the problem? –How much time will it require? –How much.
Copyright © Curt Hill Languages and Grammars This is not English Class. But there is a resemblance.
Model construction and verification for dynamic programming languages Radu Iosif
Math Chapter 6 Part II. POWER SETS In mathematics, given a set S, the power set of S, written P(S) or 2 n(S), is the set of all subsets of S. Remember.
Chapter 5 – Relations and Functions. 5.1Cartesian Products and Relations Definition 5.1: For sets A, B  U, the Cartesian product, or cross product, of.
LDK R Logics for Data and Knowledge Representation PL of Classes.
1 Section 13.2 The Church-Turing Thesis The Church-Turing Thesis: Anything that is intuitively computable can be be computed by a Turing machine. It is.
Syntax and Semantics CIS 331 Syntax: the form or structure of the expressions, statements, and program units. Semantics: the meaning of the expressions,
School of Computing and Mathematics, University of Huddersfield CHA2545: WEEK 4 LECTURE: DENOTIONAL SEMANTICS OF A SIMPLE LANGUAGE TUTORIAL: Do exercises.
1 Introduction to Abstract Mathematics Sets Section 2.1 Basic Notions of Sets Section 2.2 Operations with sets Section 2.3 Indexed Sets Instructor: Hayk.
Separation and Information Hiding Peter W. O’Hearn (Queen Mary, University of London) John C. Reynolds (Carnegie Mellon University) Hongseok Yang (Seoul.
2004 Hawaii Inter Conf Comp Sci1 Specifying and Proving Object- Oriented Programs Arthur C. Fleck Computer Science Department University of Iowa.
Lecture 5 1 CSP tools for verification of Sec Prot Overview of the lecture The Casper interface Refinement checking and FDR Model checking Theorem proving.
Finite State Machines (FSM) OR Finite State Automation (FSA) - are models of the behaviors of a system or a complex object, with a limited number of defined.
ece 627 intelligent web: ontology and beyond
SAFE KERNEL EXTENSIONS WITHOUT RUN-TIME CHECKING George C. Necula Peter Lee Carnegie Mellon U.
Sequence Control Syntax and Semantics Jian Xu March 3, 2004 CS706, CAS McMaster.
T. Gregory BandyInteraction Machines SeminarFebruary 21, Union College - Computer Science Graduate Program Interaction Machines Are they more.
“Towards Self Stabilizing Wait Free Shared Memory Objects” By:  Hopeman  Tsigas  Paptriantafilou Presented By: Sumit Sukhramani Kent State University.
/ PSWLAB Thread Modular Model Checking by Cormac Flanagan and Shaz Qadeer (published in Spin’03) Hong,Shin Thread Modular Model.
1 Introduction to Turing Machines
Safety Guarantee of Continuous Join Queries over Punctuated Data Streams Hua-Gang Li *, Songting Chen, Junichi Tatemura Divykant Agrawal, K. Selcuk Candan.
Secure Information Flow for Reactive Programming Paradigm Zhengqin Luo SAFA workshop 2009.
Chapter 8: Concurrency Control on Relational Databases
Denotational Semantics
Deterministic FA/ PDA Sequential Machine Theory Prof. K. J. Hintz
Modeling Arithmetic, Computation, and Languages
Graph Coverage for Specifications CS 4501 / 6501 Software Testing
Overview Part 1 – Gate Circuits and Boolean Equations
Lecture 5 Floyd-Hoare Style Verification
Partly Verifiable Signals (c.n.)
A Design Structure for Higher Order Quotients
Formal Methods in software development
Presentation transcript:

Towards a General Theory of Local Actions Hongseok Yang Seoul National University Peter O’Hearn Queen Mary, University of London

Programming Language Semantics “Semantics is a strange kind of applied mathematics; it seeks profound definitions rather than difficult theorems. The mathematical concepts which are relevant are immediately relevant. Without any long chains of reasoning, the application of such concepts directly reveals regularity in linguistic behavior, and strengthens and objectifies our intuitions of simplicity and uniformity.” John C. Reynolds (1980)

Modeling Locality Two extreme views on commands: 1. Comm = States ! p States 2. Comm = language-definable fns on States Both definitions are bad; they do not reveal any regularity of programs. In this talk, we define a semantics of Comm that models how commands use memory resources. 1. The execution of a command depends on what it accesses. 2. For each execution of a command, we can identify which locations are accessed. The goal of this talk is to experience what it is like to do a research on semantics.

Overview 1. Partial Commutative Monoid 2. Safety Monotonicity 3. Frame Property 4. Miminum Resource Property 5. Finite Resource Property 6. Conclusion

Partial Commutative Monoid (PCM) (M, *, e) is a PCM iff * is a partial binary operator on M such that 1. * is commutative: m*n = n*m; 2. * is associative: m*(n*p) = (m*n)*p; 3. e is the unit of *: m*e = e*m = m. Intuition: Each m in M denotes a resource. * combines two compatible resources. e means the empty resource. States = (Nat ! p Nat, ],{}) is a PCM.

Deterministic Action A deterministic action t on (M,*,e) is a partial function from M to M. The undefinedness of t indicates the “resource-shortage” error. t(m) is not defined iff t(m) needs an unavailable resource during the execution. (m,t) is called safe iff t(m) is defined. Examples: 1. set10at2 = m. if (2 2 dom(m)) (m[2 ! 10]) undef 2. only2 = m. if ({2}=dom(m)) m undef 3. have2or3 = m. if (2 2 dom(m) or 3 2 dom(m)) m undef 4. reset = m. l. if (l 2 dom(m)) 0 undef Nat 5. haveAllOdd = m. if (OddNum µ dom(m)) m undef

Feasibility Question Which of the following cannot be implemented? Why not? 1. set10at2 = m. if (2 2 dom(m)) (m[2 ! 10]) undef 2. only2 = m. if ({2}=dom(m)) m undef 3. check2or3 = m. if (2 2 dom(m) or 3 2 dom(m)) m undef 4. reset = m. l. if (l 2 dom(m)) 0 undef Nat 5. haveAllOdd = m. if (oddNum µ dom(m)) m undef

Safety Monotonicity Safety monotonicity: if (m,t) is safe and m#n, then (m*n,t) is also safe. Intuition: If m has already all the resources that t accesses, the so does m*n. Quiz: Which of the following violates this condition? (1) set10at2 (2) only2 (3) have2or3 (4) reset (5) haveAllOdd

Frame Property Frame property: if (m,t) is safe and m#n, then t(m)*n = t(m*n). Intuition: The behavior of t is determined by what t accesses. Quiz: Which of the following does not satisfy frame property? (1) set10at2 (2)check2or3 (3)reset (4)haveAllOdd

Minimum Resource Property Resource order: m v n iff there is some m’ such that m*m’ = n. Minimum resource property: if (m,t) is safe, then there exists m 0 such that 1. (m 0,t) is safe, and m 0 v m; and 2. if (m 1,t) is safe, and m 1 v m, then m 0 v m 1. Quiz: What does MRP mean? Quiz: Which of the following violates the minimum resource property? (1) set2at10 (2) check2or3 (3) haveAllOdd

Finite Element A resource m is finite iff for all chains {m i } i in M with resource order, if t {m i } i exists and t {m i } i w m, then there exists some m i such that m i w m. Quiz: Which elements in States are finite?

Finite Resource Property Finite resource property: if (m,t) is safe, then there exists m 0 such that 1. m 0 is finite; 2. (m 0,t) is safe; and 3. m 0 v m. Quiz: What violates the finite resource property? (1) set2at10 (2) haveAllOdd

Semantics of Comm Comm = {t:States ! p States | t satisfies safety monotonicity, frame property, minimum resource property, finite resource property } THEOREM: All the language-definable commands satisfy all four locality conditions, so that they are in Comm.

Frame Rule THEOREM: A deterministic action t satisfies the frame rule iff it satisfies the frame property and the safety monotonicity. The frame rule is not sound for reset and only2. {1  1}reset{1  0} {(1  1)*(2  1)}reset{(1  0)*(2  1)} {2  -}only2{true} {(2  -)*(3  -)}only2{true*(3  -)}

Conclusion We defined locality conditions that describe how language-definable functions use resources. This new resource-oriented view on functions is crucial to have the frame rule, and its higher- order extensions. Current research issues: 1. How to handle higher-order functions? 2. Can we explain locality conditions with existing notions in the domain theory? 3. Can we solve recursive “domain” equations that involve the “local” function space?