Type-checking multi-parameter type classes

被引:0
|
作者
Duggan, Dominic [1 ]
Ophel, John [2 ]
机构
[1] Department of Computer Science, Stevens Institute of Technology, Castle Point on the Hudson, Hoboken, NJ 07030, United States
[2] Department of Computer Science and Computer Engineering, La Trobe University, Bundoora, Vic. 3083, Australia
关键词
Algorithms - Problem solving - Recursive functions - Vectors;
D O I
10.1017/s0956796801004233
中图分类号
学科分类号
摘要
Type classes are a novel combination of parametric polymorphism and constrained types. Although most implementations restrict type classes to be single-parameter, the generalization to multi-parameter type classes has gained increasing attention. A problem with multiparameter type classes is the increased possibilities they introduce for ambiguity in inferred types, impacting their usefulness in many practical situations. A new type-checking strategy, domain-driven unifying resolution, is identified as an approach to solve these problems. Domaindriven unifying resolution is simple, efficient, and practically useful. However, even with severe restrictions on instance definitions, it is not possible to guarantee that type-checking with unifying resolution terminates. This is in contrast with the naive generalization of single parameter resolution strategies. Domain-driven unifying resolution is guaranteed to terminate if the type class constraints are satisfiable; however satisfiability is undecidable even with severe restrictions on instance definitions. These results shed some light on ambiguity problems with multi-parameter type classes.
引用
收藏
页码:133 / 158
相关论文
共 50 条
  • [21] JDeodorant: Identification and removal of type-checking bad smells
    Tsantalis, Nikolaos
    Chaikalis, Theodoros
    Chatzigeorgiou, Alexander
    CSMR 2008: 12TH EUROPEAN CONFERENCE ON SOFTWARE MAINTENANCE AND REENGINEERING: DEVELOPING EVOLVABLE SYSTEMS, 2008, : 329 - 331
  • [22] Lintent: Towards Security Type-Checking of Android Applications
    Bugliesi, Michele
    Calzavara, Stefano
    Spano, Alvise
    FORMAL TECHNIQUES FOR DISTRIBUTED SYSTEMS, FMOODS/FORTE 2013, 2013, 7892 : 289 - 304
  • [23] A Modular Type-Checking Algorithm for Type Theory with Singleton Types and Proof Irrelevance
    Abel, Andreas
    Coquand, Thierry
    Pagano, Miguel
    TYPED LAMBDA CALCULI AND APPLICATIONS, PROCEEDINGS, 2009, 5608 : 5 - +
  • [24] MULTI-PARAMETER CHECKING OF THE QUALITATIVE FEATURES OF PAPER
    VAKULYUK, YA
    KONOVAL, VA
    MEASUREMENT TECHNIQUES USSR, 1982, 25 (02): : 182 - 184
  • [25] A MODULAR TYPE-CHECKING ALGORITHM FOR TYPE THEORY WITH SINGLETON TYPES AND PROOF IRRELEVANCE
    Abel, Andreas
    Coquand, Thierry
    Pagano, Miguel
    LOGICAL METHODS IN COMPUTER SCIENCE, 2011, 7 (02)
  • [26] A multi-parameter hybrid Barankin-type bound
    Reuven, I
    Messer, H
    1996 IEEE INTERNATIONAL CONFERENCE ON ACOUSTICS, SPEECH, AND SIGNAL PROCESSING, CONFERENCE PROCEEDINGS, VOLS 1-6, 1996, : 2483 - 2486
  • [27] TYPE-CHECKING LIVENESS FOR COLLABORATIVE PROCESSES WITH BOUNDED AND UNBOUNDED RECURSION
    Debois, Soren
    Hildebrandt, Thomas
    Slaats, Tijs
    Yoshida, Nobuko
    LOGICAL METHODS IN COMPUTER SCIENCE, 2016, 12 (01)
  • [28] Efficient Type-Checking for Amortised Heap-Space Analysis
    Hofmann, Martin
    Rodriguez, Dulma
    COMPUTER SCIENCE LOGIC, PROCEEDINGS, 2009, 5771 : 317 - 331
  • [29] DATA TYPES AS VALUES: POLYMORPHISM, TYPE-CHECKING, ENCAPSULATION.
    Demers, Alan
    Donahue, James
    Skinner, Glenn
    1978, : 23 - 30
  • [30] Decidability of type-checking in the calculus of algebraic constructions with size annotations
    Blanqui, F
    COMPUTER SCIENCE LOGIC, PROCEEDINGS, 2005, 3634 : 135 - 150