Skip to main content

A Common Framework Using Expected Types for Several Type Debugging Approaches

  • Conference paper
  • First Online:
Functional and Logic Programming (FLOPS 2018)

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

Included in the following conference series:

Abstract

Many different approaches to type error debugging were developed independently. In this paper, we describe a new common framework for several type error debugging approaches. For this purpose, we introduce expected types from the outer context and propose a method for obtaining them. Using expected types, we develop three type error debugging approaches: enumeration of type error messages, type error slicing and (improved) interactive type error debugging. Based on our idea we implemented prototypes and confirm that the framework works well for type debugging.

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 EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.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

Similar content being viewed by others

Notes

  1. 1.

    It is actually a tree of principal monomorphic typings; let-bound potentially polymorphic variables do not appear in the type environment [2].

References

  1. Chen, S., Erwig, M.: Counter-factual typing for debugging type errors. In: POPL 2014, pp. 583–594 (2014)

    Google Scholar 

  2. Chitil, O.: Compositional explanation of types and algorithmic debugging of type errors. In: ICFP 2001, pp. 193–204 (2001)

    Google Scholar 

  3. Haack, C., Wells, J.B.: Type error slicing in implicitly typed higher-order languages. Sci. Comput. Program. 50(1–3), 189–224 (2004). Special issue ESOP 2003

    Article  MathSciNet  Google Scholar 

  4. Heeren, B., Hage, J., Swierstra, S.: Constraint based type inferencing in Helium. In: Immediate Applications of Constraint Programming (ACP), pp. 57–78 (2003)

    Google Scholar 

  5. Ishii, Y., Asai, K.: Report on a user test and extension of a type debugger for novice programmers. In: Post Conference Proceedings of International Workshop on Trends in Functional Programming in Education, pp. 1–18 (2014)

    Article  Google Scholar 

  6. Lee, O., Yi, K.: Proofs about a folklore let-polymorphic type inference algorithm. ACM Trans. Program. Lang. Syst. 20, 707–723 (1998)

    Article  Google Scholar 

  7. Neubauer, M., Thiemann, P.: Discriminative sum types locate the source of type errors. In: ICFP 2003, pp. 15–26 (2003)

    Google Scholar 

  8. Schilling, T.: Constraint-free type error slicing. In: Peña, R., Page, R. (eds.) TFP 2011. LNCS, vol. 7193, pp. 1–16. Springer, Heidelberg (2012). https://doi.org/10.1007/978-3-642-32037-8_1

    Chapter  Google Scholar 

  9. Shapiro, E.Y.: Algorithmic Program Debugging. MIT Press, Cambridge (1983)

    MATH  Google Scholar 

  10. Stuckey, P.J., Sulzmann, M., Wazny, J.: Interactive type debugging in Haskell. In: Proceedings of the 2003 ACM SIGPLAN Workshop on Haskell (Haskell 2003), pp. 72–83 (2003)

    Google Scholar 

  11. Tsushima, K., Asai, K.: Report on an OCaml type debugger. In: ML Workshop, 3 pages (2011)

    Google Scholar 

  12. Tsushima, K., Asai, K.: An embedded type debugger. In: Hinze, R. (ed.) IFL 2012. LNCS, vol. 8241, pp. 190–206. Springer, Heidelberg (2013). https://doi.org/10.1007/978-3-642-41582-1_12

    Chapter  Google Scholar 

  13. Rahli, V., Wells, J., Pirie, J., Kamareddine, F.: Skalpel. J. Symb. Comput. 80(P1), 164–208 (2017)

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Kanae Tsushima .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2018 Springer International Publishing AG, part of Springer Nature

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Tsushima, K., Chitil, O. (2018). A Common Framework Using Expected Types for Several Type Debugging Approaches. In: Gallagher, J., Sulzmann, M. (eds) Functional and Logic Programming. FLOPS 2018. Lecture Notes in Computer Science(), vol 10818. Springer, Cham. https://doi.org/10.1007/978-3-319-90686-7_15

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-90686-7_15

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-90685-0

  • Online ISBN: 978-3-319-90686-7

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics