throw Unimplemented("unknown kind of open condition");
throw Exception("unknown kind of open condition");
static bool open_cond_refinements(int& refinements,				  int& addable, int& reusable,				  const OpenCondition& open_cond,				  const Plan& plan, int limit) {  if (refinements >= 0) {    return refinements <= limit;  } else {    const Literal* literal = open_cond.literal();    if (literal != NULL) {      int ref = 0;      if (addable < 0) {	if (!plan.addable_steps(addable, *literal,				open_cond.step_id(), limit)) {	  return false;	}      }      ref += addable;      if (ref <= limit) {	if (reusable < 0) {	  if (!plan.reusable_steps(reusable, *literal,				   open_cond.step_id(), limit)) {	    return false;	  }	}	refinements = ref + reusable;	return refinements <= limit;      }    } else {      const Disjunction* disj = open_cond.disjunction();      if (disj != NULL) {	refinements = plan.disjunction_refinements(*disj, open_cond.step_id());	return refinements <= limit;      } else {	const Inequality* neq = open_cond.inequality();	if (neq != NULL) {	  refinements = plan.inequality_refinements(*neq, open_cond.step_id());	} else {	  throw Unimplemented("unknown kind of open condition");	}      }    }  }  return false;}