Consistency of a Programming Logic for a Version of PCF Using Domain Theory

Size: px
Start display at page:

Download "Consistency of a Programming Logic for a Version of PCF Using Domain Theory"

Transcription

1 Consistency of a Programming Logic for a Version of PCF Using Domain Theory Andrés Sicard-Ramírez EAFIT University Logic and Computation Seminar EAFIT University 5 April, 3 May 2013

2 A Core Functional Programming Language Plotkin s PCF language

3 PCF Features (Plotkin 1977) Typed λ-calculus Basic data types: Natural numbers and Booleans

4 A Programming Logic Logical Theory of Constructions (LTC) (Bove, Dybjer and Sicard-Ramírez 2009) 1 LTC = type-free version of PCF (terms, conversion and discrimination rules) + first-order logic + inductive predicates (not considered in this talk) 1 A Bove, P Dybjer and A Sicard-Ramírez (2009) Embedding a Logical Theory of Constructions in Agda In: Proceedings of the 3rd workshop on Programming languages meets program verification (PLPV 09), pp 59 66

5 LTC-Terms Terms t = x t t λxt fix xt true false if 0 succ pred iszero variable application λ-abstraction fixed-point operator Boolean constants natural number constants Convention Ṭhe binary application function symbol is left-associative

6 LTC-Formulae Formulae A = A A A A A A xa xa t = t P(t,, t) truth, falsehood binary logical connectives quantifiers equality predicate Abbreviations A = A, t t = (t = t )

7 Conversion and Discrimination Rules of LTC Conversion rules t t if true t t = t, t t if false t t = t, pred 0 = 0, t pred (succ t) = t, iszero 0 = true, t iszero (succ t) = false, t t (λxt) t = t[x = t ], t fix xt = t[x = fix xt], where t[x = t ] is the capture-free substitution of x for t in t Discrimination rules true false, t 0 succ t

8 LTC Consistency How we know that LTC is a consistent theory? 2 C C Chang and H J Keisler (1992) Model Theory 3rd Vol 73 Studies in Logic and the Foundations of Mathematics 3rd impression North-Holland

9 LTC Consistency How we know that LTC is a consistent theory? Standard answer: To build a model for LTC (Chang and Keisler 1992, theorem 1321) 2 2 C C Chang and H J Keisler (1992) Model Theory 3rd Vol 73 Studies in Logic and the Foundations of Mathematics 3rd impression North-Holland

10 LTC Consistency How we know that LTC is a consistent theory? Standard answer: To build a model for LTC (Chang and Keisler 1992, theorem 1321) 2 domain model for LTC 2 C C Chang and H J Keisler (1992) Model Theory 3rd Vol 73 Studies in Logic and the Foundations of Mathematics 3rd impression North-Holland

11 Introduction to Domain Theory Motivation: Does λ-calculus have models? Historically my first model for the λ-calculus was discovered in 1969 and details were provided in Scott (1972) 1 (written in 1971) (Scott 1980, p 226) 2 1 D Scott (1972) Continuous lattices In: Lecture Notes in Mathematics 274, pp D Scott (1980) Lambda Calculus: Some Models, Some Philosophy In: The Kleene Symposium Ed by J Barwise, H J Keisler and K Kunen Vol 101 Studies in Logic and the Foundations of Mathematics North-Holland Publishing Company, pp

12 Introduction to Domain Theory Non-standard definitions pre-domain, domain, complete partial order (cpo), ω-cpo, bottomless ω-cpo, Scott s domain, Convention ḍomain ω-complete partial order

13 Introduction to Domain Theory Some bibliographic references G Winskel (1994) The Formal Semantics of Programming Languages An Introduction 2nd printing The MIT Press

14 Introduction to Domain Theory Some bibliographic references G Winskel (1994) The Formal Semantics of Programming Languages An Introduction 2nd printing The MIT Press J C Mitchell (1996) Foundations for Programming Languages The MIT Press

15 Introduction to Domain Theory Some bibliographic references G Winskel (1994) The Formal Semantics of Programming Languages An Introduction 2nd printing The MIT Press J C Mitchell (1996) Foundations for Programming Languages The MIT Press T Streicher (2006) Domain-Theoretic Foundations of Functional Programming World Scientific Publishing Co Pte Ltd

16 Introduction to Domain Theory Some bibliographic references G Winskel (1994) The Formal Semantics of Programming Languages An Introduction 2nd printing The MIT Press J C Mitchell (1996) Foundations for Programming Languages The MIT Press T Streicher (2006) Domain-Theoretic Foundations of Functional Programming World Scientific Publishing Co Pte Ltd G Plotkin (1992) Post-graduate Lecture Notes in Advance Domain Theory (incorporating the Pisa Notes ) Electronic edition prepared by Yugo Kashiwagi and Hidetaka Kondoh

17 Partially Ordered Sets Definition (Partially ordered set) A partially ordered set (poset) (D, ) is a set D on which the binary relation satisfies the following properties: x x x x y z x y y z x z x y x y y x x = y (reflexive) (transitive) (antisymmetry)

18 Partially Ordered Sets Definition (Partially ordered set) A partially ordered set (poset) (D, ) is a set D on which the binary relation satisfies the following properties: x x x x y z x y y z x z x y x y y x x = y (reflexive) (transitive) (antisymmetry) Examples (Z, ) is a poset Let a, b Z with a 0 The divisibility relation is defined by a b = c (ac = b) Then (Z +, ) is a poset (P(A), ) is a poset

19 Partially Ordered Sets Example Hasse diagram for the poset ({1, 2, 3, 4, 6, 8, 12}, )

20 Partially Ordered Sets Example Hasse diagram for the poset ({a, b, c}, ) {a, b, c} {a, c} {a, b} {b, c} {a} {c} {b}

21 Monotone Functions Definition (Monotone function) Let (D, ) and (D, ) be two posets A function f D D is monotone if x y x y f(x) f(y)

