# this macro tests the 0n1n TM (0n1n.tm) # 0n1n.tm halts in a final state if and only if the tape # has a number of 0's followed by an equal number of 1's # delete all read tm 0n1n # say "macro first run----this is the tape..." set tape 000000111111 show tape say "TM should halt in a final state:" go say " -- at end of run, tape looks like:" show tape say "next run. Tape looks like.. " set tape 00111111 show tape say " TM should halt in a non-final state:" go say " -- at end of run, tape looks like:" show tape