A constraint-based presentation and generalization of rows

We study the combination of possibly conditional nonstructural subtyping constraints with rows. We give a new presentation of rows, where row terms disappear; instead, we annotate constraints with filters. We argue that, in the presence of subtyping, this approach is simpler and more general. In the case where filters are finite or cofinite sets of row labels, we give a constraint solving algorithm whose complexity is O(n/sup 3/m log m), where n is the size of the constraint and m is the number of row labels that appear in it. We point out that this allows efficient type inference for record concatenation. Furthermore, by varying the nature of filters, we obtain several natural generalizations of rows.

[1]  John C. Reynolds,et al.  Automatic computation of data set definitions , 1968, IFIP Congress.

[2]  Luca Cardelli,et al.  Operations on Records , 1989, Mathematical Foundations of Programming Semantics.

[3]  Didier Rémy,et al.  Projective ML , 1992, LFP '92.

[4]  Jens Palsberg,et al.  Efficient recursive subtyping , 1992, POPL '93.

[5]  Didier Rémy,et al.  Type inference for records in natural extension of ML , 1994 .

[6]  John C. Mitchell,et al.  Theoretical aspects of object-oriented programming: types, semantics, and language design , 1994, Choice Reviews Online.

[7]  Peter Buneman,et al.  Theoretical Aspects of Object-Oriented Programming , 1994 .

[8]  Mitchell Wand Type inference for objects with instance variables and inheritance , 1994 .

[9]  Jens Palsberg,et al.  Efficient recursive subtyping , 1992, POPL '93.

[10]  François Pottier,et al.  Simplifying subtyping constraints , 1996, ICFP '96.

[11]  François Pottier,et al.  Type Inference in the Presence of Subtyping: from Theory to Practice , 1998 .

[12]  Martin Odersky,et al.  Type Inference with Constrained Types , 1999, Theory Pract. Object Syst..

[13]  François Pessaux,et al.  Type-based analysis of uncaught exceptions , 1999, POPL '99.

[14]  David A. McAllester On the complexity analysis of static analyses , 1999, JACM.

[15]  François Pottier,et al.  A Versatile Constraint-Based Type Inference System , 2000, Nord. J. Comput..

[16]  François Pessaux,et al.  Type-based analysis of uncaught exceptions , 2000, TOPL.

[17]  François Pottier,et al.  Simplifying Subtyping Constraints: A Theory , 2001, Inf. Comput..

[18]  Benjamin C. Pierce,et al.  Regular expression pattern matching for XML , 2003, POPL '01.

[19]  David A. McAllester On the complexity analysis of static analyses , 2002, JACM.

[20]  Jens Palsberg,et al.  Efficient type inference for record concatenation and subtyping , 2002, Proceedings 17th Annual IEEE Symposium on Logic in Computer Science.

[21]  Benjamin C. Pierce,et al.  Regular expression pattern matching for XML , 2003, J. Funct. Program..

[22]  Jens Palsberg,et al.  Type inference with non-structural subtyping , 2005, Formal Aspects of Computing.