Main Page | Modules | Alphabetical List | Compound List | File List | Compound Members | Related Pages

NonHaltDetectionRoutines


Functions

bool simpleLoopCheck (turing_machine< d_type > &machine, unsigned int transition_limit)
 Simple loop detection algorithm.

bool isInfinite (std::vector< state< d_type > > &stateSet, localTape< d_type > &tape, std::vector< state< d_type > >::size_type stateIndex, int limitSeed, int backTrackLimit)
 recursive back track helper.

bool backTrack (turing_machine< d_type > &machine, unsigned int transition_limit)
 parent backTrack function.

bool isIn (std::vector< state< d_type > >::size_type element, std::vector< std::vector< state< d_type > >::size_type > set)
 check if element is in set

bool subsetLoop (std::vector< state< d_type > >::size_type seed, std::vector< state< d_type > >::size_type haltState, std::vector< state< d_type > > &stateSet)
 subset loops helper function.

bool loopStates (turing_machine< d_type > &machine)
 subset loop non halt detection.

unsigned int getNextRightBound (turing_machine< d_type > &machine, std::list< d_type >::iterator &rightBound, std::list< d_type >::iterator &leftBound, unsigned int &step_counter, unsigned int transition_limit)
 get the next right extremum in the back and forth sweeping motion of a christmas tree.

bool findMidSection (tapeChunk< d_type > &before, tapeChunk< d_type > &after, tapeChunk< d_type > &midSection, tapeChunk< d_type > &leftSection, tapeChunk< d_type > &rightSection)
 finds an additional middle portion of the tape given a tape before and after a sweep of a christmas tree.

tapeChunk< d_type > getNextChunk (turing_machine< d_type > &machine, std::list< d_type >::iterator leftBound, std::list< d_type >::iterator rightBound, unsigned int stopPointCounter, unsigned int &step_counter, unsigned int transition_limit, bool stopAtLeftBound, bool stopAtRightBound, bool inclusiveLeft, bool inclusiveRight, bool pushLeftBound, bool pushRightBound)
 get the next chunk of the tape after performing a transformation in the christmas tree grammars.

tapeChunk< d_type > getNextChunkUnevenCheck (turing_machine< d_type > &machine, std::list< d_type >::iterator leftBoundCheck, std::list< d_type >::iterator leftBound, std::list< d_type >::iterator rightBound, unsigned int stopPointCounter, unsigned int &step_counter, unsigned int transition_limit, bool stopAtLeftBound, bool stopAtRightBound, bool inclusiveLeft, bool inclusiveRight, bool pushLeftBound, bool pushRightBound)
 specialized version of getNextChunk this version is run for transitions that push the left bound in alternating christmas trees picks up uneven alternating christmas tree.

bool checkLeaningChristmasTreeGrammar (turing_machine< d_type > &machine, unsigned int firstRightBound, unsigned int secondRightBound, unsigned int thirdRightBound, std::list< d_type >::iterator firstLeftBound, std::list< d_type >::iterator secondLeftBound, std::list< d_type >::iterator thirdLeftBound, unsigned int transition_limit, tapeChunk< d_type > &N, tapeChunk< d_type > &U, tapeChunk< d_type > &X, tapeChunk< d_type > &V, std::vector< state< d_type > >::size_type s)
 check the grammar for a leaning christmas tree.

unsigned int getNextLeaningRightBound (turing_machine< d_type > &machine, std::list< d_type >::iterator &rightBound, unsigned int &step_counter, unsigned int transition_limit)
 specialized version of getNextRightBound for leaning christmas trees.

bool checkLeaningChristmasTree (turing_machine< d_type > &machine, unsigned int transition_limit)
 leaning christmas tree non halt detection routine.

bool leaningChristmasTree (turing_machine< d_type > &machine, unsigned int transition_limit)
 leaning christmas tree non halt detection routine (checks mirror machines).

unsigned int getNextBlankLocation (turing_machine< d_type > &machine, std::list< d_type >::iterator &rightBound, std::list< d_type >::iterator &leftBound, unsigned int &step_counter, unsigned int transition_limit)
 get the next location of a blank cell in a counter.

