Skip to main content

Blame Prediction

  • Conference paper
Trends in Functional Programming (TFP 2013)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 8322))

Included in the following conference series:

  • 493 Accesses

Abstract

Static type systems are usually conservative. Therefore, many interesting programs are rejected by the static type system, even though they may execute without errors. Dynamic type systems allow such ill-typed programs to run, at the cost of run-time errors. The cause of runtime errors is often far removed from the place where the type errors are raised, making the program hard to debug. We present a novel typing discipline called blame prediction which transforms programs in order to detect runtime type errors as soon as they are guaranteed to happen. These type errors relate the future type error with its cause, aiding in debugging. As a proof of concept, we have applied blame prediction to a functional Scheme-like language and evaluated our system against soft typing.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 49.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Cartwright, R., Fagan, M.: Soft typing. In: Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation, pp. 278–292 (1991)

    Google Scholar 

  2. Aiken, A., Wimmers, E.L., Lakshman, T.K.: Soft typing with conditional types. In: Proceedings of the 21st ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pp. 163–173 (1994)

    Google Scholar 

  3. Flanagan, C., Felleisen, M.: A new way of debugging lisp programs. 40th Anniversary of Lisp (Lisp in the Mainstream) (1998)

    Google Scholar 

  4. Guha, A., Saftoiu, C., Krishnamurthi, S.: Typing Local Control and State Using Flow Analysis. In: Proceedings of the 20th European Symposium on Programming, pp. 256–275 (2011)

    Google Scholar 

  5. Furr, M., An, J., Foster, J., Hicks, M.: Static type inference for Ruby. In: Proceedings of the ACM Symposium on Applied Computing, pp. 1859–1866 (2009)

    Google Scholar 

  6. Felleisen, M., Hieb, R.: The revised report on the syntactic theories of sequential control and state. Theoretical Computer Science 103(2), 235–271 (1992)

    Article  MathSciNet  MATH  Google Scholar 

  7. Sabry, A., Felleisen, M.: Reasoning about programs in continuation-passing style. LISP and Symbolic Computation 6(3-4), 289–360 (1993)

    Article  Google Scholar 

  8. Flanagan, C., Sabry, A., Duba, B.F., Felleisen, M.: The essence of compiling with continuations. In: Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation, pp. 237–247 (1993)

    Google Scholar 

  9. Wright, A.K., Cartwright, R.: A practical soft type system for Scheme. In: Proceedings of the ACM Conference on LISP and Functional Programming, pp. 250–262 (July 1994)

    Google Scholar 

  10. Gabriel, R.P., Masinter, L.M.: Performance of Lisp systems. In: Proceedings of the ACM Symposium on LISP and Functional Programming, pp. 123–142 (1982)

    Google Scholar 

  11. Siek, J.G., Taha, W.: Gradual typing for functional languages. In: Proceedings of the Workshop on Scheme and Functional Programming, pp. 81–92 (2006)

    Google Scholar 

  12. Tobin-Hochstadt, S., Felleisen, M.: Interlanguage migration: from scripts to programs. In: Proceedings of the 21st ACM International Conference on Object Oriented Programming Systems Languages and Applications, pp. 964–974 (2006)

    Google Scholar 

  13. Findler, R.B., Felleisen, M.: Contracts for higher-order functions. In: Proceedings of the 7th International Conference on Functional Programming, pp. 48–59 (2002)

    Google Scholar 

  14. Peyton Jones, S., Vytiniotis, D., Magalhães, J.P.: Equality proofs and deferred type errors: A compiler pearl. In: Proceedings of the 17th International Conference on Functional Programming, pp. 341–352 (2012)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2014 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Harnie, D., Scholliers, C., De Meuter, W. (2014). Blame Prediction. In: McCarthy, J. (eds) Trends in Functional Programming. TFP 2013. Lecture Notes in Computer Science, vol 8322. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-45340-3_6

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-45340-3_6

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-45339-7

  • Online ISBN: 978-3-642-45340-3

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics