Matthias Neubauer | Albert-Ludwigs-University of Freiburg (original) (raw)

Papers by Matthias Neubauer

Research paper thumbnail of Multi-Tier Programming

Research paper thumbnail of Placement Inference for a Client-Server Calculus

Lecture Notes in Computer Science

ABSTRACT Placement inference assigns locations to operations in a distributed program under the c... more ABSTRACT Placement inference assigns locations to operations in a distributed program under the constraints that some operations can only execute on particular locations and that values may not be transferred arbitrarily between locations. An optimal choice of locations additionally minimizes the run time of the program, given that operations take different time on different locations and that a cost is associated to transferring a value from one location to another. We define a language with a time- and location-aware semantics, formalize placement inference in terms of constraints, and show that solving these constraints is an NP-complete problem. We then show that optimal placements are computable via a reformulation of the semantics in terms of matrices and an application of the max-plus spectral theory. A prototype implementation validates our results.

Research paper thumbnail of Placement Inference for a Client-Server Calculus

Lecture Notes in Computer Science

ABSTRACT Placement inference assigns locations to operations in a distributed program under the c... more ABSTRACT Placement inference assigns locations to operations in a distributed program under the constraints that some operations can only execute on particular locations and that values may not be transferred arbitrarily between locations. An optimal choice of locations additionally minimizes the run time of the program, given that operations take different time on different locations and that a cost is associated to transferring a value from one location to another. We define a language with a time- and location-aware semantics, formalize placement inference in terms of constraints, and show that solving these constraints is an NP-complete problem. We then show that optimal placements are computable via a reformulation of the semantics in terms of matrices and an application of the max-plus spectral theory. A prototype implementation validates our results.

Research paper thumbnail of An Implementation of Session Types

Practical Aspects of Declarative Languages, 2004

Research paper thumbnail of Macros for context-free grammars

Proceedings of the 10th international ACM SIGPLAN conference on Principles and practice of declarative programming, 2008

Current parser generators are based on context-free grammars. Because such grammars lack abstract... more Current parser generators are based on context-free grammars. Because such grammars lack abstraction facilities, the resulting specications are often not easy to read. Fischer's macro grammars provide the equivalent of procedural abstraction by extending context-free grammars with macrolike productions. Unfortunately, macro grammars generate context-sensitive languages, in general, so they do not have ecient parsers. To enable the specication of a language using a macro grammar, we dene specialization for macro grammars. This specialization always yields context-free rules, but it does not always terminate. We present a sound and complete static analysis that decides whether specialization terminates for a given macro grammar and thus yields a (nite) context-free grammar. The analysis is based on an intuitive notion of self-embedding nonterminals, which is easy to check by hand and which gives the expected answer for all examples that we tried.

Research paper thumbnail of From sequential programs to multi-tier applications by program transformation

ACM SIGPLAN Notices, 2005

Modern applications are designed in multiple tiers to separate concerns. Since each tier may run ... more Modern applications are designed in multiple tiers to separate concerns. Since each tier may run at a separate location, middleware is required to mediate access between tiers. However, introducing this middleware is tiresome and error-prone.We propose a multi-tier calculus and a splitting transformation to address this problem. The multi-tier calculus serves as a sequential core programming language for constructing a multi-tier application. The application can be developed in the sequential setting. Splitting extracts one process per tier from the sequential program such that their concurrent execution behaves like the original program.The splitting transformation starts from an assignment of primitive operations to tiers. A program analysis determines communication requirements and inserts remote procedure calls. The next transformation step performs resource pooling: it optimizes the communication behavior by transforming sequences of remote procedure calls to a stream-based pro...

Research paper thumbnail of Discriminative sum types locate the source of type errors

ACM SIGPLAN Notices, 2003

We propose a type system for locating the source of type errors in an applied lambda calculus wit... more We propose a type system for locating the source of type errors in an applied lambda calculus with ML-style polymorphism. The system is based on discriminative sum types---known from work on soft typing---with annotation subtyping and recursive types. This way, type clashes can be registered in the type for later reporting. The annotations track the potential producers and consumers for each value so that clashes can be traced to their cause.Every term is typeable in our system and type inference is decidable. A type derivation in our system describes all type errors present in the program, so that a principal derivation yields a principal description of all type errors present. Error messages are derived from completed type derivations. Thus, error messages are independent of the particular algorithm used for type inference, provided it constructs such a derivation.

