Abstract
The λ-calculus is popular as an intermediate language for practical compilers. But in the world of logic it has a lesser-known twin, born at the same time, called the sequent calculus. Perhaps that would make for a good intermediate language, too? To explore this question we designed Sequent Core, a practically-oriented core calculus based on the sequent calculus, and used it to re-implement a substantial chunk of the Glasgow Haskell Compiler.
- A. W. Appel. Compiling with Continuations. Cambridge University Press, New York, NY, USA, 1992. ISBN 0-521-41695-7. Google Scholar
Digital Library
- Z. M. Ariola and H. Herbelin. Control reduction theories: The benefit of structural substitution. Journal of Functional Programming, 18(3):373– 419, May 2008. ISSN 0956-7968. doi: 10.1017/S0956796807006612. Google Scholar
Digital Library
- Z. M. Ariola, J. Maraist, M. Odersky, M. Felleisen, and P. Wadler. A call-by-need lambda calculus. In Proceedings of the 22nd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL ’95, pages 233–246, New York, NY, USA, 1995. Google Scholar
Digital Library
- ACM. ISBN 0-89791-692-1. doi: 10.1145/199448.199507.Google Scholar
- Z. M. Ariola, A. Bohannon, and A. Sabry. Sequent calculi and abstract machines. ACM Transactions on Programming Languages and Systems, 31(4):13:1–13:48, May 2009. ISSN 0164-0925. doi: 10.1145/1516507.1516508. Google Scholar
Digital Library
- Z. M. Ariola, H. Herbelin, and A. Saurin. Classical call-by-need and duality. In Proceedings of the 10th International Conference on Typed Lambda Calculi and Applications, TLCA’11, pages 27–44, Berlin, Heidelberg, 2011. Springer-Verlag. ISBN 978-3-642-21690-9. Google Scholar
Digital Library
- Z. M. Ariola, P. Downen, H. Herbelin, K. Nakata, and A. Saurin. Classical call-by-need sequent calculi: The unity of semantic artifacts. In Proceedings of the 11th International Conference on Functional and Logic Programming, FLOPS’12, pages 32–46, Berlin, Heidelberg, 2012. Springer-Verlag. ISBN 978-3-642-29821-9. doi: 10. 1007/978-3-642-29822-6_6. Google Scholar
Digital Library
- J. Breitner. Call arity. In Trends in Functional Programming - 15th International Symposium, TFP 2014, Soesterberg, The Netherlands, May 26-28, 2014. Revised Selected Papers, pages 34–50, 2014. doi: 10. 1007/978-3-319-14675-1_3.Google Scholar
- D. Coutts, R. Leshchinskiy, and D. Stewart. Stream fusion: From lists to streams to nothing at all. In Proceedings of the 12th ACM SIGPLAN International Conference on Functional Programming, ICFP ’07, pages 315–326, New York, NY, USA, 2007. ACM. ISBN 978-1-59593-815- 2. doi: 10.1145/1291151.1291199. Google Scholar
Digital Library
- P. Curien and H. Herbelin. The duality of computation. In Proceedings of the Fifth ACM SIGPLAN International Conference on Functional Programming (ICFP ’00), Montreal, Canada, September 18-21, 2000, pages 233–243, 2000. doi: 10.1145/351240.351262. Google Scholar
Digital Library
- R. Cytron, J. Ferrante, B. K. Rosen, M. N. Wegman, and F. K. Zadeck. Efficiently computing static single assignment form and the control dependence graph. ACM Transactions on Programming Languages and Systems, 13(4):451–490, 1991. doi: 10.1145/115372.115320. Google Scholar
Digital Library
- M. Felleisen. On the expressive power of programming languages. Science of Computer Programming, 17(1-3):35–75, Dec. 1991. ISSN 0167-6423. doi: 10.1016/0167-6423(91)90036-W. Google Scholar
Digital Library
- M. Felleisen and D. P. Friedman. Control operators, the SECDmachine, and the λ-calculus. In M. Wirsing, editor, Formal Description of Programming Concepts III, pages 193–219. North Holland Press, Amsterdam, 1986.Google Scholar
- C. Flanagan, A. Sabry, B. F. Duba, and M. Felleisen. The essence of compiling with continuations. In Proceedings of the ACM SIGPLAN 1993 Conference on Programming Language Design and Implementation, PLDI ’93, pages 237–247, New York, NY, USA, 1993. Google Scholar
Digital Library
- ACM. ISBN 0-89791-598-4. doi: 10.1145/155090.155113.Google Scholar
- G. Gentzen. Investigations into logical deduction. In M. Szabo, editor, Collected papers of Gerhard Gentzen, pages 68–131. North-Holland, 1969.Google Scholar
- H. Herbelin. A lambda-calculus structure isomorphic to gentzenstyle sequent calculus structure. In Computer Science Logic, 8th International Workshop, CSL ’94, Kazimierz, Poland, September 25-30, 1994, Selected Papers, pages 61–75, 1994. doi: 10.1007/BFb0022247. Google Scholar
Digital Library
- H. Herbelin. Explicit substitutions and reducibility. Journal of Logic and Computation, 11(3):431–451, 2001. doi: 10.1093/logcom/11.3. 431.Google Scholar
Cross Ref
- M. Hofmann and T. Streicher. Continuation models are universal for lambda-mu-calculus. In Proceedings, 12th Annual IEEE Symposium on Logic in Computer Science, Warsaw, Poland, June 29 - July 2, 1997, pages 387–395, 1997. doi: 10.1109/LICS.1997.614964. Google Scholar
Digital Library
- G. Huet. The zipper. Journal of Functional Programming, 7(5):549– 554, Sept. 1997. ISSN 0956-7968. doi: 10.1017/S0956796897002864. Google Scholar
Digital Library
- R. A. Kelsey. A correspondence between continuation passing style and static single assignment form. In Papers from the 1995 ACM SIGPLAN Workshop on Intermediate Representations, IR ’95, pages 13–22, New York, NY, USA, 1995. ACM. ISBN 0-89791-754-5. doi: 10.1145/202529.202532. Google Scholar
Digital Library
- A. Kennedy. Compiling with continuations, continued. In Proceedings of the 12th ACM SIGPLAN International Conference on Functional Programming, ICFP ’07, pages 177–190, New York, NY, USA, 2007. Google Scholar
Digital Library
- ACM. ISBN 978-1-59593-815-2. doi: 10.1145/1291151.1291179.Google Scholar
- D. A. Kranz, R. Kelsey, J. Rees, P. Hudak, and J. Philbin. ORBIT: an optimizing compiler for Scheme. In Proceedings of the 1986 SIGPLAN Symposium on Compiler Construction, Palo Alto, California, USA, June 25-27, 1986, pages 219–233, 1986. doi: 10.1145/12276.13333. Google Scholar
Digital Library
- J. Launchbury. A natural semantics for lazy evaluation. In Proceedings of the 20th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL ’93, pages 144–154, New York, NY, USA, 1993. ACM. ISBN 0-89791-560-7. doi: 10.1145/158511.158618. Google Scholar
Digital Library
- R. Leißa, M. Köster, and S. Hack. A graph-based higher-order intermediate representation. In Proceedings of the 13th Annual IEEE/ACM International Symposium on Code Generation and Optimization, CGO ’15, pages 202–212, Washington, DC, USA, 2015. Google Scholar
Digital Library
- IEEE Computer Society. ISBN 978-1-4799-8161-8.Google Scholar
- A. Meyer and S. Cosmadakis. Semantical Paradigms: Notes for an Invited Lecture. Technical report, MIT Laboratory for Computer Science, 545 Technology Square, Cambridge, MA 02139, July 1988.Google Scholar
- G. Munch-Maccagnoni. Focalisation and classical realisability. In Proceedings of the 23rd CSL International Conference and 18th EACSL Annual Conference on Computer Science Logic, CSL’09/EACSL’09, pages 409–423, Berlin, Heidelberg, 2009. Springer-Verlag. ISBN 3-642-04026-8, 978-3-642-04026-9. Google Scholar
Digital Library
- G. Munch-Maccagnoni. Syntax and Models of a non-Associative Composition of Programs and Proofs. PhD thesis, Univ. Paris Diderot, 2013.Google Scholar
- C. Okasaki, P. Lee, and D. Tarditi. Call-by-need and continuationpassing style. Lisp and Symbolic Computation, 7(1):57–82, Jan. 1994. ISSN 0892-4635. doi: 10.1007/BF01019945. Google Scholar
Digital Library
- M. Parigot. Lambda-my-calculus: An algorithmic interpretation of classical natural deduction. In Proceedings of the International Conference on Logic Programming and Automated Reasoning, LPAR ’92, pages 190–201, London, UK, UK, 1992. Springer-Verlag. ISBN 3-540- 55727-X. Google Scholar
Digital Library
- 663989.Google Scholar
- S. L. Peyton Jones and J. Launchbury. Unboxed values as first class citizens in a non-strict functional language. In Proceedings of the 5th ACM Conference on Functional Programming Languages and Computer Architecture, pages 636–666, London, UK, UK, 1991. Springer-Verlag. ISBN 3-540-54396-1. Google Scholar
Digital Library
- S. L. Peyton Jones and A. L. M. Santos. A transformation-based optimiser for Haskell. Science of Computer Programming, 32(1-3): 3–47, Sept. 1998. ISSN 0167-6423. doi: 10.1016/S0167-6423(97) 00029-4. Google Scholar
Digital Library
- S. L. Peyton Jones, A. Tolmach, and T. Hoare. Playing by the rules: rewriting as a practical optimisation technique in GHC. In 2001 Haskell Workshop. ACM SIGPLAN, September 2001.Google Scholar
- G. D. Plotkin. Call-by-name, call-by-value and the λ-calculus. Theoretical Computer Science, 1(2):125–159, 1975. doi: 10.1016/ 0304-3975(75)90017-1.Google Scholar
Cross Ref
- J.-C. Raoult and J. Vuillemin. Operational and semantic equivalence between recursive programs. Journal of the Association for Computing Machinery, 27(4):772–796, Oct. 1980. ISSN 0004-5411. doi: 10.1145/ 322217.322229. Google Scholar
Digital Library
- 322229.Google Scholar
- J. C. Reynolds. The discoveries of continuations. Lisp and Symbolic Computation, 6(3-4):233–248, 1993. Google Scholar
Digital Library
- J. C. Reynolds. User-defined types and procedural data structures as complementary approaches to data abstraction. In C. A. Gunter and J. C. Mitchell, editors, Theoretical Aspects of Object-oriented Programming, pages 13–23. MIT Press, Cambridge, MA, USA, 1994. ISBN 0-262- 07155-X. Google Scholar
Digital Library
- 186680.Google Scholar
- J. C. Reynolds. Definitional interpreters for higher-order programming languages. Higher-Order and Symbolic Computation, 11(4):363–397, Dec. 1998. ISSN 1388-3690. doi: 10.1023/A:1010027404223. Google Scholar
Digital Library
- A. Sabry and M. Felleisen. Reasoning about programs in continuationpassing style. In LISP and Functional Programming, pages 288–298, 1992. doi: 10.1145/141471.141563. Google Scholar
Digital Library
- A. L. M. Santos. Compilation by Transformation in Non-Strict Functional Languages. PhD thesis, University of Glasgow, 1995.Google Scholar
- T. Standish, D. Harriman, D. Kibler, and J. Neighbors. The Irvine program transformation catalogue. 1976.Google Scholar
- G. L. Steele, Jr. RABBIT: A compiler for SCHEME. Technical Report AITR-474, Massachusetts Institute of Technology, Artificial Intelligence Laboratory, 1978. Google Scholar
Digital Library
- G. L. Steele, Jr. and G. J. Sussman. Lambda: The ultimate declarative. Memo AIM-379, Massachusetts Institute of Technology, Artificial Intelligence Laboratory, 1976. Google Scholar
Digital Library
- G. L. Steele, Jr. and G. J. Sussman. Lambda: The ultimate imperative. Memo AIM-353, Massachusetts Institute of Technology, Artificial Intelligence Laboratory, 1976. Google Scholar
Digital Library
- G. J. Sussman and G. L. Steele, Jr. SCHEME: An interpreter for untyped lambda-calculus. Memo AIM-349, Massachusetts Institute of Technology, Artificial Intelligence Laboratory, 1975. Google Scholar
Digital Library
- P. Wadler. Call-by-value is dual to call-by-name. In Proceedings of the Eighth ACM SIGPLAN International Conference on Functional Programming, ICFP ’03, pages 189–201, New York, NY, USA, 2003. Google Scholar
Digital Library
- ACM. ISBN 1-58113-756-7. doi: 10.1145/944705.944723.Google Scholar
- P. Wadler. Propositions as types. Communications of the ACM, 58(12): 75–84, Nov. 2015. ISSN 0001-0782. doi: 10.1145/2699407. Google Scholar
Digital Library
- N. Zeilberger. The Logical Basis of Evaluation Order and Pattern-Matching. PhD thesis, Carnegie Mellon University, 2009. Google Scholar
Digital Library
Index Terms
Sequent calculus as a compiler intermediate language
Recommendations
Sequent calculus as a compiler intermediate language
ICFP 2016: Proceedings of the 21st ACM SIGPLAN International Conference on Functional ProgrammingThe λ-calculus is popular as an intermediate language for practical compilers. But in the world of logic it has a lesser-known twin, born at the same time, called the sequent calculus. Perhaps that would make for a good intermediate language, too? To ...
Non-classical Elegance for Sequent Calculus Enthusiasts
In this paper we develop what we can describe as a "dual two-sided" cut-free sequent calculus system for the non-classical logics of truth lp, k 3, stt and a non-reflexive logic ts which is, arguably, more elegant than the three-sided sequent calculus ...
Sequentialization for N-Graphs via Sub-N-Graphs
WoLLIC 2014: Proceedings of the 21st International Workshop on Logic, Language, Information, and Computation - Volume 8652Since proof-nets for MLL- were introduced by Girard 1987, several studies have been made on its soundness proof. Bellin & Van de Wiele 1995 produced an elegant proof based on properties of subnets empires and kingdoms and Robinson 2003 proposed a ...







Comments