Results 1 
2 of
2
Rank2 Intersection and Polymorphic Recursion
 In TLCA’05, volume 2841 of LNCS
, 2005
"... Let # be a rank2 intersection type system. We say that a term is #simple (or just simple when the system # is clear from the context) if system # can prove that it has a simple type. In this paper we propose new typing rules and algorithms that are able to type recursive definitions that are n ..."
Abstract

Cited by 3 (0 self)
 Add to MetaCart
Let # be a rank2 intersection type system. We say that a term is #simple (or just simple when the system # is clear from the context) if system # can prove that it has a simple type. In this paper we propose new typing rules and algorithms that are able to type recursive definitions that are not simple. At the best of our knowledge, previous algorithms for typing recursive definitions in the presence of rank2 intersection types allow only simple recursive definitions to be typed. The proposed rules are also able to type interesting examples of polymorphic recursion (i.e., recursive definitions rec {x = e} where di#erent occurrences of x in e are used with di#erent types). Moreover, the underlying techniques do not depend on particulars of rank2 intersection, so they can be applied to other type systems.
A Typebased Trace Analysis for Java
"... The intersection type discipline (ITD) is a well established one in the field of the Lambda Calculus (LC) and the functional programming paradigm. It has also been extended to Term Rewriting Systems (TRS) and more recently to object calculi and sequent calculi. We continue this trend by applying the ..."
Abstract
 Add to MetaCart
The intersection type discipline (ITD) is a well established one in the field of the Lambda Calculus (LC) and the functional programming paradigm. It has also been extended to Term Rewriting Systems (TRS) and more recently to object calculi and sequent calculi. We continue this trend by applying the techniques of ITD to the analysis of the (class based) objectoriented (OO) programming paradigm: specifically, we study a small core calculus for Java which is a restriction of Featherweight Java by removing casts, for which using ITD we define an intersection type system that traces method and field calls. Type assignment in this system is closed under reduction and expansion, allowing for a typebased semantics for programs. The main contribution of this paper is an approximation result for this programming model, linking approximation semantics with trace semantics, which we achieve by defining a notion of reduction on type derivations that is strongly normalising (as for LC and TRS). This result demonstrates a direct correspondence between a trace semantics for programs and their types, and opens up the possibility of both abstract interpretation and detailed typebased analyses for OO. We show how the approximation result facilitates one such analysis a characterisation of normalisation and termination. In order to demonstrate that our framework constitutes a practical approach to program analysis, we define a restriction of our type system which is essentially equivalent to Curry’s system for the Lambda Calculus (functional programming), and show that a principal typings property holds. We show that our system is expressive by giving an encoding of Combinatory Logic (and thereby, indirectly, the Lambda Calculus) into our calculus which preserves type assignment. The definition of principal typings for this system leads straightforwardly to a decidable type inference algorithm, for which we have a reference implementation in ML.