Research paper thumbnail of Protocol Specialization

Lecture Notes in Computer Science, 2004

In component-based programming, the programmer assembles applications from prefabricated componen... more In component-based programming, the programmer assembles applications from prefabricated components. The assembly process has two main steps: adapting a component by tweaking its configuration parameters, and connecting components by gluing output interfaces to input interfaces. While convenient, this approach may give rise to code bloat and inefficiency because prefabricated code is overly general, by necessity. The present work addresses ways to remove unnecessary code during the deployment of a closed set of components by using program specialization. Our framework models components at the intermediate language level as systems of concurrent functional processes which communicate via channels. Each channel acts as a component connector with the interface determined by the channel's protocol. We present an analysis that determines the minimum protocol required for each process and specify the specialization of a process with respect to a desired protocol, thereby removing unnecessary code. The resulting specialization algorithm is unique in that it processes a concurrent base language, terminates always, and is guaranteed not to expand the program beyond its original size.

Research paper thumbnail of Type classes with more higher-order polymorphism

ACM SIGPLAN Notices, 2002

We propose an extension of Haskell's type class system with lambda abstractions in the type l... more We propose an extension of Haskell's type class system with lambda abstractions in the type language. Type inference for our extension relies on a novel constrained unification procedure called guided higher-order unification. This unification procedure is more general than Haskell's kind-preserving unification but less powerful than full higher-order unification.The main technical result is the soundness and completeness of the unification rules for the fragment of lambda calculus that we admit on the type level.

Research paper thumbnail of Down with Emacs Lisp: Dynamic Scope Analysis

It is possible to translate code written in Emacs Lisp or another Lisp dialect which uses dynamic... more It is possible to translate code written in Emacs Lisp or another Lisp dialect which uses dynamic scoping to a more modern programming language with lexical scoping while largely preserving structure and readability of the code. The biggest obstacle to such an idiomatic translation from Emacs Lisp is the translation of dynamic binding into suitable instances of lexical binding: Many binding constructs in real programs in fact exhibit identical behavior under both dynamic and lexical binding. An idiomatic translation needs to detect as many of these binding constructs as possible and convert them into lexical binding constructs in the target language to achieve readability and e#ciency of the target code.

Research paper thumbnail of Abstract LDTA’04 Preliminary Version Parameterized LR Parsing

Common LR parser generators lack abstraction facilities for defining recurring patterns of produc... more Common LR parser generators lack abstraction facilities for defining recurring patterns of productions. Although there are generators capable of supporting regular expressions on the right hand side of productions, no generator supports user defined patterns in grammars. Parameterized LR parsing extends standard LR parsing technology by admitting grammars with parameterized non-terminal symbols. A generator can implement such a grammar in two ways, either by expansion or directly. We develop the theory required for the direct implementation and show that it leads to significantly smaller parse tables and that it has fewer parsing conflicts than the expanded grammar. Attribute evaluation for a parameterized non-terminal is possible in the same way as before, if the semantic functions related to the non-terminal are polymorphic with respect to the parameter. We have implemented parameterized LR parsing in the context of Essence, a partial-evaluation based LR parser generator for Schem...

Research paper thumbnail of A Functional Notation For Functional Dependencies

Functional dependencies help resolve many of the ambiguities that result from the use of multi-pa... more Functional dependencies help resolve many of the ambiguities that result from the use of multi-parameter type classes. They e#ectively enable writing programs at the type-level which significantly enhances the expressive power of Haskell's type system. Among the applications of this technique are the emulation of dependent types, and precise typechecking for XML and HTML combinator libraries. Unfortunately, the notation presently used for functional dependencies implies that the type-level programs are logic programs, but many of its applications are conceptually functional programs. We propose an alternative notation for functional dependencies which adds a functional-programming notation to Haskell's type classes and makes applications of functional dependencies significantly more readable. We apply the new notation to our examples and study the problems arising due to Haskell's open world assumption and overlapping instances.

Research paper thumbnail of Demonstration Abstract: Haskell Type Browser

Despite 25 years of experience with ML-style typing and numerous implementations of type inferenc... more Despite 25 years of experience with ML-style typing and numerous implementations of type inference algorithms for this kind of type system, programmers are still struggling with error messages reported when the inference algorithm fails. Virtually every Haskell programmer can tell stories about type errors where it took hours to identify the actual problem with the program. While initiated functional programmers may accept this as a fact of life, it makes life especially hard for beginners, in fact, too hard for some.

