• Documents
  • Authors
  • Tables
  • Other Seers ▼
    RefSeer AckSeer CollabSeer SeerSeer
  • Log in
  • Sign up
  • MetaCart

CiteSeerX logo

Advanced Search Include Citations
Advanced Search Include Citations | Disambiguate

Demand-Driven Type Inference with Subgoal Pruning: Trading Precision for Scalability (2004)

by S. Alexander Spoon, Olin Shivers
Add To MetaCart

Tools

Sorted by:
Results 1 - 9 of 9

Static Type Inference for Ruby

by Michael Furr, et al. - SAC'09 , 2009
"... Many general-purpose, object-oriented scripting languages are dynamically typed, which provides flexibility but leaves the programmer without the benefits of static typing, including early error detection and the documentation provided by type annotations. This paper describes Diamondback Ruby (DRub ..."
Abstract - Cited by 22 (5 self) - Add to MetaCart
Many general-purpose, object-oriented scripting languages are dynamically typed, which provides flexibility but leaves the programmer without the benefits of static typing, including early error detection and the documentation provided by type annotations. This paper describes Diamondback Ruby (DRuby), a tool that blends Ruby’s dynamic type system with a static typing discipline. DRuby provides a type language that is rich enough to precisely type Ruby code we have encountered, without unneeded complexity. When possible, DRuby infers static types to discover type errors in Ruby programs. When necessary, the programmer can provide DRuby with annotations that assign static types to dynamic code. These annotations are checked at run time, isolating type errors to unverified code. We applied DRuby to a suite of benchmarks and found several bugs that would cause run-time type errors. DRuby also reported a number of warnings that reveal questionable programming practices in the benchmarks. We believe that DRuby takes a major step toward bringing the benefits of combined static and dynamic typing to Ruby and other object-oriented languages.

A Pattern Language for Extensible Program Representation

by Daniel Vainsencher, Andrew P. Black , 2007
"... For the last 15 years, implementors of multiple view programming environments have sought a single code model that would form a suitable basis for all of the program analyses and tools that might be applied to the code. They have been unsuccessful. The consequences are a tendency to build monolithic ..."
Abstract - Cited by 5 (0 self) - Add to MetaCart
For the last 15 years, implementors of multiple view programming environments have sought a single code model that would form a suitable basis for all of the program analyses and tools that might be applied to the code. They have been unsuccessful. The consequences are a tendency to build monolithic, single-purpose tools, each of which implements its own specialized analyses and optimized representation. This restricts the availability of the analyses, and also limits the reusability of the representation by other tools. Unintegrated tools also produce inconsistent views, which reduce the value of multiple views. This paper describes an architecture that allows a single, minimal representation of program code to be extended as required to support new tools and program analyses, while still maintaining a simple and uniform interface to program properties. We present architectural patterns that address efficiency, correctness and the integration of multiple analyses and tools in a modular fashion.

Practical, pluggable types for a dynamic language

by Niklaus Haldiman, Marcus Denker, Oscar Nierstrasz , 2009
"... ..."
Abstract - Cited by 3 (0 self) - Add to MetaCart
Abstract not found

Practical, pluggable types

by Niklaus Haldiman, Marcus Denker, Oscar Nierstrasz - IN: PROCEEDINGS OF THE 2007 INTERNATIONAL CONFERENCE ON DYNAMIC LANGUAGES (ICDL 2007). ACM DIGITAL LIBRARY; 2007. P. 183–204 URL: 〈HTTP://WWW.IAM.UNIBE.CH/∼SCG/ARCHIVE/PAPERS/HALD07B-TYPEPLUG.PDF , 2007
"... Most languages fall into one of two camps: either they adopt a unique, static type system, or they abandon static type-checks for runtime checks. Pluggable types blur this division by (i) making static type systems optional, and (ii) supporting a choice of type systems for reasoning about different ..."
Abstract - Cited by 2 (2 self) - Add to MetaCart
Most languages fall into one of two camps: either they adopt a unique, static type system, or they abandon static type-checks for runtime checks. Pluggable types blur this division by (i) making static type systems optional, and (ii) supporting a choice of type systems for reasoning about different kinds of static properties. Dynamic languages can then benefit from static-checking without sacrificing dynamic features or committing to a unique, static type system. But the overhead of adopting pluggable types can be very high, especially if all existing code must be decorated with type annotations before any type-checking can be performed. We propose a practical and pragmatic approach to introduce pluggable type systems to dynamic languages. First of all, only annotated code is type-checked. Second, limited type inference is performed on unannotated code to reduce the number of reported errors. Finally, external annotations can be used to type third-party code. We present TypePlug, a Smalltalk implementation of our framework, and report on experience applying the framework to three different pluggable type systems.

Scaling Abstraction Refinement via Pruning

by Percy Liang, Mayur Naik
"... Many static analyses do not scale as they are made more precise. For example, increasing the amount of context sensitivity in a k-limited pointer analysis causes the number of contexts to grow exponentially with k. Iterative refinement techniques can mitigate this growth by starting with a coarse ab ..."
Abstract - Cited by 1 (1 self) - Add to MetaCart
Many static analyses do not scale as they are made more precise. For example, increasing the amount of context sensitivity in a k-limited pointer analysis causes the number of contexts to grow exponentially with k. Iterative refinement techniques can mitigate this growth by starting with a coarse abstraction and only refining parts of the abstraction that are deemed relevant with respect to a given client. In this paper, we introduce a new technique called pruning that uses client feedback in a different way. The basic idea is to use coarse abstractions to prune away parts of the program analysis deemed irrelevant for proving a client query, and then using finer abstractions on the sliced program analysis. For a k-limited pointer analysis, this approach amounts to adaptively refining and pruning a set of prefix patterns representing the contexts relevant for the client. By pruning, we are able to scale up to much more expensive abstractions than before. We also prove that the pruned analysis is both sound and complete, that is, it yields the same results as an analysis that uses a more expensive abstraction directly without pruning.

Efficient Local Type Inference 3rd Year Project Report

by Benjamin Bellamy, Magdalen College, Trinity Term
"... I con~idel ' the problem of local type inference, where the types of local variable ~ are inferred within a method with otherwise complete static type information. This is an important problem for tooh,; which manipulate languages, Buch as Java bytecode, where local type information does not exbt. A ..."
Abstract - Add to MetaCart
I con~idel ' the problem of local type inference, where the types of local variable ~ are inferred within a method with otherwise complete static type information. This is an important problem for tooh,; which manipulate languages, Buch as Java bytecode, where local type information does not exbt. Another application of local type inference would enable the design of programming languages where the types of local variables need not be declared by the programmer. Even whell pl'ogramml::'rdeclared types for a local variable are available. it is possible that these may not be as tight as possible. Some allalyses on programs,.such as generation of a call g'raph, give more useful re:-;ults when local variables are t,vped as tightly as possible. Finally local type inference can be seen as a sUb-problem in global t.vpe infereuce for object-oriented language~. where not even method signatures are available I construct a new algorithm, built upward from a definition of optim<L1 typing validity. I begin by examining the Java bytecode verifier, which is perhaps the 'most executed ' example of local type inference algorithm. I consider how Ow bytecode verifier solves a similar problem to local type inference, but is in some aspects quite different. I use some of the.se ideas iu the development of my algorithm. I derive a 'core ' algorithm for local type inference in a language that obeys certain requirements, and prove this correct. Then I go on to consider how the algorithm can be generalized further, relaxing certain rE'quirE'mE'nts on the target language. This yields a final algorithm, general enough for local type inferf'nGe that is a specific target language: Jimple, which is 'somewhere between ' Java bytecode and Java source. Through extensive experiments on over 295K Jimple methods, generated by a range of different compiler~. I show that my algorithm is typically around 4 to 5 times faster than algorithms currently ill use. I show that although my algorithm has exponential worst-case complexity, it exhibits linear complexity in common cases. Other <Llgorithms offer better worst-ca,,;e complexity but are usually slower in practice.

Languages, Verification

by unknown authors
"... Many general-purpose, object-oriented scripting languages are dynamically typed, which provides flexibility but leaves the programmer without the benefits of static typing, including early error detection and the documentation provided by type annotations. This paper describes Diamondback Ruby (DRub ..."
Abstract - Add to MetaCart
Many general-purpose, object-oriented scripting languages are dynamically typed, which provides flexibility but leaves the programmer without the benefits of static typing, including early error detection and the documentation provided by type annotations. This paper describes Diamondback Ruby (DRuby), a tool that blends Ruby’s dynamic type system with a static typing discipline. DRuby provides a type language that is rich enough to precisely type Ruby code we have encountered, without unneeded complexity. When possible, DRuby infers static types to discover type errors in Ruby programs. When necessary, the programmer can provide DRuby with annotations that assign static types to dynamic code. These annotations are checked at run time, isolating type errors to unverified code. We applied DRuby to a suite of benchmarks and found several bugs that would cause run-time type errors. DRuby also reported a number of warnings that reveal questionable programming practices in the benchmarks. We believe that DRuby takes a major step toward bringing the benefits of combined static and dynamic typing to Ruby and other object-oriented languages.

Languages, Verification

by unknown authors
"... Many general-purpose, object-oriented scripting languages are dynamically typed, which provides flexibility but leaves the programmer without the benefits of static typing, including early error detection and the documentation provided by type annotations. This paper describes Diamondback Ruby (DRub ..."
Abstract - Add to MetaCart
Many general-purpose, object-oriented scripting languages are dynamically typed, which provides flexibility but leaves the programmer without the benefits of static typing, including early error detection and the documentation provided by type annotations. This paper describes Diamondback Ruby (DRuby), a tool that blends Ruby’s dynamic type system with a static typing discipline. DRuby provides a type language that is rich enough to precisely type Ruby code we have encountered, without unneeded complexity. When possible, DRuby infers static types to discover type errors in Ruby programs. When necessary, the programmer can provide DRuby with annotations that assign static types to dynamic code. These annotations are checked at run time, isolating type errors to unverified code. We applied DRuby to a suite of benchmarks and found several bugs that would cause run-time type errors. DRuby also reported a number of warnings that reveal questionable programming practices in the benchmarks. We believe that DRuby takes a major step toward bringing the benefits of combined static and dynamic typing to Ruby and other object-oriented languages.

Software Composition Group

by Niklaus Haldiman, Marcus Denker, Oscar Nierstrasz
"... ..."
Abstract - Add to MetaCart
Abstract not found
The National Science Foundation
  • About CiteSeerX
  • Submit Documents
  • Privacy Policy
  • Help
  • Data
  • Source
  • Contact Us

Developed at and hosted by The College of Information Sciences and Technology

© 2007-2010 The Pennsylvania State University