# dfa

A deterministic finite automaton (DFA) is a mathematical model of a simple computational device that reads an input string and accepts or rejects it, formally represented as a 5-tuple with finite states, an input alphabet, a transition function, a start state, and accepting states.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## Certified Split Points for Parallel Lexing: Exact and Modulo Discarded Tokens

DevFeed: [Certified Split Points for Parallel Lexing: Exact and Modulo Discarded Tokens](<https://devfeed.tech/articles/certified-split-points-for-parallel-lexing-exact-and-modulo-discarded-tokens-101582.md>)

Original publisher: [Read original article](<https://arxiv.org/abs/2608.03473>)

Author: Nicklas Nidh\\"ogg

Published: 2026-10-27T04:00:00Z

Content type: article

Language: en

Sources: [arXiv: Distributed Computing](<https://devfeed.tech/sources/arxiv-distributed-computing.md>)

Topics: [dfa](<https://devfeed.tech/topics/dfa.md>), [Finite-state machine](<https://devfeed.tech/topics/finite-state-machine.md>)

Tags: [cs-dc](<https://devfeed.tech/tags/cs-dc.md>), [cs-fl](<https://devfeed.tech/tags/cs-fl.md>), [cs-pl](<https://devfeed.tech/tags/cs-pl.md>), [parallel](<https://devfeed.tech/tags/parallel.md>), [points](<https://devfeed.tech/tags/points.md>), [split](<https://devfeed.tech/tags/split.md>), [tokenization](<https://devfeed.tech/tags/tokenization.md>), [tokens](<https://devfeed.tech/tags/tokens.md>)

### AI overview

The paper gives two DFA-based conditions for splitting longest-match lexing across chunks without recovering each chunk's entry state. An exact certificate guarantees that every occurrence of a byte begins a token and preserves token kinds and lengths, but strings, comments, or whitespace may eliminate useful certificates. A more permissive, constant-time test guarantees equivalence after removing declared discarded tokens; it is sound but can be incomplete. It recovers newline for a conventional C-like tokenization and tab, newline, and carriage return for JSON, while rejecting newline with unrestricted block comments. Safety is decidable in PSPACE for general token automata and polynomial time for literal vocabularies; unsafe bytes have replayable counterexamples. In tests on 15 token sets, the second condition was exact. The reported single-machine benchmark reached 92.6-95.3% efficiency at eight threads and 3.46-3.94x end-to-end speedup at four threads.

### Source excerpt

arXiv:2608.03473v4 Announce Type: replace-cross Abstract: Table-driven DFA lexing is sequential, since each transition depends on the previous byte's state. Scanning one input in parallel needs each chunk's entry state, which existing methods recover by simulation, speculation, prescanning, or overlap. We give two conditions under which none is needed. For a longest-match scanner restarting from q0 at every token boundary, a byte b is a certified split symbol when no reachable state other than q0 has a b-transition whose target can reach acceptance, and q0 is not re-entrant if it has one. Every occurrence of such a byte in completely tokenizable input begins a token, so chunks starting there reproduce the serial sequence of kinds and lengths. The condition is necessary and sufficient, but one string, comment, or whitespace run can remove every useful certificate. Comments and whitespace are usually discarded, so we weaken the guarantee to equality after deleting a declared discarded set and give a second condition, a precomputed constant-time one-bit test. It is sound but incomplete and more permissive, strictly so on suitable token sets and discarded sets. It recovers newline for a conventional C-like tokenization and tab, newline and carriage return for JSON, and refuses newline where block comments are unrestricted. Safety modulo the discarded set is decidable in PSPACE for every token automaton and in polynomial time for literal vocabularies, and every unsafe byte has a replayable counterexample. On the fifteen token sets studied the second condition is already exact. Splitting at exact certificates in munch reaches 92.6-95.3% parallel efficiency at eight threads on a restricted CPU set and a 512 MiB corpus, and a 3.46-3.94x end-to-end speedup at four threads, on one machine. It turns delimiter-based parallel lexing from a language-specific assumption into a property a compiler checks.

## Synthesis and Verification of Register Automata over Data Sequences (Technical Report)

DevFeed: [Synthesis and Verification of Register Automata over Data Sequences (Technical Report)](<https://devfeed.tech/articles/synthesis-and-verification-of-register-automata-over-data-sequences-technical-report-94682.md>)

Original publisher: [Read original article](<https://arxiv.org/abs/2511.19100>)

Author: Chih-Duo Hong, Hongjian Jiang, Anthony W. Lin, Oliver Markgraf, Julian Parsert, Tony Tan

Published: 2026-10-22T04:00:00Z

Content type: article

Language: en

Sources: [arXiv: Machine Learning](<https://devfeed.tech/sources/arxiv-machine-learning.md>)

Topics: [Sequences](<https://devfeed.tech/topics/sequences.md>), [Machine learning](<https://devfeed.tech/topics/machine-learning.md>), [concept-learning](<https://devfeed.tech/topics/concept-learning.md>), [dfa](<https://devfeed.tech/topics/dfa.md>), [polynomials](<https://devfeed.tech/topics/polynomials.md>)

Tags: [alignment](<https://devfeed.tech/tags/alignment.md>), [alphabet](<https://devfeed.tech/tags/alphabet.md>), [application](<https://devfeed.tech/tags/application.md>), [benchmark](<https://devfeed.tech/tags/benchmark.md>), [classifiers](<https://devfeed.tech/tags/classifiers.md>), [comparisons](<https://devfeed.tech/tags/comparisons.md>), [control](<https://devfeed.tech/tags/control.md>), [costs](<https://devfeed.tech/tags/costs.md>), [cs-ai](<https://devfeed.tech/tags/cs-ai.md>), [cs-fl](<https://devfeed.tech/tags/cs-fl.md>), [cs-lg](<https://devfeed.tech/tags/cs-lg.md>), [data](<https://devfeed.tech/tags/data.md>), [dra](<https://devfeed.tech/tags/dra.md>), [fixed](<https://devfeed.tech/tags/fixed.md>), [framework](<https://devfeed.tech/tags/framework.md>), [guarantees](<https://devfeed.tech/tags/guarantees.md>), [implement](<https://devfeed.tech/tags/implement.md>), [infinite](<https://devfeed.tech/tags/infinite.md>), [languages](<https://devfeed.tech/tags/languages.md>), [large](<https://devfeed.tech/tags/large.md>), [sequences](<https://devfeed.tech/tags/sequences.md>), [synthesis](<https://devfeed.tech/tags/synthesis.md>), [verification](<https://devfeed.tech/tags/verification.md>)

### AI overview

The report presents a method to synthesize Deterministic Register Automata (DRAs) and check their robustness on ordered rational data sequences. Its exact checker reduces robustness to coverability and then shortest paths; for a fixed register count it runs in polynomial time, with exponential dependence on that count. It can find variable-length witnesses, including for alignment costs such as DTW, without a preset length bound. The authors also use learned DRAs as interpretable surrogates for neural sequence classifiers: a PAC validation loop refines rejected candidates, can return genuine non-robustness witnesses, and accepts surrogates with statistical guarantees for fidelity and local stability. Their RAExc implementation is evaluated on benchmark languages and sequentialized MNIST; the abstract reports high accuracy and verified robustness of learned automata.

### Source excerpt

arXiv:2511.19100v2 Announce Type: replace-cross Abstract: Data sequences, such as time series, traces, and sensor streams, are words over large or infinite data domains. Their properties often depend on comparisons between values at different positions, which finite automata cannot express directly. We study synthesis and verification for Deterministic Register Automata (DRAs) over ordered data sequences. DRAs combine finite control with registers for remembered data values, providing compact symbolic descriptions of quantitative sequence languages. Our technical core is a local-search synthesis procedure and an exact robustness checker for DRAs. We fix the alphabet theory to ordered rationals $(\Q;<,=)$ with rational guard constants and use non-negative affine accumulator costs. For a fixed number of DRA registers, the checker runs in polynomial time; its dependence on that number is exponential. It reduces robustness to coverability and then to a shortest-path problem. Since the search ranges over $\Q^+$, it produces variable-length witnesses and, for RAA-definable alignment costs such as DTW, explores a counterexample space with no a priori length bound. As an application, we use learned DRAs as interpretable surrogates for queried neural sequence classifiers. A probably approximately correct (PAC) validation loop refines rejected candidates, returns genuine non-robustness witnesses for the classifier when found, and accepts a surrogate only with statistical guarantees for fidelity and local stability. We implement the framework in $\textsc{RAExc}$, enabling the synthesis of interpretable automata and the verification of their robustness. We evaluate the approach on benchmark languages and sequentialized MNIST, demonstrating high accuracy while verifying the robustness of the learned automata.

## How Stripe uses graph search and state machines to auto-remediate a global database fleet

DevFeed: [How Stripe uses graph search and state machines to auto-remediate a global database fleet](<https://devfeed.tech/articles/how-stripe-uses-graph-search-and-state-machines-to-auto-remediate-a-global-database-fleet-81778.md>)

Original publisher: [Read original article](<https://stripe.dev/blog/how-stripe-uses-graph-search-and-state-machines-to-auto-remediate-a-global-database-fleet>)

Author: Pragya Mehta

Published: 2026-07-16T00:00:00Z

Content type: article

Language: en

Sources: [Stripe Dot Dev Blog](<https://devfeed.tech/sources/stripe-dot-dev-blog.md>)

Topics: [NebulaGraph](<https://devfeed.tech/topics/nebula-graph.md>), [database-optimization](<https://devfeed.tech/topics/database-optimization.md>), [dfa](<https://devfeed.tech/topics/dfa.md>), [Graphs](<https://devfeed.tech/topics/graphs.md>), [scaling laws](<https://devfeed.tech/topics/scaling-laws.md>), [Integration testing](<https://devfeed.tech/topics/integration-testing.md>)

Tags: [algorithms](<https://devfeed.tech/tags/algorithms.md>), [database](<https://devfeed.tech/tags/database.md>), [graph](<https://devfeed.tech/tags/graph.md>), [infrastructure](<https://devfeed.tech/tags/infrastructure.md>), [layouts](<https://devfeed.tech/tags/layouts.md>), [mongodb](<https://devfeed.tech/tags/mongodb.md>), [pager](<https://devfeed.tech/tags/pager.md>), [pathfinding](<https://devfeed.tech/tags/pathfinding.md>), [recovery](<https://devfeed.tech/tags/recovery.md>)

### AI overview

Stripe modeled its MongoDB infrastructure as a traversable graph and used pathfinding algorithms to compute and execute recovery plans. The automated system reduced pager volume by 30% (about 200 pages per year), eliminated 12 days of unhealthy shard states annually, and supports new shard layouts without manual effort.

### Source excerpt

Discover how we modeled our MongoDB infrastructure as a traversable graph and then use pathfinding algorithms to dynamically compute and execute recovery plans. This automated approach reduced pager volume by 30% (~200 pages/year), eliminated 12 days of unhealthy shard states annually, and supports new shard layouts with zero manual effort.

## Friday Q&A 2018-04-27: Generating Text With Markov Chains in Swift

DevFeed: [Friday Q&A 2018-04-27: Generating Text With Markov Chains in Swift](<https://devfeed.tech/articles/friday-q-a-2018-04-27-generating-text-with-markov-chains-in-swift-30627.md>)

Original publisher: [Read original article](<http://www.mikeash.com/pyblog/friday-qa-2018-04-27-generating-text-with-markov-chains-in-swift.html>)

Author: Mike Ash

Published: 2018-04-28T01:27:00Z

Content type: tutorial

Language: en

Sources: [Mike Ash](<https://devfeed.tech/sources/mike-ash.md>)

Topics: [Swift](<https://devfeed.tech/topics/swift.md>), [dfa](<https://devfeed.tech/topics/dfa.md>)

Tags: [2018](<https://devfeed.tech/tags/2018.md>), [friday](<https://devfeed.tech/tags/friday.md>), [markov](<https://devfeed.tech/tags/markov.md>), [q-a](<https://devfeed.tech/tags/q-a.md>), [swift](<https://devfeed.tech/tags/swift.md>), [text](<https://devfeed.tech/tags/text.md>)

### AI overview

The article builds a Swift Markov chain text generator from the author's blog RSS feed. Each word is a state linked to possible following words; repeated links are stored in an array so choosing a random index naturally weights transitions by how often they occurred. This is simple and fast, but uses more memory than counted links or precomputed cumulative weights. `Chain` clears those links during deinitialization to break reference cycles. The code parses RSS descriptions, uses Foundation sentence enumeration, and splits sentences on spaces, retaining punctuation as part of words to constrain output and produce more natural punctuation. Generated sentences are intentionally often nonsensical. The article also highlights handling circular references, text enumeration, and conditional conformance in Swift.

### Source excerpt

Markov chains make for a simple way to generate realistic looking but nonsensical text. Today, I'm going to use that technique to build a text generator based on this blog's contents, an idea suggested/inspired by reader Jordan Pittman. (Read More)