bool checkCounterConversion (turing_machine< d_type > &machine, tapeChunk< d_type > originalTape, tapeChunk< d_type > desiredTape, int originalReadHead, int desiredReadHead, std::vector< state< d_type > >::size_type originalState, std::vector< state< d_type > >::size_type desiredState)
 check a transformation in the counter grammar.

bool checkFinalCounterGrammar (turing_machine< d_type > &machine, tapeChunk< d_type > splitLeftSide, tapeChunk< d_type > splitRightSide, tapeChunk< d_type > zeroCell, tapeChunk< d_type > oneCell, tapeChunk< d_type > onePrimeCell, tapeChunk< d_type > endCell, int cellSize, std::vector< state< d_type > >::size_type stateC, std::vector< state< d_type > >::size_type stateR)
 checks all of the necessary transformations in the counter grammar.

bool checkCounterRun (turing_machine< d_type > &machine, unsigned int transition_limit, unsigned int firstBlankLocationCounter, tapeChunk< d_type > firstBlankLocation, tapeChunk< d_type > zeroCell, tapeChunk< d_type > oneCell, tapeChunk< d_type > onePrimeCell, tapeChunk< d_type > endCell, unsigned int cellSize, std::vector< state< d_type > >::size_type stateC)
 check the run of a counter from a blank location to verify transformations.

bool extractCounterElements (turing_machine< d_type > &machine, unsigned int transition_limit, unsigned int firstBlankLocationCounter, tapeChunk< d_type > firstBlankLocation, tapeChunk< d_type > secondBlankLocation, tapeChunk< d_type > middleLocation, std::vector< state< d_type > >::size_type stateC)
 extract the components in a counter.

bool testCounter (turing_machine< d_type > &machine, unsigned int transition_limit)
 test if the machine is a counter

bool counter (turing_machine< d_type > &machine, unsigned int transition_limit)
 test if the machine is a counter

bool establishSweep (turing_machine< d_type > &machine, std::list< d_type >::iterator &leftBound, std::list< d_type >::iterator &rightBound, unsigned int &step_counter, unsigned int step_limit, unsigned int transition_limit)
 run a machine for a while to establish a sweeping motion

bool checkMultiSweepFirstPass (turing_machine< d_type > &machine, unsigned int currentSweep, unsigned int totalSweeps, std::vector< unsigned int > rightBoundCounters, std::vector< std::list< d_type >::iterator > leftBoundPointers, unsigned int transition_limit, unsigned int &step_counter, tapeChunk< d_type > &U, tapeChunk< d_type > &X, tapeChunk< d_type > &V, std::vector< state< d_type > >::size_type s, std::vector< sweepStats< d_type > > &statistics)
 check the first pass through the grammar in a multi-sweep christmas tree.

bool checkMultiSweepSecondPass (turing_machine< d_type > &machine, unsigned int currentSweep, unsigned int totalSweeps, std::vector< unsigned int > rightBoundCounters, std::vector< std::list< d_type >::iterator > leftBoundPointers, unsigned int transition_limit, unsigned int &step_counter, std::vector< state< d_type > >::size_type s, std::vector< sweepStats< d_type > > &statistics)
 check the first pass through the grammar in a multi-sweep christmas tree.

bool checkMultiSweepChristmasTreeGrammar (turing_machine< d_type > &machine, unsigned int totalSweeps, std::vector< unsigned int > rightBoundCounters, std::vector< std::list< d_type >::iterator > leftBoundPointers, unsigned int transition_limit, tapeChunk< d_type > &U, tapeChunk< d_type > &X, tapeChunk< d_type > &V, std::vector< state< d_type > >::size_type s)
 check the grammar for christmas trees.

bool checkMultiSweepChristmasTree (turing_machine< d_type > &machine, unsigned int sweeps, unsigned int transition_limit)
 check for christmas tree non-halter.

bool multiSweepChristmasTree (turing_machine< d_type > &machine, unsigned int sweeps, unsigned int transition_limit)
 check for christmas tree non-halter (mirror machines as well).


Function Documentation

bool backTrack turing_machine< d_type > &  machine,
unsigned int  transition_limit
 

parent backTrack function.

Postcondition:
true if machine is determined to be a non-halter through backTracking methods
Author:
Owen Kellett

Definition at line 175 of file non_halt_detection.hpp.

