-
Notifications
You must be signed in to change notification settings - Fork 3
Simulating Automata
In order to enter simulation mode, the user must load both a valid automata and input file. The simulation is started by clicking the large "Simulate >>" button in the page header. Immediately, the automata is simulated over the first 100 characters and its results are stored in a local cache (see below). The automata on screen is then updated so that its colors match the color scheme for activated, enabled, and reporting STEs according to the Graph Legend.
The cache allows for faster navigation through the simulation, potentially unhindered forward simulation, jumping to different cycles, and moving in reverse. When the simulation begins, 100 characters are simulated over and their data is stored in the cache. Once the user gets onto or past the 75th cycle, the next 100 characters are simulated and loaded into the cache and the first 50 are dropped so that the cache length becomes 150. The cache continues to reload itself each time the user is within 25 cycles of the end of the cache, dropping previous cycles so that the length remains 150 after the first cache loading. The simulation cache does not load in reverse, but the simulation can be reset if the user wishes to start from the beginning.
The character stream shows the user which characters/cycles are in the cache by enabling their clickability. Characters outside the cache are grey and unclickable. The user can click to any cycle in the cache at any time to see the automata at that point. The current character that is being simulated on is highlighted yellow in the character stream, unless an STE is reporting, in which case the character is highlighted orange. When one or more STEs report on a given cycle, the character stream displays the corresponding data. The character box turns purple and allows the user to hover over the box to display data about all reporting STEs on that cycle in the following format: "id: report_code".
After entering Simulation Mode, the "Simulation Tools" tab is revealed at the bottom of the screen. The following information and tools are provided in this area:
- Cycle Index - The numerical index of the current cycle/character being simulated on in the display.
-
Simulation Controls:
- <- Step - Move back one character in the stream. Disabled when the user reaches the beginning of the cached data.
- Step -> - Move forward one character in the stream. Disabled when the user reaches the end of the cached data.
- Play Simulation - Continually move forward with the simulation. Disabled when the user reaches the end of the cached data. Also used to stop the simulation manually as it plays.
- Play Speed - Allows the user to add delay when playing the simulation. "Fastest" adds no delay; "Slowest" adds two seconds delay between steps.
-
Stop on [select] - controls when the simulation pauses when playing:
- none - the simulation does not stop when playing unless stopped manually.
- report - the simulation stops when it reaches the next reporting cycle
- cycle - the simulation stops on a cycle index as provided by the user -- must be a number!
- Hex Char Mode - Toggles whether the character stream displays the input as hex values.
- Reset Simulation - Clears the cache and starts simulating again from the beginning of the character stream.
- Download Report Record - Appears after a report cycle has occurred in the cached region. Downloads a file called "reports.txt" containing information on all reports thus far in the simulation.