Home

About

Advanced Search

Browse by Discipline

Scientific Societies

E-print Alerts

Add E-prints

E-print Network
FAQHELPSITE MAPCONTACT US


  Advanced Search  

 
Programming with Narrowing: a Tutorial Sergio Antoy 1
 

Summary: Programming with Narrowing: a Tutorial
Sergio Antoy 1
Computer Science Department
Portland State University
P.O. Box 751, Portland, OR 97207, U.S.A.
Abstract
Narrowing is a computation implemented by some declarative programming languages. Research
in the last decade has produced significant results on the theory and foundation of narrowing, but
little is published on the use of narrowing in programming. This paper introduces narrowing from
a programmer viewpoint; shows, by means of examples, when, why and how to use narrowing
in a program; and discusses the impact of narrowing on software development activities such as
design and maintenance. The examples are coded in the programming language Curry, which
provides narrowing as a first class feature.
1. Introduction
Narrowing is a programming feature found in some modern high-level declarative lan-
guages such as Curry (Hanus et al., 1995; Hanus, 2006) and T OY (Caballero and S´anchez,
2007; L´opez-Fraguas and S´anchez-Hern´andez, 1999). These languages are often referred
to as functional logic because they include both functions, as in the functional languages
Haskell (Peyton Jones and Hughes, 1999) and ML (Milner et al., 1997), and logic vari-
ables, as in the logic language Prolog (ISO, 1995). Narrowing is the glue that allows the

  

Source: Antoy, Sergio - Department of Computer Science, Portland State University

 

Collections: Computer Technologies and Information Sciences