References turing_machine< T >::haltState(), isInfinite(), and turing_machine< T >::stateSet().

bool checkCounterConversion turing_machine< d_type > &  machine,
tapeChunk< d_type >  originalTape,
tapeChunk< d_type >  desiredTape,
int  originalReadHead,
int  desiredReadHead,
std::vector< state< d_type > >::size_type  originalState,
std::vector< state< d_type > >::size_type  desiredState
 

check a transformation in the counter grammar.

Postcondition:
the machine is run on the original tape using the original state as the starting state until either the left or right bound of the tape is breached
Parameters:
machine machine to check
originalTape original local tape to run the machine on
desiredTape hopeful result after machine is ru
originalReadHead original location of read head on local tape
desiredReadHead desired location of read head on local tape
originalState original starting state of machine for transformation
desiredState desired state of machine after transformation
Returns:
true iff the desired conditions are the actual conditions on the machine
Author:
Owen Kellett

Definition at line 3053 of file non_halt_detection.hpp.

References turing_machine< T >::access_tape_read_write(), tapeChunk< T >::fillTape(), turing_machine< T >::get_current_state(), turing_machine< T >::nextMove(), turing_machine< T >::rigMachine(), turing_machine< T >::run_one(), and tapeChunk< T >::tapeConfig.

Referenced by checkFinalCounterGrammar().

bool checkCounterRun turing_machine< d_type > &  machine,
unsigned int  transition_limit,
unsigned int  firstBlankLocationCounter,
tapeChunk< d_type >  firstBlankLocation,
tapeChunk< d_type >  zeroCell,
tapeChunk< d_type >  oneCell,
tapeChunk< d_type >  onePrimeCell,
tapeChunk< d_type >  endCell,
unsigned int  cellSize,
std::vector< state< d_type > >::size_type  stateC
 

check the run of a counter from a blank location to verify transformations.

Postcondition:
machine is run from the firstBlankLocation until it is halfway down the tape; the components at each side of the read head are then checked and the transformations in the grammar are confirmed; if all holds, return true else false
Parameters:
machine machine to check
transition_limit max limit
firstBlankLocationCounter step counter of the first blank location
firstBlankLocation entire tape at the point of the first blank location counter
zeroCell zero cell
oneCell one cell
onePrimeCell one prime cell
endCell end cell
cellSize size of the above components
stateC carry signal
Author:
Owen Kellett

Definition at line 3190 of file non_halt_detection.hpp.

References turing_machine< T >::access_tape_read_write(), checkFinalCounterGrammar(), tapeChunk< T >::emptyTape(), tapeChunk< T >::fillTape(), turing_machine< T >::get_current_state(), tapeChunk< T >::length(), turing_machine< T >::nextMove(), turing_machine< T >::resetMachine(), and turing_machine< T >::run_one().

Referenced by extractCounterElements().

bool checkFinalCounterGrammar turing_machine< d_type > &  machine,
tapeChunk< d_type >  splitLeftSide,
tapeChunk< d_type >  splitRightSide,
tapeChunk< d_type >  zeroCell,
tapeChunk< d_type >  oneCell,
tapeChunk< d_type >  onePrimeCell,
tapeChunk< d_type >  endCell,
int  cellSize,
std::vector< state< d_type > >::size_type  stateC,
std::vector< state< d_type > >::size_type  stateR
 

checks all of the necessary transformations in the counter grammar.

Parameters:
machine machine to check
splitLeftSide left side resulting run when counter is run from the blank location to halfway to the end cell.
splitLeftSide right side resulting run when counter is run from the blank location to halfway to the end cell.
zeroCell zero component
oneCell one component
onePrimeCell one prime component
endCell end component
cellSize size of the above components
stateC carry signal
stateR return signal
Returns:
true if the split sides have the correct components and if all of the counter grammar transformations hold
Author:
Owen Kellett

Definition at line 3114 of file non_halt_detection.hpp.

References checkCounterConversion(), tapeChunk< T >::compareNextChunk(), and tapeChunk< T >::length().

Referenced by checkCounterRun().

bool checkLeaningChristmasTree turing_machine< d_type > &  machine,
unsigned int  transition_limit
 

leaning christmas tree non halt detection routine.

