Type feedback vs. concrete type inference: A comparison of optimization techniques for object-oriented languages (original) (raw)

2.1 Static Type Inference.................................... 5

2013

• We conducted a survey of real-world JavaScript programs, focusing on idioms that employ JavaScript's quirks. • We developed a type system for JavaScript that handles these quirks, allowing developers to use modern technology to reason about their programs. In this document, I present JSTrace. I first discuss the general idea behind my tool and choices made when developing it. I then expose the technical details of the tool's functionality. In the evaluation chapter, I demonstrate that the tool is effective at reducing the burden of typing programs. I then conclude, discuss future work, and review related work.

Objects and Types: A Tutorial

1988

This paper is a tutorial explaining the concepts that surround abstract data types and object-oriented programming, and the relationships between these groups of concepts. These concepts include types (languagedefied, user-defied, abstract), instantiations, differences between operations and functions, overloading, objects, state, inheritance and, messages. Some of the these trems, e.g. "type", have been well defied. Many others are used in seveml contexts with multiple meanings. This paper is an attempt to identify consistent and meaningful definitions which are the most widely accepted. 2. Background De£initions. The &g of an identifier has become a standard concept in most modern programming languages since typing of identifiers makes the task of identdying potentially inappropriate uses of an identifier easier for both the compiler and the human reader of the program. The type of an identifier defies the kind of entity which that identifier represents. The type may indicate that an identifier represents a procedure, a variable, a constant, a package, or some other syntactic component of the language. In the case of variables, the type, generally called the data type, specifies the set (or range) of values which that variable can have, and the set of operations which are valid upon that variable. A type forms a template or pattern to be used in the creation of an entity. A type is not that entity, but is rather a pattern to be used in its creation. The process of using a type template to create an entity is called instantiation An instance of that type is created. For example, in the C programming language "int" is the name of the integer type. It is not an integer, but is a template for creating integers. The declaration "int i;" i s an instantiation of "int". The variable "i" is an instance of 'lint". Another view is that a type is a way of specifying the semantics for a syntactic component of a propun A type of a variable explains how to interpret the binary digits which are stored in the memory location associated with that variable; and reveals the operations which are valid upon those bits. The type declaration of a procedure

On the use of type predicates in object-oriented software

Proceedings of the 10th ACM Symposium on Dynamic languages - DLS '14, 2014

Object-orientation relies on polymorphism to express behavioral variants. As opposed to traditional procedural design, explicit typebased conditionals should be avoided. This message is conveyed in introductory material on object orientation, as well as in objectoriented reengineering patterns. Is this principle followed in practice? In other words, are type predicates actually used in objectoriented software, and if so, to which extent?

On the correctness of object classes

2004

The cardinal purpose of teaching programming is to demonstrate a method of developing correct programs. Reliability and correctness are especially important in cases of programs that are intended for multiple reuse. The most characteristic examples of such program-tools are the ones belonging to data types (or data type classes). The method we outline for program development assists in producing correct programs with mathematical formalism.

Type Systems For Object-Oriented Programming Languages

1996

Object-oriented programming languages oopl's provide important support for today's large-scale software development projects. Unfortunately, the typing issues arising from the object-oriented features that provide this support are substantially di erent from those that arise in typing procedural languages. Attempts to adapt procedural type systems to object-oriented languages have resulted in languages like Simula, C++, and Object Pascal, which h a v e o v erly restrictive t ype systems. Among other things, the rigidity of these systems frequently force programmers to use type casts, which are a notorious source of hard-to-nd bugs. These restrictive type systems also mean that many programming idioms common to untyped oopl's such as Smalltalk are not typeable. One source of this lack of exibility is the con ation of subtyping and inheritance. Brie y, inheritance is an implementation technique in which new object de nitions may be given as incremental modi cations to existing de nitions. Subtyping concerns substitutivity: when can one object safely replace another? By tying subtyping to inheritance, existing oopl's greatly reduce the number of legal substitutions in a system, and hence their degree of polymorphism. Attempts to x this rigidity h a v e resulted in unsound type systems, most notably Ei el's.

Some challenging typing issues in object-oriented languages

2003

In this paper we discuss some of the remaining problems in the design of static type systems for object-oriented programming languages. We look at typing problems involved in writing a simple interpreter as a good example of a simple problem leading to difficult typing issues. The difficulties encountered seem to arise in situations where a programmer desires to simultaneously refine mutually interdependent classes and object types.