Adding overloading to Java type inference

نویسندگان

  • Andreas Stadelmeier
  • Martin Plümicke
چکیده

Zusammenfassung In this paper we extend our Java with type inference by adding methods. Functions had been realized as lambda expressions defined in fields until now, which led to the restrictions that no overloading is available. Therefore the main challenge of adding methods is to deal with overloading. We present the change of the data-structures and the algorithm.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Type inference for MLj

MLj is an extension of the Standard ML language which allows interoperation with Java. It has a type system which combines ML’s parametric polymorphism and type inference with Java’s subtyping (class hierarchy) and arbitrary overloading of methods. In this paper, we discuss some of the difficulties in implementing type inference for MLj and outline our progress on the implementation. In particu...

متن کامل

Order-Sorted Polymorphism in Isabelle

ML-style polymorphism can be generalized from a single-sorted algebra of types to an order-sorted one by adding a partially ordered layer of “sorts” on top of the types. Type inference proceeds as in the Hindley/Milner system, except that order-sorted unification of types is used. The resulting system has been implemented in Isabelle to permit type variables to range over user-definable subsets...

متن کامل

Simplifying and Improving Quali ed Types

Qualiied types provide a general framework for constrained type systems , with applications including type class overloading, subtyping and record calculi. This paper presents an extended version of the type inference algorithm used in previous work, that can take account of the satissability of constraints to obtain more accurate principal types. The new algorithm is obtained by adding two new...

متن کامل

A Safe Implementation of Dynamic Overloading in Java-Like Languages

We present a general technique for extending Java-like languages with dynamic overloading, where method selection depends on the dynamic type of the parameter, instead of just the receiver. To this aim we use a core Java-language enriched with encapsulated multi-methods and dynamic overloading. Then we define an algorithm which translates programs to standard Java code using only basic mechanis...

متن کامل

Translating Double Dispatch into Single Dispatch

Goals of flexibility and re-usability in typed object-oriented languages suggest the requirement of double dispatch, i.e., the mechanism of dynamically selecting a method not only according to the run-time type of the receiver (single dispatch), but also to the run-time type of the argument. However, many mainstream languages, such as, e.g., C++ and Java, do not provide it, resorting to only si...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2015