Parameters:
machine machine to check
transition_limit max limit before proof fails by default
Author:
Owen Kellett

Definition at line 1937 of file non_halt_detection.hpp.

References turing_machine< T >::access_tape_read_write(), checkLeaningChristmasTreeGrammar(), tapeChunk< T >::fillTape(), findMidSection(), turing_machine< T >::get_current_state(), getNextLeaningRightBound(), turing_machine< T >::nextMove(), turing_machine< T >::resetMachine(), and turing_machine< T >::run_one().

Referenced by leaningChristmasTree().

bool checkLeaningChristmasTreeGrammar turing_machine< d_type > &  machine,
unsigned int  firstRightBound,
unsigned int  secondRightBound,
unsigned int  thirdRightBound,
std::list< d_type >::iterator  firstLeftBound,
std::list< d_type >::iterator  secondLeftBound,
std::list< d_type >::iterator  thirdLeftBound,
unsigned int  transition_limit,
tapeChunk< d_type > &  N,
tapeChunk< d_type > &  U,
tapeChunk< d_type > &  X,
tapeChunk< d_type > &  V,
std::vector< state< d_type > >::size_type  s
 

check the grammar for a leaning christmas tree.

Parameters:
machine machine to check
firstRightBound step counter of the first right bound
secondRightBound step counter of the second right bound
thirdRightBound step counter of the third right bound
firstLeftBound pointer to the first left bound
secondLeftBound poiner to the second left bound
thirdLeftBound pointer to the third left bound
transition_limit max limit
N N component in the grammar
U U component in the grammar
X X component in the grammar
V V component in the grammar
s state s in the grammar
Author:
Owen Kellett

Definition at line 1638 of file non_halt_detection.hpp.

References turing_machine< T >::access_tape_read_write(), tapeChunk< T >::fillTape(), turing_machine< T >::get_current_state(), getNextChunk(), tapeChunk< T >::isEmpty(), turing_machine< T >::resetMachine(), turing_machine< T >::run_one(), and tapeChunk< T >::tapeConfig.

Referenced by checkLeaningChristmasTree().

bool checkMultiSweepChristmasTree turing_machine< d_type > &  machine,
unsigned int  sweeps,
unsigned int  transition_limit
 

check for christmas tree non-halter.

Parameters:
machine machine to check
sweeps number of sweeps to check in the multi-sweep grammar
transition_limit max steps before fail
Returns:
true iff machine is sweeps-sweep christmas tree
Author:
Owen Kellett

Definition at line 3863 of file non_halt_detection.hpp.

References turing_machine< T >::access_tape_read_write(), checkMultiSweepChristmasTreeGrammar(), establishSweep(), tapeChunk< T >::fillTape(), findMidSection(), turing_machine< T >::get_current_state(), getNextRightBound(), turing_machine< T >::nextMove(), turing_machine< T >::resetMachine(), and turing_machine< T >::run_one().

Referenced by multiSweepChristmasTree().

bool checkMultiSweepChristmasTreeGrammar turing_machine< d_type > &  machine,
unsigned int  totalSweeps,
std::vector< unsigned int >  rightBoundCounters,
std::vector< std::list< d_type >::iterator >  leftBoundPointers,
unsigned int  transition_limit,
tapeChunk< d_type > &  U,
tapeChunk< d_type > &  X,
tapeChunk< d_type > &  V,
std::vector< state< d_type > >::size_type  s
 

check the grammar for christmas trees.

Parameters:
machine machine to check
totalSweeps number of sweeps in this christmas tree grammar check
rightBoundCounters vector of right bounds representing the step counter for the right bound at each sweep
leftBoundPointers vector of left bounds representing the pointers to the cell location for the left bounds at each sweep
transition_limit max steps
U U component of the grammar
X X component of the grammar
V V component of the grammar
s state s in the grammar
Returns:
true iff the grammar is satisfied for all transformations
Author:
Owen Kellett

Definition at line 3833 of file non_halt_detection.hpp.

References checkMultiSweepFirstPass(), checkMultiSweepSecondPass(), and turing_machine< T >::resetMachine().

Referenced by checkMultiSweepChristmasTree().

