## Logical Step-Indexed Logical Relations

### Cached

### Download Links

- [ttic.uchicago.edu]
- [www.itu.dk]
- [www.itu.dk]
- [www.it-c.dk]
- [www.it-c.dk]
- [www.itu.dk]
- [www.itu.dk]
- [www.it-c.dk]
- [www.cs.indiana.edu]
- [www.ccs.neu.edu]
- [www.itu.dk]
- [www.itu.dk]
- [www.it-c.dk]
- [www.ccs.neu.edu]
- [www.itu.dk]
- [www.it-c.dk]
- [www.mpi-sws.org]
- [www.mpi-soft.mpg.de]
- [www.mpi-sws.org]
- [www.mpi-sws.org]
- [www.mpi-sws.org]

Citations: | 15 - 6 self |

### BibTeX

@MISC{Dreyer_logicalstep-indexed,

author = {Derek Dreyer and Amal Ahmed and Lars Birkedal},

title = {Logical Step-Indexed Logical Relations},

year = {}

}

### OpenURL

### Abstract

We show how to reason about “step-indexed ” logical relations in an abstract way, avoiding the tedious, error-prone, and proof-obscuring step-index arithmetic that seems superficially to be an essential element of the method. Specifically, we define a logic LSLR, which is inspired by Plotkin and Abadi’s logic for parametricity, but also supports recursively defined relations by means of the modal “later ” operator from Appel et al.’s “very modal model” paper. We encode in LSLR a logical relation for reasoning (in-)equationally about programs in call-by-value System F extended with recursive types. Using this logical relation, we derive a useful set of rules with which we can prove contextual (in-)equivalences without mentioning step indices. 1

### Citations

328 | Theorems for free
- Wadler
- 1989
(Show Context)
Citation Context ... holds for all n, i.e., roughly, the subset {(e1,e2) | ∀n.(e1,e2) ∈ �E ≈�τ��n }. In spite of this, we are still (unlike some bisimulationbased methods [26]) able to prove Wadler-style “free theorems” =-=[27]-=-; see Appendix E for an example. 5 Examples In this section we show two examples of how our LSLRbased logical relation can be used to prove contextual equivalence of programs. An additional example pr... |

135 | An indexed model of recursive types for foundational proof-carrying code
- Appel, McAllester
- 2001
(Show Context)
Citation Context ...recursive types. Using this logical relation, we derive a useful set of rules with which we can prove contextual (in-)equivalences without mentioning step indices. 1 Introduction Appel and McAllester =-=[6]-=- invented the step-indexed model in order to express “semantic” proofs of type safety for use in foundational proof-carrying code. The basic idea is to characterize type inhabitation as a predicate in... |

123 | A logic for parametric polymorphism
- Plotkin, Abadi
- 1993
(Show Context)
Citation Context ...SLR. Our solution involves a novel synthesis of ideas from two well-known pieces of prior work: (1) Plotkin and Abadi’s logic for relational reasoning 1about parametric polymorphism (hereafter, PAL) =-=[23]-=-, and (2) Appel, Melliès, Richards, and Vouillon’s “very modal model” paper (hereafter, VMM) [7]. PAL is a second-order intuitionistic logic extended with axioms for equational reasoning about relatio... |

110 | Equivalence in Functional Languages with Effects
- Mason, Talcott
- 1991
(Show Context)
Citation Context ...in Section 2. In order to prove this, we will follow Pitts [22] in employing an intermediate form of approximation, often referred to as ciu approximation. Ciu approximation, due to Mason and Talcott =-=[18]-=-, is a superficially coarser version of contextual approximation in which (1) attention is restricted to evaluation contexts E instead of arbitrary program contexts, and (2) the “closing” of open term... |

