1#include "storm-config.h"
22std::optional<storm::jani::Model> computeJaniCounterexample(std::string
const& janiFile, std::string
const& formulaString) {
28 options.setBuildChoiceOrigins(
true);
32 auto highLevelCounterexample = std::dynamic_pointer_cast<storm::counterexamples::HighLevelCounterexample>(counterexample);
33 if (highLevelCounterexample !=
nullptr && highLevelCounterexample->isJaniHighLevelCounterexample()) {
34 return highLevelCounterexample->getModelDescription().asJaniModel();
36 ADD_FAILURE() <<
"Failed to compute a high-level counterexample for jani file " << janiFile <<
" and " << formulaString <<
".";
43 result += automaton.getNumberOfEdges();
52TEST(SmtMinimalLabelSetGeneratorTest, DtmcWithMultipleLocations) {
56 auto result = computeJaniCounterexample(STORM_TEST_RESOURCES_DIR
"/dtmc/locations_counterexample.jani",
"P<0.05 [ F s=3 ]");
57 ASSERT_TRUE(result.has_value());
58 ASSERT_EQ(1ull, result->getNumberOfAutomata());
59 ASSERT_EQ(2ull, getNumberOfEdges(result.value()));
66TEST(SmtMinimalLabelSetGeneratorTest, MdpWithMultipleLocationsAndInitialLocations) {
70 auto result = computeJaniCounterexample(STORM_TEST_RESOURCES_DIR
"/mdp/locations_counterexample.jani",
"P<0.5 [ F s=3 ]");
71 ASSERT_TRUE(result.has_value());
73 ASSERT_EQ(2ull, result->getNumberOfAutomata());
74 EXPECT_EQ(2ull, result->getAutomaton(
"A").getNumberOfEdges());
76 EXPECT_EQ(1ull, result->getAutomaton(
"B").getNumberOfEdges());
TEST(RegionConstraintCheckerTest, AffineConstraintHoldsThroughout)
Edge const & getEdge(uint64_t index) const
Retrieves the edge with the given index in this automaton.
uint64_t getLocationIndex(std::string const &name) const
uint64_t getSourceLocationIndex() const
Retrieves the index of the source location.
std::vector< Automaton > & getAutomata()
Retrieves the automata of the model.
std::shared_ptr< storm::counterexamples::Counterexample > computeHighLevelCounterexampleMaxSmt(storm::Environment const &env, storm::storage::SymbolicModelDescription const &symbolicModel, std::shared_ptr< storm::models::sparse::Model< double > > model, std::shared_ptr< storm::logic::Formula const > const &formula, storm::counterexamples::SMTMinimalLabelSetGenerator< double >::Options const &options)
std::shared_ptr< storm::models::sparse::Model< ValueType > > buildSparseModel(storm::storage::SymbolicModelDescription const &model, storm::builder::BuilderOptions const &options, typename storm::builder::ExplicitModelBuilder< ValueType >::Options const &explorationOptions=typename storm::builder::ExplicitModelBuilder< ValueType >::Options())
std::vector< std::shared_ptr< storm::logic::Formula const > > extractFormulasFromProperties(std::vector< storm::jani::Property > const &properties)
std::vector< storm::jani::Property > parsePropertiesForSymbolicModelDescription(std::string const &inputString, storm::storage::SymbolicModelDescription const &modelDescription, boost::optional< std::set< std::string > > const &propertyFilter)
std::pair< storm::jani::Model, std::vector< storm::jani::Property > > parseJaniModel(std::string const &filename, boost::optional< std::vector< std::string > > const &propertyFilter)