bool checkMultiSweepFirstPass turing_machine< d_type > &  machine,
unsigned int  currentSweep,
unsigned int  totalSweeps,
std::vector< unsigned int >  rightBoundCounters,
std::vector< std::list< d_type >::iterator >  leftBoundPointers,
unsigned int  transition_limit,
unsigned int &  step_counter,
tapeChunk< d_type > &  U,
tapeChunk< d_type > &  X,
tapeChunk< d_type > &  V,
std::vector< state< d_type > >::size_type  s,
std::vector< sweepStats< d_type > > &  statistics
 

check the first pass through the grammar in a multi-sweep christmas tree.

Parameters:
machine machine to check
currentSweep current sweep of the machine
totalSweeps total sweeps to check
rightBoundCounters vector of right bounds representing the step counter for the right bound at each sweep
leftBoundPointers vector of left bounds representing the pointers to the cell location for the left bounds at each sweep
transition_limit max steps
step_counter current step of the machine
U U component of the grammar
X X component of the grammar
V V component of the grammar
s state s in the grammar
statistics represents stats that maintains information about previous sweeps
Returns:
true iff the grammar is satisified for one complete pass
Author:
Owen Kellett

Definition at line 3547 of file non_halt_detection.hpp.

References turing_machine< T >::access_tape_read_write(), tapeChunk< T >::fillTape(), turing_machine< T >::get_current_state(), getNextChunk(), getNextChunkUnevenCheck(), tapeChunk< T >::isEmpty(), turing_machine< T >::run_one(), and tapeChunk< T >::tapeConfig.

Referenced by checkMultiSweepChristmasTreeGrammar().

bool checkMultiSweepSecondPass turing_machine< d_type > &  machine,
unsigned int  currentSweep,
unsigned int  totalSweeps,
std::vector< unsigned int >  rightBoundCounters,
std::vector< std::list< d_type >::iterator >  leftBoundPointers,
unsigned int  transition_limit,
unsigned int &  step_counter,
std::vector< state< d_type > >::size_type  s,
std::vector< sweepStats< d_type > > &  statistics
 

check the first pass through the grammar in a multi-sweep christmas tree.

Parameters:
machine machine to check
currentSweep current sweep of the machine
totalSweeps total sweeps to check
rightBoundCounters vector of right bounds representing the step counter for the right bound at each sweep
leftBoundPointers vector of left bounds representing the pointers to the cell location for the left bounds at each sweep
transition_limit max steps
step_counter current step of the machine
s state s in the grammar
statistics represents stats that maintains information about previous sweeps
Returns:
true iff the grammar is satisified for the second complete pass
Author:
Owen Kellett

Definition at line 3669 of file non_halt_detection.hpp.

References turing_machine< T >::access_tape_read_write(), tapeChunk< T >::fillTape(), turing_machine< T >::get_current_state(), getNextChunk(), getNextChunkUnevenCheck(), tapeChunk< T >::isEmpty(), and tapeChunk< T >::tapeConfig.

Referenced by checkMultiSweepChristmasTreeGrammar().

bool counter turing_machine< d_type > &  machine,
unsigned int  transition_limit
 

test if the machine is a counter

Returns:
true iff the machine exhibits counter behavior
Author:
Owen Kellett

Definition at line 3464 of file non_halt_detection.hpp.

References turing_machine< T >::reverseMachine(), and testCounter().

bool establishSweep turing_machine< d_type > &  machine,
std::list< d_type >::iterator &  leftBound,
std::list< d_type >::iterator &  rightBound,
unsigned int &  step_counter,
unsigned int  step_limit,
unsigned int  transition_limit
 

run a machine for a while to establish a sweeping motion

Parameters:
machine machine to run
leftBound update the left bound pointer as you go
rightBound update the right bound pointer as you go
step_counter update the step counter as you go
step_limit steps to run for
transition_limit max steps
Author:
Owen Kellett

Definition at line 3492 of file non_halt_detection.hpp.

References turing_machine< T >::access_tape_read_write(), turing_machine< T >::nextMove(), and turing_machine< T >::run_one().

Referenced by checkMultiSweepChristmasTree().

bool extractCounterElements turing_machine< d_type > &  machine,
unsigned int  transition_limit,
unsigned int  firstBlankLocationCounter,
tapeChunk< d_type >  firstBlankLocation,
tapeChunk< d_type >  secondBlankLocation,
tapeChunk< d_type >  middleLocation,
std::vector< state< d_type > >::size_type  stateC
 

