POPL '90 Proceedings of the 17th ACM SIGPLAN-SIGACT symposium on Principles of programming languages
A practical soft type system for scheme
ACM Transactions on Programming Languages and Systems (TOPLAS)
Programming Ruby: the pragmatic programmer's guide
Programming Ruby: the pragmatic programmer's guide
Invariant inference for static checking:
Proceedings of the 10th ACM SIGSOFT symposium on Foundations of software engineering
ECOOP '93 Proceedings of the 7th European Conference on Object-Oriented Programming
Dynamic Type Inference to Support Object-Oriented Reenginerring in Smalltalk
ECOOP '98 Workshop ion on Object-Oriented Technology
Dynamic inference of polymorphic lock types
Science of Computer Programming - Special issue: Concurrency and synchronization in Java programs
Perracotta: mining temporal API rules from imperfect traces
Proceedings of the 28th international conference on Software engineering
Dynamic inference of abstract types
Proceedings of the 2006 international symposium on Software testing and analysis
RPython: a step towards reconciling dynamically and statically typed OO languages
Proceedings of the 2007 symposium on Dynamic languages
Combined static and dynamic mutability analysis
Proceedings of the twenty-second IEEE/ACM international conference on Automated software engineering
The Daikon system for dynamic detection of likely invariants
Science of Computer Programming
The design and implementation of typed scheme
Proceedings of the 35th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languages
DySy: dynamic symbolic execution for invariant inference
Proceedings of the 30th international conference on Software engineering
Static type inference for Ruby
Proceedings of the 2009 ACM symposium on Applied Computing
Profile-guided static typing for dynamic scripting languages
Proceedings of the 24th ACM SIGPLAN conference on Object oriented programming systems languages and applications
The ruby intermediate language
DLS '09 Proceedings of the 5th symposium on Dynamic languages
Mixing type checking and symbolic execution
PLDI '10 Proceedings of the 2010 ACM SIGPLAN conference on Programming language design and implementation
Towards a type system for analyzing javascript programs
ESOP'05 Proceedings of the 14th European conference on Programming Languages and Systems
Towards type inference for javascript
ECOOP'05 Proceedings of the 19th European conference on Object-Oriented Programming
Nested refinements: a logic for duck typing
POPL '12 Proceedings of the 39th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languages
The ins and outs of gradual type inference
POPL '12 Proceedings of the 39th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languages
Correlation tracking for points-to analysis of javascript
ECOOP'12 Proceedings of the 26th European conference on Object-Oriented Programming
Static single information form for abstract compilation
TCS'12 Proceedings of the 7th IFIP TC 1/WG 202 international conference on Theoretical Computer Science
Proceedings of the 28th Annual ACM Symposium on Applied Computing
Type refinement for static analysis of JavaScript
Proceedings of the 9th symposium on Dynamic languages
Efficient dynamic access analysis using JavaScript proxies
Proceedings of the 9th symposium on Dynamic languages
Hi-index | 0.00 |
There have been several efforts to bring static type inference to object-oriented dynamic languages such as Ruby, Python, and Perl. In our experience, however, such type inference systems are extremely difficult to develop, because dynamic languages are typically complex, poorly specified, and include features, such as eval and reflection, that are hard to analyze. In this paper, we introduce constraint-based dynamic type inference, a technique that infers static types based on dynamic program executions. In our approach, we wrap each run-time value to associate it with a type variable, and the wrapper generates constraints on this type variable when the wrapped value is used. This technique avoids many of the often overly conservative approximations of static tools, as constraints are generated based on how values are used during actual program runs. Using wrappers is also easy to implement, since we need only write a constraint resolution algorithm and a transformation to introduce the wrappers. The best part is that we can eat our cake, too: our algorithm will infer sound types as long as it observes every path through each method body---note that the number of such paths may be dramatically smaller than the number of paths through the program as a whole. We have developed Rubydust, an implementation of our algorithm for Ruby. Rubydust takes advantage of Ruby's dynamic features to implement wrappers as a language library. We applied Rubydust to a number of small programs and found it to be both easy to use and useful: Rubydust discovered 1 real type error, and all other inferred types were correct and readable.