Research paper thumbnail of Session Types for Asynchronous Communication

A session type is an abstraction of a sequence of heterogeneous values sent over one communicatio... more A session type is an abstraction of a sequence of heterogeneous values sent over one communication channel. Session types can be used for specifying stream-based Internet protocols. We consider session types in a setting with asynchronous communication over buffered channels. Due to buffering, a process may write ahead before the reading process picks up the data. Thus the types of the two ends of a channel may differ. We formalize the potential difference in types due to buffering, show that the ensuing relation on types is decidable, and prove the type soundness of the resulting type system with respect to a low-level operational semantics that models buffered communication channels accurately.

Research paper thumbnail of Chapter 1 Reactive Objects for Haskell

Reactive objects are a convenient abstraction for writing programs which have to interact with a ... more Reactive objects are a convenient abstraction for writing programs which have to interact with a concurrent environment. A reactive object has two characteristics: the abandonment of all blocking operations and the unification of the concepts state and process. The former allows a reactive object to accept input from multiple sources without imposing any ordering on the input events. The latter prevents race conditions because the state of an object is only manipulated from the process belonging to the object. Only a few programming languages exist that make the concept of reactive objects available to programmers. Unfortunately, all those systems seem to be either not actively maintained anymore or not really matured yet. In this paper we demonstrate how reactive objects can be incorporated into the existing general purpose programming language Haskell by making use of common extensions to Haskell. Our implementation is heavily inspired by the O’Haskell programming language. While ...

Research paper thumbnail of A functional notation for functional dependencies

2001 ACM SIGPLAN, 2001

Functional dependencies help resolve many of the ambiguities that result from the use of multi-pa... more Functional dependencies help resolve many of the ambiguities that result from the use of multi-parameter type classes. They effectively enable writing programs at the type-level which significantly enhances the expressive power of Haskell's type system. Among the applications of this technique are the emulation of dependent types, and precise typechecking for XML and HTML combinator libraries. Unfortunately, the notation presently used for functional dependencies implies that the type-level programs are logic programs, but many of its applications are conceptually functional programs. We propose an alternative notation for functional dependencies which adds a functional-programming notation to Haskell's type classes and makes applications of functional dependencies significantly more readable. We apply the new notation to our examples and study the problems arising due to Haskell's open world assumption and overlapping instances.

Research paper thumbnail of Session Types for Asynchronous Communication Matthias Neubauer and Peter Thiemann

A session type is an abstraction of a sequence of heterogeneous values sent over one communicatio... more A session type is an abstraction of a sequence of heterogeneous values sent over one communication channel. Session types can be used for specifying stream-based Internet protocols. We consider session types in a setting with asynchronous communication over buffered channels. Due to buffering, a process may write ahead before the reading process picks up the data. Thus the types of the two ends of a channel may differ. We formalize the potential difference in types due to buffering, show that the ensuing relation on types is decidable, and prove the type soundness of the resulting type system with respect to a low-level operational semantics that models buffered communication channels accurately.

Research paper thumbnail of Haskell type browser

Proceedings of the 2004 Acm Sigplan Workshop on Haskell, Sep 22, 2004

... Matthias Neubauer Universit ät Freiburg neubauer@informatik.uni-freiburg.de Peter Thiemann Un... more ... Matthias Neubauer Universit ät Freiburg neubauer@informatik.uni-freiburg.de Peter Thiemann Universit ät Freiburg thiemann@informatik.uni-freiburg.de Categories and Subject Descriptors ... 2003. ACM Press, New York. [6] M. Odersky, M. Sulzmann, and M. Wehr. ...

Research paper thumbnail of Dynamic scope analysis for emacs lisp

Research paper thumbnail of Functional Logic Overloading

Functional logic overloading is a novel approach to user-defined overloading that extends Haskell... more Functional logic overloading is a novel approach to user-defined overloading that extends Haskell's concept of type classes in significant ways. Whereas type classes are conceptually predicates on types in standard Haskell, they are type functions in our approach. Thus, we can base type inference on the evaluation of functional logic programs. Functional logic programming provides a solid theoretical foundation for type functions and, at the same time, allows for programmable overloading resolution strategies by choosing different evaluation strategies for functional logic programs. Type inference with type functions is an instance of type inference with constrained types, where the underlying constraint system is defined by a functional logic program. We have designed a variant of Haskell which supports our approach to overloading, and implemented a prototype front-end for the language.

