Intersection type assignment systems
Selected papers of the thirteenth conference on Foundations of software technology and theoretical computer science
The Definition of Standard ML
The Java Language Specification
The Java Language Specification
POPL '83 Proceedings of the 10th ACM SIGACT-SIGPLAN symposium on Principles of programming languages
Principal type-schemes for functional programs
POPL '82 Proceedings of the 9th ACM SIGPLAN-SIGACT symposium on Principles of programming languages
Principality and type inference for intersection types using expansion variables
Theoretical Computer Science
Typeless programming in Java 5.0
PPPJ '06 Proceedings of the 4th international symposium on Principles and practice of programming in Java
Typeless programming in Java 5.0 with wildcards
Proceedings of the 5th international symposium on Principles and practice of programming in Java
On Type Inference in the Intersection Type Discipline
Electronic Notes in Theoretical Computer Science (ENTCS)
Hi-index | 0.00 |
In the past we analyzed typeless Java programs. One of our results was, that there may be different correct typings for one method. This means that the principal types of such methods are intersection types. We presented a type-inference algorithm. For typeless Java methods the algorithm infers its principal intersection type. Unfortunately, like Java byte-code, Java does not allow intersection types. In this paper we present an algorithm, which resolves intersection types of Java methods, such that Java programs with standard typings are generated. In the algorithm we have to differentiate two cases of intersection types. On the one hand there are methods with intersection types, where for all types the same code is executed. On the other hand there are methods, which call in dependence to its typings different methods. These two cases have to be treated differently during type resolving. Finally, we will see that this differentiation leads to a refined definition of Java method principal types.