# I'm looking for a construct that is to semantic-analysis what NFA/DFA are to scanning and DPDA is to parsing

What maps to Semantic Analysis the way automata like Finite State Machines and Pushdown automatons map to Lexing and Parsing?

A couple of years ago I came across a paper that presented such a construct; I don't remember much about the paper to be useful, but here's what I think I remember:

1. I think the paper was from the late 80s or early 90s,
2. The construct had/employed a double-ended queue,
3. Elements were replaced in the queue until the replacement rules could no longer be applied [and replacements were longer sequences than what they replaced],
4. The paper mentioned that while it mapped to the Semantic Analysis, it was somewhat unwieldy to use.

Any help locating this paper would be most welcome, as would info on other constructs mapping to Semantic Analysis.

Thank you.

• repeated substring replacing is turing complete. – ratchet freak Jun 20 '17 at 14:13
• @ratchetfreak -- I hadn't heard that. That's interesting. – Shark8 Jun 20 '17 at 19:37

The current string encodes the tape with a new symbol $\$$followed by an encoding of the current state inserted before the position where the current head is. The allowed replacements can be encoded by taking each transition$\delta(n, b) = (m, c, N|L|R)$by creating the replacement rules to replace$a\$nb$ with $a\$mc\$mac$ or $ac\$m\$ for not moving the head or moving it left or right where a is every symbol in the alphabet.