B2B Integration Solutions from Unidex  
Universal Turing Machine in XSLTThis page is organized as follows:
Introduction Obtaining the
Universal Turing Machine Stylesheet
Running the
Universal Turing Machine Stylesheet saxon add_one_tm.xml utm.xsl tape=199 The output of this command includes information about each step performed by the Turing machine and the final tape, which will contain the number "200".
Description
of the Universal Turing Machine Stylesheet The tape for the Turing machine is specified via the global parameter named "tape". Each character in the string represents a symbol on the tape. The tape must contain at least one symbol. Each of the symbols on the tape must be either the blank symbol or one of the symbols defined in the symbols element of the TMML source document. In theory, the tape for the Turing machine is infinite in both directions (i.e., both to the left and to the right). The stylesheet represents the tape as a string. The stylesheet will append the blank symbol to the right end of the tape when the tape head of the Turing machine moves to the right of the last symbol on the tape. Likewise, the stylesheet will insert a blank symbol at the beginning of the tape when the tape head of the Turing machine moves to the left of the leftmost symbol on the tape. By default, the tape head of the Turing machine is initially positioned over the first symbol on the tape (i.e., the first character of the value of the 'tape' parameter). You can specify a different initial position for the tape head via the optional global parameter named 'start_position'. The value of the 'start_position' parameter should be the character position of the symbol over which you want the tape head to be positioned initially. If you want the tape head to be initially positioned over the 2nd symbol on the tape, then set the 'start_position' parameter to 2. The default value for the 'start_position' parameter is 1. The Turing machine will crash if the transition function is not defined for the current state and the current symbol. The Turing machine will stop when it transitions to one of the halt states. The Turing machine's procedure for processing the input tape is as follows:
The stylesheet will display information about each iteration of the Turing machine's operation. This information includes a snapshot of the tape and a pointer (i.e., "^") under the current symbol. The pointer represents the tape head. If you are inspired to develop a TMML document that implements a Turing machine and would like to include it (or a link to it) on this page, then please feel free to contact me at boblyons@unidex.com. Please send any comments to boblyons@unidex.com. Powered by Turing Machines :) 

Powered by XML and XSLT! Last modified: March 30, 2001. Please send comments & questions to webmaster@unidex.com. Copyright © 2001  2008. Unidex, Inc. All rights reserved. 