22 Notable Elements Definition (Upper bound) Let (D, ) be a poset and let A D Let u D be an element such that a u for all elements a A, then u is an upper bound of A Examples A = {a, b, c} Upper bounds: {e, f, j, h} A = {j, h} No upper bounds A = {a, c, d, f} Upper bounds: {f, h, j} g d b h a j f e c

23 Notable Elements Definition (Supremum or least upper bound) An element x is the supremum or the least upper bound of the subset A, denoted by A, if x is an upper bound that is less than every other upper bound of A Example A = {b, d, g} Upper bounds: {g, h} A = g g d b h a j f e c

24 ω-complete Partial Orders Definition (ω-chain) Let D = (D, ) be a poset A ω-chain of D is an increasing chain d d d, where d D

25 ω-complete Partial Orders Definition (ω-complete partial order) Let D = (D, ) be a poset The poset D is a ω-complete partial order (ω-cpo) if (Plotkin 1992) 3 1 There is a least element D, that is, x x The element is called bottom 2 For every ω-chain d d d, the least upper bound d D exists 3 G Plotkin (1992) Post-graduate Lecture Notes in Advance Domain Theory (incorporating the Pisa Notes ) Electronic edition prepared by Yugo Kashiwagi and Hidetaka Kondoh

26 ω-complete Partial Orders Definition (Lifted set) Let A be a set The symbol A denotes the ω-cpo whose elements A { } are ordered by x y, if and only if, x = or x = y (Mitchell 1996) 4 The ω-cpo A is called A lifted 4 J C Mitchell (1996) Foundations for Programming Languages The MIT Press

27 ω-complete Partial Orders Definition (Lifted set) Let A be a set The symbol A denotes the ω-cpo whose elements A { } are ordered by x y, if and only if, x = or x = y (Mitchell 1996) 4 The ω-cpo A is called A lifted Examples The lifted unit type and the lifted Booleans B () false true data () = () data Bool = True False 4 J C Mitchell (1996) Foundations for Programming Languages The MIT Press

28 ω-complete Partial Orders Example The lifted natural numbers N n

29 ω-complete Partial Orders Example The ω-cpo LN of lazy natural numbers arises from a non-strict successor function, that is, S( ) (Escardó 1993) n 2 S(S( )) 1 S( ) data Nat = Z S Nat 0 5 M H Escardó (1993) On lazy natural numbers with applications to computability theory and functional programming In: SIGACT News 24 (1), pp 61 67

30 ω-complete Partial Orders Definition (Continuous function) Let (D, ) and (D, ) be two ω-cpos A function f D D is continuous if (Plotkin 1992) 6 1 The function is monotone 2 The function preserves the least upper bounds of the ω-chains, that is, f(d ) = f( d ), for all ω-chains d d d 6 G Plotkin (1992) Post-graduate Lecture Notes in Advance Domain Theory (incorporating the Pisa Notes ) Electronic edition prepared by Yugo Kashiwagi and Hidetaka Kondoh

31 ω-complete Partial Orders Definition (Function space of continuous functions) Let (D, ) and (D, ) be two ω-cpos The function space of continuous functions is the set (Winskel 1994) 7 [D D ] = {f D D f is continous } 7 G Winskel (1994) The Formal Semantics of Programming Languages An Introduction 2nd printing The MIT Press

32 ω-complete Partial Orders Definition (Function space of continuous functions) Let (D, ) and (D, ) be two ω-cpos The function space of continuous functions is the set (Winskel 1994) 7 [D D ] = {f D D f is continous } Theorem The function space [D D ] is an ω-cpo [D D ] can be partially ordered point-wise by f g d D f(d) g(d) The bottom element is λx 7 G Winskel (1994) The Formal Semantics of Programming Languages An Introduction 2nd printing The MIT Press

33 ω-complete Partial Orders Definition Let f D D be a function, then f (d) = d, f + (d) = f(f (d)) Theorem (The Fixed-Point Theorem) Let (D, ) be an ω-cpo Given f [D D], then Fix(f) = f ( ), is the least fixed-point of f (Winskel 1994) 8, that is, d f(d) d Fix(f) d, f(fix(f)) = Fix(f) 8 G Winskel (1994) The Formal Semantics of Programming Languages An Introduction 2nd printing The MIT Press

34 ω-complete Partial Orders Definition (Coalesced sum) Let D = (D, ),, D = (D, ) be ω-cpos The coalesced sum, that is, disjoint union with bottom elements identified D D is the ω-cpo (Plotkin 1992) 9 with the order {(i, d) d D d } x y x = or i n d, d D d d x = (i, d) y = (i, d ) 9 G Plotkin (1992) Post-graduate Lecture Notes in Advance Domain Theory (incorporating the Pisa Notes ) Electronic edition prepared by Yugo Kashiwagi and Hidetaka Kondoh

35 ω-complete Partial Orders Associated with the coalesced sum are the injection functions in D D D if d =, in (d) = (i, d) otherwise

36 Domain Model for LTC Terms: The term language of LTC From domain theory it is known that a domain model for Terms, where self-application is allowed and where the terms will have values in the Booleans or the lazy natural numbers is a solution to the recursive domain equation (Plotkin 1992) 10 D B LN (D D) 10 G Plotkin (1992) Post-graduate Lecture Notes in Advance Domain Theory (incorporating the Pisa Notes ) Electronic edition prepared by Yugo Kashiwagi and Hidetaka Kondoh

37 Domain Model for LTC Notation Let D be a domain and let ρ be a valuation on D (a function from the set of variables to D) ρ(x d): the valuation which maps x to d and otherwise acts like ρ λxe: λ-abstraction on D

38 Domain Model for LTC Convention D: A solution to the recursive domain equation for LTC From terms to functions and viceverse The domain D comes equipped with the continuous functions (Barendregt 2004) 11 F D [D D], G [D D] D 11 H Barendregt (2004) The Lambda Calculus Its Syntax and Semantics 2nd Vol 103 Studies in Logic and the Foundations of Mathematics 6th impression Elsevier

