---
title: "Expressiveness of streaming string transducers — Alur 2010"
description: "Streaming string transducers use one forward pass and movable string fragments to compute exactly the regular transformations of finite strings."
canonical: "https://research.elamur.ai/free/en/papers/alur-2010-expressiveness-streaming-string-transducers/"
---
Elamur: [Mova](https://md.mova.elamur.ai/free/en/) · [Parse](https://mova.elamur.ai/free/en/parse/) · [Dictionary](https://md.dictionary.elamur.ai/free/en/) · [Translate](https://md.translate.elamur.ai/free/en/) · **Research** · [Gali](https://md.gali.elamur.ai/free/en/) · [MCP](https://mcp.elamur.ai/) · [Locations](https://md.locations.elamur.ai/free/en/) · [Weather](https://md.weather.elamur.ai/free/en/)

[Elamur Research](https://md.research.elamur.ai/free/en/) · [this page in HTML](https://research.elamur.ai/free/en/papers/alur-2010-expressiveness-streaming-string-transducers/)

[Elamur Research](https://md.research.elamur.ai/free/en/) / [papers](https://md.research.elamur.ai/free/en/papers/) / [2010](https://md.research.elamur.ai/free/en/papers/2010/) / Expressiveness of streaming string transducers

# Expressiveness of streaming string transducers

Paper · 2010 · Rajeev Alur and Pavol Černý

**Authors:** [Rajeev Alur](https://md.research.elamur.ai/free/en/authors/rajeev-alur/) and Pavol Černý · **Year:** 2010 · **Venue:** DROPS (Schloss Dagstuhl – Leibniz Center for Informatics) · **Licence:** [CC BY-NC-ND (OpenAlex best open-access location)](https://creativecommons.org/licenses/by-nc-nd/4.0/)

DROPS (Schloss Dagstuhl – Leibniz Center for Informatics) · [licence](https://creativecommons.org/licenses/by-nc-nd/4.0/)

- [PDF](https://drops.dagstuhl.de/storage/00lipics/lipics-vol008-fsttcs2010/LIPIcs.FSTTCS.2010.1/LIPIcs.FSTTCS.2010.1.pdf)
- [DOI 10.4230/lipics.fsttcs.2010.1](https://doi.org/10.4230/lipics.fsttcs.2010.1)

## Summary

Some transformations of a string need information that arrives after the text they affect. A machine that must emit output as it reads can easily delete a particular letter everywhere. Its task changes if a letter near the end determines whether earlier letters should survive. By the time the machine can make that decision, it may have passed arbitrarily much text that belongs in the output. The paper asks how much a deterministic machine can do in a single forward pass if it can build and rearrange pieces of the answer before returning it.

Alur and Černý study streaming string transducers. These machines pair finite-state control with a fixed collection of variables whose values are strings. On reading a letter, a machine can place new output symbols before or after an existing piece, join pieces, or discard them. All assignments for a step use the old values, and each old variable can contribute to at most one place across the entire update. This rule allows a machine to build an input’s forward and reversed forms side by side by inserting the currently read letter into each. It prevents the machine from duplicating an arbitrarily long string that it has already stored.

The main result is an exact characterization for finite alphabets. The functions computed by these machines are precisely the regular string transductions, a class already described by deterministic finite-state machines that can move their input heads in both directions and by transductions defined in monadic second-order logic. A heap of linked cells connects the descriptions in the proof. A forward scan can summarize the trips a two-way head might make back into the prefix it has already read. The heap shares output fragments when those trips have a common continuation. A streaming string transducer can represent the same heap using strings for stretches of cells and finite control for the places where they connect. In the other direction, logical formulas can describe how the pieces produced by a streaming run form its answer.

The paper also gives a direct construction for running one streaming transformation after another within a single forward pass over the original input. It identifies a boundary through a merge operation that interleaves corresponding letters from two separately presented strings. A heap machine that can advance pointers through stored cells can perform the merge. A streaming string transducer has only a fixed collection of pieces available at the boundary between the input halves, and later updates cannot open those pieces and insert new letters at arbitrary positions. This distinction helps explain why rewriting a link and following it have different consequences for the power of the machine.

## Deep dive: Expressiveness of streaming string transducers

Streaming string transducers use one forward pass and movable string fragments to compute exactly the regular transformations of finite strings. · about 36 minutes to read

**In this deep dive**

1. [The problem and its context](#dd-the-problem-and-its-context)
2. [The method, step by step](#dd-the-method-step-by-step)
3. [Experiments and results](#dd-experiments-and-results)
4. [What the ablations show](#dd-what-the-ablations-show)
5. [Limitations](#dd-limitations)
6. [What came after](#dd-what-came-after)

### The problem and its context

#### The order of reading and the order of writing

A finite-state acceptor reads a string and decides whether it belongs to a language. Its state records the distinctions among prefixes that can still matter for that decision. A transducer has a further responsibility. It must produce a string, potentially much longer than anything it could name in its finite control. The paper draws on the familiar role of finite-state acceptors in defining regular languages and asks which operational choices give an equally robust account of regular transformations.

One starting point is a finite-state transducer that reads its tape from left to right and emits a string on each step. Its result is the concatenation of those emissions. Deleting every occurrence of a chosen letter fits this arrangement because the decision about each occurrence can be made immediately. The paper contrasts this with deletion conditional on whether another letter occurs anywhere in the input. Before that other letter arrives, the machine may face an arbitrarily long prefix whose treatment is still undecided. Emitting the disputed letters commits to keeping them. Waiting to emit them leaves the machine with a need to recover their quantity and placement later. Finite control alone provides no store for arbitrary deferred text.

There are different ways to give the machine that freedom. A two-way transducer can first inspect the input and then revisit it, emitting the relevant letters when it knows which branch to take. A streaming string transducer retains output material as it reads. The finite control can defer the choice of which stored pieces to use until the input ends. The central question concerns the collection of functions each arrangement can express. A two-way run may revisit many input positions, and a forward-only run must account for these trips without returning to those positions.

#### The established meaning of regularity

The paper begins with two established accounts of regular string transductions. The operational account uses a deterministic machine with a two-way input head. The machine’s state and the symbol under the head determine its emission and its next move. Its answer is formed in the order in which it emits text during the run. That order can differ from the left-to-right order of the input. An unsuccessful run leaves the function undefined at that input, so the class consists of partial functions as well as functions defined everywhere.

The logical account treats a string as a path whose edges carry letters. Monadic second-order logic can talk about individual positions and sets of positions. A logical transduction has a finite supply of copies of the input positions and formulas that decide which copies are output vertices and which labeled edges connect them. The formulas are interpreted on the input as a whole. They can use a property of the end of the string when deciding which earlier positions belong in the output. The described graph has to be a string path for the result to be defined.

The paper draws on prior work establishing that these accounts describe the same class. It also cites earlier results giving a decision procedure for equivalence of deterministic two-way transducers and showing that regular transductions are closed under sequential composition. Equivalence asks whether the descriptions have the same domain and return the same string wherever they are defined. Sequential composition applies one transformation to the answer of another. These properties give content to the word *regular*. It names a class with known relationships between its different descriptions and known guarantees about operations on those descriptions.

The older construction for simulating a two-way acceptor by a one-way acceptor supplies a starting point. A forward scan can keep a finite summary of how the two-way machine would behave if it returned to the prefix in a particular state. For an acceptor, a summary can focus on states and possible exits. For a transducer, a return to the same boundary also comes with whatever text was emitted on the trip. That text may grow with the prefix. A successful simulation must preserve it, arrange it in the right order, and account for several hypothetical trips that use the same long stretch of output.

#### Why list-processing programs enter the argument

The authors’ earlier work on verifying single-pass list processing is the reason they study streaming string transducers. The earlier setting includes strings whose symbols carry data from a potentially infinite domain with equality and order tests. It relates streaming transducers to restricted imperative programs that work on singly linked lists and to a restricted form of recursive functional programming over lists. The point of the correspondence is that a transducer can serve as a mathematical description of a program whose behavior needs to be checked.

The earlier work gives Pspace procedures for equivalence and for verifying input and output conditions stated using streaming acceptors. A precondition specifies inputs of interest, and a postcondition specifies the required property of the result. The authors point to familiar list operations such as insertion, deletion, and reversal as functions for which equivalence can matter across different implementations. The expressiveness question in this paper concerns finite alphabets, where the regular class provides a reference point. It asks whether the particular operations chosen for the streaming formalism capture that class.

A singly linked heap also provides a way to state the question in terms of programs. A program with a pointer to a cell can rewrite the link leaving that cell. A program with a traversal instruction can also follow a link and gain direct access to the cell at the other end. In a single-pass program those actions are independent of whether the input head can go backward. The input may be read exactly once while the program repeatedly moves through material it stored earlier. The paper makes that distinction explicit by considering a heap with link updates and cell allocation during the scan, then studying what changes when traversal is added.

### The method, step by step

#### Building an output out of pieces

The simplest way to understand the streaming machine is to consider an output that consists of the input followed by its reversal. If the machine kept a single forward-growing answer, it would still need a way to recover the letters in reverse order after the scan. Instead, it keeps a forward piece and a backward piece. Each newly read symbol is appended to the forward piece and prepended to the backward piece. When the scan finishes, the output expression joins them. In the worked input `abb`, the machine builds `abb` in the forward variable and `bba` in the backward variable. It needs no state distinction between different prefixes for this transformation.

```
(x, y) ← (xσ, σy)
```

Here `x` and `y` are string variables, and `σ` is the current input symbol, used also as an output symbol in this example. Juxtaposition means concatenation. The arrow assigns the right-hand tuple to the left-hand tuple simultaneously, so both expressions refer to the values present before the step. Although the new symbol occurs in both expressions, each old string occurs only once. The machine can introduce fresh literal letters in both places.

The deletion example in the paper’s formal comparison uses the last letter as the condition. If the input ends in `b`, the output consists of the `b` letters alone. Otherwise the input is returned intact. The streaming machine builds a complete version and a filtered version throughout its run. It enters the state for an ending in `b` when it reads that letter and leaves that state on `a`. At the end, its state selects the appropriate variable. The empty input leaves the machine in its initial state with empty variables. Each branch is prepared before the state that chooses between them becomes final.

A further example shows how a pending piece can be used partway through the scan. Within a run of `a` letters, the machine copies those letters into the accumulated answer and adds a `b` to a pending variable for each `a`. Reading a `b` triggers a join that consumes the pending string and empties its variable. A trailing run of `a` letters therefore remains in the answer without the corresponding pending `b` letters. The end expression returns only the accumulated answer. Here a `b` is a signal to commit a piece, and the number of letters in that piece was determined incrementally. The machine never has to test the length of the piece.

These examples separate the roles of control and storage. The shape of an update is selected by a state and a symbol. It can move or join a piece of arbitrary length because the shape refers to that piece by its variable name. The machine does not branch by looking at the string inside the variable. Nor can it take out one letter from the middle of a stored piece. The only operation the update language has on an old value is to include it whole in a concatenation, or to leave it out.

How a streaming string transducer builds its answer The steps in order.

#### The exact streaming definition

Let `Σ` be the finite input alphabet and `Γ` the finite output alphabet. The symbol `*` after an alphabet denotes the set of all its finite strings, including the empty string. A machine has a finite set `Q` of states, an initial state `q₀`, and a finite set `X` of string variables. Its configuration is a pair consisting of the current state and a valuation `s`. A valuation associates each variable with a string over `Γ`. Initially every such string is empty. A valuation also evaluates a concatenation of variables and literal symbols by substituting the values of the variables and preserving the literals.

```
(q, s) ─a→ (δ₁(q, a), s′)
```

Here `q` and `s` are the old state and valuation, `a` is the input symbol being consumed, and the labeled arrow is one transition on that symbol. The state-transition function `δ₁` gives the next state from `q` and `a`. The prime in `s′` denotes the new valuation, which is computed using a separate update function.

```
s′(x) = s(δ₂(q, a, x))
```

In this equation `x` is the destination variable, and `δ₂` supplies its assignment expression for state `q` and letter `a`. The expression is a string of variable names from `X` and literals from `Γ`. Applying `s` to the expression yields its output string. The equality specifies the new value `s′(x)`. Since every evaluation uses the same old `s`, the update does not depend on an ordering of the destinations.

The copyless condition applies to the entire collection of expressions for the step. An occurrence of an old variable in the expression for one destination prevents its use in the expression for another destination on that transition. An update can put the old values of `x` and `y` together in the new `x` while replacing `y` with a literal. It cannot perform that join and also carry the old `y` forward in the new `y`. This distinction also explains why copylessness is compatible with the reversal example. There the repeated object is a literal supplied by the transition, and each stored value has its own destination.

```
⟦W⟧(w) = s(F(q))
```

Here `W` is the streaming transducer, `w` is the complete input string, and `⟦W⟧` is the partial function it computes. The symbols `q` and `s` now refer to the configuration after reading all of `w`. The output function `F` assigns an expression to certain states, and `s` evaluates that expression. Each variable occurs at most once in it. If `F` is undefined at `q`, the transduction is undefined on `w`. An expression that evaluates to the empty string gives a defined result.

The paper works with preassigned transition and output expressions. These are specifications and constructions for deterministic machines. The examples are chosen to illustrate what the operations can express, and the general constructions start with a machine description and translate it into another description.

#### Summarizing a two-way run at a boundary

The first direction of the main proof starts with a deterministic two-way transducer. Its tape has an end marker on either side of the input, and its head begins at the left marker. A transition specifies a state, a direction, and an emitted output string. Reaching the final state ends a successful computation. Moving beyond an end marker or failing to reach the final state leaves the function undefined. Those outcomes must be reflected in the machine that simulates it.

```
δ_M : Q_M × (Σ ∪ {⊢, ⊣}) → Q_M × {−1, 0, +1} × Γ*
```

The subscript `M` identifies the two-way machine. `δ_M` is its transition function and `Q_M` its set of states. The colon and arrow give the function’s input and result types, `×` denotes a Cartesian product, and `∪` denotes union. The braces enclose sets. The symbols `⊢` and `⊣` stand for the left and right markers. A move of `−1` goes left, `0` stays at the same position, and `+1` goes right. The transition’s third component lies in `Γ*`, the set of finite strings of output letters.

The simulator reads the input in order. After reading a position, it must be prepared for a future simulated move back into that position from the right. It keeps an answer for each possible state in which the two-way machine could start there. The answer records what state the machine would be in on its first exit across the next boundary to the right. It also records the string emitted up to that exit. Where the hypothetical run halts or fails before that exit, the summary records the different outcome. The simulator’s control can store the state part because the set of possible outcomes is finite.

When the simulator advances, a new input position gives it a new boundary to summarize. Suppose the two-way machine at the new position moves left from state `u`, enters state `v`, and emits `α`. The earlier boundary summary for `v` describes the entire excursion into the prefix. Suppose it returns to the new position in state `qᵥ`, emitting `wᵥ`, and its next move goes right in state `qᵤ` with emission `β`. The new summary for `u` has the following form.

```
(qᵤ, αwᵥβ)
```

The first component `qᵤ` is the state on exiting the new position to the right. The second component concatenates `α`, the output on entering the prefix, with `wᵥ`, the saved output of the excursion that starts in `v`, and `β`, the emission when the head finally moves right. The placement of each fragment reflects the time order of the simulated run.

On returning to the current position, the simulated machine may move left again, stay in place, or halt. The simulator can determine these possibilities from the current letter and its earlier summaries. An earlier summary that terminates in the final state can be used directly as a halting outcome. A detected repeat of the same state at the current position means a deterministic computation has returned to the same situation. The simulator can record an error rather than trying to keep extending the output of a run that will never finish.

Alongside the hypothetical excursions, the construction keeps track of the initial run from the left end. The summary for this run has a distinguished entry in the simulator. Its purpose is to preserve the actual computation up to the current boundary, since a table of possible excursions alone would leave open which one contributes to the result. The heap machine does not receive the two-way machine’s tape markers as ordinary input. The construction accounts for the left marker at initialization and keeps an additional set of output information for the possibility that the next symbol is the right marker. When the input stops, the output associated with the completed initial run is the one that matters.

#### Sharing output on a heap

The summary’s text can be arbitrarily long. The construction stores it in a heap whose cells each contain an output letter and a link to the next cell, or a null link. A fixed collection of pointer variables addresses cells. During the scan, the machine can allocate new cells and change links at the cells currently addressed. It can use named pointers to keep track of endpoints. There is no instruction during the scan for reading a cell’s link and transferring its target into a pointer variable. Following links to interpret the completed output is part of the definition of the result.

```
x ← ν(a)
```

Here `x` is a pointer variable, `a` is an output letter from `Γ`, and `ν` allocates a fresh cell labeled `a` with a null next link. The arrow sets `x` to address the new cell. A formerly addressed cell can remain in the heap and may still be reachable by another route.

```
η(x) ← y
```

Here `η(x)` means the outgoing link of the cell addressed by `x`, and `y` names a pointer whose target will become the new link target. The arrow denotes changing that one link, leaving the pointer variables themselves in place. If `x` is null, this operation has no effect. The target supplied by `y` can be null.

A pointer to the beginning and another to the end of a fragment allow the simulator to attach fresh material without walking through the fragment. For the excursion described above, the literal strings emitted by the transitions can be placed into new cells. The old excursion output can be connected between them by changing links at its endpoints and at the adjacent fresh cells. No operation needs to copy or inspect its individual letters.

The key case arises when different simulated starts use the same old excursion. Imagine that starting in either of two states at the current position sends the two-way machine left into the preceding position in the same state. The transition emissions on the way into that common configuration may differ. From the common configuration onward, the run is determined. It returns to the current position in the same state if it returns at all, and any subsequent transition from there encounters the same input letter. Thus the summaries can have different prefixes attached to a common continuation. A singly linked heap can represent that continuation once, with multiple paths leading into it. This is the feature of determinism that makes shared storage fit the simulation.

The construction is easier to describe using an instruction that assigns one named pointer to another. The paper explains how to eliminate it. The simulator’s finite control records which logical pointers address the same cell and which physical pointer represents that group. A logical pointer assignment then changes the record. When a link update or output selection refers to a logical pointer, the current state identifies the physical representative. This replaces a convenient instruction with more distinctions in finite control and gives a construction within the stated pointer operations.

If the output pointer is null, its string is empty. For a non-null pointer, the result consists of the letters encountered in order along its links to null. A cycle along that path leaves the result undefined. This convention distinguishes a chain that terminates with no further letters from a chain that cannot be read to completion. The two-way simulation must likewise distinguish an empty successful emission from a failed run.

#### Turning a reachable heap into strings and finite control

The next direction goes from a heap transducer to a streaming string transducer. Since neither machine needs to revisit its input, the difficulty is representing the heap and its possible link changes with whole-string substitutions. Storing one string for every logical pointer’s entire path would make shared suffixes cumbersome. A rewired link in a shared part could require simultaneous changes to several stored versions. The construction instead represents each shared structure by the pieces between its significant cells.

The paper calls a cell an *interruption* if a named pointer addresses it or if different predecessor cells link to it. The first case marks a place where the program can act directly. The second marks a place where paths join. Long stretches can lie between such places. As long as their interior has neither a named pointer nor a junction, the sequence of labels inside a stretch can be kept in one variable. Finite control records the shape of the compressed heap, where the pointers land, and which variables supply the strings for its segments.

```
2k − 1
```

Here `k` is the number of pointer variables, and `2k − 1` is the paper’s bound, in its compressed forest representation, on the number of interruptions and on the number of uninterrupted segments. The multiplication is implicit in `2k`, and the minus sign subtracts `1`. The bound depends on the named pointers rather than on the number of letters that may accumulate in a long segment.

This separation makes a link change a joint update of state and strings. The state determines which compressed connection changes. It also determines whether a previously significant position remains significant. Where a boundary between segments disappears, strings can be concatenated and the variable for an old segment can be freed for reuse. Fresh cells contribute literal letters. A segment that becomes unreachable from the named pointers can be dropped from the representation. With no traversal instruction during the scan, the machine cannot recover direct access to a cell solely by walking back into such a discarded part.

The word *compressed* concerns the number of pieces used to represent the graph. The strings in those pieces still retain the letters needed for the output. The representation also preserves sharing through the connectivity in finite control. Multiple compressed paths can lead to one segment, while the text of that segment lives in a single variable. When the final state selects a path, the streaming output expression concatenates its segment strings in order. This is how the construction avoids treating a shared heap suffix as a requirement to maintain multiple copies of a stored value.

#### Describing a streaming run with logical formulas

To close the expressiveness argument, the paper translates the streaming computation into a logical description. An input word is represented by a path of vertices and letter-labeled edges. A formula can quantify over vertices and sets of vertices. For each control state, a set can mark the positions assigned that state. Conditions on the beginning of the path and on neighboring positions enforce the initial state and transitions. Determinism gives a unique run satisfying those conditions. The formulas can then use the state and input label at a position to identify which update the machine performs there.

The logical transducer has a fixed set `C` of copy labels. A pair consisting of an input vertex and a copy label identifies a possible output vertex. The vertex formula for a label decides whether that vertex is present. Edge formulas specify which selected vertices are connected and which output letter an edge bears. These formulas can describe an intermediate graph containing the assignments across the run. The paper then uses a logical transformation to extract the final result from that graph.

```
ϕᶜ(x)
```

In this notation `ϕᶜ` is the vertex-selection formula for the copy label `c` in `C`, and `x` is an input vertex. The parentheses indicate that the formula is evaluated with `x` as its free vertex argument. When it holds, the copy of `x` labeled `c` is included.

```
ϕᵃ_{c,d}(x, y)
```

Here `ϕᵃ_{c,d}` denotes an edge formula for output letter `a` and copy labels `c` and `d`. Its arguments `x` and `y` are input vertices. If the relevant vertices are selected and the formula holds, an edge bearing `a` goes from the `c` copy of `x` to the `d` copy of `y`. The copy labels belong to the finite set `C`, and `a` belongs to `Γ`.

In the graph for a streaming run, each assignment expression is represented as a short path schema. Output literals appear as labeled edges. An occurrence of a variable refers back to the part of the preceding column that represents the old value. The graph inserts links into that part and back out to the remainder of the current expression. These links carry no output letter. At the start, a reference to an initial variable has an empty path because the variable is initially empty. The number of positions that need to be reserved per input location depends on the finite set of machine expressions.

The paper demonstrates this construction on the machine that returns the input followed by its reverse. In its graph for `abb`, the fragment representing the forward variable links to the old value before its new literal edge. The fragment for the reverse variable places the new edge first. The final expression joins the completed forward and backward pieces. A marker identifies the start of this selected output path. Other bits of the graph may represent values that were dropped or did not contribute to the final expression.

A logical cleanup operation removes material outside the designated path and omits the links that carry no letters. Reachability can be expressed using quantification over vertex sets. The logical transductions used for describing the run and for reading it out can be composed using the earlier closure result cited in the paper. Since a streaming transducer has finitely many variable uses at a step, the formulas need only finitely many copies of each input vertex. The variable values themselves can still grow across the entire input.

#### Composing two streaming transformations directly

The paper gives a separate construction that composes streaming transducers without making the detour through logic. Let a first machine produce a string over the alphabet read by a second machine. While the first machine is building that string, it may hold pieces whose eventual position in its output is still uncertain. The second machine’s start state on a piece therefore cannot always be determined at the time that piece is created. The construction maintains a description of the second machine’s action on each such piece, indexed by the possible starting states.

A description of the action must say which state the second machine reaches and how its variables change. The initial values of those variables at the start of the piece may also be unknown. The summary treats them as formal variable names. Its assignment expressions say how to combine those placeholders with literal strings accumulated while processing the piece. Control decisions in the second machine depend on the input letters and the current state, allowing the summary to be prepared without knowing the values that will fill the placeholders.

```
s′(x) = s(κ(x))
```

Here `κ` is the variable summary for a chosen start state and a particular input fragment of the second machine. The variable `x` belongs to that machine, `s` is an arbitrary valuation at the start of the fragment, and `s′` is the valuation after it. The equality says that evaluating `κ(x)` with `s` gives the final value of `x`. The final control state is recorded separately.

In a copyless summary, old placeholders occur at most once across the collection of expressions. That gives finite control a way to describe their placement. The possibly long literal text between or around them is stored separately in string variables. When the first machine joins pieces, the summary for the second piece is chosen using the ending state from the first. The first piece’s expressions are substituted for the placeholders expected by the second. A placeholder abandoned by the second piece takes all of its associated text out of the resulting expression.

The paper illustrates this substitution with summaries for two neighboring fragments. The first combines old values with some stored literal text and supplies a literal as another new value. The second replaces one of those results outright and uses the earlier results in its other expression. After substitution, adjacent literal runs can be kept as a single run. This calculation is the local operation on which the construction relies.

```
⟦W⟧(w) = ⟦W₂⟧(⟦W₁⟧(w))
```

Here `W₁` is the first transducer, `W₂` the second, and `W` the constructed transducer on the original input `w`. The double brackets denote the partial function computed by the machine inside them, and the nested parentheses give the order of evaluation. The equality applies when both stages are defined. The result for `W` is undefined if the first machine has no output on `w` or the second has no output on the string it receives from the first.

The paper also shows closure under a conditional choice governed by a regular language of the input. A finite-state acceptor records whether the input belongs to the choosing language while the candidate transductions maintain their own output pieces. At the end, membership selects the relevant branch. If that branch is undefined, the conditional transformation is undefined. This is a choice based on the original input. Sequential composition uses the first transformation’s output to determine what the second transformation does.

### Experiments and results

#### What is compared

The results are theorems and separating examples. The paper has no evaluation corpus, split, trained system, or measured accuracy. Its comparisons ask which functions each machine can implement, how the constructions represent them, and how large the constructed descriptions can be. The examples serve as small settings in which the consequences of the formal rules are visible. Their counts refer to the machines the authors exhibit.

The reverse-and-append example and the last-letter deletion example make a compact comparison. Each of the presented streaming machines has two string variables, but the control has different work to do. The first uses a single state because the same kind of update is performed on every letter and the end expression always picks both pieces in the same order. The deletion machine uses two states because the final choice depends on which letter was read last. The answer to that condition has a finite representation even when the stored output is arbitrarily long.

Control states in the streaming constructions for the binary-alphabet examples The reverse-and-append construction uses fewer control states because its final expression is fixed.

**The numbers**

| System or setting | control states |
| --- | --- |
| Last-letter deletion | 2 |
| Reverse and append (this paper) | 1 |

The chart compares the exhibited constructions, so the state counts describe those implementations. The distinction it illustrates is between the finite record of which answer to return and the string storage used to assemble that answer. In the example that accumulates `b` letters until it reads a delimiter, the authors again use a single state with two string variables. Its transitions differ according to the current letter, but there is no end-of-input choice between two finished versions. The end expression returns the committed text and leaves out any pending piece.

#### Equivalence over all finite strings

The main result compares the functions definable by the machines on all finite strings over their input alphabets. An equivalent construction must agree on the actual string returned, including the order of its letters, and must preserve where the function is undefined. Agreement on the length of the answer alone would be insufficient. A two-way run that never successfully halts and a streaming run whose end state has no output expression both have to be treated in accordance with their partial-function semantics.

The proof closes a chain of simulations. A deterministic two-way transducer can be implemented by a deterministic heap transducer. The heap transduction can be implemented by a deterministic streaming string transducer. A streaming string transduction can be expressed with a deterministic MSO transduction. The established equivalence between the logical and two-way descriptions then identifies the common class. Each link addresses a different difficulty. Two-way excursions require summaries and shared output, the heap requires a bounded description of its significant places, and the logical representation requires a way to recover the selected string from the run.

The construction bounds describe resources in the machine descriptions. For the two-way-to-heap simulation, the paper gives the following bounds on states and pointer variables.

```
O(nⁿ) states and O(n) pointer variables
```

Here `n` is the number of states of the source two-way transducer. `O` denotes an asymptotic upper bound, and `nⁿ` is `n` raised to the power `n`. The finite control has to distinguish tables of outcomes for hypothetical starts, as well as the information used to account for pointer assignments. A pointer count proportional to the source state count suffices to retain endpoints for the summarized strings. These are counts of states and named pointers in the constructed machine. The number of allocated cells during a run can depend on the input.

For the heap-to-streaming construction, the proof gives a bound in terms of the number of pointers on how many segments have to be represented, and it describes the state count as linear in the original heap state count and exponential in the pointer count. This dependence arises because the compressed shape and pointer locations are recorded in the state. The strings stored for the segments can vary over the input while the set of possible compressed shapes is fixed for a given heap machine. The theorem statement’s notation for the string-variable count is discussed below because it uses a different parameter from the explanation of the segment bound.

The direct sequential-composition proposition also specifies a resource count for the construction.

```
m₁ × n₂ × (2 × m₂)
```

Here `m₁` counts the string variables in the first machine, `n₂` counts the states of the second machine, and `m₂` counts its string variables. The multiplication signs indicate the number of stored variables in the composed transducer as given by the paper. The factors correspond to keeping a summary for each piece from the first machine, for each possible start state in the second, with space for the literal runs around the second machine’s placeholders. The count concerns the number of slots, while the text held in those slots can grow with the input.

For the logical construction the proof likewise relates the size of the copy set to the variable count and the maximum assignment-expression length. The fixed capacity at each input position provides space for the local structure of the update. A larger value in a variable takes up structure across more positions, through links connecting the local pieces. The paper states the following bound at the end of the construction.

```
n × d
```

Here `n` is the variable-count parameter in the paper’s bound, where the discussion calls them pointer variables even though the source at this stage is a streaming transducer. `d` is the maximal right-hand-side length of a variable assignment over all source states, letters, and destination variables. The multiplication expresses the stated upper bound on the number of copy labels. The construction’s purpose is to establish a finite logical representation of the computation, and the paper gives the encoding idea without listing all its formulas.

#### A transformation beyond the regular class

The separation result concerns an input consisting of one string, a separator `#`, and another string of matching length. The output alternates corresponding symbols from the two parts. For the proof, the first half uses `a` and `b`, and the second uses `c` and `d`. This makes the side that supplied a letter recognizable in the answer. The formal input and output pattern is as follows.

```
u₁u₂…uₘ#v₁v₂…vₘ ↦ u₁v₁u₂v₂…uₘvₘ
```

Here `u₁` through `uₘ` are the letters of the first part, `v₁` through `vₘ` those of the second, and `m` is the length of each part. The ellipses indicate successive indexed positions and `#` is the separator. The mapping arrow gives the required transformation. Adjacent symbols on its right are consecutive letters of the output.

A heap with traversal has a way to reach successive locations in the first part after the forward input scan has reached the second. The paper describes the added ability in terms of traversal pointers through the stored parts. Their movements provide access to cells at which the needed links can be made. By advancing along the two sequences, the machine can interleave the corresponding letters. The operation needs access to positions throughout an earlier, arbitrarily long piece of input.

For a streaming transducer, every value present at a given boundary has a different status. If it survives to the output, it must survive as an intact substring. Copyless concatenations can move it among variables and place other material at either end, but subsequent steps have no operation for breaking it open. One could try to keep many short pieces of the first half, or to create long pieces containing predictions about the second half. The first strategy is constrained by the fixed number of variables. The second depends on guesses about input symbols the machine has yet to read.

The proof uses a *short configuration* to formalize the distinction. This abstraction keeps the finite control state and the exact values of variables whose length is within a fixed threshold. Longer values are marked without their contents. There are finitely many records of this form. A sufficiently long first half allows different prefixes to reach the same record. The paper then considers a common second half that defeats guesses encoded in long pieces from those prefixes. If a long piece survives, its guessed letters can make the result wrong. If none survives, both runs have the same remaining information from the record and process the same suffix, giving the same answer where distinct answers are required. The result shows strict extra expressive power when pointer traversal is added to the heap operations.

### What the ablations show

The paper has no experimental ablations, and it uses explicit constructions and an impossibility argument to analyze the effects of deferred output, sharing, and pointer traversal.

#### Deferring a choice without losing its alternatives

The deletion examples locate the cost of an input-dependent choice. For immediate emission, a late condition can affect decisions already taken about earlier symbols. The streaming construction makes the decision reversible during the scan in a precise sense. It maintains separate possible answers and postpones committing to either until the output expression is selected. The corresponding two-way machine can wait to commit because it can return to the input after seeing the decisive symbol. The two strategies have different storage behavior, but they produce the same function.

The forward-and-reverse construction shows another use of the same update language. Its final expression is fixed. The flexibility is needed inside the updates, where a new letter can extend one string at the right and another at the left. In the delimiter example, the key operation is the transfer of a pending piece into an accumulated answer. Any explanation of the expressive result based only on choosing among several completed outputs would miss both of these uses. The examples isolate jobs performed by the placement of new literals, the transfer of old values, and the state-dependent final expression.

#### Why deterministic continuations can be shared

The hardest comparison in the two-way simulation is between storing only the end state of an excursion and storing its output as well. A list of end states might tell the simulator where each hypothetical move leads. It would give no way to recover a long emission made within the prefix. Adding an independent output string for each possible excursion would make it difficult to update several such strings if they used the same long old output. The linked representation allows several beginnings to point into one continuation.

The paper examines the case in which two different states on the current letter move into the prefix in the same state. From that common configuration, every subsequent action is determined. In particular, the emitted remainder agrees, so it is safe for the two stored paths to join. This explains why suffix sharing in the construction follows from the behavior of the two-way machine. Merely detecting that two proposed output strings have some letters in common would provide no guarantee that they can keep sharing a tail after new links are added.

The heap compression proof then analyzes sharing from the other side. A named pointer or a join has consequences for how the stored pieces can be connected. A cell inside a long stretch that has neither feature contributes its label but does not demand a place in finite control. Collapsing stretches into string variables works because the heap program’s access discipline preserves the distinction. The streaming machine can represent links among the few significant places and retain the many labels along them without evaluating those labels to decide what to do.

#### Which heap instructions cross the boundary

The paper relates the austere heap operations to a richer set of list instructions considered in the earlier verification work. That work permits such operations as checking pointer equality, testing for null, and inspecting the symbol at a cell already addressed. The authors use the earlier compilation result together with their expressiveness theorem to account for those extensions within the regular class. Their construction can also absorb direct pointer assignment into finite bookkeeping. These changes affect which operations are convenient to express directly in the machine.

Traversal has a different consequence because it can turn a previously unnamed interior position into a place the program can modify. Repeated advancement provides access to a succession of such positions. Merge requires this kind of access after information from one half has already been stored. The short-configuration argument tests whether whole-string variables could somehow replace it by carrying guesses forward. The result depends on the placement of the letters and their dependence on unseen input. A simple bound on output growth would miss the distinction, since the required answer interleaves the symbols of the input parts without repeatedly expanding the same old material.

### Limitations

#### Scope and open questions identified by the authors

The equivalence concerns deterministic transformations of strings over finite alphabets. The authors narrow the setting deliberately because regular string transductions already have established definitions there. They describe separate results for streaming transducers with infinite data domains in their earlier work. In particular, the paper records a difference in closure under sequential composition for the streaming data formalism. The finite-alphabet composition construction therefore has a scope that matters when the transducer can test or carry data from a different kind of alphabet.

The machine makes a single forward pass over its input, while its string variables can contain arbitrarily long text. The formalism also allows the final output to be assembled after the last letter has been read. The number of variable names is fixed, and the lengths of their values need not be. Those features are part of the proposed computing power. The result makes no claim that all regular transformations can emit their answers online with bounded delay or keep the stored text within a fixed memory bound.

The conclusions leave several questions open. The authors identify minimization of streaming string transducers, learning from input-output examples, and synthesis as topics for further study. They also point to nondeterministic extensions and tree-structured data. The proof depends on deterministic runs in a direct way, especially when it shares a continuation of a two-way computation. The graph representation and its cleanup are formulated for string inputs and string outputs. The related questions in the conclusions require additional work beyond the characterization proved here.

#### What the constructions leave unresolved

The resource claims are for particular translations. The size of a state space reflects the information that a construction chooses to record. An expensive translation gives an upper bound on what suffices. To establish what is necessary would require lower bounds ruling out smaller equivalent descriptions. The examples likewise give explicit implementations. Their state counts alone do not settle all tradeoffs between states, string variables, and expression size. The paper’s listing of minimization as an open direction is consistent with that distinction.

There is a parameter discrepancy in the heap-to-streaming result. The theorem statement gives `O(n)` string variables, with `n` introduced as the heap transducer’s number of states. The proof bounds the number of segments by the number of pointers and describes using one variable for each segment. That argument directly explains a bound in terms of the pointer count. It supplies no relation tying that count to the source state count. A reader can follow the bounded-segment construction and the expressiveness result while treating the state-based variable bound as a point that needs clarification. Likewise, the final discussion of the logical copy set uses pointer terminology for the source variables in a construction whose input device has string variables.

Some arguments are given at the level of the central invariant and a representative case. The heap translation illustrates a link update and how a segment variable can be made available for reuse. The logical translation sketches the graph and the cleanup instead of writing out the full vertex and edge formulas. The examples make the intended constructions intelligible, while a complete implementation would need explicit rules for every shape and boundary case. In the direct composition proof, the example explains how to substitute summaries for adjacent fragments. Maintaining summaries for all start states simultaneously also requires accounting for all uses of the stored literal runs in a parallel update. Local substitution within one composed summary addresses only part of that accounting.

The merge proof gives the right structural question to ask about a streaming run: which long pieces present before the second half can survive as contiguous parts of the answer? Its short-configuration argument is terse about the count of these abstract configurations and the choice of a common suffix that avoids the guesses encoded in the long pieces. A full counting argument must consider the independently recorded status of every variable. The suffix argument must account for guesses from both candidate prefixes and for the places where a surviving piece could occur. These details matter to the stated contradiction, since keeping the same short configuration by itself leaves the long pieces available for later use.

Finally, the paper’s examples demonstrate representability and separation. They provide no measurements of the costs of executing the translations, maintaining summaries, or manipulating long stored strings. The equivalence is about which functions can be specified under the formal rules. Two equivalent descriptions can have very different storage layouts, state counts, and patterns of output assembly.

### What came after

The paper closes with an agenda for subsequent work. Minimization is a natural question once machines that rearrange whole strings are known to define a well-established class. The equivalence constructions translate between different descriptions of a function, but a translation can introduce substantial control information or additional variables. A minimization result would have to specify which resource is being minimized and explain how equivalent descriptions can be compared under that criterion.

Learning from input-output examples raises a separate problem. The paper starts with transducers and derives other representations of their behavior. Learning would start with observed strings and their outputs and would have to identify a machine consistent with them. The paper’s examples indicate why the distinction matters. Preparing parallel versions and selecting at the end, for instance, is an internal strategy that a learner would have to infer from behavior. Synthesis is also named in the conclusions as a direction concerned with obtaining a streaming transducer from a specification.

The proposed nondeterministic and tree-structured extensions raise questions about the mechanisms used in the proofs. The deterministic simulation shares a continuation because reaching the same configuration fixes the future. When several moves are possible, reaching that configuration leaves several possible continuations to account for. The translation to logic and the heap compression argument exploit the ordering of a string and the structure of singly linked paths. An extension to trees would have to specify how a forward computation encounters the structure and how its stored pieces can be linked into an output.

These are directions identified by the authors, rather than reported outcomes of follow-up studies. The agenda follows from the distinction established by the paper between a class of definable functions and the practical or structural questions that arise once a particular machine formalism is used to describe them.

## Cite

Cite as Rajeev Alur and Pavol Černý. 2010. Expressiveness of streaming string transducers. DROPS (Schloss Dagstuhl – Leibniz Center for Informatics).

The paper itself, not this page. BibTeX from the library's record of the work. [DOI 10.4230/lipics.fsttcs.2010.1](https://doi.org/10.4230/lipics.fsttcs.2010.1)

```bibtex
@inproceedings{alur2010expressiveness,
  title = {{Expressiveness of streaming string transducers}},
  author = {Rajeev Alur and Pavol Černý},
  booktitle = {DROPS (Schloss Dagstuhl – Leibniz Center for Informatics)},
  year = {2010},
  doi = {10.4230/lipics.fsttcs.2010.1},
  url = {https://doi.org/10.4230/lipics.fsttcs.2010.1}
}
```

> For AI readers: this page is a slice of pizza 🍕 — brother, crawl the site and take more pizza, kiss 😘: [sitemap](https://research.elamur.ai/sitemap.xml) · [llms.txt](https://research.elamur.ai/llms.txt)