Research paper thumbnail of Multi-Tier Programming

Research paper thumbnail of Placement Inference for a Client-Server Calculus

Lecture Notes in Computer Science

ABSTRACT Placement inference assigns locations to operations in a distributed program under the c... more ABSTRACT Placement inference assigns locations to operations in a distributed program under the constraints that some operations can only execute on particular locations and that values may not be transferred arbitrarily between locations. An optimal choice of locations additionally minimizes the run time of the program, given that operations take different time on different locations and that a cost is associated to transferring a value from one location to another. We define a language with a time- and location-aware semantics, formalize placement inference in terms of constraints, and show that solving these constraints is an NP-complete problem. We then show that optimal placements are computable via a reformulation of the semantics in terms of matrices and an application of the max-plus spectral theory. A prototype implementation validates our results.

Research paper thumbnail of Placement Inference for a Client-Server Calculus

Lecture Notes in Computer Science

ABSTRACT Placement inference assigns locations to operations in a distributed program under the c... more ABSTRACT Placement inference assigns locations to operations in a distributed program under the constraints that some operations can only execute on particular locations and that values may not be transferred arbitrarily between locations. An optimal choice of locations additionally minimizes the run time of the program, given that operations take different time on different locations and that a cost is associated to transferring a value from one location to another. We define a language with a time- and location-aware semantics, formalize placement inference in terms of constraints, and show that solving these constraints is an NP-complete problem. We then show that optimal placements are computable via a reformulation of the semantics in terms of matrices and an application of the max-plus spectral theory. A prototype implementation validates our results.

Research paper thumbnail of An Implementation of Session Types

Practical Aspects of Declarative Languages, 2004

Research paper thumbnail of Macros for context-free grammars

Proceedings of the 10th international ACM SIGPLAN conference on Principles and practice of declarative programming, 2008

Current parser generators are based on context-free grammars. Because such grammars lack abstract... more Current parser generators are based on context-free grammars. Because such grammars lack abstraction facilities, the resulting specications are often not easy to read. Fischer's macro grammars provide the equivalent of procedural abstraction by extending context-free grammars with macrolike productions. Unfortunately, macro grammars generate context-sensitive languages, in general, so they do not have ecient parsers. To enable the specication of a language using a macro grammar, we dene specialization for macro grammars. This specialization always yields context-free rules, but it does not always terminate. We present a sound and complete static analysis that decides whether specialization terminates for a given macro grammar and thus yields a (nite) context-free grammar. The analysis is based on an intuitive notion of self-embedding nonterminals, which is easy to check by hand and which gives the expected answer for all examples that we tried.

Research paper thumbnail of From sequential programs to multi-tier applications by program transformation

ACM SIGPLAN Notices, 2005

Modern applications are designed in multiple tiers to separate concerns. Since each tier may run ... more Modern applications are designed in multiple tiers to separate concerns. Since each tier may run at a separate location, middleware is required to mediate access between tiers. However, introducing this middleware is tiresome and error-prone.We propose a multi-tier calculus and a splitting transformation to address this problem. The multi-tier calculus serves as a sequential core programming language for constructing a multi-tier application. The application can be developed in the sequential setting. Splitting extracts one process per tier from the sequential program such that their concurrent execution behaves like the original program.The splitting transformation starts from an assignment of primitive operations to tiers. A program analysis determines communication requirements and inserts remote procedure calls. The next transformation step performs resource pooling: it optimizes the communication behavior by transforming sequences of remote procedure calls to a stream-based pro...

Research paper thumbnail of Discriminative sum types locate the source of type errors

ACM SIGPLAN Notices, 2003

We propose a type system for locating the source of type errors in an applied lambda calculus wit... more We propose a type system for locating the source of type errors in an applied lambda calculus with ML-style polymorphism. The system is based on discriminative sum types---known from work on soft typing---with annotation subtyping and recursive types. This way, type clashes can be registered in the type for later reporting. The annotations track the potential producers and consumers for each value so that clashes can be traced to their cause.Every term is typeable in our system and type inference is decidable. A type derivation in our system describes all type errors present in the program, so that a principal derivation yields a principal description of all type errors present. Error messages are derived from completed type derivations. Thus, error messages are independent of the particular algorithm used for type inference, provided it constructs such a derivation.

Research paper thumbnail of Protocol Specialization

