1#include "storm-config.h"
25class GBGmmxxDoubleGmresEnvironment {
28 static const bool isExact =
false;
41class GBEigenDoubleDGmresEnvironment {
44 static const bool isExact =
false;
58class GBEigenRationalLUEnvironment {
61 static const bool isExact =
true;
71class GBNativeSorEnvironment {
74 static const bool isExact =
false;
87class GBNativeWalkerChaeEnvironment {
90 static const bool isExact =
false;
104class DistrGmmxxDoubleGmresEnvironment {
107 static const bool isExact =
false;
121class DistrEigenRationalLUEnvironment {
124 static const bool isExact =
true;
134class DistrNativeWalkerChaeEnvironment {
137 static const bool isExact =
false;
150class ValueIterationEnvironment {
153 static const bool isExact =
false;
162template<
typename TestType>
163class LraDtmcPrctlModelCheckerTest :
public ::testing::Test {
165 typedef typename TestType::ValueType
ValueType;
166 LraDtmcPrctlModelCheckerTest() : _environment(TestType::createEnvironment()) {}
171 return storm::utility::convertNumber<ValueType>(input);
181typedef ::testing::Types<
183 GBGmmxxDoubleGmresEnvironment, GBEigenDoubleDGmresEnvironment, DistrGmmxxDoubleGmresEnvironment,
185 GBEigenRationalLUEnvironment, GBNativeSorEnvironment, GBNativeWalkerChaeEnvironment, DistrEigenRationalLUEnvironment, DistrNativeWalkerChaeEnvironment,
186 ValueIterationEnvironment>
191TYPED_TEST(LraDtmcPrctlModelCheckerTest, LRASingleBscc) {
192 typedef typename TestFixture::ValueType
ValueType;
195 std::shared_ptr<storm::models::sparse::Dtmc<ValueType>> dtmc;
208 ap.addLabelToState(
"a", 1);
216 std::unique_ptr<storm::modelchecker::CheckResult> result = checker.check(this->env(), *formula);
219 EXPECT_NEAR(this->
parseNumber(
"0.5"), quantitativeResult1[0], this->precision());
220 EXPECT_NEAR(this->
parseNumber(
"0.5"), quantitativeResult1[1], this->precision());
232 ap.addLabelToState(
"a", 1);
240 std::unique_ptr<storm::modelchecker::CheckResult> result = checker.check(this->env(), *formula);
243 EXPECT_NEAR(this->
parseNumber(
"0.5"), quantitativeResult1[0], this->precision());
244 EXPECT_NEAR(this->
parseNumber(
"0.5"), quantitativeResult1[1], this->precision());
256 ap.addLabelToState(
"a", 2);
264 std::unique_ptr<storm::modelchecker::CheckResult> result = checker.check(this->env(), *formula);
267 EXPECT_NEAR(this->
parseNumber(
"1/3"), quantitativeResult1[0], this->precision());
268 EXPECT_NEAR(this->
parseNumber(
"1/3"), quantitativeResult1[1], this->precision());
269 EXPECT_NEAR(this->
parseNumber(
"1/3"), quantitativeResult1[2], this->precision());
273TYPED_TEST(LraDtmcPrctlModelCheckerTest, LRA) {
274 typedef typename TestFixture::ValueType
ValueType;
277 std::shared_ptr<storm::models::sparse::Dtmc<ValueType>> dtmc;
315 ap.addLabelToState(
"a", 1);
316 ap.addLabelToState(
"a", 4);
317 ap.addLabelToState(
"a", 5);
318 ap.addLabelToState(
"a", 7);
319 ap.addLabelToState(
"a", 11);
320 ap.addLabelToState(
"a", 13);
321 ap.addLabelToState(
"a", 14);
329 std::unique_ptr<storm::modelchecker::CheckResult> result = checker.check(this->env(), *formula);
332 EXPECT_NEAR(this->
parseNumber(
"1/10"), quantitativeResult1[0], this->precision());
333 EXPECT_NEAR(this->
parseNumber(
"0"), quantitativeResult1[3], this->precision());
334 EXPECT_NEAR(this->
parseNumber(
"1/3"), quantitativeResult1[6], this->precision());
335 EXPECT_NEAR(this->
parseNumber(
"0"), quantitativeResult1[9], this->precision());
336 EXPECT_NEAR(this->
parseNumber(
"1/10"), quantitativeResult1[12], this->precision());
337 EXPECT_NEAR(this->
parseNumber(
"79/300"), quantitativeResult1[13], this->precision());
338 EXPECT_NEAR(this->
parseNumber(
"1/10"), quantitativeResult1[14], this->precision());
void setPrecision(storm::RationalNumber value)
void setPreconditioner(storm::solver::EigenLinearEquationSolverPreconditioner value)
void setMethod(storm::solver::EigenLinearEquationSolverMethod value)
SolverEnvironment & solver()
void setMethod(storm::solver::GmmxxLinearEquationSolverMethod value)
void setPrecision(storm::RationalNumber value)
void setPreconditioner(storm::solver::GmmxxLinearEquationSolverPreconditioner value)
void setDetLraMethod(storm::solver::LraMethod value, bool isSetFromDefault=false)
void setPrecision(storm::RationalNumber value)
void setSorOmega(storm::RationalNumber const &value)
void setMaximalNumberOfIterations(uint64_t value)
void setMethod(storm::solver::NativeLinearEquationSolverMethod value)
void setPrecision(storm::RationalNumber value)
void setLinearEquationSolverType(storm::solver::EquationSolverType const &value, bool isSetFromDefault=false)
EigenSolverEnvironment & eigen()
NativeSolverEnvironment & native()
GmmxxSolverEnvironment & gmmxx()
LongRunAverageSolverEnvironment & lra()
ExplicitQuantitativeCheckResult< ValueType > & asExplicitQuantitativeCheckResult()
This class represents a discrete-time Markov chain.
This class manages the labeling of the state space with a number of (atomic) labels.
A class that can be used to build a sparse matrix by adding value by value.
void addNextValue(index_type row, index_type column, value_type const &value)
Sets the matrix entry at the given row and column to the given value.
SparseMatrix< value_type > build(index_type overriddenRowCount=0, index_type overriddenColumnCount=0, index_type overriddenRowGroupCount=0)
A class that holds a possibly non-square matrix in the compressed row storage format.
SFTBDDChecker::ValueType ValueType
NumberType parseNumber(std::string const &value)
Parse number from string.
TYPED_TEST(GraphTestAR, SymbolicProb01StochasticGameDieSmall)
TYPED_TEST_SUITE(GraphTestAR, TestingTypes,)
::testing::Types< Cudd, Sylvan > TestingTypes