STORM_LOG_DEBUG("The Approximation Model is initialized");
STORM_LOG_THROW(this->isApproximationApplicable,storm::exceptions::UnexpectedException,"Approximation model requested but approximation is not applicable");
STORM_LOG_THROW(this->isApproximationApplicable,storm::exceptions::UnexpectedException,"Approximation model requested but approximation is not applicable");
// Run through the rows of the original model and obtain the probability evaluation table, a matrix with dummy entries and the mapping between the two.
// Run through the rows of the original model and obtain the probability evaluation table, a matrix with dummy entries and the mapping between the two.
STORM_LOG_DEBUG("Preprocessing for DTMC started.");
STORM_LOG_THROW(this->getModel().getInitialStates().getNumberOfSetBits()==1,storm::exceptions::InvalidArgumentException,"Input model is required to have exactly one initial state.");
STORM_LOG_THROW(this->getModel().getInitialStates().getNumberOfSetBits()==1,storm::exceptions::InvalidArgumentException,"Input model is required to have exactly one initial state.");
// Subtract from the maybe states the set of states that is not reachable (on a path from the initial to a target state).
// Subtract from the maybe states the set of states that is not reachable (on a path from the initial to a target state).
@ -145,6 +147,7 @@ namespace storm {
STORM_LOG_DEBUG("Eliminated "<<subsystem.size()-subsystem.getNumberOfSetBits()<<" of "<<subsystem.size()<<" states that had constant outgoing transitions.");
STORM_LOG_DEBUG("Eliminated "<<subsystem.size()-subsystem.getNumberOfSetBits()<<" of "<<subsystem.size()<<" states that had constant outgoing transitions.");
//Build the simple model
//Build the simple model
STORM_LOG_DEBUG("Building the resulting simplified model.");
//The matrix. The flexibleTransitions matrix might have empty rows where states have been eliminated.
//The matrix. The flexibleTransitions matrix might have empty rows where states have been eliminated.
//The new matrix should not have such rows. We therefore leave them out, but we have to change the indices of the states accordingly.
//The new matrix should not have such rows. We therefore leave them out, but we have to change the indices of the states accordingly.
std::vector<storm::storage::sparse::state_type>newStateIndexMap(flexibleTransitions.getNumberOfRows(),flexibleTransitions.getNumberOfRows());//initialize with some illegal index to easily check if a transition leads to an unselected state
std::vector<storm::storage::sparse::state_type>newStateIndexMap(flexibleTransitions.getNumberOfRows(),flexibleTransitions.getNumberOfRows());//initialize with some illegal index to easily check if a transition leads to an unselected state
STORM_LOG_DEBUG("Preprocessing for MDPs started.");
STORM_LOG_THROW(this->getModel().getInitialStates().getNumberOfSetBits()==1,storm::exceptions::InvalidArgumentException,"Input model is required to have exactly one initial state.");
STORM_LOG_THROW(this->getModel().getInitialStates().getNumberOfSetBits()==1,storm::exceptions::InvalidArgumentException,"Input model is required to have exactly one initial state.");
STORM_LOG_WARN("No simplification of the original model (like elimination of constant transitions) is happening. Will just use a copy of the original model");
simpleModel=std::make_shared<ParametricSparseModelType>(this->getModel());//Note: an actual copy is technically not necessary.. but we will do it here..
STORM_LOG_THROW(model->getType()==storm::models::ModelType::Dtmc,storm::exceptions::InvalidSettingsException,"Currently parametric verification is only available for DTMCs.");
STORM_LOG_THROW(modelchecker.canHandle(*formula.get()),storm::exceptions::InvalidSettingsException,"The parametric region check engine currently does not support this property.");
modelchecker.specifyFormula(formula);
modelchecker.specifyFormula(formula);
modelchecker.checkRegions(regions);
modelchecker.checkRegions(regions);
}
else{
STORM_LOG_THROW(false,storm::exceptions::InvalidSettingsException,"The parametric region check engine currently does not support this property.");
STORM_LOG_THROW(modelchecker.canHandle(*formula.get()),storm::exceptions::InvalidSettingsException,"The parametric region check engine currently does not support this property.");
modelchecker.specifyFormula(formula);
modelchecker.checkRegions(regions);
modelchecker.printStatisticsToStream(std::cout);
}else{
STORM_LOG_THROW(false,storm::exceptions::InvalidSettingsException,"Currently parametric region verification is only available for DTMCs and Mdps.");
STORM_LOG_THROW(model->getType()==storm::models::ModelType::Dtmc,storm::exceptions::InvalidSettingsException,"Currently parametric verification via state elimination is only available for DTMCs.");