Results 1 - 10
of
29
Towards Type Inference for JavaScript
- IN PROC. 19TH EUROPEAN CONFERENCE ON OBJECT-ORIENTED PROGRAMMING
, 2005
"... Object-oriented scripting languages like JavaScript and Python are popular partly because of their dynamic features. These include the runtime modification of objects and classes through addition of fields or updating of methods. These features make static typing difficult and so usually dynamic ..."
Abstract
-
Cited by 45 (1 self)
- Add to MetaCart
Object-oriented scripting languages like JavaScript and Python are popular partly because of their dynamic features. These include the runtime modification of objects and classes through addition of fields or updating of methods. These features make static typing difficult and so usually dynamic typing is used. Consequently, errors such as access to non-existent members are not detected until runtime. We first
Automatic Program Specialization for Java
- ACM Transactions on Programming Languages and Systems
, 2000
"... The object-oriented style of programming facilitates program adaptation and enhances program genericness, but at the expense of efficiency. We demonstrate experimentally that state-of-the-art Java compilation technology fails to compensate for the use of object-oriented abstractions to implement ..."
Abstract
-
Cited by 31 (3 self)
- Add to MetaCart
The object-oriented style of programming facilitates program adaptation and enhances program genericness, but at the expense of efficiency. We demonstrate experimentally that state-of-the-art Java compilation technology fails to compensate for the use of object-oriented abstractions to implement generic programs, and that program specialization can be used to eliminate these overheads. We present an automatic program specializer for Java, and demonstrate experimentally that significant speedups in program execution time can be obtained through automatic specialization. Although automatic program specialization could be seen as overlapping with existing optimizing compiler technology, we show that specialization and compiler optimization are in fact complementary. 1 Introduction Object-oriented languages encourage a style of programming that facilitates program adaptation. Encapsulation enhances code resilience to program modifications and increases the possibilities for di...
Context-sensitive points-to analysis: is it worth it
- In CC
, 2006
"... Abstract. We present the results of an empirical study evaluating the precision of subset-based points-to analysis with several variations of context sensitivity on Java benchmarks of significant size. We compare the use of call site strings as the context abstraction, object sensitivity, and the BD ..."
Abstract
-
Cited by 30 (1 self)
- Add to MetaCart
Abstract. We present the results of an empirical study evaluating the precision of subset-based points-to analysis with several variations of context sensitivity on Java benchmarks of significant size. We compare the use of call site strings as the context abstraction, object sensitivity, and the BDD-based context-sensitive algorithm proposed by Zhu and Calman, and by Whaley and Lam. Our study includes analyses that context-sensitively specialize only pointer variables, as well as ones that also specialize the heap abstraction. We measure both characteristics of the points-to sets themselves, as well as effects on the precision of client analyses. To guide development of efficient analysis implementations, we measure the number of contexts, the number of distinct contexts, and the number of distinct points-to sets that arise with each context sensitivity variation. To evaluate precision, we measure the size of the call graph in terms of methods and edges, the number of devirtualizable call sites, and the number of casts statically provable to be safe. The results of our study indicate that object-sensitive analysis implementations are likely to scale better and more predictably than the other approaches; that objectsensitive analyses are more precise than comparable variations of the other approaches; that specializing the heap abstraction improves precision more than extending the length of context strings; and that the profusion of cycles in Java call graphs severely reduces precision of analyses that forsake context sensitivity in cyclic regions. 1
PyPy’s Approach to Virtual Machine Construction
- In Dynamic Languages Symposium (DSL ’06
, 2006
"... interpreters, run-time environments; F.3.2 [Logics ..."
Abstract
-
Cited by 27 (0 self)
- Add to MetaCart
interpreters, run-time environments; F.3.2 [Logics
Modular and Constraint-based Information Flow Inference for an Object-oriented Language
- In Proc. of the Eleventh International Static Analysis Symposium (SAS
, 2004
"... This paper addresses the problem of checking programs written in an object-oriented language to ensure that they satisfy the information flow policies, confidentiality and integrity. Policy is specified using security types. An algorithm that infers such security types in a modular manner is pre ..."
Abstract
-
Cited by 23 (9 self)
- Add to MetaCart
This paper addresses the problem of checking programs written in an object-oriented language to ensure that they satisfy the information flow policies, confidentiality and integrity. Policy is specified using security types. An algorithm that infers such security types in a modular manner is presented. The specification of the algorithm involves inference for libraries. Library classes and methods maybe parameterized by security levels. It is shown how modular inference is achieved in the presence of method inheritance and override. Soundness and completeness theorems for the inference algorithm are given.
Efficiently Refactoring Java Applications to Use Generic Libraries
- In ECOOP
, 2005
"... Abstract. Java 1.5 generics enable the creation of reusable container classes with compiler-enforced type-safe usage. This eliminates the need for potentially unsafe down-casts when retrieving elements from containers. We present a refactoring that replaces raw references to generic library classes ..."
Abstract
-
Cited by 19 (4 self)
- Add to MetaCart
Abstract. Java 1.5 generics enable the creation of reusable container classes with compiler-enforced type-safe usage. This eliminates the need for potentially unsafe down-casts when retrieving elements from containers. We present a refactoring that replaces raw references to generic library classes with parameterized references. The refactoring infers actual type parameters for allocation sites and declarations using an existing framework of type constraints, and removes casts that have been rendered redundant. The refactoring was implemented in Eclipse, a popular open-source development environment for Java, and laid the grounds for a similar refactoring in the forthcoming Eclipse 3.1 release. We evaluated our work by refactoring several Java programs that use the standard collections framework to use Java 1.5’s generic version instead. In these benchmarks, on average, 48.6 % of the casts are removed, and 91.2 % of the compiler warnings related to the use of raw types are eliminated. Our approach distinguishes itself from the state-of-the-art [8] by being more scalable, by its ability to accommodate user-defined subtypes of generic library classes, and by being incorporated in a popular integrated development environment. 1
Demand-Driven Type Inference with Subgoal Pruning: Trading Precision for Scalability
, 2004
"... After two decades of effort, type inference for dynamically typed languages scales to programs of a few tens of thousands of lines of code, but no further. For larger programs, this paper proposes using a kind of demand-driven analysis where the number of active goals is carefully restricted. To ach ..."
Abstract
-
Cited by 13 (2 self)
- Add to MetaCart
After two decades of effort, type inference for dynamically typed languages scales to programs of a few tens of thousands of lines of code, but no further. For larger programs, this paper proposes using a kind of demand-driven analysis where the number of active goals is carefully restricted. To achieve this restriction, the algorithm occasionally prunes goals by giving them solutions that are trivially true and thus require no further subgoals to be solved; the previous subgoals of a newly pruned goal may often be discarded from consideration, reducing the total number of active goals. A specific algorithm DDP is described which uses this approach. An experiment on DDP shows that it infers precise types for roughly 30 % to 45 % of the variables in a program with hundreds of thousands of lines; the percentage varies with the choice of pruning threshold, a parameter of the algorithm. The time required varies from an average of one-tenth of one second per variable to an unknown maximum, again depending on the pruning threshold. These data suggest that 50 and 2000 are both good choices of pruning threshold, depending on whether speed or precision is more important.
Pedigree Types
- In IWACO
, 2008
"... Pedigree Types are an intuitive ownership type system requiring minimal programmer annotations. Reusing the vocabulary of human genealogy, Pedigree Types programmers can qualify any object reference with a pedigree – a child, sibling, parent, grandparent, etc – to indicate what relationship the obje ..."
Abstract
-
Cited by 7 (1 self)
- Add to MetaCart
Pedigree Types are an intuitive ownership type system requiring minimal programmer annotations. Reusing the vocabulary of human genealogy, Pedigree Types programmers can qualify any object reference with a pedigree – a child, sibling, parent, grandparent, etc – to indicate what relationship the object being referred to has with the referant on the standard ownership tree, following the owners-as-dominators convention. Such a qualifier serves as a heap shape constraint that must hold at run time and is enforced statically. Pedigree child captures the intention of encapsulation, i.e. ownership: the modified object reference is ensured not to escape the boundary of its parent. Among existing ownership type systems, Pedigree Types are closest to Universe Types. The former can be viewed as extending the latter with a more general form of pedigree modifiers, so that the relationship between any pair of objects on the aforementioned ownership tree can be named and – more importantly – inferred. We use a constraint-based type system which is proved sound via subject reduction. Other technical originalities include a polymorphic treatment of pedigrees not explicitly specified by programmers, and use of linear diophantine equations in type constraints to enforce the hierarchy. 1.

