Skalpel: A constraint-based type error slicer for Standard ML
Autor: | John Pirie, Vincent Rahli, Fairouz Kamareddine, Joseph Brian Wells |
---|---|
Rok vydání: | 2017 |
Předmět: |
Computer science [C05] [Engineering
computing & technology] Algebra and Number Theory Type inference 020207 software engineering 02 engineering and technology Standard ML Sciences informatiques [C05] [Ingénierie informatique & technologie] computer.software_genre Constraint (information theory) Computational Mathematics Tree (data structure) 0202 electrical engineering electronic engineering information engineering 020201 artificial intelligence & image processing Compiler Round-off error computer Algorithm Constraint satisfaction problem computer.programming_language Generator (mathematics) Mathematics |
Zdroj: | Journal of Symbolic Computation. (2016). |
ISSN: | 0747-7171 |
DOI: | 10.1016/j.jsc.2016.07.013 |
Popis: | Compilers for languages with type inference algorithms often produce confusing type error messages and give a single error location which is sometimes far away from the real location of the error. Attempts at solving this problem often (1) fail to include the multiple program points which make up the type error; (2) report tree fragments which do not correspond to any place in the user program; and (3) give incorrect type information/diagnosis which can be highly confusing. We present Skalpel, a type error slicing tool which solves these problems by giving the programmer all and only the information involved with a type error to significantly aid in diagnosis and repair of type errors. Skalpel relies on a simple and general constraint system, a sophisticated constraint generator which is linear in program size, and a constraint solver which is terminating. Skalpel’s constraint system can elegantly and efficiently handle intricate features such as SML’s open. We also show that the Skalpel tool is general enough to deal not only with one source code file and one single error, but highlights all and only the possible locations of the error(s) in all affected files and produces all the culprit multiple program slices. |
Databáze: | OpenAIRE |
Externí odkaz: |