99 | Relational properties of domains
- Pitts
- 1996
(Show Context)
Citation Context ...s equivalent to v = fix f(x : τ). case (unroll x) of inl ⇒roll (inl 〈〉) |inr g ⇒roll (inr (λy : τ. f(g(f y)))) This corresponds to the minimal invariant property in the domain-theoretic work of Pitts =-=[27]-=-, which Birkedal and Harper subsequently proved in an operational setting [10]. To prove contextual equivalence of id and v, we can show d, d ↓ bool ⊢ (id, v) ∈ V ≈ �τ → τ�. Our proof will be parametr... |

74 | Parametric polymorphism and operational equivalence
- Pitts
- 2000
(Show Context)
Citation Context ...n. Finally, besides step-indexed logical relations, a number of other logical relations methods have been proposed for languages with parametric polymorphism, recursion, and/or recursive types, e.g., =-=[25, 26, 18, 22, 10, 13]-=-. One of the most important advances in this domain is the idea of ⊤⊤-closure (aka biorthogonality). In developing a logical relation for a language with impredicative polymorphism, existential types,... |

72 | Step-indexed syntactic logical relations for recursive and quantified types
- Ahmed
- 2006
(Show Context)
Citation Context ...chanized. In subsequent work, Ahmed and coworkers have shown that the step-indexed model can also be used for relational reasoning about programs in languages with semantically complex type structure =-=[4, 3, 16, 5]-=-. However, a continual annoyance in working with stepindexed logical relations, as well as a stumbling block to their general acceptance, is the tedious, error-prone, and proof-obscuring reasoning abo... |

64 | Coinductive axiomatization of recursive type equality and subtyping
- Brandt, Henglein
- 1998
(Show Context)
Citation Context ...relationship between step-indexed logical relations and bisimulation techniques, perhaps leading to a more unifying account. Also related to our use of the Löb rule is the work of Brandt and Henglein =-=[11]-=-, who gave a coinductive axiomatization of recursive type equality and subtyping via a coinduction-like rule. They also define the semantic interpretation of their subtyping judgment using a stratifie... |

62 | State-dependent representation independence
- Ahmed, Dreyer, et al.
- 2009
(Show Context)
Citation Context ...-indexed logical relations in a more abstract way, because step-indexed relations have proven more easily adaptable than other logical-relations methods to languages with effects (particularly state) =-=[3, 5, 24]-=-. We believe that the work presented here makes an important first step toward logical step-indexed logical relations for effectful programs. Indeed, since publication of our original LICS paper [14],... |

46 |
Small bisimulations for reasoning about higher-order imperative programs
- Koutavas, Wand
- 2006
(Show Context)
Citation Context ...sed methods like Sumii and Pierce’s [26], or Lassen and Levy’s [15]. Bisimulations have also been developed for (in-)equational reasoning in languages with general references and/or control operators =-=[14, 25, 24]-=-. We hope that the present work will help to illuminate the relationship between step-indexed logical relations and bisimulation techniques, perhaps leading to a more unifying account. Also related to... |

46 | A Bisimulation for Type Abstraction and Recursion
- Sumii, Pierce
- 2007
(Show Context)
Citation Context ...shall see that, when it is employed in connection with logical relations, it also has a coinductive flavor reminiscent of the reasoning principles used in bisimulation methods like Sumii and Pierce’s =-=[26]-=-. Overview In Section 2, we present our language under consideration, F µ . In Section 3, we present our logic LSLR described above. We also give a Kripke model of LSLR with worlds being natural numbe... |

37 | Typed operational reasoning
- Pitts
- 2005
(Show Context)
Citation Context ...incurs an unfold-fold reduction. Specifically, in order to prove that the logical relation is sound with respect to contextual approximation, we must prove that it is compatible in the sense of Pitts =-=[20]-=-. Compatibility for unfold demands that if fold v1 and fold v2 are logically related, then unfold (fold v1) and unfold (fold v2) are related, too. By definition of V �µα.τ� ρ, knowing fold v1 and fold... |

