TY - GEN
T1 - Properties of a notation for combining functions
AU - Raoult, Jean Claude
AU - Sethi, Ravi
N1 - Publisher Copyright:
© by Springer-Verlag Berlin Heidelberg 1982.
PY - 1982
Y1 - 1982
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
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
A2 - Nielsen, Mogens
A2 - Schmidt, Erik Meineche
PB - Springer-Verlag
T2 - 9th International Colloquium on Automata, Languages and Programming, ICALP 1982
Y2 - 12 July 1982 through 16 July 1982
ER -