extract the components in a counter.

Parameters:
machine machine to use
firstBlankLocationCounter step counter of first blank location
firstBlankLocation entire tape at the firstBlankLocationCounter
secondBlankLocation entire tape at the secondBlankLocation step counter
middleLocation entire tape at the point where the read head is at the left most point between the first and second blank location
stateC carry signal
Author:
Owen Kellett

Definition at line 3302 of file non_halt_detection.hpp.

References checkCounterRun(), tapeChunk< T >::emptyTape(), tapeChunk< T >::fillTape(), and tapeChunk< T >::length().

Referenced by testCounter().

bool findMidSection tapeChunk< d_type > &  before,
tapeChunk< d_type > &  after,
tapeChunk< d_type > &  midSection,
tapeChunk< d_type > &  leftSection,
tapeChunk< d_type > &  rightSection
 

finds an additional middle portion of the tape given a tape before and after a sweep of a christmas tree.

Precondition:
before and after have common end components; before has no additional componenets while after has an arbitrary length additional center component;
Postcondition:
midSection, leftSection, and rightSection are filled with the left, middle, and right components of after (left and right are also the same as the left and right components in before)
Parameters:
before representation of tape before sweep of the tree
after representation of tape after sweep of the tree
midSection reference to tapeChunk to populate with middle component
leftSection reference to tapeChunk to poulate with left component
rightSection reference to tapeChunk to populate with right component
Author:
Owen Kellett

Definition at line 396 of file non_halt_detection.hpp.

References tapeChunk< T >::fillTape(), and tapeChunk< T >::tapeConfig.

Referenced by checkLeaningChristmasTree(), and checkMultiSweepChristmasTree().

unsigned int getNextBlankLocation turing_machine< d_type > &  machine,
std::list< d_type >::iterator &  rightBound,
std::list< d_type >::iterator &  leftBound,
unsigned int &  step_counter,
unsigned int  transition_limit
 

get the next location of a blank cell in a counter.

machine to check location of previous right bound location of previous left bound current step counter of machine max limit to go to

Returns:
the next point at which the state of the machine is 0*[E][Z]*[sB]
Author:
Owen Kellett

Definition at line 3002 of file non_halt_detection.hpp.

References turing_machine< T >::access_tape_read_write(), turing_machine< T >::nextMove(), and turing_machine< T >::run_one().

Referenced by testCounter().

tapeChunk<d_type> getNextChunk turing_machine< d_type > &  machine,
std::list< d_type >::iterator  leftBound,
std::list< d_type >::iterator  rightBound,
unsigned int  stopPointCounter,
unsigned int &  step_counter,
unsigned int  transition_limit,
bool  stopAtLeftBound,
bool  stopAtRightBound,
bool  inclusiveLeft,
bool  inclusiveRight,
bool  pushLeftBound,
bool  pushRightBound
 

get the next chunk of the tape after performing a transformation in the christmas tree grammars.

runs the machine according to the following conditions. if stopAtLeftBound runs the machine until the read head hits leftBound. if stopAtRightBoudn runs the machine until the read head hits right bound. if neither runs the machine until the specified stopPointCounter. returns the tapeChunk representative of the tape between leftBound and rightBound after the transformation. returns blank tape if left or right bounds are breached when they shouldn't be

Parameters:
leftBound left boundary of the transformation
rightBound right boundary of the transformation
stopPointCounter counter to stop at if specified to
step_counter current step counter of machine
transition_limit max limit to go to
stopAtLeftBound signals to run until leftBound is hit
stopAtRightBound signals to run until rightBound is hit
inclusiveLeft signals whether or not to include the left most symbol in the answer after execution
inclusiveRight signals whether or not to include the right most symbol in the answer after execution
pushLeftBound signals to push the leftBound on the tape if it is hit (during transitions at left of sweep)
pushRightBound signals to put the rightBound on the tape if it is hit (during transitions at right of sweep)
Author:
Owen Kellett

Definition at line 437 of file non_halt_detection.hpp.

References turing_machine< T >::access_tape_read_write(), tapeChunk< T >::fillTape(), turing_machine< T >::nextMove(), and turing_machine< T >::run_one().