35 | Operational properties of Lily, a polymorphic linear lambda calculus with recursion
- Bierman, Pitts, et al.
- 2000
(Show Context)
Citation Context ...rphic fixed-point combinator to combine polymorphism with recursion; it relied on an abstract notion of admissible relations (see also [10]), whereas our logic LSLR does not. Bierman, Pitts and Russo =-=[8]-=- equipped the language suggested by Plotkin with an operational semantics, resulting in a programming language called Lily. Here instead we consider a standard call-byvalue language with impredicative... |

33 |
Denotational semantics with partial functions
- Plotkin
- 1985
(Show Context)
Citation Context ... (and first-order axioms) related to CBV reduction instead of PAL’s equational predicates and axioms. This approach is similar to earlier logics of partial terms for call-by-value calculi with simple =-=[24]-=- and recursive (but not universal) types [2]. For handling recursive types, it suffices to have some way of defining recursive relations µr.R in the logic. This can be done when R is suitably “contrac... |

31 | Syntactic considerations on recursive types
- Abadi, Fiore
- 1996
(Show Context)
Citation Context ...CBV reduction instead of PAL’s equational predicates and axioms. This approach is similar to earlier logics of partial terms for call-by-value with simple [21] and recursive (but not universal) types =-=[2]-=-. For handling recursive types, it suffices to have some way of defining recursive relations µr.R in the logic. This can be done when R is suitably “contractive” in r; to express contractiveness, we b... |

31 | The impact of higher-order state and control effects on local relational reasoning
- Dreyer, Neis, et al.
- 2010
(Show Context)
Citation Context ...also has the pleasing side effect of rendering the relations complete w.r.t. contextual equivalence. This is also the case for step-indexed logical relations, as shown in recent work of Dreyer et al. =-=[15]-=-. We have presented in this paper an alternative technique for ensuring completeness, namely closure w.r.t. ciu-approximation (in the definition of E �τ� ρ). We believe our approach is simpler and mor... |

27 | Imperative selfadjusting computation
- Acar, Ahmed, et al.
- 2008
(Show Context)
Citation Context ...chanized. In subsequent work, Ahmed and coworkers have shown that the step-indexed model can also be used for relational reasoning about programs in languages with semantically complex type structure =-=[4, 3, 16, 5]-=-. However, a continual annoyance in working with stepindexed logical relations, as well as a stumbling block to their general acceptance, is the tedious, error-prone, and proof-obscuring reasoning abo... |

27 |
Syntactic logical relations for polymorphic and recursive types
- Crary, Harper
(Show Context)
Citation Context ...Rbased logical relation can be used to prove contextual equivalence of programs. An additional example proof of a “free theorem” may be found in Appendix E. The first example is from Crary and Harper =-=[12]-=- (who adapted it from one in Sumii and Pierce [26]) and concerns representation independence of “objects” with existential recursive type. The second example, from Sumii and Pierce [26], is concerned ... |

25 | A Modality for Recursion
- Nakano
- 2000
(Show Context)
Citation Context ... logic. This can be done when R is suitably “contractive” in r; to express contractiveness, we borrow the “later” ⊲A operator from Appel et al.’s VMM, which they in turn borrowed from Gödel-Löb logic =-=[18, 19]-=-. Hence, LSLR is in fact not only a second-order logic (like PAL) but a modal one, and the truth value of a proposition is the set of worlds (think: step levels) at which it holds. The key reasoning p... |

24 | Biorthogonality, step-indexing and compiler correctness, in
- Benton, Hur
- 2009
(Show Context)
Citation Context ...ve our approach is simpler and more direct than ⊤⊤-closure, but neither approach subsumes the either. On the one hand, ⊤⊤-closure is applicable in more general settings, such as lower-level languages =-=[8, 17]-=- or languages with control operators [15], where the behavior of a term depends on its evaluation context. On the other hand, this added generality means that a ⊤⊤-closed relation is incapable of vali... |

19 | A relational modal logic for higher-order stateful ADTs - Dreyer, Neis, et al. - 2010 |

