Type Inferencing Based on Complete Type Specifications (original) (raw)

1995, Advances in Databases and Information Systems

Type specification completeness is a necessary prerequisite for support of object creating formulae in object calculus leading to formation of new types to be integrated into a type lattice containing the types from which they were formed. The paper shows what conditions should be satisfied in order that the inferred types could be correct and what is the systematic way

Precise concrete type inference for object-oriented languages

ACM SIGPLAN Notices, 1994

Concrete type information is invaluable for program optimization. The determination of concrete types in object-oriented languages is a flow sensitive global data flow problem. It is made difficult by dynamic dispatch (virtual function invocation) and first class functions (and selectors)—the very program structures for whose optimization its results are most critical. Previous work has shown that constraint-based type inference systems can be used to safely approximate concrete types [15], but their use can be expensive and their results imprecise. We present an incremental constraint-based type inference which produces precise concrete type information for a much larger class of programs at lower cost. Our algorithm extends the analysis in response to discovered imprecisions, guiding the analysis' effort to where it is most productive. This produces precise information at a cost proportional to the type complexity of the program. Many programs untypable by previous approaches ...

A Rewriting Logic Approach to Type Inference: Technical Report

Meseguer and Rosu [MR04,MR07] proposed rewriting logic semantics (RLS) as a programing language definitional framework that unifies operational and algebraic denotational semantics. Once a language is defined as an RLS theory, many generic tools are immediately available for use with no additional cost to the designer. These include a formal inductive theorem proving environment, an efficient interpreter, a state space explorer, and even a model checker. RLS has already been used to define a series of didactic and real languages [MR04, MR07], but its benefits in connection with defining and reasoning about type systems have not been fully investigated yet. This paper shows how the same RLS style employed for giving formal definitions of languages can be used to define type systems. The same term-rewriting mechanism used to execute RLS language definitions can now be used to execute type systems, giving type checkers or type inferencers. Since both the language and its type system ar...

Loading...

Loading Preview

Sorry, preview is currently unavailable. You can download the paper by clicking the button above.