3 ms·
But these kinds of languages do exist and it's reasonable to think about writing compilers for them and/or subsets.
by radm 13y ago
But these kinds of languages do exist and it's reasonable to think about writing compilers for them and/or subsets.
- yvdriess 13y agoI haven't heard of any recent string reduction languages. The last I heard about it was in Kent Dybvig 'Three Scheme Implementations' thesis, where he used it to map Scheme on a dataflow-like FP architecture (IIRC).
- radm 13y agoI don't have a formal definition of a string reduction language, so maybe I'm mis-generalizing. That said, J's parser (http://www.jsoftware.com/help/dictionary/dicte.htm http://www.jsoftware.com/help/dictionary/dicte.htm) looks like what I imagined the phrase meant.
- yvdriess 13y agop. 127 of www.cs.indiana.edu/~dyb/papers/3imp.pdf gives a pretty good overview, including a ton of references. Roughly, graph reduction execution represents an expression as a node, with an edge to nodes of subexpressions. A value of a node is obtained by walking through it's children, setting the value of each node as the recursion winds down. String reduction simply modifies the expression itself. This does not eliminate common subexpressions (a() * a() will reduce a() twice), which is why graph reduction is favoured. In a parallel world, you often don't care about the extra work if it reduces the number of synchronisation.