Skip to main navigation Skip to search Skip to main content

Functional programming with sets

Research output: Chapter in Book/Report/Conference proceedingConference contributionpeer-review

12 Scopus citations

Abstract

Set abstraction, originally introduced in fuctional languages by Turner, is an appealing construct because it leads to concise definitions of many interesting operations. However, existing approaches treat sets as lists for the sake of efficiency, and thereby sacrifice a simple declarative semantics. In this paper, we present a novel language based on sets and equations, where sets are treated as sets, consistent with their semantics. The language is called SEL, for Set-Equation Language. Equations are assumed to define a confluent rewriting system when oriented left to right. Sets are defined in terms of their subsets; these rules define a nonconfluent rewriting system when oriented left to right. We show examples of programs in this language, and provide an operational semantics for such programs. Programs are executed by innermost reduction, which may be nondeterministic or deterministic. Nondeterministic reduction is used when one of the elements of a set is desired. Deterministic reduction is used to simplify a term via an equation or to obtain all the elements of a set. The correctness of the operational semantics is also established.

Original languageEnglish
Title of host publicationFunctional Programming Languages and Computer Architecture, Proceedings
EditorsGilles Kahn
PublisherSpringer Verlag
Pages194-211
Number of pages18
ISBN (Print)9783540183174
DOIs
StatePublished - 1987
Event3rd International Conference on Functional Programming Languages and Computer Architecture, 1987 - Portland, United States
Duration: Sep 14 1987Sep 16 1987

Publication series

NameLecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)
Volume274 LNCS

Conference

Conference3rd International Conference on Functional Programming Languages and Computer Architecture, 1987
Country/TerritoryUnited States
CityPortland
Period09/14/8709/16/87

Fingerprint

Dive into the research topics of 'Functional programming with sets'. Together they form a unique fingerprint.

Cite this