// Example programs with initial tape states export const EXAMPLE_PROGRAMS = [ { name: "Replace two B's", code: `#start q0 #accept acc #reject rej q0 B 1 R q1 q1 1 1 R q1 q1 B 1 R acc`, initialTape: "" }, { name: "Binary equality checker", code: `// https://stackoverflow.com/questions/59045832 #start q0 #accept acc #reject rej q0 0 X R q1 q0 1 X R q2 q0 = = R q7 q1 0 0 R q1 q1 1 1 R q1 q1 = = R q3 q2 0 0 R q2 q2 1 1 R q2 q2 = = R q4 q3 X X R q3 q3 0 X L q5 q3 1 1 L rej q3 B B L rej q4 X X R q4 q4 0 0 L rej q4 B B L rej q4 1 X L q5 q5 X X L q5 q5 = = L q6 q6 0 0 L q6 q6 1 1 L q6 q6 X X R q0 q7 X X R q7 q7 B B L q8 q7 0 0 L rej q7 1 1 L rej q8 X X L q8 q8 0 0 L q8 q8 1 1 L q8 q8 = = acc`, initialTape: "1011=1011" }, { name: "Binary addition", code: `// https://stackoverflow.com/questions/59045832 #start q0 #accept acc #reject rej q0 B B R q0 q0 0 0 R q0 q0 1 1 R q0 q0 + + R q1 q1 0 0 R q1 q1 1 1 R q1 q1 B B L q2 q2 0 1 L q2 q2 1 0 L q3 q2 + + R q5 q3 0 0 L q3 q3 1 1 L q3 q3 + + L q4 q4 0 1 R q0 q4 1 0 L q4 q4 B 1 R q0 q5 1 B R q5 q5 B B R q6 q6 B B L q6 q6 + B L q7 q7 0 0 L q7 q7 1 1 L q7 q7 B B R acc `, initialTape: "101+110" } ];