39 Domain Model for LTC Interpretation function Terms D: (Based on Pitts (1994) 12 ) x = ρ(x), λxt = G(λd t ( ) ), t t = f( t ) if t = G(f), otherwise, fix xt = Fix(λd t ( ) ), true = true, false = false, if = G(if), 0 = 0, succ = G(succ), pred = G(pred), iszero = G(iszero), where 12 A M Pitts (1994) Computational Adequacy via Mixed Inductive Definitions In: Mathematical Foundations of Programming Semantics Ed by S Brookes, M Main, A Melton, M Mislove and D Schmidt Vol 802 LNCS Springer, pp 72 82

40 Domain Model for LTC we omit the use of the injection functions in, and the continuous functions if, succ, pred and iszero from D to D are defined by λxyx if(d) = λxyy if d = true, if d = false, otherwise, n + 1 succ(d) = n + 1 if d = n LN, if d = n LN, otherwise,

41 Domain Model for LTC 0 if d = 0, pred(d) = d if d = succ(d ), otherwise, true if d = 0, iszero(d) = false if d = succ(d ), otherwise

42 Domain Model for LTC If the LTC equality is interpreted as the equality in D, it is possible verify that the conversion and discrimination rules of LTC are satisfied in D

43 Bonus Slides

44 Monotone Functions Example (Counter-example of monotone function) halt N B true if n, halt(n) = false if n = Let n N Since n, and not necessarily halt( ) halt(n), that is, false true, the halt function is non-monotone (Schmidt 1986) D A Schmidt (1986) Denotational Semantics A Methodology for Language Development Allyn and Bacon, Inc

45 Continuous Functions Example (Monotone but non-continuous function 14 ) f [Bool] Bool f(xs) = False True if xs is finite, that is, the function f is non-continuous if xs = [False, False, ], otherwise Given d = [], d = [False], d = [False, False], we have f(d ) = False = f([false, False, ]) = f( d ), 14 behind_continuity_in_winskels/

46 Complete Partial Orders Definition (Directed set) Let D = (D, ) be a poset A subset X D is directed if X and x y X z X x z y z Definition (Complete partial order) Let D = (D, ) be a poset The poset D is a complete partial order (cpo) if (Barendregt 2004) 15 1 There is a least element D, that is, x x The element is called bottom 2 For every directed X D, the least upper bound X D exists 15 H Barendregt (2004) The Lambda Calculus Its Syntax and Semantics 2nd Vol 103 Studies in Logic and the Foundations of Mathematics 6th impression Elsevier

47 Complete Partial Orders Note The Scott domains are built from complete partial orders See, for example, Gunter and Scott (1990) C A Gunter and D S Scott (1990) Semantics Domains In: Handbook of Theoretical Computer Science Ed by J van Leeuwen Vol B Formal Models and Semantics The MIT Press Chap 12

What does the partial order "mean"?

What does the partial order mean? What does the partial order "mean"? Domain theory developed by Dana Scott and Gordon Plotkin in the late '60s use partial order to represent (informally): approximates carries more information than better

More information

Denotational Semantics

Denotational Semantics Q Lecture Notes on Denotational Semantics Part II of the Computer Science Tripos 2010/11 Dr Marcelo Fiore Cambridge University Computer Laboratory c A. M. Pitts, G. Winskel, M. Fiore Contents Notes ii

More information

Denotational Semantics

Denotational Semantics Q Lecture Notes on Denotational Semantics for Part II of the Computer Science Tripos Andrew M. Pitts Cambridge University Computer Laboratory c A. M. Pitts, 1997-9 First edition 1997. Revised 1998, 1999.

More information

Domain theory and denotational semantics of functional programming

Domain theory and denotational semantics of functional programming Domain theory and denotational semantics of functional programming Martín Escardó School of Computer Science, Birmingham University MGS 2007, Nottingham, version of April 20, 2007 17:26 What is denotational

More information

COSE312: Compilers. Lecture 14 Semantic Analysis (4)

COSE312: Compilers. Lecture 14 Semantic Analysis (4) COSE312: Compilers Lecture 14 Semantic Analysis (4) Hakjoo Oh 2017 Spring Hakjoo Oh COSE312 2017 Spring, Lecture 14 May 8, 2017 1 / 30 Denotational Semantics In denotational semantics, we are interested

More information

The non-logical symbols determine a specific F OL language and consists of the following sets. Σ = {Σ n } n<ω

The non-logical symbols determine a specific F OL language and consists of the following sets. Σ = {Σ n } n<ω 1 Preliminaries In this chapter we first give a summary of the basic notations, terminology and results which will be used in this thesis. The treatment here is reduced to a list of definitions. For the

More information

Denotational Semantics

Denotational Semantics Q Lecture Notes on Denotational Semantics for Part II of the Computer Science Tripos Dr Andrew M. Pitts Cambridge University Computer Laboratory c A. M. Pitts, 1997-9 First edition 1997. Revised 1998,

More information

Semantics of Higher-Order Functional Programming

Semantics of Higher-Order Functional Programming Semantics of Higher-Order Functional Programming Petros Barbagiannis µ λ July 14, 2014 Petros Barbagiannis Semantics of Higher-Order Functional Programming July 14, 2014 1 / 18 Introduction Higher-order

More information

Typed Arithmetic Expressions

Typed Arithmetic Expressions Typed Arithmetic Expressions CS 550 Programming Languages Jeremy Johnson TAPL Chapters 3 and 5 1 Types and Safety Evaluation rules provide operational semantics for programming languages. The rules provide

More information

AAA616: Program Analysis. Lecture 3 Denotational Semantics

AAA616: Program Analysis. Lecture 3 Denotational Semantics AAA616: Program Analysis Lecture 3 Denotational Semantics Hakjoo Oh 2018 Spring Hakjoo Oh AAA616 2018 Spring, Lecture 3 March 28, 2018 1 / 33 Denotational Semantics In denotational semantics, we are interested

