TuringSim
C++ framework to simulate abstract computing models
Public Types | Static Public Member Functions | Static Public Attributes | List of all members
TuringSim::Machine::Turing::Utm Class Reference

A factory for the universal Turing machine described in Turing's 1936 paper. More...

#include <machine/utm.h>

Public Types

typedef DeterministicTuringStyleMConfigurationTuringMachine< std::string, hasHalfTapeUtmType
 The type of Turing's UTM.
 
typedef Transition::Turing::StringTuringStyleMConfigurationTuringMachineTransition< hasHalfTapeTransitionType
 The type of transitions returned by this factory. More...
 
typedef std::set< TransitionTypeTransitionSetType
 Sets of TransitionType.
 

Static Public Member Functions

static UtmType makeUtm ()
 Build a new UTM. More...
 
static TransitionSetType makeFind ()
 Build the find function. More...
 
static TransitionSetType makeErase ()
 Build the erase function. More...
 
static TransitionSetType makePrintAtEnd ()
 Build the print at end function. More...
 
static TransitionSetType makeFindAndMove ()
 Build the find and move function. More...
 
static TransitionSetType makeCopy ()
 Build the copy function. More...
 
static TransitionSetType makeCopyAndErase ()
 Build the copy and erase function. More...
 
static TransitionSetType makeReplace ()
 Build the replace function. More...
 
static TransitionSetType makeComparison ()
 Build the comparison function. More...
 
static TransitionSetType makeFindLast ()
 Build the find last function. More...
 
static TransitionSetType makeE ()
 Build the e table of the UTM. More...
 
static TransitionSetType makeCon ()
 Build the con table of the UTM. More...
 
static TransitionSetType makeInit ()
 Build the init table of the UTM. More...
 
static TransitionSetType makeSim ()
 Build the sim_n table of the UTM. More...
 
static TransitionSetType makeMf ()
 Build the mf_n table of the UTM. More...
 
static TransitionSetType makeSh ()
 Build the sh_n table of the UTM. More...
 
static TransitionSetType makeInst ()
 Build the inst_n table of the UTM. More...
 

Static Public Attributes

constexpr static bool hasHalfTape = true
 This machine works on an half-tape. More...
 

Detailed Description

A factory for the universal Turing machine described in Turing's 1936 paper.

This class contains only typedefs and static methods.

Definition at line 13 of file utm.h.

Member Typedef Documentation

◆ TransitionType

The type of transitions returned by this factory.

This is in fact a derived class of transitions in UtmType that allows to parse their component from strings. Consequently, TransitionType != UtmType::TransitionType.

Definition at line 33 of file utm.h.

Member Function Documentation

◆ makeComparison()

Utm::TransitionSetType TuringSim::Machine::Turing::Utm::makeComparison ( )
static

Build the comparison function.

Returns
a set of m-configuration transitions.

Definition at line 105 of file utm.cpp.

Here is the caller graph for this function:

◆ makeCon()

Utm::TransitionSetType TuringSim::Machine::Turing::Utm::makeCon ( )
static

Build the con table of the UTM.

Returns
a set of m-configuration transitions.

Definition at line 140 of file utm.cpp.

Here is the caller graph for this function:

◆ makeCopy()

Utm::TransitionSetType TuringSim::Machine::Turing::Utm::makeCopy ( )
static

Build the copy function.

Returns
a set of m-configuration transitions.

Definition at line 74 of file utm.cpp.

Here is the caller graph for this function:

◆ makeCopyAndErase()

Utm::TransitionSetType TuringSim::Machine::Turing::Utm::makeCopyAndErase ( )
static

Build the copy and erase function.

Returns
a set of m-configuration transitions.

Definition at line 82 of file utm.cpp.

Here is the caller graph for this function:

◆ makeE()

Utm::TransitionSetType TuringSim::Machine::Turing::Utm::makeE ( )
static

Build the e table of the UTM.

Returns
a set of m-configuration transitions.

Definition at line 130 of file utm.cpp.

Here is the caller graph for this function:

◆ makeErase()

Utm::TransitionSetType TuringSim::Machine::Turing::Utm::makeErase ( )
static

Build the erase function.

Returns
a set of m-configuration transitions.

Definition at line 45 of file utm.cpp.

Here is the caller graph for this function:

◆ makeFind()

Utm::TransitionSetType TuringSim::Machine::Turing::Utm::makeFind ( )
static

Build the find function.

Returns
a set of m-configuration transitions.

Definition at line 31 of file utm.cpp.

Here is the caller graph for this function:

◆ makeFindAndMove()

Utm::TransitionSetType TuringSim::Machine::Turing::Utm::makeFindAndMove ( )
static

Build the find and move function.

Returns
a set of m-configuration transitions.

Definition at line 64 of file utm.cpp.

Here is the caller graph for this function:

◆ makeFindLast()

Utm::TransitionSetType TuringSim::Machine::Turing::Utm::makeFindLast ( )
static

Build the find last function.

Returns
a set of m-configuration transitions.

Definition at line 117 of file utm.cpp.

Here is the caller graph for this function:

◆ makeInit()

Utm::TransitionSetType TuringSim::Machine::Turing::Utm::makeInit ( )
static

Build the init table of the UTM.

Returns
a set of m-configuration transitions.

Definition at line 153 of file utm.cpp.

Here is the caller graph for this function:

◆ makeInst()

Utm::TransitionSetType TuringSim::Machine::Turing::Utm::makeInst ( )
static

Build the inst_n table of the UTM.

Returns
a set of m-configuration transitions.

Definition at line 212 of file utm.cpp.

Here is the caller graph for this function:

◆ makeMf()

Utm::TransitionSetType TuringSim::Machine::Turing::Utm::makeMf ( )
static

Build the mf_n table of the UTM.

Returns
a set of m-configuration transitions.

Definition at line 179 of file utm.cpp.

Here is the caller graph for this function:

◆ makePrintAtEnd()

Utm::TransitionSetType TuringSim::Machine::Turing::Utm::makePrintAtEnd ( )
static

Build the print at end function.

Returns
a set of m-configuration transitions.

Definition at line 54 of file utm.cpp.

Here is the caller graph for this function:

◆ makeReplace()

Utm::TransitionSetType TuringSim::Machine::Turing::Utm::makeReplace ( )
static

Build the replace function.

Returns
a set of m-configuration transitions.

Definition at line 96 of file utm.cpp.

Here is the caller graph for this function:

◆ makeSh()

Utm::TransitionSetType TuringSim::Machine::Turing::Utm::makeSh ( )
static

Build the sh_n table of the UTM.

Returns
a set of m-configuration transitions.

Definition at line 196 of file utm.cpp.

Here is the caller graph for this function:

◆ makeSim()

Utm::TransitionSetType TuringSim::Machine::Turing::Utm::makeSim ( )
static

Build the sim_n table of the UTM.

Returns
a set of m-configuration transitions.

Definition at line 167 of file utm.cpp.

Here is the caller graph for this function:

◆ makeUtm()

Utm::UtmType TuringSim::Machine::Turing::Utm::makeUtm ( )
static

Build a new UTM.

Returns
A fresh instance of Turing's UTM.

Definition at line 4 of file utm.cpp.

Here is the call graph for this function:

Member Data Documentation

◆ hasHalfTape

constexpr static bool TuringSim::Machine::Turing::Utm::hasHalfTape = true
staticconstexpr

This machine works on an half-tape.

It may also work with a full tape as long as the current cell is on the right tape at the beginning, but the implementation of half-tape is slightly more efficient.

Definition at line 20 of file utm.h.


The documentation for this class was generated from the following files: