General Mistakes and Some Hints

 

Missing Parts:

 

 

 

 

 

 

 

 

 

Hints:

 

 

 

 

 

 

 

 

 

One caveat:  The more I think of it, the more I think it may be impossible to write a fully secure machine that executes the sample program as written. program.txt will not be one of the sample programs, so you have the option of either writing something fully secure that won't run the program exactly as written, or writing something not fully secure that will.  In either case, document why - tests will distinguish between such design choices, and the fact that you recognize the choice you had to make is what really counts.