Lecture Notes in Computer Science, 2004

In component-based programming, the programmer assembles applications from prefabricated componen... more In component-based programming, the programmer assembles applications from prefabricated components. The assembly process has two main steps: adapting a component by tweaking its configuration parameters, and connecting components by gluing output interfaces to input interfaces. While convenient, this approach may give rise to code bloat and inefficiency because prefabricated code is overly general, by necessity. The present work addresses ways to remove unnecessary code during the deployment of a closed set of components by using program specialization. Our framework models components at the intermediate language level as systems of concurrent functional processes which communicate via channels. Each channel acts as a component connector with the interface determined by the channel's protocol. We present an analysis that determines the minimum protocol required for each process and specify the specialization of a process with respect to a desired protocol, thereby removing unnecessary code. The resulting specialization algorithm is unique in that it processes a concurrent base language, terminates always, and is guaranteed not to expand the program beyond its original size.

Research paper thumbnail of Type classes with more higher-order polymorphism

ACM SIGPLAN Notices, 2002

We propose an extension of Haskell's type class system with lambda abstractions in the type l... more We propose an extension of Haskell's type class system with lambda abstractions in the type language. Type inference for our extension relies on a novel constrained unification procedure called guided higher-order unification. This unification procedure is more general than Haskell's kind-preserving unification but less powerful than full higher-order unification.The main technical result is the soundness and completeness of the unification rules for the fragment of lambda calculus that we admit on the type level.

Research paper thumbnail of Down with Emacs Lisp: Dynamic Scope Analysis

It is possible to translate code written in Emacs Lisp or another Lisp dialect which uses dynamic... more It is possible to translate code written in Emacs Lisp or another Lisp dialect which uses dynamic scoping to a more modern programming language with lexical scoping while largely preserving structure and readability of the code. The biggest obstacle to such an idiomatic translation from Emacs Lisp is the translation of dynamic binding into suitable instances of lexical binding: Many binding constructs in real programs in fact exhibit identical behavior under both dynamic and lexical binding. An idiomatic translation needs to detect as many of these binding constructs as possible and convert them into lexical binding constructs in the target language to achieve readability and e#ciency of the target code.

Research paper thumbnail of Abstract LDTA’04 Preliminary Version Parameterized LR Parsing

Common LR parser generators lack abstraction facilities for defining recurring patterns of produc... more Common LR parser generators lack abstraction facilities for defining recurring patterns of productions. Although there are generators capable of supporting regular expressions on the right hand side of productions, no generator supports user defined patterns in grammars. Parameterized LR parsing extends standard LR parsing technology by admitting grammars with parameterized non-terminal symbols. A generator can implement such a grammar in two ways, either by expansion or directly. We develop the theory required for the direct implementation and show that it leads to significantly smaller parse tables and that it has fewer parsing conflicts than the expanded grammar. Attribute evaluation for a parameterized non-terminal is possible in the same way as before, if the semantic functions related to the non-terminal are polymorphic with respect to the parameter. We have implemented parameterized LR parsing in the context of Essence, a partial-evaluation based LR parser generator for Schem...

Research paper thumbnail of A Functional Notation For Functional Dependencies

Functional dependencies help resolve many of the ambiguities that result from the use of multi-pa... more Functional dependencies help resolve many of the ambiguities that result from the use of multi-parameter type classes. They e#ectively enable writing programs at the type-level which significantly enhances the expressive power of Haskell's type system. Among the applications of this technique are the emulation of dependent types, and precise typechecking for XML and HTML combinator libraries. Unfortunately, the notation presently used for functional dependencies implies that the type-level programs are logic programs, but many of its applications are conceptually functional programs. We propose an alternative notation for functional dependencies which adds a functional-programming notation to Haskell's type classes and makes applications of functional dependencies significantly more readable. We apply the new notation to our examples and study the problems arising due to Haskell's open world assumption and overlapping instances.

Research paper thumbnail of Demonstration Abstract: Haskell Type Browser

Despite 25 years of experience with ML-style typing and numerous implementations of type inferenc... more Despite 25 years of experience with ML-style typing and numerous implementations of type inference algorithms for this kind of type system, programmers are still struggling with error messages reported when the inference algorithm fails. Virtually every Haskell programmer can tell stories about type errors where it took hours to identify the actual problem with the program. While initiated functional programmers may accept this as a fact of life, it makes life especially hard for beginners, in fact, too hard for some.

