F. Craciun
An Interval-based Inference of Variant Parametric Types
Craciun, F.; Chin, W.-N.; He, G.; Qin, S.; Castagna, G.
Authors
W.-N. Chin
G. He
S. Qin
G. Castagna
Abstract
Variant parametric types represent the successful integration of subtype and parametric polymorphism to support a more flexible subtyping for Java like languages. A key feature that helps strengthen this integration is the use-site variance. Depending on how the fields are used, each variance denotes a covariant, a contravariant, an invariant or a bivariant subtyping. By annotating variance properties on each type argument to a parametric class, programmers can choose various desirable variance properties for each use of the parametric class. Although Java library classes have been successfully refactored to use variant parametric types, these mechanisms are often criticized, due to the difficulty of choosing appropriate variance annotations. Several algorithms have been proposed for automatically refactoring legacy Java code to use generic libraries, but none can support the full flexibility of the use-site variance-based subtyping. This paper addresses this difficulty by proposing a novel interval-based approach to inferring both the variance annotations and the type arguments. Each variant parametric type is regarded as an interval type with two type bounds, a lower bound for writing and an upper bound for reading. We propose a constraint-based inference algorithm that works on a per method basis, as a summary-based analysis.
Citation
Craciun, F., Chin, W., He, G., Qin, S., & Castagna, G. (2009). An Interval-based Inference of Variant Parametric Types. In Programming languages and systems : 18th European Symposium on Programming, ESOP 2009 : held as part of the Joint European Conferences on Theory and Practice of Software, ETAPS 2009, York, UK, 22-29 March, 2009 ; proceedings (112-127). https://doi.org/10.1007/978-3-642-00590-9_9
Conference Name | 18th European Symposium on Programming (ESOP 2009) |
---|---|
Conference Location | York, UK |
Start Date | Mar 22, 2009 |
End Date | Mar 29, 2009 |
Publication Date | Mar 1, 2009 |
Deposit Date | Nov 23, 2009 |
Publicly Available Date | Dec 10, 2009 |
Pages | 112-127 |
Series Title | Lecture notes in computer science |
Series Number | 5502 |
Series ISSN | 0302-9743,1611-3349 |
Book Title | Programming languages and systems : 18th European Symposium on Programming, ESOP 2009 : held as part of the Joint European Conferences on Theory and Practice of Software, ETAPS 2009, York, UK, 22-29 March, 2009 ; proceedings. |
ISBN | 9783642005893 |
DOI | https://doi.org/10.1007/978-3-642-00590-9_9 |
Files
Accepted Conference Proceeding
(144 Kb)
PDF
Copyright Statement
The final publication is available at Springer via http://dx.doi.org/10.1007/978-3-642-00590-9_9
You might also like
PTSC: probability, time and shared-variable concurrency
(2009)
Journal Article
Memory Usage Verification Using Hip/Sleek
(2009)
Conference Proceeding
A Heap Model for Java Bytecode to Support Separation Logic
(2008)
Conference Proceeding
Verifying BPEL-like Programs with Hoare Logic
(2008)
Journal Article
Downloadable Citations
About Durham Research Online (DRO)
Administrator e-mail: dro.admin@durham.ac.uk
This application uses the following open-source libraries:
SheetJS Community Edition
Apache License Version 2.0 (http://www.apache.org/licenses/)
PDF.js
Apache License Version 2.0 (http://www.apache.org/licenses/)
Font Awesome
SIL OFL 1.1 (http://scripts.sil.org/OFL)
MIT License (http://opensource.org/licenses/mit-license.html)
CC BY 3.0 ( http://creativecommons.org/licenses/by/3.0/)
Powered by Worktribe © 2024
Advanced Search