Abstract
We are interested in type inference in the presence of structural subtyping from a pragmatic perspective. This work combines theoretical and practical contributions: first, it provides a faithful description of an efficient algorithm for solving and simplifying constraints; whose correctness is formally proved. Besides, the framework has been implemented in Objective Caml, yielding a generic type inference engine. Its efficiency is assessed by a complexity result and a series of experiments in realistic cases.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Bourdoncle, F., Merz, S.: Type checking higher-order polymorphic multi-methods. In: 24th Principles of Programming Languages (1997)
Pottier, F.: A versatile constraint-based type inference system. Nordic Journal of Computing 7 (2000)
Aiken, A.S., Fähndrich, M.: Program analysis using mixed term and set constraints. In: 4th Static Analysis Symposium (1997)
Palsberg, J., O’Keefe, P.M.: A type system equivalent to flow analysis. In: 22nd Principles of Programming Languages (1995)
Pottier, F., Simonet, V.: Information flow inference for ML. In: 29th Principles of Programming Languages (2002)
Mitchell, J.C.: Coercion and type inference. In: 11th Principles of Programming Languages (1984)
Cardelli, L.: A semantics of multiple inheritance. Information and Computation 76 (1988)
Tiuryn, J.: Subtype inequalities. In: 7th IEEE Symposium on Logic in Computer Science (1992)
Hoang, M., Mitchell, J.C.: Lower bounds on type inference with subtypes. In: 22nd Principles of Programming Languages (1995)
Mitchell, J.C.: Type inference with simple subtypes. Journal of Functional Programming 1 (1991)
Fuh, Y.C., Mishra, P.: Type inference with subtypes. In: Ganzinger, H. (ed.) ESOP 1988. LNCS, vol. 300, Springer, Heidelberg (1988)
Fuh, Y.C., Mishra, P.: Polymorphic subtype inference: Closing the theory-practice gap. In: Díaz, J., Orejas, F. (eds.) TAPSOFT 1989 and CCIPL 1989. LNCS, vol. 352, Springer, Heidelberg (1989)
Frey, A.: Satisfying subtype inequalities in polynomial space. In: Van Hentenryck, P. (ed.) SAS 1997. LNCS, vol. 1302, Springer, Heidelberg (1997)
Kuncak, V., Rinard, M.: Structural subtyping of non-recursive types is decidable. In: 18th IEEE Symposium on Logic in Computer Science (2003)
Aiken, A.S., Fähndrich, M.: Making set-constraint based program analyses scale. Technical Report CSD-96-917, University of California, Berkeley (1996)
Trifonov, V., Smith, S.: Subtyping constrained types. In: Cousot, R., Schmidt, D.A. (eds.) SAS 1996. LNCS, vol. 1145, Springer, Heidelberg (1996)
Flanagan, C., Felleisen, M.: Componential set-based analysis. In: Programming Language Design and Implementation (1997)
Pottier, F.: Simplifying subtyping constraints: a theory. Information and Computation 170 (2001)
Rehof, J.: Minimal typings in atomic subtyping. In: 24th Principles of Programming Languages (1997)
Marlow, S., Wadler, P.: A practical subtyping system for Erlang. In: International Conference on Functional Programming (1997)
Fendrick, M.: Bane, A Library for Scalable Constraint-Based Program Analysis. PhD thesis (1999)
Pottier, F.: Wallace, an efficient implementation of type inference with subtyping (2000), http://pauillac.inria.fr/~fpottier/wallace/
Frey, A.: Jazz (1998), http://www.exalead.com/jazz/
Kodumal, J.: Banshee, a toolkit for building constraint-based analyses. PhD thesis (2002)
Foster, J.S., Fähndrich, M., Aiken, A.: A Theory of Type Qualifiers. In: Programming Language Design and Implementation (1999)
Foster, J.S., Terauchi, T., Aiken, A.: Flow-sensitive type qualifiers. In: Programming Language Design and Implementation (2002)
Glynn, K., Stuckey, P.J., Sulzmann, M., Søndergaard, H.: Boolean constraints for binding-time analysis. In: Danvy, O., Filinski, A. (eds.) PADO 2001. LNCS, vol. 2053, p. 39. Springer, Heidelberg (2001)
Simonet, V.: Dalton, an efficient implementation of type inference with structural subtyping (2002), http://cristal.inria.fr/~simonet/soft/dalton/
Heintze, N., McAllester, D.: Linear-time subtransitive control flow analysis. In: Programming Language Design and Implementation (1997)
Saha, B., Heintze, N., Oliva, D.: Subtransitive CFA using types. Technical report, Yale University (1998)
Rémy, D.: Extending ML type system with a sorted equational theory. Research Report 1766, Institut de Recherche en Informatique et en Automatique (1992)
Pessaux, F., Leroy, X.: Type-based analysis of uncaught exceptions. ACM Transactions on Programming Languages and Systems 22 (2000)
Simonet, V.: Type inference with structural subtyping: A precise formalization of an efficient constraint solver (2003), Full version http://cristal.inria.fr/simonet/publis/simonet-structural-subtypingfull.ps.gz
Abadi, M., Banerjee, A., Heintze, N., Riecke, J.G.: A core calculus of dependency. In: 26th Principles of Programming Languages (1999)
Pottier, F.: A constraint-based presentation and generalization of rows. In: 18th IEEE Symposium on Logic in Computer Science (2003)
Tarjan, R.E.: Efficiency of a good but not linear set union algorithm. Journal of the ACM 22 (1975)
Fendrich, M., Foster, J.S., Su, Z., Aiken, A.S.: Partial online cycle elimination in inclusion constraint graphs. In: Programming Language Design and Implementation (1998)
Eifrig, J., Smith, S., Trifonov, V.: Sound polymorphic type inference for objects. ACM SIGPLAN Notices 30 (1995)
Simonet, V.: Flow Caml, information flow inference in Objective Caml., http://cristal.inria.fr/~simonet/soft/flowcaml/ (2002)
Fendrich, M., Rehof, J., Das, M.: Scalable context-sensitive flow analysis using instantiation constraints. In: Programming Language Design and Implementation (2000)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2003 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Simonet, V. (2003). Type Inference with Structural Subtyping: A Faithful Formalization of an Efficient Constraint Solver. In: Ohori, A. (eds) Programming Languages and Systems. APLAS 2003. Lecture Notes in Computer Science, vol 2895. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-40018-9_19
Download citation
DOI: https://doi.org/10.1007/978-3-540-40018-9_19
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-20536-4
Online ISBN: 978-3-540-40018-9
eBook Packages: Springer Book Archive