Research paper thumbnail of Session Types for Asynchronous Communication

A session type is an abstraction of a sequence of heterogeneous values sent over one communicatio... more A session type is an abstraction of a sequence of heterogeneous values sent over one communication channel. Session types can be used for specifying stream-based Internet protocols. We consider session types in a setting with asynchronous communication over buffered channels. Due to buffering, a process may write ahead before the reading process picks up the data. Thus the types of the two ends of a channel may differ. We formalize the potential difference in types due to buffering, show that the ensuing relation on types is decidable, and prove the type soundness of the resulting type system with respect to a low-level operational semantics that models buffered communication channels accurately.

Research paper thumbnail of Chapter 1 Reactive Objects for Haskell

Reactive objects are a convenient abstraction for writing programs which have to interact with a ... more Reactive objects are a convenient abstraction for writing programs which have to interact with a concurrent environment. A reactive object has two characteristics: the abandonment of all blocking operations and the unification of the concepts state and process. The former allows a reactive object to accept input from multiple sources without imposing any ordering on the input events. The latter prevents race conditions because the state of an object is only manipulated from the process belonging to the object. Only a few programming languages exist that make the concept of reactive objects available to programmers. Unfortunately, all those systems seem to be either not actively maintained anymore or not really matured yet. In this paper we demonstrate how reactive objects can be incorporated into the existing general purpose programming language Haskell by making use of common extensions to Haskell. Our implementation is heavily inspired by the O’Haskell programming language. While ...

Research paper thumbnail of A functional notation for functional dependencies

2001 ACM SIGPLAN, 2001

Functional dependencies help resolve many of the ambiguities that result from the use of multi-pa... more Functional dependencies help resolve many of the ambiguities that result from the use of multi-parameter type classes. They effectively enable writing programs at the type-level which significantly enhances the expressive power of Haskell's type system. Among the applications of this technique are the emulation of dependent types, and precise typechecking for XML and HTML combinator libraries. Unfortunately, the notation presently used for functional dependencies implies that the type-level programs are logic programs, but many of its applications are conceptually functional programs. We propose an alternative notation for functional dependencies which adds a functional-programming notation to Haskell's type classes and makes applications of functional dependencies significantly more readable. We apply the new notation to our examples and study the problems arising due to Haskell's open world assumption and overlapping instances.

Research paper thumbnail of Session Types for Asynchronous Communication Matthias Neubauer and Peter Thiemann

A session type is an abstraction of a sequence of heterogeneous values sent over one communicatio... more A session type is an abstraction of a sequence of heterogeneous values sent over one communication channel. Session types can be used for specifying stream-based Internet protocols. We consider session types in a setting with asynchronous communication over buffered channels. Due to buffering, a process may write ahead before the reading process picks up the data. Thus the types of the two ends of a channel may differ. We formalize the potential difference in types due to buffering, show that the ensuing relation on types is decidable, and prove the type soundness of the resulting type system with respect to a low-level operational semantics that models buffered communication channels accurately.

Research paper thumbnail of Haskell type browser

Proceedings of the 2004 Acm Sigplan Workshop on Haskell, Sep 22, 2004

... Matthias Neubauer Universit ät Freiburg neubauer@informatik.uni-freiburg.de Peter Thiemann Un... more ... Matthias Neubauer Universit ät Freiburg neubauer@informatik.uni-freiburg.de Peter Thiemann Universit ät Freiburg thiemann@informatik.uni-freiburg.de Categories and Subject Descriptors ... 2003. ACM Press, New York. [6] M. Odersky, M. Sulzmann, and M. Wehr. ...

Research paper thumbnail of Dynamic scope analysis for emacs lisp

Research paper thumbnail of Functional Logic Overloading

Functional logic overloading is a novel approach to user-defined overloading that extends Haskell... more Functional logic overloading is a novel approach to user-defined overloading that extends Haskell's concept of type classes in significant ways. Whereas type classes are conceptually predicates on types in standard Haskell, they are type functions in our approach. Thus, we can base type inference on the evaluation of functional logic programs. Functional logic programming provides a solid theoretical foundation for type functions and, at the same time, allows for programmable overloading resolution strategies by choosing different evaluation strategies for functional logic programs. Type inference with type functions is an instance of type inference with constrained types, where the underlying constraint system is defined by a functional logic program. We have designed a variant of Haskell which supports our approach to overloading, and implemented a prototype front-end for the language.