skip to main content
research-article
Free Access

Sequent calculi and abstract machines

Published:26 May 2009Publication History
Skip Abstract Section

Abstract

We propose a sequent calculus derived from the λ―μμ˜-calculus of Curien and Herbelin that is expressive enough to directly represent the fine details of program evaluation using typical abstract machines. Not only does the calculus easily encode the usual components of abstract machines such as environments and stacks, but it can also simulate the transition steps of the abstract machine with just a constant overhead. Technically this is achieved by ensuring that reduction in the calculus always happens at a bounded depth from the root of the term. We illustrate these properties by providing shallow encodings of the Krivine (call-by-name) and the CEK (call-by-value) abstract machines in the calculus.

References

  1. Abadi, M., Cardelli, L., Curien, P.-L., and Lévy, J.-J. 1990. Explicit substitutions. In ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages. ACM Press, New York, 31--46. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Ager, M. S., Biernacki, D., Danvy, O., and Midtgaard, J. 2003. A functional correspondence between evaluators and abstract machines. Research Series RS-03-13, BRICS. March. 26 pp. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Appel, A. 2001. Foundational proof-carrying code. In IEEE Symposium on Logic in Computer Science. IEEE Computer Society Press, Los Alamitos, CA. http://www.cs.princeton.edu/~appel/papers/fpcc.pdf. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Barthe, G., Dufay, G., Jakubiec, L., Serpette, B. P., and de Sousa, S. M. 2001. A formal executable semantics of the JavaCard platform. In Proceedings of the European Symposium on Programming Languages and Systems. Springer-Verlag, Berlin, 302--319. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Curien, P.-L., Hardin, T., and Lévy, J.-J. 1996. Confluence properties of weak and strong calculi of explicit substitutions. J. ACM 43, 2, 362--397. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Curien, P.-L. and Herbelin, H. 2000. The duality of computation. In Proceedings of the ACM SIGPLAN International Conference on Functional Programming. ACM Press, New York, 233--243. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Danos, V., Joinet, J.-B., and Schellinx, H. 1993. A new deconstructive logic: Linear logic. In Proceedings of the Workshop on Linear Logic, J.-Y. Girard, et al., Eds.Google ScholarGoogle Scholar
  8. Douence, R. and Fradet, P. 1998. A systematic study of functional language implementations. ACM Trans. Program. Lang. Syst. 20, 2, 344--387. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Felleisen, M., Friedman, D., and Kohlbecker, E. 1987. A syntactic theory of sequential control. Theor. Comput. Sci. 52, 3, 205--237. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Felleisen, M., Friedman, D., Kohlbecker, E., and Duba, B. 1986. Reasoning with continuations. In 1st Symposium on Logic and Computer Science. IEEE Computer Society Press, Los Alamitos, CA, 131--141.Google ScholarGoogle Scholar
  11. Felleisen, M. and Friedman, D. P. 1986. Control operators, the SECD-machine and the λ-calculus. In Formal Description of Programming Language Concepts III. Elsevier, Amsterdam, The Netherlands, 193--217.Google ScholarGoogle Scholar
  12. Fournet, C. and Gordon, A. D. 2002. Stack inspection: Theory and variants. In ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages. ACM Press, New York, 307--318. http://research.microsoft.com/~fournet/papers/stack-inspection-theory-and-variants-popl-02.pdf. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Gentzen, G. 1969. Investigations into logical deduction. In Collected Papers of Gerhard Gentzen, M. Szabo, Ed. Elsevier, Amsterdam, The Netherlands, 68--131.Google ScholarGoogle Scholar
  14. Griffin, T. G. 1990. The formulae-as-types notion of control. In ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages. ACM Press, New York, 47--57. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Hardin, T., Maranget, L., and Pagano, B. 1996. Functional back-ends within the lambda-sigma calculus. In International Conference on Functional Programming. ACM Press, New York, 25--33. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Herbelin, H. 1994. A lambda-calculus structure isomorphic to Gentzen-style sequent calculus structure. In Proceedings of the Annual Conference of the European Association for Computer Science Logic. Lecture Notes in Computer Science, vol. 933. Springer-Verlag, Berlin. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Higuchi, T. and Ohori, A. 2002. Java bytecode as a typed term calculus. In ACM SIGPLAN International Conference on Principles and Practice of Declarative Programming. ACM Press, New York, 201--211. http://www.jaist.ac.jp/~ohori/research/jvmcalc.ps. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Howard, W. 1980. The formulae-as-types notion of construction. In To H. B. Curry: Essays in Combinatory Logic, Lambda Calculus and Formalism, J. R. Hindley and J. P. Seldin, Eds. Elsevier, Amsterdam, The Netherlands, 479--490.Google ScholarGoogle Scholar
  19. Huet, G. and Lévy, J.-J. 1991. Computations in orthogonal rewriting systems, i. In Computational Logic: Essays in Honor of Alan Robinson, J.-L. Lassez and G. Plotkin, Eds. MIT Press, Cambridge, MA, 395--414.Google ScholarGoogle Scholar
  20. Jones, M. P. 1998. The functions of Java bytecode. In Proceedings of the OOPSLA Wokshop on the Formal Underpinnings of Java.Google ScholarGoogle Scholar
  21. Klein, G. and Strecker, M. 2004. Verified bytecode verification and type-certifying compilation. J. Logic Program. 58, 1-2, 27--60. citeseer.ist.psu.edu/article/klein03verified.html.Google ScholarGoogle Scholar
  22. Krivine, J.-L. 2007. A call-by-name lambda calculus machine. Higher Order and Symbolic Computation (to appear). Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Lescanne, P. 1994. From λσ to λv a journey through calculi of explicit substitutions. In ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages. ACM Press, New York, 60--69. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. Liu, H. and Moore, J. S. 2004. Java program verification via a JVM deep embedding in ACL2. In 17th International Conference on Theorem Proving in Higher Order Logics (TPHOLs2004). Lecture Notes in Computer Science, vol. 3223. Springer-Verlag, Berlin, 184--200.Google ScholarGoogle Scholar
  25. Morrisett, J. G., Crary, K., Glew, N., and Walker, D. 2002. Stack-Based typed assembly language. In J. Functional Program. Cambridge University Press, Cambridge, MA. http://www.cs.cornell.edu/talc/papers/stal-tic-abstract.html. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. Ohori, A. 2005. A proof theory for machine code. http://www.pllab.riec.tohoku.ac.jp/~ohori/research/LogicalMachineRevOct2005.pdf. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. Parigot, M. 1993. Classical proofs as programs. Comput. Logic Theory 713, 263--276. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. Plotkin, G. D. 1975. Call-by-Name, call-by-value, and the lambda-calculus. Theor. Comput. Sci. 1, 2, 125--159.Google ScholarGoogle ScholarCross RefCross Ref
  29. Polonovski, E. 2004. Strong normalization of λ―μμ˜-calculus. In Foundations of Software Science and Computation Structures (FOSSACS 2004). Lecture Notes in Computer Science, vol. 2987. Springer-Verlag, Berlin, 423--437.Google ScholarGoogle ScholarCross RefCross Ref
  30. Pottier, F., Skalka, C., and Smith, S. F. 2001. A systematic approach to static access control. In Proceedings of the European Symposium on Programming Languages and Systems. Springer-Verlag, Berlin, 30--45. http://www.cs.uvm.edu/~skalka/skalka-pubs/fpottier-skalka-smith-toplas03.pdf. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. Prawitz, D. 1965. Natural Deduction, a Proof-Theoretical Study. Almquist and Wiksell, Stockholm.Google ScholarGoogle Scholar
  32. Reus, B. and Streicher, T. 1998. Classical logic, continuation semantics and abstract machines. J. Funct. Prog. 8, 6, 543--572. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. Wadler, P. 2003. Call-by-value is dual to call-by-name. In Proceedings of the ACM SIGPLAN International Conference on Functional Programming. ACM Press, New York. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. Wand, M. 2007. On the correctness of the Krivine machine. Higher Order and Symbolic Computation Special Issue on the Krivine Machine (to appear). Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. Yelland, P. M. 1999. A compositional account of the Java virtual machine. In ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages. ACM Press, New York, 57--69. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Sequent calculi and abstract machines

            Recommendations

            Comments

            Login options

            Check if you have access through your login credentials or your institution to get full access on this article.

            Sign in

            Full Access

            PDF Format

            View or Download as a PDF file.

            PDF

            eReader

            View online with eReader.

            eReader
            About Cookies On This Site

            We use cookies to ensure that we give you the best experience on our website.

            Learn more

            Got it!