public State run(final String program, final State s) {

        operations = compile(program);
        if (s instanceof StatusState) {
            StatusState statusState = (StatusState) s;
            for (Operations operation : operations) {
                operation.execute(statusState);
                if ((statusState).isTerminated()) {
                    break;
                }
            }
        } else {
            for (Operations operation : operations) {
                operation.execute(s);
            }
        }

        return s;
    }