Referenced by checkLeaningChristmasTreeGrammar(), checkMultiSweepFirstPass(), and checkMultiSweepSecondPass().

tapeChunk<d_type> getNextChunkUnevenCheck turing_machine< d_type > &  machine,
std::list< d_type >::iterator  leftBoundCheck,
std::list< d_type >::iterator  leftBound,
std::list< d_type >::iterator  rightBound,
unsigned int  stopPointCounter,
unsigned int &  step_counter,
unsigned int  transition_limit,
bool  stopAtLeftBound,
bool  stopAtRightBound,
bool  inclusiveLeft,
bool  inclusiveRight,
bool  pushLeftBound,
bool  pushRightBound
 

specialized version of getNextChunk this version is run for transitions that push the left bound in alternating christmas trees picks up uneven alternating christmas tree.

get the next chunk of the tape after performing a transformation in the christmas tree grammars. runs the machine according to the following conditions. if stopAtLeftBound runs the machine until the read head hits leftBound. if stopAtRightBoudn runs the machine until the read head hits right bound. if neither runs the machine until the specified stopPointCounter. returns the tapeChunk representative of the tape between leftBound and rightBound after the transformation. returns blank tape if left or right bounds are breached when they shouldn't be

Parameters:
leftBound left boundary of the transformation
rightBound right boundary of the transformation
stopPointCounter counter to stop at if specified to
step_counter current step counter of machine
transition_limit max limit to go to
stopAtLeftBound signals to run until leftBound is hit
stopAtRightBound signals to run until rightBound is hit
inclusiveLeft signals whether or not to include the left most symbol in the answer after execution
inclusiveRight signals whether or not to include the right most symbol in the answer after execution
pushLeftBound signals to push the leftBound on the tape if it is hit (during transitions at left of sweep)
pushRightBound signals to put the rightBound on the tape if it is hit (during transitions at right of sweep)
Author:
Owen Kellett

Definition at line 911 of file non_halt_detection.hpp.

References turing_machine< T >::access_tape_read_write(), tapeChunk< T >::fillTape(), turing_machine< T >::nextMove(), and turing_machine< T >::run_one().

Referenced by checkMultiSweepFirstPass(), and checkMultiSweepSecondPass().

unsigned int getNextLeaningRightBound turing_machine< d_type > &  machine,
std::list< d_type >::iterator &  rightBound,
unsigned int &  step_counter,
unsigned int  transition_limit
 

specialized version of getNextRightBound for leaning christmas trees.

Postcondition:
rightBound and leftBound are updated to the new values as well as step_counter
Parameters:
machine machine to check
rightBound location of previous right bound
step_counter current step of the machine
transition_limit point at which to stop searching
Returns:
the step counter of the point at which the machine is in the next right most extremum
Author:
Owen Kellett
Todo:
increase scope of this routine; it currently does not work properly on select cases causing the leaning tree proof to fail when it should succeed

Definition at line 1882 of file non_halt_detection.hpp.

References turing_machine< T >::access_tape_read_write(), turing_machine< T >::nextMove(), and turing_machine< T >::run_one().

Referenced by checkLeaningChristmasTree().

unsigned int getNextRightBound turing_machine< d_type > &  machine,
std::list< d_type >::iterator &  rightBound,
std::list< d_type >::iterator &  leftBound,
unsigned int &  step_counter,
unsigned int  transition_limit
 

get the next right extremum in the back and forth sweeping motion of a christmas tree.

Postcondition:
rightBound and leftBound are updated to the new values as well as step_counter
Parameters:
machine machine to check
rightBound location of previous right bound
leftBound location of previous left bound
step_counter current step of the machine
transition_limit point at which to stop searching
Returns:
the step counter of the point at which the machine is in the next right most extremum
Author:
Owen Kellett

Definition at line 300 of file non_halt_detection.hpp.

References turing_machine< T >::access_tape_read_write(), turing_machine< T >::nextMove(), and turing_machine< T >::run_one().

Referenced by checkMultiSweepChristmasTree().

bool isIn std::vector< state< d_type > >::size_type  element,
std::vector< std::vector< state< d_type > >::size_type >  set
 

check if element is in set

