Abstract
Functional programming language design has been shaped by the framework of natural deduction, in which language constructs are divided into introduction and elimination rules for producers of values. In sequent calculus-based languages, left introduction rules replace (right) elimination rules and provide a dedicated sublanguage for consumers of values. In this paper, we present and analyze a wider design space of programming languages which encompasses four kinds of rules: Introduction and elimination, both left and right. We analyze the influence of rule choice on program structure and argue that having all kinds of rules enriches a programmer’s modularity arsenal. In particular, we identify four ways of adhering to the principle that ”the structure of the program follows the structure of the data“ and show that they correspond to the four possible choices of rules. We also propose the principle of bi-expressibility to guide and validate the design of rules for a connective. Finally, we deepen the well-known dualities between different connectives by means of the proof/refutation duality.
- Andreas Abel, Brigitte Pientka, David Thibodeau, and Anton Setzer. 2013. Copatterns: Programming Infinite Structures by Observations. In Proceedings of the 40th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL ’13). Association for Computing Machinery, New York, NY, USA. 27–38. isbn:9781450318327 https://doi.org/10.1145/2480359.2429075
Google Scholar
Digital Library
- Jean-Marc Andreoli. 1992. Logic Programming with Focusing Proofs in Linear Logic. Journal of Logic and Computation, 2 (1992), 297–347. https://doi.org/10.1093/logcom/2.3.297
Google Scholar
Cross Ref
- David Binder, Julian Jabs, Ingo Skupin, and Klaus Ostermann. 2019. Decomposition Diversity with Symmetric Data and Codata. Proc. ACM Program. Lang., 4, POPL (2019), Article 30, Dec., 28 pages. https://doi.org/10.1145/3371098
Google Scholar
Digital Library
- Luís Caires and Frank Pfenning. 2010. Session Types as Intuitionistic Linear Propositions. In Proceedings of the 21st International Conference on Concurrency Theory (CONCUR’10). Springer-Verlag, Berlin, Heidelberg. 222–236. isbn:3642153747 https://doi.org/10.1007/978-3-642-15375-4_16
Google Scholar
Cross Ref
- Alberto Carraro, Thomas Ehrhard, and Antonino Salibra. 2012. The stack calculus. In Proceedings Seventh Workshop on Logical and Semantic Frameworks, with Applications, LSFA 2012, Rio de Janeiro, Brazil, September 29-30, 2012 (EPTCS, Vol. 113). 93–108. https://doi.org/10.48550/arXiv.1303.7331
Google Scholar
- Tristan Crolard. 2004. A Formulae-as-Types Interpretation of Subtractive Logic. Journal of Logic and Computation, 14 (2004), 529–570. https://doi.org/10.1093/logcom/14.4.529
Google Scholar
Digital Library
- Pierre-Louis Curien and Hugo Herbelin. 2000. The Duality of Computation. In Proceedings of the Fifth ACM SIGPLAN International Conference on Functional Programming (ICFP ’00). Association for Computing Machinery, New York, NY, USA. 233–243. https://doi.org/10.1145/357766.351262
Google Scholar
Digital Library
- Paul Downen and Zena M. Ariola. 2014. The Duality of Construction. In Proceedings of the 23rd European Symposium on Programming Languages and Systems - Volume 8410 (ESOP ’14). Springer-Verlag, Berlin, Heidelberg. 249–269. https://doi.org/10.1007/978-3-642-54833-8_14
Google Scholar
Digital Library
- Paul Downen and Zena M. Ariola. 2018. A tutorial on computational classical logic and the sequent calculus. Journal of Functional Programming, 28 (2018), https://doi.org/10.1017/S0956796818000023
Google Scholar
Cross Ref
- Paul Downen and Zena M. Ariola. 2021. Duality in Action. In 6th International Conference on Formal Structures for Computation and Deduction, FSCD, Naoki Kobayashi (Ed.) (LIPIcs, Vol. 195). Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 1–32. https://doi.org/10.4230/LIPIcs.FSCD.2021.1
Google Scholar
Cross Ref
- Paul Downen, Zachary Sullivan, Zena M. Ariola, and Simon Peyton Jones. 2019. Codata in Action. In European Symposium on Programming (ESOP ’19). 119–146. https://doi.org/10.1007/978-3-030-17184-1_5
Google Scholar
Cross Ref
- Matthias Felleisen, Robert Bruce Findler, Matthew Flatt, and Shriram Krishnamurthi. 2001. How to Design Programs. An Introduction to Computing and Programming. The MIT Press, Cambridge, Massachusetts London, England.
Google Scholar
Digital Library
- Gerhard Gentzen. 1935. Untersuchungen über das logische Schließen. Mathematische Zeitschrift, 39 (1935), 176–210 and 405–431.
Google Scholar
Cross Ref
- Jeremy Gibbons. 2021. How to design co-programs. Journal of Functional Programming, 31 (2021), https://doi.org/10.1017/S0956796821000113
Google Scholar
Cross Ref
- Jean-Yves Girard. 1987. Linear logic. Theoretical Computer Science, 50, 1 (1987), 1–101. issn:0304-3975 https://doi.org/10.1016/0304-3975(87)90045-4
Google Scholar
Digital Library
- Philippe de Groote. 1994. On the Relation between the λ μ -Calculus and the Syntactic Theory of Sequential Control. In Proceedings of the 5th International Conference on Logic Programming and Automated Reasoning (LPAR ’94). Springer-Verlag, Berlin, Heidelberg. 31–43. https://doi.org/10.1007/3-540-58216-9_27
Google Scholar
Cross Ref
- Tatsuya Hagino. 1989. Codatatypes in ML. Journal of Symbolic Computation, 8, 6 (1989), 629–650. https://doi.org/10.1016/S0747-7171(89)80065-3
Google Scholar
Digital Library
- Hugo Herbelin and Silvia Ghilezan. 2008. An Approach to Call-by-Name Delimited Continuations. In Proceedings of the 35th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL ’08). Association for Computing Machinery, New York, NY, USA. 383–394. https://doi.org/10.1145/1328438.1328484
Google Scholar
Digital Library
- Martin Hofmann and Thomas Streicher. 1997. Continuation models are universal for λ μ -calculus. In Proceedings, 12th Annual IEEE Symposium on Logic in Computer Science, Warsaw, Poland, June 29 – July 2, 1997. IEEE Computer Society, 387–395. https://doi.org/10.1109/LICS.1997.614964
Google Scholar
Cross Ref
- William Lovas and Karl Crary. 2006. Structural Normalization for Classical Natural Deduction. Draft.
Google Scholar
- Guillaume Munch-Maccagnoni. 2009. Focalisation and Classical Realisability. In Computer Science Logic: 23rd international Workshop, CSL 2009, 18th Annual Conference of the EACSL, Erich Grädel and Reinhard Kahle (Eds.) (CSL ’09). Springer, Berlin, Heidelberg. 409–423. https://doi.org/10.1007/978-3-642-04027-6_30
Google Scholar
Cross Ref
- Koji Nakazawa and Tomoharu Nagai. 2014. Reduction System for Extensional Lambda-mu Calculus. In Rewriting and Typed Lambda Calculi, Gilles Dowek (Ed.). Springer International Publishing, Cham. 349–363. https://doi.org/10.1007/978-3-319-08918-8_24
Google Scholar
Cross Ref
- Sara Negri. 2002. Varieties of Linear Calculi. J. Philos. Log., 31, 6 (2002), 569–590. https://doi.org/10.1023/A:1021264102972
Google Scholar
Cross Ref
- Sara Negri and Jan Von Plato. 2001. Structural Proof Theory. Cambridge University Press. https://doi.org/10.1017/CBO9780511527340
Google Scholar
Cross Ref
- Klaus Ostermann, David Binder, Ingo Skupin, Tim Süberkrüb, and Paul Downen. 2022. Introduction and Elimination, Left and Right - Coq Formalization. https://doi.org/10.5281/zenodo.6685674
Google Scholar
Digital Library
- Klaus Ostermann and Julian Jabs. 2018. Dualizing Generalized Algebraic Data Types by Matrix Transposition. In European Symposium on Programming. 60–85. https://doi.org/10.1007/978-3-319-89884-1_3
Google Scholar
Cross Ref
- Michel Parigot. 1992. Free deduction: An analysis of “Computations” in classical logic. In Logic Programming, A. Voronkov (Ed.). Springer Berlin Heidelberg, Berlin, Heidelberg. 361–380. https://doi.org/10.1007/3-540-55460-2_27
Google Scholar
Cross Ref
- Michel Parigot. 1992. λ μ -Calculus: An algorithmic interpretation of classical natural deduction. In Logic Programming and Automated Reasoning, Andrei Voronkov (Ed.). Springer, Berlin, Heidelberg. 190–201.
Google Scholar
- Gordon D. Plotkin. 1975. Call-By-Name, Call-By-Value and the λ -Calculus. Theoretical Computer Science, 1 (1975), 125–159. https://doi.org/10.1016/0304-3975(75)90017-1
Google Scholar
Cross Ref
- Dag Prawitz. 1965. Natural Deduction: A Proof-Theoretical Study. Almqvist & Wiksell, Stockholm. Reprinted Mineola NY: Dover Publications (2006)
Google Scholar
- Cecylia Rauszer. 1974. A formalization of the propositional calculus of H-B logic. Studia Logica, 33 (1974), 23–34.
Google Scholar
- Tillmann Rendel, Julia Trieflinger, and Klaus Ostermann. 2015. Automatic Refunctionalization to a Language with Copattern Matching: With Applications to the Expression Problem. In Proceedings of the 20th ACM SIGPLAN International Conference on Functional Programming (ICFP 2015). Association for Computing Machinery, New York, NY, USA. 269–279. isbn:9781450336697 https://doi.org/10.1145/2784731.2784763
Google Scholar
Digital Library
- John C. Reynolds. 1972. Definitional interpreters for higher-order programming languages. In Proceedings of the ACM annual conference. Association for Computing Machinery, New York. 717–740. https://doi.org/10.1145/800194.805852
Google Scholar
Digital Library
- Alexis Saurin. 2005. Separation with Streams in the λ μ -calculus. In Proceedings of the 20th Annual IEEE Symposium on Logic in Computer Science (LICS ’05). IEEE Computer Society, USA. 356–365. https://doi.org/10.1109/LICS.2005.48
Google Scholar
Digital Library
- Peter Schroeder-Heister. 2018. Proof-Theoretic Semantics. In The Stanford Encyclopedia of Philosophy (Spring 2018 ed.), Edward N. Zalta (Ed.). Metaphysics Research Lab, Stanford University.
Google Scholar
- Olin Shivers and David Fisher. 2004. Multi-Return Function Call. In Proceedings of the Ninth ACM SIGPLAN International Conference on Functional Programming (ICFP ’04). Association for Computing Machinery, New York, NY, USA. 79–89. https://doi.org/10.1145/1016848.1016864
Google Scholar
Digital Library
- Arnaud Spiwack. 2014. A Dissection of L. Unpublished draft
Google Scholar
- Luca Tranchini. 2012. Natural Deduction for Dual-intuitionistic Logic. Studia Logica, 100, 3 (2012), 631–648. https://doi.org/10.1007/s11225-012-9417-8
Google Scholar
Digital Library
- Philip Wadler. 1990. Linear Types Can Change the World!. In Programming Concepts and Methods. North-Holland.
Google Scholar
- Philip Wadler. 2003. Call-by-value is dual to call-by-name. In Proceedings of the Eighth ACM SIGPLAN International Conference on Functional Programming (ICFP ’03). ACM, New York, NY, USA. 189–201. isbn:1-58113-756-7 https://doi.org/10.1145/944705.944723
Google Scholar
Digital Library
- Philip Wadler. 2005. Call-by-Value Is Dual to Call-by-Name - Reloaded. In Term Rewriting and Applications, 16th International Conference, RTA 2005, Nara, Japan, April 19-21, 2005, Proceedings, Jürgen Giesl (Ed.) (Lecture Notes in Computer Science, Vol. 3467). Springer, 185–203. https://doi.org/10.1007/978-3-540-32033-3_15
Google Scholar
Digital Library
- Philip Wadler. 2014. Propositions as sessions. J. Funct. Program., 24, 2-3 (2014), 384–418. https://doi.org/10.1145/2398856.2364568
Google Scholar
Digital Library
- Noam Zeilberger. 2008. On the unity of duality. Annals of Pure and Applied Logic, 153, 1-3 (2008), 66–96. https://doi.org/10.1016/j.apal.2008.01.001
Google Scholar
Cross Ref
- Noam Zeilberger. 2009. The Logical Basis of Evaluation Order and Pattern-Matching. Ph. D. Dissertation. Carnegie Mellon University. USA. isbn:9781109163018
Google Scholar
Index Terms
Introduction and elimination, left and right
Recommendations
Call-by-value is dual to call-by-name
ICFP '03: Proceedings of the eighth ACM SIGPLAN international conference on Functional programmingThe rules of classical logic may be formulated in pairs corresponding to De Morgan duals: rules about & are dual to rules about V. A line of work, including that of Filinski (1989), Griffin (1990), Parigot (1992), Danos, Joinet, and Schellinx (1995), ...
Call-by-value is dual to call-by-name
The rules of classical logic may be formulated in pairs corresponding to De Morgan duals: rules about & are dual to rules about V. A line of work, including that of Filinski (1989), Griffin (1990), Parigot (1992), Danos, Joinet, and Schellinx (1995), ...
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