More information

Lambda Calculus. Andrés Sicard-Ramírez. Semester Universidad EAFIT

Lambda Calculus. Andrés Sicard-Ramírez. Semester Universidad EAFIT Lambda Calculus Andrés Sicard-Ramírez Universidad EAFIT Semester 2010-2 Bibliography Textbook: Hindley, J. R. and Seldin, J. (2008). Lambda-Calculus and Combinators. An Introduction. Cambridge University

More information

CS 6110 Lecture 35 Solving Domain Equations 19 April 2013 Lecturer: Andrew Myers

CS 6110 Lecture 35 Solving Domain Equations 19 April 2013 Lecturer: Andrew Myers CS 6110 Lecture 35 Solving Domain Equations 19 April 2013 Lecturer: Andrew Myers To develop a denotational semantics for a language with recursive types, or to give a denotational semantics for the untyped

More information

Lecture Notes on Data Abstraction

Lecture Notes on Data Abstraction Lecture Notes on Data Abstraction 15-814: Types and Programming Languages Frank Pfenning Lecture 14 October 23, 2018 1 Introduction Since we have moved from the pure λ-calculus to functional programming

More information

Mathematical Foundations of Logic and Functional Programming

Mathematical Foundations of Logic and Functional Programming Mathematical Foundations of Logic and Functional Programming lecture notes The aim of the course is to grasp the mathematical definition of the meaning (or, as we say, the semantics) of programs in two

More information

Minimal logic for computable functionals

Minimal logic for computable functionals Minimal logic for computable functionals Helmut Schwichtenberg Mathematisches Institut der Universität München Contents 1. Partial continuous functionals 2. Total and structure-total functionals 3. Terms;

More information

CS 6110 Lecture 21 The Fixed-Point Theorem 8 March 2013 Lecturer: Andrew Myers. 1 Complete partial orders (CPOs) 2 Least fixed points of functions

CS 6110 Lecture 21 The Fixed-Point Theorem 8 March 2013 Lecturer: Andrew Myers. 1 Complete partial orders (CPOs) 2 Least fixed points of functions CS 6110 Lecture 21 The Fixed-Point Theorem 8 March 2013 Lecturer: Andrew Myers We saw that the semantics of the while command are a fixed point. We also saw that intuitively, the semantics are the limit

More information

Denotational semantics

Denotational semantics Denotational semantics Semantics and Application to Program Verification Antoine Miné École normale supérieure, Paris year 2015 2016 Course 4 4 March 2016 Course 4 Denotational semantics Antoine Miné p.

More information

CS 4110 Programming Languages & Logics. Lecture 16 Programming in the λ-calculus

CS 4110 Programming Languages & Logics. Lecture 16 Programming in the λ-calculus CS 4110 Programming Languages & Logics Lecture 16 Programming in the λ-calculus 30 September 2016 Review: Church Booleans 2 We can encode TRUE, FALSE, and IF, as: TRUE λx. λy. x FALSE λx. λy. y IF λb.

More information

1 Introduction. 2 Recap The Typed λ-calculus λ. 3 Simple Data Structures

1 Introduction. 2 Recap The Typed λ-calculus λ. 3 Simple Data Structures CS 6110 S18 Lecture 21 Products, Sums, and Other Datatypes 1 Introduction In this lecture, we add constructs to the typed λ-calculus that allow working with more complicated data structures, such as pairs,

More information

Lecture 2. Least Fixed Points

Lecture 2. Least Fixed Points Lecture 2 Least Fixed Points 20 Thesis All domains of computation are partial orders with a least element. All computable functions are mononotic. 21 Partially ordered sets A binary relation on a set D

More information

Synthetic Computability

Synthetic Computability Synthetic Computability Andrej Bauer Department of Mathematics and Physics University of Ljubljana Slovenia MFPS XXIII, New Orleans, April 2007 What is synthetic mathematics? Suppose we want to study mathematical

More information

Part II Logic and Set Theory

Part II Logic and Set Theory Part II Logic and Set Theory Theorems Based on lectures by I. B. Leader Notes taken by Dexter Chua Lent 2015 These notes are not endorsed by the lecturers, and I have modified them (often significantly)

More information

CS422 - Programming Language Design

CS422 - Programming Language Design 1 CS422 - Programming Language Design Denotational Semantics Grigore Roşu Department of Computer Science University of Illinois at Urbana-Champaign 2 Denotational semantics, also known as fix-point semantics,

More information

Dana S. Scott. University Professor, Emeritus Carnegie Mellon University. Visiting Scholar in Mathematics University of California, Berkeley

Dana S. Scott. University Professor, Emeritus Carnegie Mellon University. Visiting Scholar in Mathematics University of California, Berkeley Stochastic λ-calculi Dana S. Scott University Professor, Emeritus Carnegie Mellon University Visiting Scholar in Mathematics University of California, Berkeley September 2013 (A report on work in progress.)

More information

CS611 Lecture 25 Solving Domain Equations 22 October 2007 Lecturer: Andrew Myers

CS611 Lecture 25 Solving Domain Equations 22 October 2007 Lecturer: Andrew Myers CS611 Lecture 25 Solving Domain Equations 22 October 2007 Lecturer: Andrew Myers To develop a denotational semantics for a language with recursive types, or to give a denotational semantics for the untyped

More information

Models of computation

Models of computation Lambda-Calculus (I) jean-jacques.levy@inria.fr 2nd Asian-Pacific Summer School on Formal ethods Tsinghua University, August 23, 2010 Plan computation models lambda-notation bound variables odels of computation

More information

Partial model checking via abstract interpretation

Partial model checking via abstract interpretation Partial model checking via abstract interpretation N. De Francesco, G. Lettieri, L. Martini, G. Vaglini Università di Pisa, Dipartimento di Ingegneria dell Informazione, sez. Informatica, Via Diotisalvi

More information

Finite Automata Theory and Formal Languages TMV027/DIT321 LP Recap: Logic, Sets, Relations, Functions

