Compilation principle course design while statement