PLDI '91 Proceedings of the ACM SIGPLAN 1991 conference on Programming language design and implementation
Soft typing with conditional types
POPL '94 Proceedings of the 21st ACM SIGPLAN-SIGACT symposium on Principles of programming languages
Dynamic typing: syntax and proof theory
ESOP'92 Selected papers of the symposium on Fourth European symposium on programming
A practical soft type system for scheme
ACM Transactions on Programming Languages and Systems (TOPLAS)
A framework for type inference with subtyping
ICFP '98 Proceedings of the third ACM SIGPLAN international conference on Functional programming
ECOOP '93 Proceedings of the 7th European Conference on Object-Oriented Programming
Conference record of the 33rd ACM SIGPLAN-SIGACT symposium on Principles of programming languages
RPython: a step towards reconciling dynamically and statically typed OO languages
Proceedings of the 2007 symposium on Dynamic languages
The design and implementation of typed scheme
Proceedings of the 35th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languages
Essential actionscript 3.0
Gradual typing with unification-based inference
DLS '08 Proceedings of the 2008 symposium on Dynamic languages
ECOOP '07 Proceedings of the 21st European conference on ECOOP 2007: Object-Oriented Programming
Well-Typed Programs Can't Be Blamed
ESOP '09 Proceedings of the 18th European Symposium on Programming Languages and Systems: Held as Part of the Joint European Conferences on Theory and Practice of Software, ETAPS 2009
Trace-based just-in-time type specialization for dynamic languages
Proceedings of the 2009 ACM SIGPLAN conference on Programming language design and implementation
Profile-guided static typing for dynamic scripting languages
Proceedings of the 24th ACM SIGPLAN conference on Object oriented programming systems languages and applications
Threesomes, with and without blame
Proceedings of the 37th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languages
Integrating typed and untyped code in a scripting language
Proceedings of the 37th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languages
Dynamic inference of static types for ruby
Proceedings of the 38th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languages
The impact of optional type information on jit compilation of dynamically typed languages
Proceedings of the 7th symposium on Dynamic languages
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
Fast and precise hybrid type inference for JavaScript
Proceedings of the 33rd ACM SIGPLAN conference on Programming Language Design and Implementation
Cast insertion strategies for gradually-typed objects
Proceedings of the 9th symposium on Dynamic languages
Tackling the efficiency problem of gradual typing
Proceedings of the 2013 companion publication for conference on Systems, programming, & applications: software for humanity
Hi-index | 0.00 |
Gradual typing lets programmers evolve their dynamically typed programs by gradually adding explicit type annotations, which confer benefits like improved performance and fewer run-time failures. However, we argue that such evolution often requires a giant leap, and that type inference can offer a crucial missing step. If omitted type annotations are interpreted as unknown types, rather than the dynamic type, then static types can often be inferred, thereby removing unnecessary assumptions of the dynamic type. The remaining assumptions of the dynamic type may then be removed by either reasoning outside the static type system, or restructuring the code. We present a type inference algorithm that can improve the performance of existing gradually typed programs without introducing any new run-time failures. To account for dynamic typing, types that flow in to an unknown type are treated in a fundamentally different manner than types that flow out. Furthermore, in the interests of backward-compatibility, an escape analysis is conducted to decide which types are safe to infer. We have implemented our algorithm for ActionScript, and evaluated it on the SunSpider and V8 benchmark suites. We demonstrate that our algorithm can improve the performance of unannotated programs as well as recover most of the type annotations in annotated programs.