Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.5555/1987211.1987225guideproceedingsArticle/Chapter ViewAbstractPublication PagesConference Proceedingsacm-pubtype
Article

Typing local control and state using flow analysis

Published: 26 March 2011 Publication History

Abstract

Programs written in scripting languages employ idioms that confound conventional type systems. In this paper, we highlight one important set of related idioms: the use of local control and state to reason informally about types. To address these idioms, we formalize run-time tags and their relationship to types, and use these to present a novel strategy to integrate typing with flow analysis in a modular way. We demonstrate that in our separation of typing and flow analysis, each component remains conventional, their composition is simple, but the result can handle these idioms better than either one alone.

References

[1]
Anderson, C., Giannini, P., Drossopoulou, S.: Towards type inference for javaScript. In: Gao, X.-X. (ed.) ECOOP 2005. LNCS, vol. 3586, pp. 428-452. Springer, Heidelberg (2005)
[2]
Crary, K., Weirich, S., Morrisett, G.: Intentional polymorphism in type-erasure semantics. In: ACM SIGPLAN International Conference on Functional Programming (1998)
[3]
Flanagan, C., Felleisen, M.: Componential set-based analysis. In: ACM SIGPLAN Conference on Programming Language Design and Implementation (1997)
[4]
Flanagan, C., Flatt, M., Krishnamurthi, S., Weirich, S., Felleisen, M.: Catching bugs in the web of program invariants. In: ACM SIGPLAN Conference on Programming Language Design and Implementation (1996)
[5]
Furr, M., An, J.D., Foster, J.S., Hicks, M.: Static type inference for Ruby. In: ACM Symposium on Applied Computing (2009)
[6]
Google JavaScript style guide, http://google-styleguide.googlecode.com/svn/trunk/javascriptguide.xml
[7]
Gosling, J., Joy, B., Steele, J.G.L., Bracha, G.: The Java Language Specification, 3rd edn. Addison Wesley, Reading (2005)
[8]
Guha, A., Saftoiu, C., Krishnamurthi, S.: The essence of javaScript. In: D'Hondt, T. (ed.) ECOOP 2010. LNCS, vol. 6183, pp. 126-150. Springer, Heidelberg (2010)
[9]
Harper, R., Mitchell, J.C.: On the type structure of Standard ML. ACM Transactions on Programming Languages and Systems 15(2) (1993)
[10]
Heidegger, P., Thiemann, P.: Recency types for dynamically-typed, object-based languages: Strong updates for JavaScript. In: ACM SIGPLAN International Workshop on Foundations of Object-Oriented Languages (2009)
[11]
Heintze, N.: Control-flow analysis and type systems. In: International Static Analysis Symposium (1995)
[12]
Henglein, F., Rehof, J.: Safe polymorphic type inference for a dynamically typed language: Translating Scheme to ML. In: ACM SIGPLAN International Conference on Functional Programming (1995)
[13]
Jensen, S.H., Moller, A., Thiemann, P.: Type analysis for JavaScript. In: International Static Analysis Symposium (2009)
[14]
Jensen, S.H., Moller, A., Thiemann, P.: Interprocedural analysis with lazy propagation. In: International Static Analysis Symposium (2010)
[15]
Kildall, G.A.: A unified approach to global program optimization. In: ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (1973)
[16]
Meunier, P., Findler, R.B., Felleisen, M.: Modular set-based analysis from contracts. In: ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (2006)
[17]
Mikhajlov, L., Sekerinski, E.: A study of the fragile base class problem. In: European Conference on Object-Oriented Programming (1998)
[18]
Nielson, F., Nielson, H.R.: Type and effect systems. In: Olderog, E.-R., Steffen, B. (eds.) Correct System Design. LNCS, vol. 1710, p. 114. Springer, Heidelberg (1999)
[19]
Palsberg, J., O'Keefe, P.: A type system equivalent to flow analysis. In: ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (1995)
[20]
Pierce, B.C.: Types and Programming Languages. MIT Press, Cambridge (2002)
[21]
Sabry, A., Felleisen, M.: Reasoning about programs in continuation-passing style. LISP and Symbolic Computation 6(3) (1993)
[22]
Shivers, O.: Control-Flow Analysis of Higher-Order Languages. PhD thesis, Carnegie Mellon University (1991)
[23]
Tobin-Hochstadt, S., Felleisen, M.: The design and implementation of Typed Scheme. In: ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (2008)
[24]
Tobin-Hochstadt, S., Felleisen, M.: Logical types for untyped languages. In: ACM SIGPLAN International Conference on Functional Programming (2010)
[25]
Wright, A.K., Cartwright, R.: A practical soft type system for Scheme. ACM Transactions on Programming Languages and Systems 19(1) (1997)

