public PrgState oneStep(PrgState state) { MyIStack <IStmt> stk = state.getExeStack(); try { if (stk.empty()) { throw new Exception("Empty stack"); } IStmt crtStmt = stk.pop(); PrgState newState = crtStmt.execute(state); if (flag == 1) { this.displayCrtPrgState(newState); } //repo.logPrgStateExec(); return(newState); } catch (Exception ex) { throw new Exception(ex.Message); } }