### 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 language | English (US) |
---|---|

Title of host publication | Automata, Languages and Programming - 9th Colloquium |

Publisher | Springer Verlag |

Pages | 429-441 |

Number of pages | 13 |

Volume | 140 LNCS |

ISBN (Print) | 9783540115762 |

DOIs | |

State | Published - Jan 1 1982 |

Externally published | Yes |

Event | 9th International Colloquium on Automata, Languages and Programming, ICALP 1982 - Aarhus, Denmark Duration: Jul 12 1982 → Jul 16 1982 |

### Publication series

Name | Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics) |
---|---|

Volume | 140 LNCS |

ISSN (Print) | 0302-9743 |

ISSN (Electronic) | 1611-3349 |

### Other

Other | 9th International Colloquium on Automata, Languages and Programming, ICALP 1982 |
---|---|

Country | Denmark |

City | Aarhus |

Period | 7/12/82 → 7/16/82 |

### Fingerprint

### ASJC Scopus subject areas

- Theoretical Computer Science
- Computer Science(all)

### Cite this

*Automata, Languages and Programming - 9th Colloquium*(Vol. 140 LNCS, pp. 429-441). (Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics); Vol. 140 LNCS). Springer Verlag. https://doi.org/10.1007/BFb0012789

**Properties of a notation for combining functions.** / Raoult, Jean Claude; Sethi, Ravi.

Research output: Chapter in Book/Report/Conference proceeding › Conference contribution

*Automata, Languages and Programming - 9th Colloquium.*vol. 140 LNCS, Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics), vol. 140 LNCS, Springer Verlag, pp. 429-441, 9th International Colloquium on Automata, Languages and Programming, ICALP 1982, Aarhus, Denmark, 7/12/82. https://doi.org/10.1007/BFb0012789

}

TY - GEN

T1 - Properties of a notation for combining functions

AU - Raoult, Jean Claude

AU - Sethi, Ravi

PY - 1982/1/1

Y1 - 1982/1/1

N2 - 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.

AB - 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.

UR - http://www.scopus.com/inward/record.url?scp=84976827982&partnerID=8YFLogxK

UR - http://www.scopus.com/inward/citedby.url?scp=84976827982&partnerID=8YFLogxK

U2 - 10.1007/BFb0012789

DO - 10.1007/BFb0012789

M3 - Conference contribution

AN - SCOPUS:84976827982

SN - 9783540115762

VL - 140 LNCS

T3 - Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)

SP - 429

EP - 441

BT - Automata, Languages and Programming - 9th Colloquium

PB - Springer Verlag

ER -