Finite Automata Theory and Formal Languages TMV027/DIT321 LP Recap: Logic, Sets, Relations, Functions Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2017 Formal proofs; Simple/strong induction; Mutual induction; Inductively defined sets; Recursively defined functions. Lecture 3 Ana Bove

More information

Part II. Logic and Set Theory. Year

Part II. Logic and Set Theory. Year Part II Year 2018 2017 2016 2015 2014 2013 2012 2011 2010 2009 2008 2007 2006 2005 2018 60 Paper 4, Section II 16G State and prove the ǫ-recursion Theorem. [You may assume the Principle of ǫ- Induction.]

More information

Complete Partial Orders, PCF, and Control

Complete Partial Orders, PCF, and Control Complete Partial Orders, PCF, and Control Andrew R. Plummer TIE Report Draft January 2010 Abstract We develop the theory of directed complete partial orders and complete partial orders. We review the syntax

More information

Typing λ-terms. Types. Typed λ-terms. Base Types. The Typing Relation. Advanced Formal Methods. Lecture 3: Simply Typed Lambda calculus

Typing λ-terms. Types. Typed λ-terms. Base Types. The Typing Relation. Advanced Formal Methods. Lecture 3: Simply Typed Lambda calculus Course 2D1453, 200607 Advanced Formal Methods Lecture 3: Simply Typed Lambda calculus Mads Dam KTH/CSC Some material from B. Pierce: TAPL + some from G. Klein, NICTA Typing λterms The uptyped λcalculus

More information

MFPS LICS Special Session Honouring Dana Scott. Symmetric Scott. Andrew Pitts. Computer Laboratory MFPS/LICS /14

MFPS LICS Special Session Honouring Dana Scott. Symmetric Scott. Andrew Pitts. Computer Laboratory MFPS/LICS /14 MFPS/LICS 2013 1/14 MFPS LICS Special Session Honouring Dana Scott Symmetric Scott Andrew Pitts Computer Laboratory 80 years of Dana Scott MFPS/LICS 2013 2/14 automata theory set theory sheaves & logic

More information

Simply Typed Lambda-Calculi (II)

Simply Typed Lambda-Calculi (II) THEORY AND PRACTICE OF FUNCTIONAL PROGRAMMING Simply Typed Lambda-Calculi (II) Dr. ZHANG Yu Institute of Software, Chinese Academy of Sciences Fall term, 2011 GUCAS, Beijing Introduction PCF Programming

More information

Stipulations, multivalued logic, and De Morgan algebras

Stipulations, multivalued logic, and De Morgan algebras Stipulations, multivalued logic, and De Morgan algebras J. Berman and W. J. Blok Department of Mathematics, Statistics, and Computer Science University of Illinois at Chicago Chicago, IL 60607 U.S.A. Dedicated

More information

2 C. A. Gunter ackground asic Domain Theory. A poset is a set D together with a binary relation v which is reexive, transitive and anti-symmetric. A s

2 C. A. Gunter ackground asic Domain Theory. A poset is a set D together with a binary relation v which is reexive, transitive and anti-symmetric. A s 1 THE LARGEST FIRST-ORDER-AXIOMATIZALE CARTESIAN CLOSED CATEGORY OF DOMAINS 1 June 1986 Carl A. Gunter Cambridge University Computer Laboratory, Cambridge C2 3QG, England Introduction The inspiration for

More information

Operational domain theory and topology of sequential programming languages

Operational domain theory and topology of sequential programming languages Operational domain theory and topology of sequential programming languages Martín Escardó Weng Kin Ho School of Computer Science, University of Birmingham, UK November 2006, revised May 2008 Abstract A

More information

Formal Techniques for Software Engineering: Denotational Semantics

Formal Techniques for Software Engineering: Denotational Semantics Formal Techniques for Software Engineering: Denotational Semantics Rocco De Nicola IMT Institute for Advanced Studies, Lucca rocco.denicola@imtlucca.it May 2013 Lesson 4 R. De Nicola (IMT-Lucca) FoTSE@LMU

More information

Abstract Interpretation from a Topological Perspective

