Adding Data to Curry

by   Michael Hanus, et al.
Christian-Albrechts-Universität zu Kiel

Functional logic languages can solve equations over user-defined data and functions. Thus, the definition of an appropriate meaning of equality has a long history in these languages, ranging from reflexive equality in early equational logic languages to strict equality in contemporary functional logic languages like Curry. With the introduction of type classes, where the equality operation "==" is overloaded and user-defined, the meaning became more complex. Moreover, logic variables appearing in equations require a different typing than pattern variables, since the latter might be instantiated with functional values or non-terminating operations. In this paper, we present a solution to these problems by introducing a new type class "Data" which is associated with specific algebraic data types, logic variables, and strict equality. We discuss the ideas of this class and its implications on various concepts of Curry, like unification, functional patterns, and program optimization.


page 1

page 2

page 3

page 4


Semantic subtyping for non-strict languages

Semantic subtyping is an approach to define subtyping relations for type...

Infinite Types, Infinite Data, Infinite Interaction

We describe a way to represent computable functions between coinductive ...

Anonymous Variables in Imperative Languages

In this paper, we bring anonymous variables into imperative languages. A...

Sketch-Guided Equality Saturation: Scaling Equality Saturation to Complex Optimizations of Functional Programs

Generating high-performance code for diverse hardware and application do...

First-Order Bayesian Network Specifications Capture the Complexity Class PP

The point of this note is to prove that a language is in the complexity ...

Research Summary on Implementing Functional Patterns by Synthesizing Inverse Functions

In this research summary we present our recent work on implementing func...

Strictly Associative and Unital ∞-Categories as a Generalized Algebraic Theory

We present the first definition of strictly associative and unital ∞-cat...

Please sign up or login with your details

Forgot password? Click here to reset