Hostname: page-component-6766d58669-h8lrw Total loading time: 0 Render date: 2026-05-22T10:05:19.762Z Has data issue: false hasContentIssue false

Default rules for Curry*

Published online by Cambridge University Press:  01 July 2016

SERGIO ANTOY
Affiliation:
Computer Science Dept., Portland State University, Oregon, USA (e-mail: antoy@cs.pdx.edu)
MICHAEL HANUS
Affiliation:
Computer Science Dept., Portland State University, Oregon, USA (e-mail: antoy@cs.pdx.edu)

Abstract

In functional logic programs, rules are applicable independently of textual order, i.e., any rule can potentially be used to evaluate an expression. This is similar to logic languages and contrary to functional languages, e.g., Haskell enforces a strict sequential interpretation of rules. However, in some situations it is convenient to express alternatives by means of compact default rules. Although default rules are often used in functional programs, the non-deterministic nature of functional logic programs does not allow to directly transfer this concept from functional to functional logic languages in a meaningful way. In this paper, we propose a new concept of default rules for Curry that supports a programming style similar to functional programming while preserving the core properties of functional logic programming, i.e., completeness, non-determinism, and logic-oriented use of functions. We discuss the basic concept and propose an implementation which exploits advanced features of functional logic languages.

Information

Type
Regular Papers
Copyright
Copyright © Cambridge University Press 2016 

Access options

Get access to the full version of this content by using one of the access options below. (Log in options will check for institutional or personal access. Content may require purchase if you do not have access.)

Article purchase

Temporarily unavailable