Abstract Interpretation from a Topological Perspective (-: / 1 Abstract Interpretation from a Topological Perspective David Schmidt Kansas State University www.cis.ksu.edu/ schmidt Motivation and overview of results (-: / 2 (-: / 3 Topology studies convergent

More information

Intersection Types and Lambda Theories

Intersection Types and Lambda Theories Intersection Types and Lambda Theories M.Dezani-Ciancaglini S.Lusin Abstract We illustrate the use of intersection types as a semantic tool for showing properties of the lattice of λ-theories. Relying

More information

Appendix A. Definitions for Ordered Sets. The appendices contain all the formal definitions, propositions and proofs for

Appendix A. Definitions for Ordered Sets. The appendices contain all the formal definitions, propositions and proofs for 161 Appendix A Definitions for Ordered Sets The appendices contain all the formal definitions, propositions and proofs for developing a model of the display process based on lattices. Here we list some

More information

Automata and Formal Languages - CM0081 Non-Deterministic Finite Automata

Automata and Formal Languages - CM0081 Non-Deterministic Finite Automata Automata and Formal Languages - CM81 Non-Deterministic Finite Automata Andrés Sicard-Ramírez Universidad EAFIT Semester 217-2 Non-Deterministic Finite Automata (NFA) Introduction q i a a q j a q k The

More information

CS256/Spring 2008 Lecture #11 Zohar Manna. Beyond Temporal Logics

CS256/Spring 2008 Lecture #11 Zohar Manna. Beyond Temporal Logics CS256/Spring 2008 Lecture #11 Zohar Manna Beyond Temporal Logics Temporal logic expresses properties of infinite sequences of states, but there are interesting properties that cannot be expressed, e.g.,

More information

Learning Goals of CS245 Logic and Computation

Learning Goals of CS245 Logic and Computation Learning Goals of CS245 Logic and Computation Alice Gao April 27, 2018 Contents 1 Propositional Logic 2 2 Predicate Logic 4 3 Program Verification 6 4 Undecidability 7 1 1 Propositional Logic Introduction

More information

Formal Methods Lecture 8. (B. Pierce's slides for the book Types and Programming Languages )

Formal Methods Lecture 8. (B. Pierce's slides for the book Types and Programming Languages ) Formal Methods Lecture 8 (B. Pierce's slides for the book Types and Programming Languages ) Erasure and Typability Erasure We can transform terms in λ to terms of the untyped lambda-calculus simply by

More information

Topology in Denotational Semantics

Topology in Denotational Semantics Journées Topologie et Informatique Thomas Ehrhard Preuves, Programmes et Systèmes (PPS) Université Paris Diderot - Paris 7 and CNRS March 21, 2013 What is denotational semantics? The usual stateful approach

More information

Lambda-Calculus (I) 2nd Asian-Pacific Summer School on Formal Methods Tsinghua University, August 23, 2010

Lambda-Calculus (I) 2nd Asian-Pacific Summer School on Formal Methods Tsinghua University, August 23, 2010 Lambda-Calculus (I) jean-jacques.levy@inria.fr 2nd Asian-Pacific Summer School on Formal Methods Tsinghua University, August 23, 2010 Plan computation models lambda-notation bound variables conversion

More information

Kleene realizability and negative translations

Kleene realizability and negative translations Q E I U G I C Kleene realizability and negative translations Alexandre Miquel O P. D E. L Ō A U D E L A R April 21th, IMERL Plan 1 Kleene realizability 2 Gödel-Gentzen negative translation 3 Lafont-Reus-Streicher

More information

CIS 500 Software Foundations Midterm II Answer key November 17, 2004

CIS 500 Software Foundations Midterm II Answer key November 17, 2004 CIS 500 Software Foundations Midterm II Answer key November 17, 2004 Simply typed lambda-calculus The following questions refer to the simply typed lambda-calculus with booleans and error. The syntax,

More information

Concrete Domains. Gilles Kahn INRIA Sophia Antipolis Gordon D. Plotkin University of Edinburgh

Concrete Domains. Gilles Kahn INRIA Sophia Antipolis Gordon D. Plotkin University of Edinburgh Concrete Domains Gilles Kahn INRIA Sophia Antipolis Gordon D. Plotkin University of Edinburgh May 21, 1993 Abstract This paper introduces the theory of a particular kind of computation domains called concrete

More information

The Minimal Graph Model of Lambda Calculus

The Minimal Graph Model of Lambda Calculus The Minimal Graph Model of Lambda Calculus Antonio Bucciarelli 1 and Antonino Salibra 2 1 Université Paris 7, Equipe PPS, 2 place Jussieu, 72251 Paris Cedex 05, France buccia@pps.jussieu.fr, 2 Università

More information

Origin in Mathematical Logic

Origin in Mathematical Logic Lambda Calculus Origin in Mathematical Logic Foundation of mathematics was very much an issue in the early decades of 20th century. Cantor, Frege, Russel s Paradox, Principia Mathematica, NBG/ZF Origin

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

Model checking (III)

Model checking (III) Theory and Algorithms Model checking (III) Alternatives andextensions Rafael Ramirez rafael@iua.upf.es Trimester1, Oct2003 Slide 9.1 Logics for reactive systems The are many specification languages for

More information

Abstracting real-valued parameters in parameterised boolean equation systems

Abstracting real-valued parameters in parameterised boolean equation systems Department of Mathematics and Computer Science Formal System Analysis Research Group Abstracting real-valued parameters in parameterised boolean equation systems Master Thesis M. Laveaux Supervisor: dr.

More information

On Modal Logics of Partial Recursive Functions

On Modal Logics of Partial Recursive Functions arxiv:cs/0407031v1 [cs.lo] 12 Jul 2004 On Modal Logics of Partial Recursive Functions Pavel Naumov Computer Science Pennsylvania State University Middletown, PA 17057 naumov@psu.edu June 14, 2018 Abstract

More information

Logic for Computational Effects: work in progress

Logic for Computational Effects: work in progress 1 Logic for Computational Effects: work in progress Gordon Plotkin and John Power School of Informatics University of Edinburgh King s Buildings Mayfield Road Edinburgh EH9 3JZ Scotland gdp@inf.ed.ac.uk,

More information

Introduction to Kleene Algebras

Introduction to Kleene Algebras Introduction to Kleene Algebras Riccardo Pucella Basic Notions Seminar December 1, 2005 Introduction to Kleene Algebras p.1 Idempotent Semirings An idempotent semiring is a structure S = (S, +,, 1, 0)

More information

Lecture Notes: Selected Topics in Discrete Structures. Ulf Nilsson

Lecture Notes: Selected Topics in Discrete Structures. Ulf Nilsson Lecture Notes: Selected Topics in Discrete Structures Ulf Nilsson Dept of Computer and Information Science Linköping University 581 83 Linköping, Sweden ulfni@ida.liu.se 2004-03-09 Contents Chapter 1.

More information

Operational Semantics

Operational Semantics Operational Semantics Semantics and applications to verification Xavier Rival École Normale Supérieure Xavier Rival Operational Semantics 1 / 50 Program of this first lecture Operational semantics Mathematical

More information

Denoting computation

Denoting computation A jog from Scott Domains to Hypercoherence Spaces 13/12/2006 Outline Motivation 1 Motivation 2 What Does Denotational Semantic Mean? Trivial examples Basic things to know 3 Scott domains di-domains 4 Event

More information

(2) (15pts) Using Prolog, implement a type-checker for the following small subset of System F:

(2) (15pts) Using Prolog, implement a type-checker for the following small subset of System F: CS 6371 Advanced Programming Languages Sample Spring 2018 Final Exam This sample final exam is LONGER than a real final exam (to give you more practice problems) and has a medium difficulty level. You

More information

Propositional logic (revision) & semantic entailment. p. 1/34

Propositional logic (revision) & semantic entailment. p. 1/34 Propositional logic (revision) & semantic entailment p. 1/34 Reading The background reading for propositional logic is Chapter 1 of Huth/Ryan. (This will cover approximately the first three lectures.)

More information

The Knaster-Tarski Fixed Point Theorem for Complete Partial Orders

The Knaster-Tarski Fixed Point Theorem for Complete Partial Orders The Knaster-Tarski Fixed Point Theorem for Complete Partial Orders Stephen Forrest October 31, 2005 Complete Lattices Let (X, ) be a be partially ordered set, and let S X. Then S ( the meet of S ) denotes

More information

A Fixed Point Representation of References

A Fixed Point Representation of References A Fixed Point Representation of References Susumu Yamasaki Department of Computer Science, Okayama University, Okayama, Japan yamasaki@momo.cs.okayama-u.ac.jp Abstract. This position paper is concerned

More information

Tutorial on Semantics Part I

Tutorial on Semantics Part I Tutorial on Semantics Part I Basic Concepts Prakash Panangaden 1 1 School of Computer Science McGill University on sabbatical leave at Department of Computer Science Oxford University Fields Institute,

More information

Chapter 1 A computational interpretation of forcing in Type Theory

Chapter 1 A computational interpretation of forcing in Type Theory Chapter 1 A computational interpretation of forcing in Type Theory Thierry Coquand and Guilhem Jaber Abstract In a previous work, we showed the uniform continuity of definable functionals in intuitionistic

More information

Lecture 4. Algebra, continued Section 2: Lattices and Boolean algebras

Lecture 4. Algebra, continued Section 2: Lattices and Boolean algebras V. Borschev and B. Partee, September 21-26, 2006 p. 1 Lecture 4. Algebra, continued Section 2: Lattices and Boolean algebras CONTENTS 1. Lattices.... 1 1.0. Why lattices?... 1 1.1. Posets... 1 1.1.1. Upper

More information

λ-calculus: Enumeration Operators and Types

λ-calculus: Enumeration Operators and Types λ-calculus: Enumeration Operators and Types Dana S. Scott University Professor, Emeritus Carnegie Mellon University Visiting Scholar in Mathematics University of California, Berkeley December, 2014 (A

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

λ Slide 1 Content Exercises from last time λ-calculus COMP 4161 NICTA Advanced Course Advanced Topics in Software Verification

λ Slide 1 Content Exercises from last time λ-calculus COMP 4161 NICTA Advanced Course Advanced Topics in Software Verification Content COMP 4161 NICTA Advanced Course Advanced Topics in Software Verification Toby Murray, June Andronick, Gerwin Klein λ Slide 1 Intro & motivation, getting started [1] Foundations & Principles Lambda

More information

The Lambda Calculus. Stephen A. Edwards. Fall Columbia University

The Lambda Calculus. Stephen A. Edwards. Fall Columbia University The Lambda Calculus Stephen A. Edwards Columbia University Fall 2014 Lambda Expressions Function application written in prefix form. Add four and five is (+ 4 5) Evaluation: select a redex and evaluate

More information

September 14. Fall Software Foundations CIS 500

September 14. Fall Software Foundations CIS 500 CIS 500 Software Foundations Fall 2005 September 14 CIS 500, September 14 1 Announcements I will be away September 19-October 5. I will be reachable by email. Fastest response cis500@cis.upenn.edu No office

More information

Normalization by Evaluation

Normalization by Evaluation Normalization by Evaluation Andreas Abel Department of Computer Science and Engineering Chalmers and Gothenburg University PhD Seminar in Mathematical Engineering EAFIT University, Medellin, Colombia 9

More information

3. Only sequences that were formed by using finitely many applications of rules 1 and 2, are propositional formulas.

3. Only sequences that were formed by using finitely many applications of rules 1 and 2, are propositional formulas. 1 Chapter 1 Propositional Logic Mathematical logic studies correct thinking, correct deductions of statements from other statements. Let us make it more precise. A fundamental property of a statement is

More information

An Abstract Interpretation Framework for Semantics and Diagnosis of Lazy Functional-Logic Languages

An Abstract Interpretation Framework for Semantics and Diagnosis of Lazy Functional-Logic Languages Università degli Studi di Udine Dipartimento di Matematica e Informatica Dottorato di Ricerca in Informatica Ph.D. Thesis An Abstract Interpretation Framework for Semantics and Diagnosis of Lazy Functional-Logic

More information

Applications of Regular Algebra to Language Theory Problems. Roland Backhouse February 2001

Applications of Regular Algebra to Language Theory Problems. Roland Backhouse February 2001 1 Applications of Regular Algebra to Language Theory Problems Roland Backhouse February 2001 Introduction 2 Examples: Path-finding problems. Membership problem for context-free languages. Error repair.

More information

On the Complexity of the Reflected Logic of Proofs

On the Complexity of the Reflected Logic of Proofs On the Complexity of the Reflected Logic of Proofs Nikolai V. Krupski Department of Math. Logic and the Theory of Algorithms, Faculty of Mechanics and Mathematics, Moscow State University, Moscow 119899,

More information

Operationally-Based Theories of Program Equivalence

Operationally-Based Theories of Program Equivalence Operationally-Based Theories of Program Equivalence Andrew Pitts Contents 1 Introduction : : : : : : : : : : : : : : : : : : : : : : : : : : : : 241 2 Contextual Equivalence : : : : : : : : : : : : : :

More information

Concrete Models for Classical Realizability

Concrete Models for Classical Realizability Concrete Models for Classical Realizability Jaap van Oosten (joint work with Tinxiang Zou) Department of Mathematics, Utrecht University Utrecht Workshop on Proof Theory, April 16, 2015 Classical Realizability

More information

Review. Principles of Programming Languages. Equality. The Diamond Property. The Church-Rosser Theorem. Corollaries. CSE 230: Winter 2007

Review. Principles of Programming Languages. Equality. The Diamond Property. The Church-Rosser Theorem. Corollaries. CSE 230: Winter 2007 CSE 230: Winter 2007 Principles of Programming Languages Lecture 12: The λ-calculus Ranjit Jhala UC San Diego Review The lambda calculus is a calculus of functions: e := x λx. e e 1 e 2 Several evaluation

More information

FIXED POINTS AND EXTENSIONALITY IN TYPED FUNCTIONAL PROGRAMMING LANGUAGES

FIXED POINTS AND EXTENSIONALITY IN TYPED FUNCTIONAL PROGRAMMING LANGUAGES FIXED POINTS AND EXTENSIONALITY IN TYPED FUNCTIONAL PROGRAMMING LANGUAGES a dissertation submitted to the department of computer science and the committee on graduate studies of stanford university in

More information

Chu Spaces, Concept Lattices, and Domains

Chu Spaces, Concept Lattices, and Domains Electronic Notes in Theoretical Computer Science 83 (2004) URL: http://www.elsevier.nl/locate/entcs/volume83.html 17 pages Chu Spaces, Concept Lattices, and Domains Guo-Qiang 1 Department of Electrical

More information

Restricted truth predicates in first-order logic

Restricted truth predicates in first-order logic Restricted truth predicates in first-order logic Thomas Bolander 1 Introduction It is well-known that there exist consistent first-order theories that become inconsistent when we add Tarski s schema T.

More information

CSE 1400 Applied Discrete Mathematics Definitions

CSE 1400 Applied Discrete Mathematics Definitions CSE 1400 Applied Discrete Mathematics Definitions Department of Computer Sciences College of Engineering Florida Tech Fall 2011 Arithmetic 1 Alphabets, Strings, Languages, & Words 2 Number Systems 3 Machine

More information

CONSERVATION by Harvey M. Friedman September 24, 1999

CONSERVATION by Harvey M. Friedman September 24, 1999 CONSERVATION by Harvey M. Friedman September 24, 1999 John Burgess has specifically asked about whether one give a finitistic model theoretic proof of certain conservative extension results discussed in

More information

Proofs and computations

Proofs and computations (j.w.w. Kenji Miyamoto) Mathematisches Institut, LMU, München Leeds University, 7. March 2012 Formalization and extraction One can extract from a (constructive) proof of a formula with computational content

More information

Introduction to Kleene Algebra Lecture 14 CS786 Spring 2004 March 15, 2004

Introduction to Kleene Algebra Lecture 14 CS786 Spring 2004 March 15, 2004 Introduction to Kleene Algebra Lecture 14 CS786 Spring 2004 March 15, 2004 KAT and Hoare Logic In this lecture and the next we show that KAT subsumes propositional Hoare logic (PHL). Thus the specialized

More information

Informal Statement Calculus

Informal Statement Calculus FOUNDATIONS OF MATHEMATICS Branches of Logic 1. Theory of Computations (i.e. Recursion Theory). 2. Proof Theory. 3. Model Theory. 4. Set Theory. Informal Statement Calculus STATEMENTS AND CONNECTIVES Example

More information

A MODEL-THEORETIC PROOF OF HILBERT S NULLSTELLENSATZ

A MODEL-THEORETIC PROOF OF HILBERT S NULLSTELLENSATZ A MODEL-THEORETIC PROOF OF HILBERT S NULLSTELLENSATZ NICOLAS FORD Abstract. The goal of this paper is to present a proof of the Nullstellensatz using tools from a branch of logic called model theory. In

More information

Categories for Imperative Semantics

Categories for Imperative Semantics Categories for Imperative Semantics PLDG Seminar Riccardo Pucella The aim of these notes is to provide an introduction to category theory, and a motivation for its use in denotational semantics. I will

More information

Theory of Computation

Theory of Computation Thomas Zeugmann Hokkaido University Laboratory for Algorithmics http://www-alg.ist.hokudai.ac.jp/ thomas/toc/ Lecture 1: Introducing Formal Languages Motivation I This course is about the study of a fascinating

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

Constructions of Models in Fuzzy Logic with Evaluated Syntax

Constructions of Models in Fuzzy Logic with Evaluated Syntax Constructions of Models in Fuzzy Logic with Evaluated Syntax Petra Murinová University of Ostrava IRAFM 30. dubna 22 701 03 Ostrava Czech Republic petra.murinova@osu.cz Abstract This paper is a contribution

More information

A generalization of modal definability

A generalization of modal definability A generalization of modal definability Tin Perkov Polytechnic of Zagreb Abstract. Known results on global definability in basic modal logic are generalized in the following sense. A class of Kripke models

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

Logic Michælmas 2003

Logic Michælmas 2003 Logic Michælmas 2003 ii Contents 1 Introduction 1 2 Propositional logic 3 3 Syntactic implication 5 3.0.1 Two consequences of completeness.............. 7 4 Posets and Zorn s lemma 9 5 Predicate logic

More information

Introduction to Axiomatic Semantics

Introduction to Axiomatic Semantics Introduction to Axiomatic Semantics Meeting 9, CSCI 5535, Spring 2009 Announcements Homework 3 is out, due Mon Feb 16 No domain theory! Homework 1 is graded Feedback attached 14.2 (mean), 13 (median),

More information

About Typed Algebraic Lambda-calculi

About Typed Algebraic Lambda-calculi About Typed Algebraic Lambda-calculi Benoît Valiron INRIA Saclay/LIX Palaiseau, France valiron@lix.polytechnique.fr Abstract Arrighi and Dowek (2008) introduce an untyped lambdacalculus together with a

More information

LING 501, Fall 2004: Laws of logic and the definitions of the connectives

LING 501, Fall 2004: Laws of logic and the definitions of the connectives LING 501, Fall 2004: Laws of logic and the definitions of the connectives Modified October 24, adding a test yourself section at the end. Modified October 21, correcting errors noted in class on October

More information