Summary: A Monadic Semantics for Core Curry #
Andrew Tolmach and Sergio Antoy
Dept. of Computer Science, Portland State University,
P.O.Box 751, Portland OR 97207, USA
12th Int. Workshop on Functional and (Constraint) Logic Programming (WFLP03), Valencia, Spain --- June 1213, 2003.
Technical Report DSICII/13/03, Departmento de SistemÁ as y ComputatciÁ on, Universidad Polit’ ecnica de Valencia, pp. 3346.
Abstract. We give a highlevel operational semantics for the essential core of the
Curry language, including higherorder functions, callbyneed evaluation, non
determinism, narrowing, and residuation. The semantics is structured in monadic
style, and is presented in the form of an executable interpreter written in Haskell.
The functional logic language Curry combines lazy functional programming with logic
programming features based on both narrowing and residuation. Describing the seman
tics of these features and their interaction in a common framework is a nontrivial task,
especially because functional and logic programming have rather different semantic tra
ditions. The ``of£cial'' semantics for Curry , largely based on work by Hanus [6, 5],
is an operational semantics based on de£nitional trees and narrowing steps. Although
fairly lowlevel, this semantics says nothing about sharing behavior. Functional lan
guages are typically given denotational or natural (``big step'') operational semantics.