Hostname: page-component-77f85d65b8-g4pgd Total loading time: 0 Render date: 2026-03-28T08:26:51.807Z Has data issue: false hasContentIssue false

Understanding functional dependencies via constraint handling rules

Published online by Cambridge University Press:  01 January 2007

MARTIN SULZMANN
Affiliation:
School of Computing, National University of Singapore, S16 Level 5, 3 Science Drive 2, Singapore 117543 (e-mail: sulzmann@comp.nus.edu.sg)
GREGORY J. DUCK
Affiliation:
NICTA Victoria Laboratory, Department of Computer Science and Software Engineering, University of Melbourne, 3010 Vic, Australia (e-mail: gjd@cs.mu.oz.au)
SIMON PEYTON-JONES
Affiliation:
Microsoft Research Ltd, 7 JJ Thomson Avenue, Cambridge CB3 0FB, UK (e-mail: simonpj@microsoft.com)
PETER J. STUCKEY
Affiliation:
NICTA Victoria Laboratory, Department of Computer Science and Software Engineering, University of Melbourne, Vic 3010, Australia (e-mail: pjs@cs.mu.oz.au)
Rights & Permissions [Opens in a new window]

Abstract

Core share and HTML view are not available for this content. However, as you have access to this content, a full PDF is available via the 'Save PDF' action button.

Functional dependencies are a popular and useful extension to Haskell style type classes. We give a reformulation of functional dependencies in terms of Constraint Handling Rules (CHRs). In previous work, CHRs have been employed for describing user-programmable type extensions in the context of Haskell style type classes. Here, we make use of CHRs to provide for the first time a concise result that under some sufficient conditions, functional dependencies allow for sound, complete and decidable type inference. The sufficient conditions imposed on functional dependencies can be very limiting. We show how to safely relax these conditions and suggest several sound extensions of functional dependencies. Our results allow for a better understanding of functional dependencies and open up the opportunity for new applications.

Information

Type
Article
Copyright
Copyright © Cambridge University Press 2006
Submit a response

Discussions

No Discussions have been published for this article.