16 |
A complete, co-inductive syntactic theory of sequential control and state
- Støvring, Lassen
- 2007
(Show Context)
Citation Context ...sed methods like Sumii and Pierce’s [26], or Lassen and Levy’s [15]. Bisimulations have also been developed for (in-)equational reasoning in languages with general references and/or control operators =-=[14, 25, 24]-=-. We hope that the present work will help to illuminate the relationship between step-indexed logical relations and bisimulation techniques, perhaps leading to a more unifying account. Also related to... |

16 | A complete characterization of observational equivalence in polymorphic λ-calculus with general references
- Sumii
- 2009
(Show Context)
Citation Context ...on-based methods like Sumii and Pierce’s [30], or Lassen and Levy’s [17]. Bisimulations have also been developed for relational reasoning in languages with general references and/or control operators =-=[16, 28, 27, 29]-=-. We hope that the present work will help to illuminate the relationship between step-indexed logical relations and bisimulation techniques, perhaps leading to a more unifying account. Also related to... |

14 | The impact of seq on free theorems-based program transformations
- Johann, Voigtländer
- 2006
(Show Context)
Citation Context ...ly step-indexed, interpretation. Finally, a number of logical-relations-based reasoning methods have been proposed for languages with parametric polymorphism, recursion, and/or recursive types, e.g., =-=[20, 13, 17, 4, 12]-=-. We do not claim that the method presented in this paper is per se more powerful than prior approaches. Rather, our goal is to show how to reason about step-indexed logical relations in a more abstra... |

14 | Parametric polymorphism through run-time sealing, or, theorems for low, low prices
- Matthews, Ahmed
- 2008
(Show Context)
Citation Context ...chanized. In subsequent work, Ahmed and coworkers have shown that the step-indexed model can also be used for relational reasoning about programs in languages with semantically complex type structure =-=[4, 3, 16, 5]-=-. However, a continual annoyance in working with stepindexed logical relations, as well as a stumbling block to their general acceptance, is the tedious, error-prone, and proof-obscuring reasoning abo... |

13 |
Pierre-Louis Curien. Formal parametric polymorphism
- Abadi, Cardelli
- 1993
(Show Context)
Citation Context ...model”. However, there are also significant differences between our work and theirs. Plotkin and Abadi’s logic was originally developed for pure System F, as was Abadi, Cardelli and Curien’s System R =-=[1]-=-. (The latter is less expressive in that the only relations definable in the logic are those that are maps of System F functions.) In recent years, several extensions of PAL to richer languages with e... |

13 | Non-parametric parametricity
- Neis, Dreyer, et al.
- 2009
(Show Context)
Citation Context ...hown that the step-indexed model can also be used for relational reasoning about programs in languages with semantically interesting types, such as general recursive types and general reference types =-=[4, 3, 5, 21]-=-. However, a continual annoyance in working with step-indexed logical relations, as well as a stumbling block to their general acceptance, is the tedious, error-prone, and proofobscuring reasoning abo... |

12 |
Jérôme Vouillon. A very modal model of a modern, major, general type system
- Appel, Melliès, et al.
- 2007
(Show Context)
Citation Context ...1) Plotkin and Abadi’s logic for relational reasoning 1about parametric polymorphism (hereafter, PAL) [23], and (2) Appel, Melliès, Richards, and Vouillon’s “very modal model” paper (hereafter, VMM) =-=[7]-=-. PAL is a second-order intuitionistic logic extended with axioms for equational reasoning about relational parametricity in pure System F. Plotkin and Abadi show how to define a logical relation inte... |

12 |
Constructing interpretations of recursive types in an operational setting
- Birkedal, Harper
- 1999
(Show Context)
Citation Context ...recursive type. The second example, from Sumii and Pierce [26], is concerned with proving that the syntactic projection function associated with a general recursive type is equivalent to the identity =-=[9]-=-. We reason informally in LSLR but present the proofs in some detail to emphasize the use of the derivable rules from Section 4. Observe that the proofs do not involve any step-indexed reasoning! Exam... |

