Hostname: page-component-5c6d5d7d68-txr5j Total loading time: 0 Render date: 2024-08-15T06:31:37.913Z Has data issue: false hasContentIssue false

Idealized coinductive type systems for imperative object-oriented programs

Published online by Cambridge University Press:  15 March 2011

Davide Ancona
Affiliation:
DISI, University of Genova, Genova, Italy; {davide,lagorio}@disi.unige.it
Giovanni Lagorio
Affiliation:
DISI, University of Genova, Genova, Italy; {davide,lagorio}@disi.unige.it
Get access

Abstract

In recent work we have proposed a novel approach to define idealized type systems for object-oriented languages, based on abstract compilation of programs into Horn formulas which are interpreted w.r.t. the coinductive (that is, the greatest) Herbrand model. In this paper we investigate how this approach can be applied also in the presence of imperative features. This is made possible by considering a natural translation of Static Single Assignment intermediate form programs into Horn formulas, where φ functions correspond to union types.

Type
Research Article
Copyright
© EDP Sciences, 2011

Access options

Get access to the full version of this content by using one of the access options below. (Log in options will check for institutional or personal access. Content may require purchase if you do not have access.)

References

Agesen, O., The cartesian product algorithm, in ECOOP'05 – Object-Oriented Programming. Lecture Notes in Computer Science 952 (1995) 226. CrossRef
Amadio, R. and Cardelli, L., Subtyping recursive types. ACM Trans. Prog. Lang. Syst. 15 (1993) 575631. CrossRef
Ancona, D. and Lagorio, G., Coinductive type systems for object-oriented languages, in ECOOP'09 – Object-Oriented Programming. Lecture Notes in Computer Science 5653 (2009) 226. CrossRef
Ancona, D. and Lagorio, G., Coinductive subtyping for abstract compilation of object-oriented languages into Horn formulas, in Proceedings of GandALF 2010. Electronic Proceedings in Theoretical Computer Science 25 (2010) 214223. CrossRef
D. Ancona and G. Lagorio, Complete coinductive subtyping for abstract compilation of object-oriented languages, in Formal Techniques for Java-like Programs (FTfJP10), ACM Digital Library (2010).
D. Ancona, G. Lagorio and E. Zucca, Type inference for polymorphic methods in Java-like languages, in ICTCS'07 – Italian Conf. on Theoretical Computer Science, edited by G.F. Italiano, E. Moggi and L. Laura, eProceedings. World Scientific (2007).
D. Ancona, G. Lagorio and E. Zucca, Type inference by coinductive logic programming, in Post-Proceedings of TYPES'08. Lecture Notes in Computer Science 5497 (2009).
D. Ancona, A. Corradi, G. Lagorio and F. Damiani, Abstract compilation of object-oriented languages into coinductive CLP(X): when type inference meets verification. Technical report, Karlsruhe Institute of Technology (2010). Formal Verification of Object-Oriented Software. Papers presented at the International Conference, Paris, France (2010).
Anderson, C., Giannini, P. and Drossopoulou, S., Towards type inference for Javascript, in ECOOP'05 – Object-Oriented Programming. Lecture Notes in Computer Science 3586 (2005) 428452. CrossRef
Barbanera, F., Dezani-Cincaglini, M. and U. de'Liguoro, Intersection and union types: Syntax and semantics. Inform. Comput. 119 (1995) 202230. CrossRef
W.R. Cook, W.L. Hill and P.S. Canning, Inheritance is not subtyping, in ACM Symp. on Principles of Programming Languages 1990. ACM Press (1990), 125–135.
Courcelle, B., Fundamental properties of infinite trees. Theoret. Comput. Sci. 25 (1983) 95169. CrossRef
P. Cousot, Types as abstract interpretations, in ACM Symp. on Principles of Programming Languages (1997), 316–331.
P. Cousot and R. Cousot, Abstract interpretation: a unified lattice model for static analysis of programs by construction or approximation of fixpoints, in ACM Symp. on Principles of Programming Languages 1977. ACM Press (1977), 238–252.
Cytron, R., Ferrante, J., Rosen, B.K., Wegman, M.N. and Zadeck, F.K., Efficiently computing static single assignment form and the control dependence graph. ACM Trans. Prog. Lang. Syst. 13 (1991) 451490. CrossRef
Das, D. and Ramakrishna, U., A practical and fast iterative algorithm for phi-function computation using DJ graphs. ACM Trans. Prog. Lang. Syst. 27 (2005) 426440. CrossRef
M. Furr, J. An, J.S. Foster and M. Hicks, Static type inference for Ruby, in SAC '09: Proceedings of the 2009 ACM symposium on Applied computing. ACM Press (2009).
Heidegger, P. and Thiemann, P., Recency types for analyzing scripting languages, in ECOOP'10 – Object-Oriented Programming. Lecture Notes in Computer Science 6183 (2010) 200224. CrossRef
Igarashi, A. and Nagira, H., Union types for object-oriented programming. JOT 6 (2007) 4768. CrossRef
Igarashi, A., Pierce, B.C. and Wadler, P., Featherweight Java: a minimal core calculus for Java and GJ. ACM Trans. Prog. Lang. Syst. 23 (2001) 396450. CrossRef
Leroy, X. and Grall, H., Coinductive big-step operational semantics. Inform. Comput. 207 (2009) 284304. CrossRef
R. Min and G. Gupta, Coinductive logic programming and its application to boolean sat, in FLAIRS Conference (2009).
R. Min and G. Gupta, Coinductive logic programming with negation, in LOPSTR (2009), 97–112.
N. Oxhøj, J. Palsberg and M.I. Schwartzbach, Making type inference practical, in ECOOP'92 – European Conference on Object-Oriented Programming (1992), 329–349.
Odersky, M., Sulzmann, M. and Wehr, M., Type inference with constrained types. Theory Pract. Obj. Syst. 5 (1999) 3555. 3.0.CO;2-4>CrossRef
J. Palsberg and M.I. Schwartzbach, Object-oriented type inference, in ACM Symp. on Object-Oriented Programming: Systems, Languages and Applications 1991. ACM Press (1991), 146–161.
J. Palsberg and M.I. Schwartzbach, Object-Oriented Type Systems. John Wiley & Sons (1994).
J. Plevyak and A. Chien, Precise concrete type inference for object-oriented languages, in Ninth Annual ACM Conference on Object-Oriented Programming Systems, Languages, and Applications. ACM Press (1994), 324–340.
N. Saeedloei and G. Gupta, Verifying complex continuous real-time systems with coinductive CLP(R), in Proc. of LATA 2010. Lecture Notes in Computer Science (2010).
L. Simon, A. Mallya, A. Bansal and G. Gupta, Coinductive logic programming, in Logic Programming, 22nd International Conference, ICLP (2006), 330–345.
L. Simon, A. Bansal, A. Mallya and G. Gupta, Co-logic programming: Extending logic programming with coinduction, in Automata, Languages and Programming, 34th International Colloquium, ICALP (2007), 472–483.
J. Singer, Static Program Analysis based on Virtual Register Renaming, Ph.D. thesis, Computer Laboratory, University of Cambridge (2006).
Sulzmann, M. and Stuckey, P.J., HM(X) type inference is CLP(X) solving. J. Funct. Program. 18 (2008) 251283. CrossRef
T. Wang and S.F. Smith, Precise constraint-based type inference for Java, in ECOOP'01 – European Conference on Object-Oriented Programming 2072 (2001) 99–117.
T. Wang and S. Smith, Polymorphic constraint-based type inference for objects. Technical report, The Johns Hopkins University (2008), submitted for publication.
T. Zhao, Type inference for scripting languages with implicit extension, in FOOL 2010 – Intl. Workshop on Foundations of Object-Oriented Languages (2010).