STORM_LOG_THROW(input.model&&input.model.get().isPrismProgram(),storm::exceptions::NotSupportedException,"Minimal command set counterexamples are only supported for PRISM model input.");
STORM_LOG_THROW(sparseModel->isOfType(storm::models::ModelType::Mdp),storm::exceptions::NotSupportedException,"Counterexample generation using MILP is currently only supported for MDPs.");
STORM_LOG_THROW(sparseModel->isOfType(storm::models::ModelType::Mdp),storm::exceptions::NotSupportedException,"Counterexample generation using MILP is currently only supported for MDPs.");
STORM_LOG_THROW(sparseModel->isOfType(storm::models::ModelType::Dtmc)||sparseModel->isOfType(storm::models::ModelType::Mdp),storm::exceptions::NotSupportedException,"Counterexample generation using MaxSAT is currently only supported for discrete-time models.");
STORM_LOG_THROW(sparseModel->isOfType(storm::models::ModelType::Dtmc)||sparseModel->isOfType(storm::models::ModelType::Mdp),storm::exceptions::NotSupportedException,"Counterexample generation using MaxSAT is currently only supported for discrete-time models.");
STORM_LOG_THROW(input.model&&input.model.get().isPrismProgram(),storm::exceptions::NotSupportedException,"Minimal command set counterexamples are only supported for PRISM model input.");
std::cout<<std::endl<<"Generating minimal label counterexample for formula "<<*formula<<std::endl;
std::cout<<std::endl<<"Generating minimal label counterexample for formula "<<*formula<<std::endl;
//Checkwhethertherearechoiceoriginsavailable
//Checkwhethertherearechoiceoriginsavailable
STORM_LOG_THROW(mdp.hasChoiceOrigins(),storm::exceptions::InvalidArgumentException,"Restriction to minimal command set is impossible for model without choice origns.");
STORM_LOG_THROW(mdp.hasChoiceOrigins(),storm::exceptions::InvalidArgumentException,"Restriction to minimal command set is impossible for model without choice origns.");
STORM_LOG_THROW(mdp.getChoiceOrigins()->isPrismChoiceOrigins(),storm::exceptions::InvalidArgumentException,"Restriction to command set is impossible for model without prism choice origins.");
STORM_LOG_THROW(mdp.getChoiceOrigins()->isPrismChoiceOrigins()||mdp.getChoiceOrigins()->isJaniChoiceOrigins(),storm::exceptions::InvalidArgumentException,"Restriction to command set is impossible for model without PRISM or JANI choice origins.");
STORM_LOG_THROW(formula->isProbabilityOperatorFormula(),storm::exceptions::InvalidPropertyException,"Counterexample generation does not support this kind of formula. Expecting a probability operator as the outermost formula element.");
STORM_LOG_THROW(formula->isProbabilityOperatorFormula(),storm::exceptions::InvalidPropertyException,"Counterexample generation does not support this kind of formula. Expecting a probability operator as the outermost formula element.");
std::cout<<std::endl<<"Computed minimal command set of size "<<usedCommandSet.size()<<" in "<<std::chrono::duration_cast<std::chrono::milliseconds>(endTime-startTime).count()<<"ms."<<std::endl;
std::cout<<std::endl<<"Computed minimal command set of size "<<usedLabelSet.size()<<" in "<<std::chrono::duration_cast<std::chrono::milliseconds>(endTime-startTime).count()<<"ms."<<std::endl;
// The empty edge set (i.e., the choices without origin) always has to get identifier getIdentifierForChoicesWithNoOrigin() -- which is assumed to be 0
STORM_LOG_ASSERT(storm::storage::sparse::ChoiceOrigins::getIdentifierForChoicesWithNoOrigin()==0,"The no origin identifier is assumed to be zero");
STORM_LOG_ASSERT(originData.empty()||boost::any_cast<EdgeIndexSet>(&originData)!=nullptr,"Origin data has unexpected type: "<<originData.type().name()<<".");
STORM_LOG_THROW(edge.getSourceLocationIndex()<locations.size(),storm::exceptions::InvalidArgumentException,"Cannot add edge with unknown source location index '"<<edge.getSourceLocationIndex()<<"'.");
STORM_LOG_THROW(edge.getSourceLocationIndex()<locations.size(),storm::exceptions::InvalidArgumentException,"Cannot add edge with unknown source location index '"<<edge.getSourceLocationIndex()<<"'.");
STORM_LOG_THROW(identifierToEdgeIndexSet[this->getIdentifierForChoicesWithNoOrigin()].empty(),storm::exceptions::InvalidArgumentException,"The given edge set for the choices without origin is non-empty");