Terminating constraint set satisfiability and simplification algorithms for context-dependent overloading.
Nenhuma Miniatura disponível
Data
2013
Título da Revista
ISSN da Revista
Título de Volume
Editor
Resumo
Algorithms for constraint set satisfiability and
simplification of Haskell type class constraints are used during
type inference in order to allow the inference of more
accurate types and to detect ambiguity. Unfortunately, both
constraint set satisfiability and simplification are in general
undecidable, and the use of these algorithms may cause nontermination
of type inference. This paper presents algorithms
for these problems that terminate on any given input, based on
the use of a criterion that is tested on each recursive step. The
use of this criterion eliminates the need of imposing syntactic
conditions on Haskell type class and instance declarations in
order to guarantee termination of type inference in the presence
of multi-parameter type classes, and allows program
compilation without the need of compiler flags for lifting
such restrictions. Undecidability of the problems implies the
existence of instances for which the algorithm incorrectly
reports unsatisfiability, but we are not aware of any practical
example where this occurs.
Descrição
Palavras-chave
Haskell, Constraint set simplification, Termination
Citação
RIBEIRO, R. G.; FIGUEIREDO, C. C. de; FIGUEIREDO, L. C. de. Terminating constraint set satisfiability and simplification algorithms for context-dependent overloading. Journal of the Brazilian Computer Society, v. 19, n. 4, p. 423-432, nov. 2013. Disponível em: <https://link.springer.com/article/10.1007/s13173-013-0107-9>. Acesso em: 20 jan. 2017.