Ambiguity and constrained polymorphism.
| Main Author: | |
|---|---|
| Publication Date: | 2016 |
| Other Authors: | , |
| Format: | Article |
| Language: | eng |
| Source: | Repositório Institucional da UFOP |
| dARK ID: | ark:/61566/0013000001wtp |
| Download full: | http://www.repositorio.ufop.br/handle/123456789/9269 https://doi.org/10.1016/j.scico.2016.03.007 |
Summary: | This paper considers the problem of ambiguity in Haskell-like languages. Overloading resolution is characterized in the context of constrained polymorphism by the presence of unreachable variables in constraints on the type of the expression. A new definition of ambiguity is presented, where existence of more than one instance for the constraints on an expression type is considered only after overloading resolution. This introduces a clear distinction between ambiguity and overloading resolution, makes ambiguity more intuitive and independent from extra concepts, such as functional dependencies, and enables more programs to type-check as fewer ambiguities arise. The paper presents a type system and a type inference algorithm that includes: a constraint-set satisfiability function, that determines whether a given set of constraints is entailed or not in a given context, focusing on issues related to decidability, a constraint-set improvement function, for filtering out constraints for which overloading has been resolved, and a context-reduction function, for reducing constraint sets according to matching instances. A standard dictionary-style semantics for core Haskell is also presented. |
| id |
UFOP_382c7b596942f98a1c9bcc06912d2764 |
|---|---|
| oai_identifier_str |
oai:repositorio.ufop.br:123456789/9269 |
| network_acronym_str |
UFOP |
| network_name_str |
Repositório Institucional da UFOP |
| repository_id_str |
3233 |
| spelling |
Ambiguity and constrained polymorphism.AmbiguityContext-dependent overloadingHaskellThis paper considers the problem of ambiguity in Haskell-like languages. Overloading resolution is characterized in the context of constrained polymorphism by the presence of unreachable variables in constraints on the type of the expression. A new definition of ambiguity is presented, where existence of more than one instance for the constraints on an expression type is considered only after overloading resolution. This introduces a clear distinction between ambiguity and overloading resolution, makes ambiguity more intuitive and independent from extra concepts, such as functional dependencies, and enables more programs to type-check as fewer ambiguities arise. The paper presents a type system and a type inference algorithm that includes: a constraint-set satisfiability function, that determines whether a given set of constraints is entailed or not in a given context, focusing on issues related to decidability, a constraint-set improvement function, for filtering out constraints for which overloading has been resolved, and a context-reduction function, for reducing constraint sets according to matching instances. A standard dictionary-style semantics for core Haskell is also presented.2018-01-18T13:38:50Z2018-01-18T13:38:50Z2016info:eu-repo/semantics/publishedVersioninfo:eu-repo/semantics/articleapplication/pdfFIGUEIREDO, C. C. de; FIGUEIREDO, L. C. de; RIBEIRO, R. G. Ambiguity and constrained polymorphism. Science of Computer Programming, v. 124, p.1-19, 2016. Disponível em: <http://www.sciencedirect.com/science/article/pii/S0167642316000836>. Acesso em: 02 out. 2017.0167-6423http://www.repositorio.ufop.br/handle/123456789/9269https://doi.org/10.1016/j.scico.2016.03.007ark:/61566/0013000001wtpO periódico Science of Computer Programming concede permissão para depósito deste artigo no Repositório Institucional da UFOP. Número da licença: 4230720311201.info:eu-repo/semantics/openAccessFigueiredo, Carlos Camarão deFigueiredo, Lucília Camarão deRibeiro, Rodrigo Geraldoengreponame:Repositório Institucional da UFOPinstname:Universidade Federal de Ouro Preto (UFOP)instacron:UFOP2024-11-10T14:24:39Zoai:repositorio.ufop.br:123456789/9269Repositório InstitucionalPUBhttp://www.repositorio.ufop.br/oai/requestrepositorio@ufop.edu.bropendoar:32332024-11-10T14:24:39Repositório Institucional da UFOP - Universidade Federal de Ouro Preto (UFOP)false |
| dc.title.none.fl_str_mv |
Ambiguity and constrained polymorphism. |
| title |
Ambiguity and constrained polymorphism. |
| spellingShingle |
Ambiguity and constrained polymorphism. Figueiredo, Carlos Camarão de Ambiguity Context-dependent overloading Haskell |
| title_short |
Ambiguity and constrained polymorphism. |
| title_full |
Ambiguity and constrained polymorphism. |
| title_fullStr |
Ambiguity and constrained polymorphism. |
| title_full_unstemmed |
Ambiguity and constrained polymorphism. |
| title_sort |
Ambiguity and constrained polymorphism. |
| author |
Figueiredo, Carlos Camarão de |
| author_facet |
Figueiredo, Carlos Camarão de Figueiredo, Lucília Camarão de Ribeiro, Rodrigo Geraldo |
| author_role |
author |
| author2 |
Figueiredo, Lucília Camarão de Ribeiro, Rodrigo Geraldo |
| author2_role |
author author |
| dc.contributor.author.fl_str_mv |
Figueiredo, Carlos Camarão de Figueiredo, Lucília Camarão de Ribeiro, Rodrigo Geraldo |
| dc.subject.por.fl_str_mv |
Ambiguity Context-dependent overloading Haskell |
| topic |
Ambiguity Context-dependent overloading Haskell |
| description |
This paper considers the problem of ambiguity in Haskell-like languages. Overloading resolution is characterized in the context of constrained polymorphism by the presence of unreachable variables in constraints on the type of the expression. A new definition of ambiguity is presented, where existence of more than one instance for the constraints on an expression type is considered only after overloading resolution. This introduces a clear distinction between ambiguity and overloading resolution, makes ambiguity more intuitive and independent from extra concepts, such as functional dependencies, and enables more programs to type-check as fewer ambiguities arise. The paper presents a type system and a type inference algorithm that includes: a constraint-set satisfiability function, that determines whether a given set of constraints is entailed or not in a given context, focusing on issues related to decidability, a constraint-set improvement function, for filtering out constraints for which overloading has been resolved, and a context-reduction function, for reducing constraint sets according to matching instances. A standard dictionary-style semantics for core Haskell is also presented. |
| publishDate |
2016 |
| dc.date.none.fl_str_mv |
2016 2018-01-18T13:38:50Z 2018-01-18T13:38:50Z |
| dc.type.status.fl_str_mv |
info:eu-repo/semantics/publishedVersion |
| dc.type.driver.fl_str_mv |
info:eu-repo/semantics/article |
| format |
article |
| status_str |
publishedVersion |
| dc.identifier.uri.fl_str_mv |
FIGUEIREDO, C. C. de; FIGUEIREDO, L. C. de; RIBEIRO, R. G. Ambiguity and constrained polymorphism. Science of Computer Programming, v. 124, p.1-19, 2016. Disponível em: <http://www.sciencedirect.com/science/article/pii/S0167642316000836>. Acesso em: 02 out. 2017. 0167-6423 http://www.repositorio.ufop.br/handle/123456789/9269 https://doi.org/10.1016/j.scico.2016.03.007 |
| dc.identifier.dark.fl_str_mv |
ark:/61566/0013000001wtp |
| identifier_str_mv |
FIGUEIREDO, C. C. de; FIGUEIREDO, L. C. de; RIBEIRO, R. G. Ambiguity and constrained polymorphism. Science of Computer Programming, v. 124, p.1-19, 2016. Disponível em: <http://www.sciencedirect.com/science/article/pii/S0167642316000836>. Acesso em: 02 out. 2017. 0167-6423 ark:/61566/0013000001wtp |
| url |
http://www.repositorio.ufop.br/handle/123456789/9269 https://doi.org/10.1016/j.scico.2016.03.007 |
| dc.language.iso.fl_str_mv |
eng |
| language |
eng |
| dc.rights.driver.fl_str_mv |
info:eu-repo/semantics/openAccess |
| eu_rights_str_mv |
openAccess |
| dc.format.none.fl_str_mv |
application/pdf |
| dc.source.none.fl_str_mv |
reponame:Repositório Institucional da UFOP instname:Universidade Federal de Ouro Preto (UFOP) instacron:UFOP |
| instname_str |
Universidade Federal de Ouro Preto (UFOP) |
| instacron_str |
UFOP |
| institution |
UFOP |
| reponame_str |
Repositório Institucional da UFOP |
| collection |
Repositório Institucional da UFOP |
| repository.name.fl_str_mv |
Repositório Institucional da UFOP - Universidade Federal de Ouro Preto (UFOP) |
| repository.mail.fl_str_mv |
repositorio@ufop.edu.br |
| _version_ |
1846632384985825280 |