Observability for Pair Pattern Calculi

Inspired by the notion of solvability in the λ-calculus, we define a notion of observability for a calculus with pattern matching. We give an intersection type system for such a calculus which is based on non-idempotent types. The typing system is shown to characterize the set of terms having canonical form, which properly contains the set of observable terms, so that typability alone is not sufficient to characterize observability. However, the inhabitation problem associated with our typing system turns out to be decidable, a result which — together with typability — allows to obtain a full characterization of observability.

[1]  Simona Ronchi Della Rocca,et al.  Essential and relational models † , 2015, Mathematical Structures in Computer Science.

[2]  Simon L. Peyton Jones,et al.  The Implementation of Functional Programming Languages , 1987 .

[3]  Delia Kesner,et al.  Pattern matching as cut elimination , 1999, Proceedings. 14th Symposium on Logic in Computer Science (Cat. No. PR00158).

[4]  Mariangiola Dezani-Ciancaglini,et al.  A filter lambda model and the completeness of type assignment , 1983, Journal of Symbolic Logic.

[5]  Barbara Petit A Polymorphic Type System for the Lambda-Calculus with Constructors , 2009, TLCA.

[6]  Delia Kesner,et al.  First-class patterns , 2009, Journal of Functional Programming.

[7]  Pawel Urzyczyn,et al.  The emptiness problem for intersection types , 1994, Proceedings Ninth Annual IEEE Symposium on Logic in Computer Science.

[8]  Vincent van Oostrom,et al.  Lambda calculus with patterns , 2008, Theor. Comput. Sci..

[9]  Vincent van Oostrom,et al.  Confluence by Decreasing Diagrams , 1994, Theor. Comput. Sci..

[10]  Jean-Louis Krivine,et al.  Lambda-calculus, types and models , 1993, Ellis Horwood series in computers and their applications.

[11]  Nissim Francez,et al.  Basic simple type theory , 1998 .

[12]  Henk Barendregt,et al.  The Lambda Calculus: Its Syntax and Semantics , 1985 .

[13]  Claude Kirchner,et al.  A rho-Calculus of Explicit Constraint Application , 2004, WRLA.

[14]  Thibaut Balabonski,et al.  On the Implementation of Dynamic Patterns , 2011, HOR.

[15]  Antonio Bucciarelli,et al.  The Inhabitation Problem for Non-idempotent Intersection Types , 2014, IFIP TCS.

[16]  Wolfram Kahl,et al.  Basic Pattern Matching Calculi: a Fresh View on Matching Failure , 2004, FLOPS.