Properties of a notation for combining functions

Jean Claude Raoult, Ravi Sethi

Research output: Chapter in Book/Report/Conference proceedingConference contribution

3 Scopus citations

Abstract

A notation based on pipes in the unix™ operating system is proposed for combining functions in a linear order. Examples suggest that semantic rules using pipes (i.e. the notation) are easy to read and understand, even for readers with little knowledge of semantics. The readability is a consequence of the operational intuition associated with pipes. The operational view is that each function is handed a sequence of values. Generally the sequence is treated as a stack; a function pops zero or more arguments off the stack, pushes zero or more results onto the stack, and passes the stack to the next function. The new idea is that a function may skip over some number of values before picking up its arguments. This approach is suited to expressing the composition of operations on machine states in a programming language. Pipes mesh smoothly with other metalanguage concepts, e.g., lambda abstraction. The bulk of the paper explores mathematical properties of pipes. In order for pipes to fit into lambda expressions, the arguments of the constructed function has to be well defined. Operationally speaking, we have to keep track of the elements in the stack. Pipes allow continuation semantics to be written with direct operators: instead of the operator having to worry about its continuation, the second function in a pipe is essentially a continuation of the first. A connection is established between functions connected by pipes and more traditional continuation semantics. This connection is made possible by a combinator do that constructs continuation versions of direct operators, e.g., continuation style operators from the literature for arithmetic, assigning to an identifier, and determining the value of an identifier, can be constructed from their direct counterparts using do. An example of the translation of a pipe based semantic rule for let expressions into a continuation based semantic rule is given.

Original languageEnglish (US)
Title of host publicationAutomata, Languages and Programming - 9th Colloquium
EditorsMogens Nielsen, Erik Meineche Schmidt
PublisherSpringer-Verlag
Pages429-441
Number of pages13
ISBN (Print)9783540115762
DOIs
StatePublished - 1982
Event9th International Colloquium on Automata, Languages and Programming, ICALP 1982 - Aarhus, Denmark
Duration: Jul 12 1982Jul 16 1982

Publication series

NameLecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)
Volume140 LNCS
ISSN (Print)0302-9743
ISSN (Electronic)1611-3349

Other

Other9th International Colloquium on Automata, Languages and Programming, ICALP 1982
Country/TerritoryDenmark
CityAarhus
Period7/12/827/16/82

ASJC Scopus subject areas

  • Theoretical Computer Science
  • General Computer Science

Fingerprint

Dive into the research topics of 'Properties of a notation for combining functions'. Together they form a unique fingerprint.

Cite this