Cited By

View all
  • (2019)Optimizing and evaluating transient gradual typingProceedings of the 15th ACM SIGPLAN International Symposium on Dynamic Languages10.1145/3359619.3359742(28-41)Online publication date: 20-Oct-2019
  • (2018)ConflictJSProceedings of the 40th International Conference on Software Engineering10.1145/3180155.3180184(741-751)Online publication date: 27-May-2018
  • (2017)Refining types using type guards in TypeScriptProceedings of the 2017 ACM SIGPLAN Workshop on Partial Evaluation and Program Manipulation10.1145/3018882.3018887(111-122)Online publication date: 2-Jan-2017
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image Guide Proceedings
ESOP'11/ETAPS'11: Proceedings of the 20th European conference on Programming languages and systems: part of the joint European conferences on theory and practice of software
March 2011
500 pages
ISBN:9783642197178
  • Editor:
  • Gilles Barthe

Publisher

Springer-Verlag

Berlin, Heidelberg

Publication History

Published: 26 March 2011

Qualifiers

  • Article

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)0
  • Downloads (Last 6 weeks)0
Reflects downloads up to 20 Jan 2025

Other Metrics

Citations

Cited By

View all
  • (2019)Optimizing and evaluating transient gradual typingProceedings of the 15th ACM SIGPLAN International Symposium on Dynamic Languages10.1145/3359619.3359742(28-41)Online publication date: 20-Oct-2019
  • (2018)ConflictJSProceedings of the 40th International Conference on Software Engineering10.1145/3180155.3180184(741-751)Online publication date: 27-May-2018
  • (2017)Refining types using type guards in TypeScriptProceedings of the 2017 ACM SIGPLAN Workshop on Partial Evaluation and Program Manipulation10.1145/3018882.3018887(111-122)Online publication date: 2-Jan-2017
  • (2017)To type or not to typeProceedings of the 39th International Conference on Software Engineering10.1109/ICSE.2017.75(758-769)Online publication date: 20-May-2017
  • (2016)First-class effect reflection for effect-guided programmingACM SIGPLAN Notices10.1145/3022671.298403751:10(820-837)Online publication date: 19-Oct-2016
  • (2016)First-class effect reflection for effect-guided programmingProceedings of the 2016 ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications10.1145/2983990.2984037(820-837)Online publication date: 19-Oct-2016
  • (2016)Static DOM event dependency analysis for testing web applicationsProceedings of the 2016 24th ACM SIGSOFT International Symposium on Foundations of Software Engineering10.1145/2950290.2950292(447-459)Online publication date: 1-Nov-2016
  • (2016)Analyzing test completeness for dynamic languagesProceedings of the 25th International Symposium on Software Testing and Analysis10.1145/2931037.2931059(142-153)Online publication date: 18-Jul-2016
  • (2015)TypeDevilProceedings of the 37th International Conference on Software Engineering - Volume 110.5555/2818754.2818795(314-324)Online publication date: 16-May-2015
  • (2015)A formalization of typed luaACM SIGPLAN Notices10.1145/2936313.281670951:2(13-25)Online publication date: 21-Oct-2015
  • Show More Cited By

View Options

View options

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media