Parameters:
element state to check
set set of states to search in
Author:
Owen Kellett

Definition at line 221 of file non_halt_detection.hpp.

Referenced by subsetLoop().

bool isInfinite std::vector< state< d_type > > &  stateSet,
localTape< d_type > &  tape,
std::vector< state< d_type > >::size_type  stateIndex,
int  limitSeed,
int  backTrackLimit
 

recursive back track helper.

Precondition:
stateSet represents a set of turing machine states (which includes a map of their individual transitions); tape and stateIndex is the "current state of the machine"
Postcondition:
through backtracking, true if it is impossible to reach the "current state of the machine"
Parameters:
stateSet set of states in the turing machine
tape tape required to satisfy back track step
stateIndex state required to satsify back track step
limitSeed current back track step
backTrackLimit max back track steps before proof fails by default
Author:
Owen Kellett

Definition at line 136 of file non_halt_detection.hpp.

References localTape< T >::allOneValue(), localTape< T >::currentPosition, and localTape< T >::tapeConfig.

Referenced by backTrack().

bool leaningChristmasTree turing_machine< d_type > &  machine,
unsigned int  transition_limit
 

leaning christmas tree non halt detection routine (checks mirror machines).

Parameters:
machine machine to check
transition_limit max limit before proof fails by default
Author:
Owen Kellett

Definition at line 2126 of file non_halt_detection.hpp.

References checkLeaningChristmasTree(), and turing_machine< T >::reverseMachine().

bool loopStates turing_machine< d_type > &  machine  ) 
 

subset loop non halt detection.

searches for an inescapable set of states in machine

Postcondition:
true if machine is a subset loop non halter
Author:
Owen Kellett

Definition at line 273 of file non_halt_detection.hpp.

References turing_machine< T >::haltState(), turing_machine< T >::stateSet(), and subsetLoop().

bool multiSweepChristmasTree turing_machine< d_type > &  machine,
unsigned int  sweeps,
unsigned int  transition_limit
 

check for christmas tree non-halter (mirror machines as well).

Parameters:
machine machine to check
sweeps number of sweeps to check in the multi-sweep grammar
transition_limit max steps before fail
Returns:
true iff machine is sweeps-sweep christmas tree
Author:
Owen Kellett

Definition at line 3961 of file non_halt_detection.hpp.

References checkMultiSweepChristmasTree(), and turing_machine< T >::reverseMachine().

bool simpleLoopCheck turing_machine< d_type > &  machine,
unsigned int  transition_limit
 

Simple loop detection algorithm.

Precondition:
machine is a valid turing_machine
Postcondition:
true if machine is determined to be a non halter according to the simple loop behavior with a step bound of transition_limit
Parameters:
machine turing machine to check arbitrary step limit at which the check fails
Author:
Owen Kellett

Definition at line 70 of file non_halt_detection.hpp.

References turing_machine< T >::access_tape(), turing_machine< T >::access_tape_read_write(), turing_machine< T >::blank_tape(), turing_machine< T >::get_current_state(), turing_machine< T >::resetMachine(), and turing_machine< T >::run_one().

bool subsetLoop std::vector< state< d_type > >::size_type  seed,
std::vector< state< d_type > >::size_type  haltState,
std::vector< state< d_type > > &  stateSet
 

subset loops helper function.

searches for an inescapable set of states given a starting state

Parameters:
seed current state of the machine
haltState halting state of the machine
stateSet set of all states in the machine
Author:
Owen Kellett

Definition at line 239 of file non_halt_detection.hpp.

References isIn().

Referenced by loopStates().

bool testCounter turing_machine< d_type > &  machine,
unsigned int  transition_limit
 

test if the machine is a counter

Returns:
true iff the machine exhibits counter behavior
Author:
Owen Kellett

Definition at line 3357 of file non_halt_detection.hpp.

References turing_machine< T >::access_tape_read_write(), extractCounterElements(), tapeChunk< T >::fillTape(), turing_machine< T >::get_current_state(), getNextBlankLocation(), turing_machine< T >::nextMove(), turing_machine< T >::resetMachine(), and turing_machine< T >::run_one().

Referenced by counter().


Generated on Thu Nov 20 00:17:34 2003 for BusyBeaver by doxygen 1.3.3