Browse Source

Lra Tests: Added a test case for sound model checking

tempestpy_adaptions
Tim Quatmann 4 years ago
parent
commit
3f2a5ffa62
  1. 17
      src/test/storm/modelchecker/csl/LraCtmcCslModelCheckerTest.cpp
  2. 15
      src/test/storm/modelchecker/prctl/mdp/LraMdpPrctlModelCheckerTest.cpp

17
src/test/storm/modelchecker/csl/LraCtmcCslModelCheckerTest.cpp

@ -209,6 +209,20 @@ namespace {
} }
}; };
class SoundEnvironment {
public:
static const storm::dd::DdType ddType = storm::dd::DdType::Sylvan; // unused for sparse models
static const CtmcEngine engine = CtmcEngine::PrismSparse;
static const bool isExact = false;
typedef double ValueType;
typedef storm::models::sparse::Ctmc<ValueType> ModelType;
static storm::Environment createEnvironment() {
storm::Environment env;
env.solver().setForceSoundness(true);
return env;
}
};
template<typename TestType> template<typename TestType>
class LraCtmcCslModelCheckerTest : public ::testing::Test { class LraCtmcCslModelCheckerTest : public ::testing::Test {
public: public:
@ -317,7 +331,8 @@ namespace {
GBSparseNativeSorEnvironment, GBSparseNativeSorEnvironment,
DistrSparseGmmxxGmresIluEnvironment, DistrSparseGmmxxGmresIluEnvironment,
DistrSparseEigenDoubleLUEnvironment, DistrSparseEigenDoubleLUEnvironment,
ValueIterationSparseEnvironment
ValueIterationSparseEnvironment,
SoundEnvironment
> TestingTypes; > TestingTypes;
TYPED_TEST_SUITE(LraCtmcCslModelCheckerTest, TestingTypes,); TYPED_TEST_SUITE(LraCtmcCslModelCheckerTest, TestingTypes,);

15
src/test/storm/modelchecker/prctl/mdp/LraMdpPrctlModelCheckerTest.cpp

@ -53,6 +53,18 @@ namespace {
} }
}; };
class SparseSoundEnvironment {
public:
static const bool isExact = false;
typedef double ValueType;
typedef storm::models::sparse::Mdp<ValueType> ModelType;
static storm::Environment createEnvironment() {
storm::Environment env;
env.solver().setForceSoundness(true);
return env;
}
};
class SparseRationalLinearProgrammingEnvironment { class SparseRationalLinearProgrammingEnvironment {
public: public:
static const bool isExact = true; static const bool isExact = true;
@ -100,7 +112,8 @@ namespace {
typedef ::testing::Types< typedef ::testing::Types<
SparseValueTypeValueIterationEnvironment, SparseValueTypeValueIterationEnvironment,
SparseValueTypeLinearProgrammingEnvironment
SparseValueTypeLinearProgrammingEnvironment,
SparseSoundEnvironment
#ifdef STORM_HAVE_Z3_OPTIMIZE #ifdef STORM_HAVE_Z3_OPTIMIZE
, SparseRationalLinearProgrammingEnvironment , SparseRationalLinearProgrammingEnvironment
#endif #endif

Loading…
Cancel
Save