Advertisement

Proving Syntactic Properties of Exceptions in an Ordered Logical Framework

  • Jeff Polakow
  • Kwangkeun Yi
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 2024)

Abstract

We formally prove the stackability and linearity of exception handlers with ML-style semantics using a novel proof technique via an ordered logical framework (OLF). We first transform exceptions into continuation-passing-style (CPS) terms and formalize the exception properties as a judgement on the CPS terms. Then, rather than directly proving that the properties hold for terms, we prove our theorem for the representations of the CPS terms and transform in OLF. We rely upon the correctness of our representations to transfer the results back to the actual CPS terms and transform.

Our work can be seen as two-fold: we present a theoretical justification of using the stack mechanism to implement exceptions of ML-like semantics; and we demonstrate the value of an ordered logical framework as a conceptual tool in the theoretical study of programming languages.

Keywords

Canonical Form Linear Logic Natural Deduction Logical Framework Exception Handler 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. [App97]
    Andrew W. Appel. Modern Compiler Implementation in ML/C/Java: Basic Techniques. Cambridge University Press, 1997.Google Scholar
  2. [BORT01]
    Josh Berdine, Peter O’Hearn, Uday S. Reddy, and Hayo Thielecke. Linearly used continuations. In Informal Proceedings of The Third ACM SIGPLAN Workshop on Continuations (CW ’01), January 2001. To appear.Google Scholar
  3. [CP99]
    Iliano Cervesato and Frank Pfenning. A linear logical framework. Information and Computation, 1999. To appear in the special issue with invited papers from LICS’96, E. Clarke, editor.Google Scholar
  4. [Dan00]
    Olivier Danvy. Formalizing implementation strategies for first-class continuations. In Programming Languages and Systems, The Proceedings of the 9th European Symposium On Programming, volume 1782 of Lecture Notes in Computer Science, pages 88–103, 2000.Google Scholar
  5. [DDP99.
    ]Olivier Danvy, Belmina Dzac, and Frank Pfenning. On proving syntactic properties of cps programs. In Third International Workshop on Higher Order Operational Techniques in Semantics (HOOTS’99), Paris, France, September 1999.Google Scholar
  6. [DF92]
    Olivier Danvy and Andrzej Filinski. Representing control: a study of the CPS transformation. Mathematical Structures in Computer Science, 2(4):361–391, December 1992.zbMATHMathSciNetCrossRefGoogle Scholar
  7. [DP95]
    Olivier Danvy and Frank Pfenning. The occurrence of continuation parameters in CPS terms. Technical Report CMU-CS-95-121, Department of Computer Science, Carnegie Mellon University, February 1995.Google Scholar
  8. [Fel87]
    Matthias Felleisen. The Calculi of λ-v-CS Conversion: A Syntactic Theory of Control and State in Imperative Higher-Order Programming Languages. PhD thesis, Department of Computer Science, Indiana University, Bloomington, Indiana, August 1987.Google Scholar
  9. [HD97]
    John Hatcliff and Olivier Danvy. Thunks and the λ-calculus. Journal of Functional Programming, 7(3):303–320, 1997.zbMATHCrossRefMathSciNetGoogle Scholar
  10. [HHP93]
    Robert Harper, Furio Honsell, and Gordon Plotkin. A framework for defining logics. Journal of the Association for Computing Machinery, 40(1):143–184, January 1993.zbMATHMathSciNetGoogle Scholar
  11. [KYD98]
    Jungtaek Kim, Kwangkeun Yi, and Olivier Danvy. Assessing the overhead of ml exceptions by selective cps transformation. In The Proceedings of the ACM SIGPLAN Workshop on ML, pages 103–114, September 1998.Google Scholar
  12. [Pfe96]
    Frank Pfenning. The practice of logical frameworks. In Hélène Kirchner, editor, Proceedings of the Colloquium on Trees in Algebra and Programming, pages 119–134, Linköping, Sweden, April 1996. Springer-Verlag LNCS 1059. Invited talk.Google Scholar
  13. [Plo75]
    Gordon D. Plotkin. Call-by-name, call-by-value and the λ-calculus. Theoretical Computer Science, 1:125–159, 1975.zbMATHCrossRefMathSciNetGoogle Scholar
  14. [Plo81]
    Gordon D. Plotkin. A structural approach to operational semantics. Technical report, Aarhus University, September 1981.Google Scholar
  15. [PP99a]
    Jeff Polakow and Frank Pfenning. Natural deduction for intuitionistic non-commutative linear logic. In J.-Y. Girard, editor, Proceedings of the Fourth International Conference on Typed Lambda Calculi and Applications (TLCA’99), pages 295–309, l’Aquila, Italy, April 1999. Springer-Verlag LNCS 1581.Google Scholar
  16. [PP99b]
    Jeff Polakow and Frank Pfenning. Relating natural deduction and sequent calculus for intuitionistic non-commutative linear logic. In Andre Scedrov and Achim Jung, editors, Proceedings of the 15th Conference on Mathematical Foundations of Programming Semantics, pages 311–328, New Orleans, Louisiana, April 1999. Electronic Notes in Theoretical Computer Science, Volume 20.Google Scholar
  17. [PP00]
    Jeff Polakow and Frank Pfenning. Properties of terms in continuation passing style in an ordered logical framework. In Workshop on Logical Frameworks and Meta-Languages (LFM 2000), Santa Barbara, California, June 2000.Google Scholar
  18. [Ste78]
    Guy L. Steele Jr. Rabbit: A compiler for Scheme. Technical Report AI-TR-474, Artificial Intelligence Laboratory, Massachusetts Institute of Technology, Cambridge, Massachusetts, May 1978.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2001

Authors and Affiliations

  • Jeff Polakow
    • 1
  • Kwangkeun Yi
    • 2
  1. 1.Department of Computer ScienceCarnegie Mellon UniversityKorea
  2. 2.Department of Computer ScienceKorea Advanced Institute of Science & TechnologyKorea

Personalised recommendations