0 $ 1 4 w 0 # Recap: Turing Machine Symbols: a finite set of things you can write in a square States: a finite set of the “states of mind” of the machine Rules: a list of quintuples: (read symbol, state) è (write symbol, move, new state) Read symbol in current square Based on rule for current state and symbol read: Write a symbol into current square Move left or right one position Change state of mind
the language? Use BNF to describe all the strings in the language Make up the evaluation rules Describe what every string in the language means Build an evaluator Implement a procedure that takes a string in the language as input and an environment and outputs its value: meval(String, Environment) returns Value
this as the most fundamental idea in programming: The evaluator, which determines the meaning of expressions in the programming language, is just another program. To appreciate this point is to change our images of ourselves as programmers. We come to see ourselves as designers of languages, rather than only users of languages designed by others. Abelson and Sussman, Structure and Interpretation of Computer Programs (p. 360)
– Figure out how to represent data in programs What is a procedure, frame, environment, etc. – Implement the evaluation rules For each evaluation rule, define a procedure that follows the behavior of that rule. Next: we’ll look at a high-level how the application rule is implemented Chapter 11: detailed walk-through of the interpreter