ABSTRACT
We propose an implementation of λ+, a recently introduced simply typed lambda-calculus with pairs where isomorphic types are made equal. The rewrite system of λ+ is a rewrite system modulo an equivalence relation, which makes its implementation non-trivial. We also extend λ+ with natural numbers and general recursion and use Bekić's theorem to split mutual recursions. This splitting, together with the features of λ+, allows for a novel way of program transformation by reduction, by projecting a function before it is applied in order to simplify it. Also, currying together with the associativity and commutativity of pairs gives an enhanced form of partial application.
- P. Arrighi and A. Díaz-Caro. A System F accounting for scalars. Logical Methods in Computer Science, 8(1:11), 2012.Google Scholar
- P. Arrighi, A. Díaz-Caro, and B. Valiron. The vectorial lambda-calculus. Draft at arXiv:1308.1138, 2015. Considered for publication at Information & Computation.Google Scholar
- F. Barbanera, M. Dezani-Ciancaglini, and U. de' Liguoro. Intersection and Union Types: Syntax and Semantics. Information and Computation, 119:202--230, 1995. Google ScholarDigital Library
- H. Bekić. Definable operations in general algebras, and the theory of automata and flowcharts. In Programming Languages and Their Definition. H. Bekić (1936-1982), volume 177 of Lecture Notes in Computer Science, pages 30--55. Springer, 1984. Google ScholarDigital Library
- A. Bernadet and S. J. Lengrand. Non-idempotent intersection types and strong normalisation. Logical Methods in Computer Science, 9(4:3), 2013.Google Scholar
- G. Boudol. Lambda-calculi for (strict) parallel functions. Information & Computation, 108(1):51--127, 1994. Google ScholarDigital Library
- K. B. Bruce, R. Di Cosmo, and G. Longo. Provable isomorphisms of types. Mathematical Structures in Computer Science, 2(2):231--247, 1992.Google ScholarCross Ref
- A. Bucciarelli, T. Ehrhard, and G. Manzonetto. A relational semantics for parallelism and non-determinism in a functional setting. Annals of Pure and Applied Logic, 163(7):918--934, 2012.Google ScholarCross Ref
- G. Castagna, K. Nguyen, Z. Xu, H. Im, S. Lenglet, and L. Padovani. Polymorphic functions with set-theoretic types: Part 1: Syntax, semantics, and evaluation. In Proceedings of the 41st ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL '14, pages 5--17, New York, NY, USA, 2014. ACM. Google ScholarDigital Library
- E. De Benedetti and S. Ronchi Della Rocca. Bounding normalization time through intersection types. In L. Paolini, editor, Proceedings of Sixth Workshop on Intersection Types and Related Systems (ITRS 2012), EPTCS, pages 48--57. Cornell University Library, 2013.Google Scholar
- U. de'Liguoro and A. Piperno. Non deterministic extensions of untyped λ-calculus. Information & Computation, 122(2):149--177, 1995. Google ScholarDigital Library
- R. Di Cosmo and D. Kesner. A confluent reduction for the extensional typed λ-calculus with pairs, sums, recursion and terminal object. In ICALP'93, volume 700 of Lecture Notes in Computer Science, pages 645--656. Springer, 1993. Google ScholarDigital Library
- A. Díaz-Caro and G. Dowek. Simply typed lambda-calculus modulo type isomorphisms. Draft at hal-01109104, 2015.Google Scholar
- A. Díaz-Caro and G. Dowek. Quantum superpositions and projective measurement in the lambda calculus. arXiv:1601.04294, 2016.Google Scholar
- A. Díaz-Caro, G. Manzonetto, and M. Pagani. Call-by-value non-determinism in a linear logic type discipline. In LFCS' 13, volume 7734 of Lecture Notes in Computer Science, pages 164--178, 2013.Google Scholar
- J. Dunfield. Elaborating intersection and union types. J. Functional Programming, 24(2-3):133--165, 2014.Google ScholarCross Ref
- J. Garrigue and H. Aït-Kaci. The typed polymorphic label-selective λ-calculus. In Proceedings of POPL 1994, ACM SIGPLAN, pages 35--47, 1994. Google ScholarDigital Library
- D. Kesner and D. Ventura. Quantitative types for the linear substitution calculus. In J. Diaz, I. Lanese, and D. Sangiorgi, editors, Theoretical Computer Science, volume 8705 of Lecture Notes in Computer Science, pages 296--310. Springer Berlin Heidelberg, 2014.Google Scholar
- M. Pagani and S. Ronchi Della Rocca. Linearity, non-determinism and solvability. Fundamenta Informaticae, 103(1-4):173--202, 2010. Google ScholarDigital Library
- E. Pimentel, S. Ronchi Della Rocca, and L. Roversi. Intersection Types from a Proof-theoretic Perspective. Fundamenta Informaticae, 121(1-4):253--274, 2012. Google ScholarDigital Library
Index Terms
- Isomorphisms considered as equalities: Projecting functions and enhancing partial application through an implementation of λ+
Recommendations
Polymorphic System I
IFL '20: Proceedings of the 32nd Symposium on Implementation and Application of Functional LanguagesSystem I is a simply-typed lambda calculus with pairs, extended with an equational theory obtained from considering the type isomorphisms as equalities. In this work we propose an extension of System I to polymorphic types, adding the corresponding ...
Termination of rewrite relations on λ-terms based on Girard's notion of reducibility
In this paper, we show how to extend the notion of reducibility introduced by Girard for proving the termination of β-reduction in the polymorphic λ-calculus, to prove the termination of various kinds of rewrite relations on λ-terms, including rewriting ...
Functional Pearl: The Distributive -Calculus
Functional and Logic ProgrammingAbstractWe introduce a simple extension of the -calculus with pairs—called the distributive -calculus—obtained by adding a computational interpretation of the valid distributivity isomorphism of simple types. We study the calculus both as an untyped and ...
Comments