Abstract
Exceptions are invaluable for structured error handling in high-level languages, but they are at odds with linear types. More generally, control effects may delete or duplicate portions of the stack, which, if we are not careful, can invalidate all substructural usage guarantees for values on the stack. We have developed a type-and-effect system that tracks control effects and ensures that values on the stack are never wrongly duplicated or dropped. We present the system first with abstract control effects and prove its soundness. We then give examples of three instantiations with particular control effects, including exceptions and delimited continuations, and show that they meet the soundness criteria for specific control effects.
- A. Ahmed, M. Fluet, and G. Morrisett. A step-indexed model of substructural state. In Proc. 10th ACM SIGPLAN International Conference on Functional Programming (ICFP'05), pages 78--91, Tallinn, Estonia, September 2005. Google Scholar
Digital Library
- J. Aldrich, J. Sunshine, D. Saini, and Z. Sparks. Typestate-oriented programming. In Proc. Onward!, pages 1015--1022, Orlando, FL, USA, October 2009. Google Scholar
Digital Library
- K. Asai and Y. Kameyama. Polymorphic delimited continuations. In Programming Languages and Systems, volume 4807 of Lecture Notes in Computer Science, pages 239--254. Springer, 2007. Google Scholar
Digital Library
- A. Barber. Dual intuitionistic linear logic. Technical Report ECS-LFCS-960347, Laboratory for Foundations of Computer Science, University of Edinburgh, September 1996.Google Scholar
- G. M. Bierman. On Intuitionistic Linear Logic. PhD thesis, University of Cambridge, August 1993.Google Scholar
- W. Clinger, ed. The revised revised report on Scheme or an UnCommon Lisp. AI Memo No. 848, MIT AI Lab, Cambridge, MA, USA, August 1985.Google Scholar
- O. Danvy and A. Filinski. A functional abstraction of typed contexts. Technical Report DIKU Rapport 89/12, Computer Science Department, University of Copenhagen, Denmark, 1989.Google Scholar
- M. Felleisen. The theory and practice of first-class prompts. In Proc. 15th Annual ACM Symposium on Principles of Programming Languages (POPL'88), pages 180--190, San Diego, CA, USA, January 1988. Google Scholar
Digital Library
- J.-Y. Girard. Linear logic. Theoretical Computer Science, 50 (1): 1--102, 1987. Google Scholar
Digital Library
- J. B. Goodenough. Structured exception handling. In Proc. 2th Annual ACM Symposium on Principles of Programming Languages (POPL'75), pages 204--224, Palo Alto, CA, USA, January 1975. Google Scholar
Digital Library
- J. Gosling, B. Joy, and G. Steele. The Java Language Specification. Addison Wesley, 1996. Google Scholar
Digital Library
- D. Grossman, G. Morrisett, T. Jim, M. Hicks, Y. Wang, and J. Cheney. Region-based memory management in Cyclone. In Proc. 2002 ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI'02), pages 282--293, Berlin, Germany, June 2002. Google Scholar
Digital Library
- O. Kiselyov and C. Shan. A substructural type system for delimited continuations. In Proc. 8th International Conference on Typed Lambda Calculi and Applications (TLCA'07), pages 223--239, Paris, France, June 2007. Google Scholar
Digital Library
- P. J. Landin. A generalization of jumps and labels. Technical report, UNIVAC Systems Programming Research, 1965.Google Scholar
- J. M. Lucassen and D. K. Gifford. Polymorphic effect systems. In Proc. 15th Annual ACM Symposium on Principles of Programming Languages (POPL'88), pages 47--57, San Diego, CA, USA, January 1988. Google Scholar
Digital Library
- K. Mazurak and S. Zdancewic. Lolliproc: to concurrency from classical linear logic via Curry-Howard and control. In Proc. 15th ACM SIGPLAN International Conference on Functional Programming (ICFP'10), pages 39--50, Baltimore, MD, USA, September 2010. Google Scholar
Digital Library
- G. Morrisett, A. Ahmed, and M. Fluet. L$^3$: A linear language with locations. In Proc. 7th International Conference on Typed Lambda Calculi and Applications (TLCA'05), pages 293--307, Nara, Japan, April 2005. Google Scholar
Digital Library
- M. Odersky and M. Zenger. Scalable component abstractions. In Proc 20th ACM Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA'05), pages 41--57, San Diego, CA, USA, October 2005. Google Scholar
Digital Library
- J. C. Reynolds. Definitional interpreters for higher-order programming languages. In Proc. ACM Annual Conference, volume 2, pages 717--470, Boston, MA, USA, August 1972. Google Scholar
Digital Library
- N. Swamy, J. Chen, and R. Chugh. Enforcing stateful authorization and information flow policies in Fine. In A. D. Gordon, editor, Proc. 19th European Symposium on Programming (ESOP'10), volume 6012 of Lecture Notes in Computer Science, pages 529--549, Paphos, Cyprus, March 2010. Google Scholar
Digital Library
- H. Thielecke. From control effects to typed continuation passing. In Proc. 30th Annual ACM Symposium on Principles of Programming Languages (POPL'03), pages 139--149, New Orleans, LA, USA, January 2003. Google Scholar
Digital Library
- J. A. Tov and R. Pucella. Practical affine types. In Proc. 38th Annual ACM Symposium on Principles of Programming Languages (POPL'11), pages 447--458, Austin, TX, USA, January 2011. Google Scholar
Digital Library
- P. Wadler. There's no substitute for linear logic. In Proc. 8th International Workshop on the Mathematical Foundations of Programming Semantics (MFPS'92), Oxford, UK, April 1992.Google Scholar
- D. Walker. Substructural type systems. In B. C. Pierce, editor, Advanced Topics in Types and Programming Languages, pages 3--44. MIT Press, Cambridge, 2005.Google Scholar
Index Terms
A theory of substructural types and control
Recommendations
A theory of substructural types and control
OOPSLA '11: Proceedings of the 2011 ACM international conference on Object oriented programming systems languages and applicationsExceptions are invaluable for structured error handling in high-level languages, but they are at odds with linear types. More generally, control effects may delete or duplicate portions of the stack, which, if we are not careful, can invalidate all ...
A Classical Sequent Calculus with Dependent Types
Special Issue on ESOP 2017 and Regular PapersDependent types are a key feature of the proof assistants based on the Curry-Howard isomorphism. It is well known that this correspondence can be extended to classical logic by enriching the language of proofs with control operators. However, they are ...
Classical By-Need
Proceedings of the 25th European Symposium on Programming Languages and Systems - Volume 9632Call-by-need calculi are complex to design and reason with. When adding control effects, the very notion of canonicity is irremediably lost, the resulting calculi being necessarily ad hoc. This calls for a design of call-by-need guided by logical rather ...







Comments