283
edits
KalmanKeri (talk | contribs) No edit summary Tags: Mobile edit Mobile web edit |
KalmanKeri (talk | contribs) No edit summary |
||
| Line 1: | Line 1: | ||
Pipe-calculus is a core calculus for programming. | Pipe-calculus is a core calculus for programming. | ||
<div style="background-color: #f4f4f4; border: 1px solid #e8e8e8; padding: 0 1em 0 1em;"> | |||
'''Note:''' Pipe-calculus is work in progress. This wiki page reflects the author's understanding of the topic, and details may very well change over time.</div> | |||
== Overview == | == Overview == | ||
| Line 7: | Line 8: | ||
=== Motivation and brief story === | === Motivation and brief story === | ||
Development of pipe-calculus stemmed from the | Development of pipe-calculus stemmed from the idea that syntax should be a first class element of programming languages the same way as formation rules are integral part of logical systems. A language that complies with this principle is able to recognize the syntax of input data without using a parser library. Pipe-calculus is a very minimal language with this capability. | ||
The first attempt to implement this idea resulted in a logical system which is referred to as ''well-typed parsing''. | The first attempt to implement this idea resulted in a logical system which is referred to as ''well-typed parsing''. Later it was realised that well-typed parsing can be translated to a calculus that uses combinators and rewriting rules instead of inference rules, and this is the basis of the current formalisation. | ||
=== Connection to other fields === | === Connection to other fields === | ||
Pipe-calculus is inspired by logical programming, substructural logic, process calculus, formal grammars, automata theory, type theory (up to the lambda-cube) and the study of algebraic effects | Pipe-calculus is inspired by logical programming, substructural logic, process calculus, formal grammars, automata theory, type theory (up to the lambda-cube) and the study of algebraic effects. | ||
Programs written in pipe-calculus can recognize and generate words of formal languages encoded as terms. Untyped lambda calculus can be translated to a subset of higher-order pipe-calculus. | Programs written in pipe-calculus can recognize and generate words of formal languages encoded as terms. Untyped lambda calculus can be translated to a subset of higher-order pipe-calculus. | ||
| Line 21: | Line 22: | ||
=== Variants === | === Variants === | ||
Pipe-calculus is meant to be an extensible framework. | Pipe-calculus is meant to be an extensible framework. An important extension is the inclusion of variables. | ||
Somewhat surprisingly, even the zero-order calculus has a limited computational power. | |||
The most simple variant of the calculus that is lacking variables and scoped constructs is called '''zero-order'''. | |||
Somewhat surprisingly, even the zero-order calculus has a limited computational power. | |||
In '''higher-order''' variants there are lexically scoped variables that can bind arbitrary terms. Intermediate variants can be constructed by extending the basic calculus with recursion and with a stack. | |||
When used as recognizers, extended variants of the calculus can generally recognize more expressive formal languages. | When used as recognizers, extended variants of the calculus can generally recognize more expressive formal languages. | ||
edits