A Nonstandard Standardization Theorem Beniamino Accattoli1 Eduardo Bonelli2 Carlos Lombardi 2,3 1 Carnegie

Delia Kesner3

Mellon University and Universit` a di Bologna

2 Univ.

Nac. de Quilmes and CONICET

3 Universit´ e

Paris-Diderot and CNRS

Outline

Standardization Explicit Substitutions Orthogonality and the Linear Substitution Calculus Proof Nets and Partial Standardization Orders Advertisement and Conclusions

Sorting Pick any vector of integers: 3, 1, 8, 6, 12, 4 It can always be sorted by swapping elements: 3, 1, 8, 6, 12, 4 1, 3, 8, 6, 12, 4 ... 1, 3, 4, 6, 8, 12 Remark that 1. Any two elements are comparable. 2. Swapping is linear and does not change the elements.

What is standardization about? I

Rough Idea: Standardization = Sorting redexes. R R

R

t →1 →2 . . . →k s ... Rσ(1) Rσ(2) Rσ(k) t → → ... → s with respect to an order ≺ (typically the left-to-right order). I

Standard derivation = ≺-ordered derivation.

I

Way subtler than sorting: 1. Redex creation ⇒ elements may not be comparable. 2. Swapping is non-linear: it may duplicate/erase redexes. 3. Swapping changes the elements.

Standardization and λ-calculus I

β-reduction: (λx.t)s →β t{x/s}.

I

λ-calculus does not come with an evaluation strategy.

I

Non-deterministic but confluent (unique result, if any).

Theorem (Standardization) Pick your favourite, arbitrary derivation d : t →∗β s. 1. Existence: it can be ordered wrt the left-to-right order. 2. Uniqueness: any sequence of swaps gives the same result. I

Completeness: non-standard derivations can be discarded.

I

Existence = Termination, Uniqueness = Confluence.

Leftmost Reduction, Normalization, and PL I

A further concept: Leftmost Reduction Strategy →leftmost : Reduce the leftmost redex at each step

I

More abstractly: leftmost = ≺-minimum.

I

→leftmost is standard (by minimality).

I

Normalization Thm: →leftmost reaches a normal form, if any.

I

More abstractly: ≺-minimum strategies are normalizing.

I

Plotkin’s Approach: 1. Standardization: calculus

programming language.

2. Idea: Abstract machines implement ≺-minimum strategies. 3. Justifications: completeness and normalization.

Outline

Standardization Explicit Substitutions Orthogonality and the Linear Substitution Calculus Proof Nets and Partial Standardization Orders Advertisement and Conclusions

Explicit Substitutions

I

λ-calculus is based on substitution (noted t{x/s}).

I

Implementations delay it, doing it lazily and partially.

I

Explicit Substitutions tried to close the gap: 1. Statically: a new constructor t[x/s] for delayed subst. 2. Dynamically: small-step operational semantics (λx.t)s →β t{x/s} becomes (λx.t)s

→B

t[x/s] →∗s t{x/s}

Ordinary Explicit Substitutions

(λx.t)s

→B

(tu)[x/s] →@ (λx.t)[x/s] →λ x[x/s] →var y [x/s] →gc

t[x/s] t[x/s]u[x/s] λx.t[x/s] s y

I

Substitutions percolate through the term structure;

I

Commuting with applications and abstractions;

I

Substituting only when facing variables.

This Paper

I

Natural expectation: Abstract Machines = ≺-minimum Strategies for ES.

I

No such Plotkin’s-style-theorem in the literature.

I

ES calculi are complex, non-orthogonal systems.

I

Standardization is out of scope.

I

This paper: a standardization theory for ES.

Outline

Standardization Explicit Substitutions Orthogonality and the Linear Substitution Calculus Proof Nets and Partial Standardization Orders Advertisement and Conclusions

Syntactic Orthogonality I

Syntactic Orthogonality: redexes cannot overlap.

I

Most standardization proofs rely on synt. orthogonality.

I

No ES calculus is syntactically orthogonal.

I

Example, consider the following reduction rules: (λx.t)s →B t[x/s] (tu)[x/s] →@ t[x/s]u[x/s] They induce a critical pair: (λx.t)[y /u]s[y /u]

@←

( (λx.t)s )[y /u] →B t[x/s][y /u]

Semantic Orthogonality I

Syntactic Orthogonality implies Semantical Orthogonality: s

P

s1 R/P

R

s2

P/R

t

aka parallel moves, or cube property, or residual system. I

Abstract Standardization relies on semantical orthogonality. [Gonthier, L´evy, and Melli`es, LICS ’91] [Melli` es PhD thesis, ’96]

I

No ordinary ES calculus is semantically orthogonal either.

A Nonstandard Calculus of ES

I

Linear logic and ES are related decompositions of λ-calculus. [Kesner and co-authors, LICS ’97, FOSSACS 2000,...]

I

Research culminated in the Linear Substitution Calculus. (next slide)

I

It is a calculus at a distance, where Distance = Use of contexts

I

No commutative rule, way simpler meta-theory.

I

Variation over calculi by Milner, De Bruijn, and Nederpelt.

Linear Substitution Calculus (LSC) I

Language: t, s, u

I

x

|

λx.t

|

ts

|

t[x/s]

One-Hole Contexts and Lists of substitutions contexts: C L

I

:=

:= :=

[·] | Ct | tC [·] | L[x/t]

| λx.C

| C [x/t] | t[x/C ]

Rewriting rules (closed by contexts C [·]): Beta at a Distance L[λx.t]s →dB L[t[x/s]] Linear Substitution C [x][x/s] →ls C [s][x/s] Garbage Collection t[x/s] →gc t

if x ∈ / fv(t)

Distance 1 I

Rule at a distance: L[λx.t]s →dB L[t[x/s]] (λx.t)[·/·] . . . [·/·] s →dB t[x/s][·/·] . . . [·/·]

I

Traditionally a configuration like: (λx.t)[y /s] u is not a redex, as it is blocked by [y /s].

I

Here, instead, it is a redex.

Distance 2 I

The substitution rules at a distance: C [x][x/s] →ls C [s][x/s] t[x/s] →gc t are the ordinary rules: x[x/s] →var y [x/s] →gc

if x ∈ / fv(t)

s y

integrating the commutative rules via contexts: (tu)[x/s] →@ t[x/s]u[x/s] (λx.t)[x/s] →λ λx.t[x/s] I

Distance

simpler proof of SN for LL [A., RTA 2013].

I

Implementable using pointers (vs de Bruijn indexes).

Features The Linear Substitution Calculus has many nice properties: I

Bisimilar to linear logic proof nets;

I

Expresses naturally 1. Linear head reduction (LHR) = Game semantics eval. 2. Weak LHR = π-calculus evaluation = KAM

I

...

I

As any other ES-calculus it is not syntactically orthogonal...

I

...but it is the first semantically orthogonal ES-calculus.

Left-to-Right Standardization For the LSC we provide: I

A left-to-right standardization theorem.

I

Proved by means of Melli` es axiomatics.

I

Simpler approaches as Plotkin’s or Takahashi’s do not work.

I

A notion of leftmost reduction →leftmost .

I

A proof that →leftmost is standard and normalising.

I

Weak linear head reduction (π and KAM) is standard.

I

Plotkin’s approach successfully lifted to ES.

Outline

Standardization Explicit Substitutions Orthogonality and the Linear Substitution Calculus Proof Nets and Partial Standardization Orders Advertisement and Conclusions

Inception of the LSC

I

LSC = algebraic copy of linear logic proof nets.

I

Every term t translates to a proof net Pt .

I

Every proof net P can be read back as a term tP .

I

Different terms may translate to the same proof net.

I

Proof nets are a syntactic quotient.

I

Dynamically: PN and LSC are behaviourally isomorphic.

Proof Nets Strong Bisimulation LSC terms and proof nets satisfy: s

t

t

s

Pt

Ps

⇒ Pt

and t

t

s

Pt

P0

⇒ ∃s s.t. Pt

P0

Strong Bisimulation: one step to one step, and viceversa.

The Graphical Equivalence I

The quotient is given by the following equivalence: t[x/s][y /u] ∼ t[y /u][x/s] (λx.t)[y /s] ∼ λx.t[y /s] (ts)[x/u] ∼ t[x/u]s

if x ∈ / fv(u) and y ∈ / fv(s) if x ∈ / fv(s) if x ∈ / fv(s)

I

Proof Nets = LSC/∼.

I

∼ preserves redexes and residuals.

I

∼ is a behavioural isomorphism of the LSC with itself.

I

The problem is that: t[x/s][y /u] ∼ t[y /u][x/s] does not preserve left-to-right derivations.

Partial Standardization Orders I

A standardization order ≺ validating: t[x/s][y /u] ∼ t[y /u][x/s] is necessarily partial.

I

Abstract standardization for partial orders exists (Melli` es).

I

But is very delicate and complex.

I

Standard derivations are up to swaps of incomparable elem.

I

Total Orders: Standardization = Term. & Conf. of swaps.

I

Partial Orders: Standardization = Term. & Conf. modulo.

The Nonstandard Standardization Theorem I

We define a partial box order validating ∼.

I

Based on the notion of explicit box for ! in linear logic.

I

The order satisfies only Melli`es’ axioms for existence.

I

We prove uniqueness in a novel abstract way.

I

Argument: the box embeds into the left-to-right order.

I

Main Result:

Theorem If t →∗∼ s then there is a box standard derivation from t to s that is unique up to swaps of incomparable elements. I

Note: modulo at two levels, Reduction (→∼ ) and Standardization (swaps).

Linear Head Reduction

I

LHR is non-deterministic, but it has the diamond property: s

s1

s2

t

Thus its non-determinism is harmless. I

It is not left-to-right standard.

I

We provide an original proof that it is box standard (next slide).

Co-Inductive External Redexes I

LHR picks ≺-minimal redexes.

I

Total order ⇒ ≺-minimum strategy is standard.

I

Partial order ⇒ ≺-minimal strategy may not be standard.

I

One has to pick special ≺-minimal redexes, called external.

I

Melli`es definition of external redexes is complex.

I

We provide a new co-inductive characterisation. A redex is external if 1) it is ≺-minimal and 2) its eventual residual is external

Outline

Standardization Explicit Substitutions Orthogonality and the Linear Substitution Calculus Proof Nets and Partial Standardization Orders Advertisement and Conclusions

Advertisement I

Reviewers: what is the connection with PL?

I

Abstract machines for call-by-name/value/need: B. Accattoli, P. Barenbaum, D. Mazza. Distilling Abstract Machines.

I

Another work: B. Accattoli, U. Dal Lago. Beta Reduction is Invariant, Indeed. solves a long-standing open problem using standardization.

I

Leftmost reduction is invariant wrt Turing machines.

I

Proved via leftmost reduction for the LSC.

Conclusions

I

A semantically orthogonal ES calculus.

I

A left-to-right stand. thm, lifting Plotkin’s approach to ES.

I

Standardization for a calculus modulo, via a partial order.

I

New light on the abstract theory.

I

General Perspective: Standard Derivations = Abstract Machine Hidden Inside the Calculus Itself

THANKS!

A Nonstandard Standardization Theorem

Rσ(k). → s with respect to an order ≺ (typically the left-to-right order). ... Reduce the leftmost redex at each step ... Dynamically: small-step operational semantics.

212KB Sizes 3 Downloads 260 Views

Recommend Documents

A Nonstandard Standardization Theorem
used to prove a left-to-right standardization theorem for the cal- culus with ES .... affect the final result nor the length of evaluation sequences (tech- nically, LHR ...

A Nonstandard Counterpart of DNR
Definition M0 ⊂d M1 iff M0 ⊂ω M1 and. (∀A∈SM1. )(∃f∈SM0. )[M1 |=f is dnr(A)]. Recall the following theorem holds,. Given any inf. rec. binary tree T and f:dnr ...

Map-closure: a general purpose mechanism for nonstandard ...
Oct 2, 2012 - The only data types supported are Booleans, reals, pairs, and procedures. ..... the ?ow-analysis techniques used in our compiler. Section.

Nonstandard Numerical Integrations of A Lotka-Volterra System 1 ...
Keywords: Lotka-Voltera model, predator and prey system, nonstandard in- tegration ... also show that solutions form a closed trajectories in (y, x) and (y, z) phase .... System Design, Kohala Coast-Island of Hawai'i, Hawai'i, USA, August 22-.

Map-closure: a general purpose mechanism for nonstandard ...
Oct 2, 2012 - The disclosed system provides a functional programming. G“ 0;' F /44 ... shop on Implementation and Application of Functional Languages.

A Model of Innovation, Standardization, and Imitation
the role of the factor intensity of high-tech inputs (e.g., skilled labor).8 ... mestic savings in the North. Then the trade account is balanced at all times owing.

A STRUCTURE THEOREM FOR RATIONALIZABILITY ...
under which rti (ai) is a best reply for ti and margΘXT−i. (πti,rti (ai)) = κti . Define a mapping φti,rti (ai),m : Θ* → Θ* between the payoff functions by setting. (A.5).

A STRUCTURE THEOREM FOR RATIONALIZABILITY IN ... - STICERD
We show that in any game that is continuous at infinity, if a plan of action ai is rationalizable ... Following Chen, we will use the notation customary in incomplete ...

A STRUCTURE THEOREM FOR RATIONALIZABILITY IN ... - STICERD
particular, there, we have extensively discussed the meaning of perturbing interim ..... assumption that Bi (h), the set of moves each period, is finite restricts the ...

Elements of Nonstandard Algebraic Geometry
techniques of nonstandard mathematics. Contents. 1 Introduction. 2. 2 List of Notation ..... the collection {Af,g,U }x∈U,f∈p,g /∈p has finite intersection property.

A Theorem on Orthology Centers
Sep 15, 2004 - bx x+z . In the notations of John H. Conway, the pedal A∗ of Oa on BC has homogeneous barycentric coordinates (0 : uSC + a2v : uSB + a2w).

Nuclear Powerplant Standardization Light.pdf
Washington Public Power Supply System. James F. Mallay. Electric Power Research Institute. David Okrent. University of California, Los Angeles. Oswald F.

Comparison Theorem
part), l'Hôpital's rule, and some other tools and the geometric intuition can be illustrated .... Ui(t) := 1. √fi(t0). Ji(t). (3.9) for i = 1, 2. Therefore, by the Jacobi equations and the ... Then define a map ϕ from the set of vector fields alo

Maximum Power Transfer Theorem
from the power source to the load is when the resistance ... Function generator on the Velleman oscilloscope that is used in a ... Th . http://www.vellemanusa.com ...

Squeeze Theorem Exercises.pdf
There was a problem previewing this document. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. Squeeze ...

WEDDERBURN'S FACTORIZATION THEOREM ... - Semantic Scholar
May 25, 2001 - Nrd|N : N −→ Z(N) is well defined, where Z(N) = F .... Let D1 = C((x1)) and define σ1 : D1 → D1 by the rule σ1(x1) = −x1. Now ... dia Math. Sci.

Nonstandard counterparts of several weak axioms
Ss: range of Xs,Ys,..., subsets of N. S ... Vs = (Ms,Ss;0s,1s,. ...... ERNA. J. Symbolic Logic 73 (2):689–710, 2008. H. Jerome Keisler, Nonstandard arithmetic and ...

Läuchli's Completeness Theorem from a Topos ... - Springer Link
Feb 6, 2008 - We believe that the topos theoretic tools available ... formation and λD-abstraction relative to a domain D ∈ D. .... to check if there is a map Z6.

A utility representation theorem with weaker continuity ...
Sep 10, 2009 - ... of the Japan Society for the Promotion of Science (JSPS) and financial ... In conjunction with the independence axiom, Herstein and Milnor [7] ...