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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
Notes
- 1.
It is actually a tree of principal monomorphic typings; let-bound potentially polymorphic variables do not appear in the type environment [2].
References
Chen, S., Erwig, M.: Counter-factual typing for debugging type errors. In: POPL 2014, pp. 583–594 (2014)
Chitil, O.: Compositional explanation of types and algorithmic debugging of type errors. In: ICFP 2001, pp. 193–204 (2001)
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
Heeren, B., Hage, J., Swierstra, S.: Constraint based type inferencing in Helium. In: Immediate Applications of Constraint Programming (ACP), pp. 57–78 (2003)
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)
Lee, O., Yi, K.: Proofs about a folklore let-polymorphic type inference algorithm. ACM Trans. Program. Lang. Syst. 20, 707–723 (1998)
Neubauer, M., Thiemann, P.: Discriminative sum types locate the source of type errors. In: ICFP 2003, pp. 15–26 (2003)
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
Shapiro, E.Y.: Algorithmic Program Debugging. MIT Press, Cambridge (1983)
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)
Tsushima, K., Asai, K.: Report on an OCaml type debugger. In: ML Workshop, 3 pages (2011)
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
Rahli, V., Wells, J., Pirie, J., Kamareddine, F.: Skalpel. J. Symb. Comput. 80(P1), 164–208 (2017)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2018 Springer International Publishing AG, part of Springer Nature
About this paper
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)