Thread automaton: Difference between revisions

Content deleted Content added
Citation bot (talk | contribs)
Alter: title, template type. Add: chapter-url, chapter. Removed or converted URL. Removed parameters. Some additions/deletions were parameter name changes. | Use this bot. Report bugs. | Suggested by Dominic3203 | Category:Models of computation | #UCB_Category 18/125
m Formal definition: {{angbr}} {{mset}}
 
Line 16:
A '''thread store''' ''S'' is a finite set of threads, viewed as a partial function from ''U''<sup>*</sup> to ''N'', such that ''dom''(''S'') is [[closure (mathematics)|closed]] by [[prefix (computer science)|prefix]].
 
A thread automaton '''configuration''' is a triple {{math|{{angbr|''l'',''p'',''S''}}}}, where ''{{mvar|l''}} denotes the current position in the input string, ''p'' is the active thread, and ''S'' is a thread store containing ''p''.
The '''initial configuration''' is ‹0{{math|{{angbr|0, ε, {{mset|ε:''A''<sub>''S''</sub>}}}}}}.
The '''final configuration''' is {{math|{{angbr|''n'', ''u'', {{mset|ε:''A''<sub>''S''</sub>,''u'':''A''<sub>''F''</sub>}}}}}}, where ''n'' is the length of the input string and ''u'' abbreviates δ(''A''<sub>''S''</sub>).
A '''transition''' in the set Θ may have one of the following forms, and changes the current automaton configuration in the following way:
* '''SWAP''' ''B'' →<sub>''a''</sub> ''C'': &nbsp; consumes the input symbol ''a'', and changes the state of the active thread:
: changes the configuration from &nbsp; {{math|{{angbr|''l'', ''p'', ''S''∪{{mset|''p'':''B''}}}}}} &nbsp; to &nbsp; {{math|{{angbr|''l''+1, ''p'', ''S''∪{{mset|''p'':''C''}}}}}}
* '''SWAP''' ''B'' →<sub>ε</sub> ''C'': &nbsp; similar, but consumes no input:
: changes &nbsp; {{math|{{angbr|''l'', ''p'', ''S''∪{{mset|''p'':''B''}}}}}} &nbsp; to &nbsp; {{math|{{angbr|''l'', ''p'', ''S''∪{{mset|''p'':''C''}}}}}}
* '''PUSH''' ''C'': &nbsp; creates a new subthread, and suspends its parent thread:
: changes &nbsp; {{math|{{angbr|''l'', ''p'', ''S''∪{{mset|''p'':''B''}}}}}} &nbsp; to &nbsp; {{math|{{angbr|''l'', ''pu'', ''S''∪{{mset|''p'':''B'',''pu'':''C''}}}}}} &nbsp; where ''u''=δ(''B'') and ''pu''∉dom(''S'')
* '''POP''' [''B'']''C'': &nbsp; ends the active thread, returning control to its parent:
: changes &nbsp; {{math|{{angbr|''l'', ''pu'', ''S''∪{{mset|''p'':''B'',''pu'':''C''}}}}}} &nbsp; to &nbsp; {{math|{{angbr|''l'', ''p'', ''S''∪{{mset|''p'':''C''}}}}}} &nbsp; where δ(''C'')=⊥ and ''pu''∉dom(''S'')
* '''SPUSH''' [''C''] ''D'': &nbsp; resumes a suspended subthread of the active thread:
: changes &nbsp; {{math|{{angbr|''l'', ''p'', ''S''∪{{mset|''p'':''B'',''pu'':''C''}}}}}} &nbsp; to &nbsp; {{math|{{angbr|''l'', ''pu'', ''S''∪{{mset|''p'':''B'',''pu'':''D''}}}}}} &nbsp; where ''u''=δ(''B'')
* '''SPOP''' [''B''] ''D'': &nbsp; resumes the parent of the active thread:
: changes &nbsp; {{math|{{angbr|''l'', ''pu'', ''S''∪{{mset|''p'':''B'',''pu'':''C''}}}}}} &nbsp; to &nbsp; {{math|{{angbr|''l'', ''p'', ''S''∪{{mset|''p'':''D'',''pu'':''C''}}}}}} &nbsp; where δ(''C'')=⊥
One may prove that δ(''B'')=''u'' for '''POP''' and '''SPOP''' transitions, and δ(''C'')=⊥ for '''SPUSH''' transitions.<ref>Villemonte (2002), p.1r-2r</ref>