CICM 2016
Incorporating Quotation and Evaluation Into Church’s Type Theory: Syntax and Semantics
William M. Farmer
Department of Computing and Software McMaster University
Incorporating Quotation and Evaluation Into Churchs Type Theory: - - PowerPoint PPT Presentation
CICM 2016 Incorporating Quotation and Evaluation Into Churchs Type Theory: Syntax and Semantics William M. Farmer Department of Computing and Software McMaster University 26 July 2016 Outline Motivation. Syntax and semantics of ctt qe .
Department of Computing and Software McMaster University
Incorporating Quotation and Evaluation Into Church’s Type Theory: Syntax and Semantics 2/27
◮ ϕ ranges over the same set? ◮ ϕ ranges over an extended set?
Incorporating Quotation and Evaluation Into Church’s Type Theory: Syntax and Semantics 3/27
Incorporating Quotation and Evaluation Into Church’s Type Theory: Syntax and Semantics 4/27
Incorporating Quotation and Evaluation Into Church’s Type Theory: Syntax and Semantics 5/27
Incorporating Quotation and Evaluation Into Church’s Type Theory: Syntax and Semantics 6/27
Incorporating Quotation and Evaluation Into Church’s Type Theory: Syntax and Semantics 7/27
Incorporating Quotation and Evaluation Into Church’s Type Theory: Syntax and Semantics 8/27
◮ For example, if c = x + 3, then x is free in c since
◮ For example, if the value of x is x, then
Incorporating Quotation and Evaluation Into Church’s Type Theory: Syntax and Semantics 9/27
Incorporating Quotation and Evaluation Into Church’s Type Theory: Syntax and Semantics 10/27
◮ cttqe is based on Q0, Peter Andrews’ elegant version of
Incorporating Quotation and Evaluation Into Church’s Type Theory: Syntax and Semantics 11/27
Incorporating Quotation and Evaluation Into Church’s Type Theory: Syntax and Semantics 12/27
ǫ→o
Incorporating Quotation and Evaluation Into Church’s Type Theory: Syntax and Semantics 13/27
Incorporating Quotation and Evaluation Into Church’s Type Theory: Syntax and Semantics 14/27
Incorporating Quotation and Evaluation Into Church’s Type Theory: Syntax and Semantics 15/27
Incorporating Quotation and Evaluation Into Church’s Type Theory: Syntax and Semantics 16/27
Incorporating Quotation and Evaluation Into Church’s Type Theory: Syntax and Semantics 17/27
Incorporating Quotation and Evaluation Into Church’s Type Theory: Syntax and Semantics 18/27
ϕ (Cγ) ∈ Dγ and each of the
ϕ (Cγ) = ϕ(Cγ).
ϕ (Cγ) = I(Cγ).
ϕ (Cγ) = V M ϕ (Fα→β)(V M ϕ (Aα)).
ϕ (Cγ) is the function f ∈ Dα→β such
ϕ[xα→d](Bβ).
ϕ (Cγ) = E(Aα).
ϕ (is-exprβ ǫ→o Aǫ) = t, then
ϕ (Cγ) = V M ϕ (E−1(V M ϕ (Aǫ))).
Incorporating Quotation and Evaluation Into Church’s Type Theory: Syntax and Semantics 19/27
◮ Thus the Evaluation Problem is not an issue.
Incorporating Quotation and Evaluation Into Church’s Type Theory: Syntax and Semantics 20/27
ǫ→o fǫ ⊃
ǫ→(ǫ→o)→o fǫ presburgerǫ→o ⊃
Incorporating Quotation and Evaluation Into Church’s Type Theory: Syntax and Semantics 21/27
◮ The quasiquotation ⌊Bǫ⌋ ∧ooo ⌊Cǫ⌋ is expressed by
0 , a version of
Incorporating Quotation and Evaluation Into Church’s Type Theory: Syntax and Semantics 22/27
◮ Example: A symbolic differentiation algorithm.
◮ Involves the interplay of syntax and semantics. ◮ Difficult to express in a traditional logic.
Incorporating Quotation and Evaluation Into Church’s Type Theory: Syntax and Semantics 23/27
◮ Example: pdiff(u · v, x) = pdiff(u, x) · v + u · pdiff(v, x).
◮ ∀ u : Poly . deriv(λ x : R . u ) = λ x : R . pdiff( u , x ) .
Incorporating Quotation and Evaluation Into Church’s Type Theory: Syntax and Semantics 24/27
Incorporating Quotation and Evaluation Into Church’s Type Theory: Syntax and Semantics 25/27
◮ Agda, Archon, Elixir, F#, Lisp, MetaML, MetaOCaml, reFLect,
◮ Coq, Agda, ....
◮ “Implementing Reflection in Nuprl” [Barzilay 2006] ◮ “Towards Practical Reflection for Formal Mathematics” [Giese,
◮ “On the Semantics of ReFLect as a Basis for a Reflective
Incorporating Quotation and Evaluation Into Church’s Type Theory: Syntax and Semantics 26/27
Incorporating Quotation and Evaluation Into Church’s Type Theory: Syntax and Semantics 27/27