12 |
order type theory and recursion. Notes for a talk at the Scott Fest
- Second
- 1993
(Show Context)
Citation Context ... that the only relations definable in the logic are those that are maps of System F functions.) In recent years, several extensions of PAL to richer languages with effects have been proposed. Plotkin =-=[22]-=- suggested a variant for a second-order linear type theory with a polymorphic fixed-point combinator to combine polymorphism with recursion; it relied on an abstract notion of admissible relations (se... |

10 | Normal form bisimulation for parametric polymorphism
- Lassen, Levy
- 2008
(Show Context)
Citation Context ...connection with a logical-relations method results in coinductive-style reasoning principles reminiscent of those used in bisimulation-based methods like Sumii and Pierce’s [26], or Lassen and Levy’s =-=[15]-=-. Bisimulations have also been developed for (in-)equational reasoning in languages with general references and/or control operators [14, 25, 24]. We hope that the present work will help to illuminate... |

8 | A kripke logical relation between ml and assembly
- Hur, Dreyer
- 2011
(Show Context)
Citation Context ...ve our approach is simpler and more direct than ⊤⊤-closure, but neither approach subsumes the either. On the one hand, ⊤⊤-closure is applicable in more general settings, such as lower-level languages =-=[8, 17]-=- or languages with control operators [15], where the behavior of a term depends on its evaluation context. On the other hand, this added generality means that a ⊤⊤-closed relation is incapable of vali... |

5 |
Eijiro Sumii. Environmental bisimulations for higher-order languages
- Sangiorgi, Kobayashi
- 2007
(Show Context)
Citation Context ...sed methods like Sumii and Pierce’s [26], or Lassen and Levy’s [15]. Bisimulations have also been developed for (in-)equational reasoning in languages with general references and/or control operators =-=[14, 25, 24]-=-. We hope that the present work will help to illuminate the relationship between step-indexed logical relations and bisimulation techniques, perhaps leading to a more unifying account. Also related to... |

4 | Fixed-point logic with the approximation modality and its Kripke completeness
- Nakano
(Show Context)
Citation Context ... logic. This can be done when R is suitably “contractive” in r; to express contractiveness, we borrow the “later” ⊲A operator from Appel et al.’s VMM, which they in turn borrowed from Gödel-Löb logic =-=[18, 19]-=-. Hence, LSLR is in fact not only a second-order logic (like PAL) but a modal one, and the truth value of a proposition is the set of worlds (think: step levels) at which it holds. The key reasoning p... |

1 | en) | if E then e1 else e2 | 〈E, e2〉 |〈 v1,E〉| fst E | snd E | inlτ E | inrτ E | case E of inl x1 ⇒e1 |inr x2 ⇒e2 | Ee| vE | E [τ] | pack τ1,Eas ∃α. τ | unpack E as α, x in e2 | foldτ E | unfold E e ↦→ e ′ if true then e1 else e2 - unknown authors |

1 |
Logical stepindexed logical relations (technical appendix), 2009. Available at: http://www.mpi-sws.org/~dreyer/papers/lslr
- Dreyer, Ahmed, et al.
(Show Context)
Citation Context ... E to lift the primitive reductions to a standard left-to-right call-by-value semantics for the language. The dynamic semantics is completely standard and is given in the companion technical appendix =-=[13]-=-. F µ typing judgments have the form Γ ⊢ e : τ, where the context Γ binds type variables α, as well as value variables x: Γ ::= · | Γ, α | Γ, x : τ. The typing rules are also standard and are given in... |

1 | en) | if E then e1 else e2 | 〈E, e2〉 | 〈v1, E〉 | fst E | snd E | inlτ E | inrτ E | case E of inl x1 ⇒e1 |inr x2 ⇒e2 | E e | v E | E [τ] | pack τ1, E as ∃α. τ | unpack E as α, x - unknown authors |

1 | Step-indexedsyntactic logical relations for recursive and quantified types. InESOP, 2006. Extended/corrected version available as - Ahmed |