CMPUT 325 Special  2

    Consider the following restricted program language
    and machine.

    It has memory for only one integer variable "s"
    and the only assignment allowed is

    s = <integer constant>

    The language allows for only one program structure:

    void main() {
        int s = 0;
        while (1) { /* loop until exit */
           <body>
      }
    }

    The <body> contains only
        1. Assignments to "s" (of integer constants)
        2. Switch statements

    NEXT