1#include "storm-config.h"
24class GBGmmxxDoubleGmresEnvironment {
27 static const bool isExact =
false;
40class GBEigenDoubleDGmresEnvironment {
43 static const bool isExact =
false;
56class GBEigenRationalLUEnvironment {
59 static const bool isExact =
true;
69class GBNativeSorEnvironment {
72 static const bool isExact =
false;
85class GBNativeWalkerChaeEnvironment {
88 static const bool isExact =
false;
101class DistrGmmxxDoubleGmresEnvironment {
104 static const bool isExact =
false;
117class DistrEigenRationalLUEnvironment {
120 static const bool isExact =
true;
130class DistrNativeWalkerChaeEnvironment {
133 static const bool isExact =
false;
146class ValueIterationEnvironment {
149 static const bool isExact =
false;
158template<
typename TestType>
159class LraDtmcPrctlModelCheckerTest :
public ::testing::Test {
161 typedef typename TestType::ValueType
ValueType;
162 LraDtmcPrctlModelCheckerTest() : _environment(TestType::createEnvironment()) {}
167 return storm::utility::convertNumber<ValueType>(input);
177typedef ::testing::Types<GBGmmxxDoubleGmresEnvironment, GBEigenDoubleDGmresEnvironment, GBEigenRationalLUEnvironment, GBNativeSorEnvironment,
178 GBNativeWalkerChaeEnvironment, DistrGmmxxDoubleGmresEnvironment, DistrEigenRationalLUEnvironment, DistrNativeWalkerChaeEnvironment,
179 ValueIterationEnvironment>
184TYPED_TEST(LraDtmcPrctlModelCheckerTest, LRASingleBscc) {
185 typedef typename TestFixture::ValueType
ValueType;
188 std::shared_ptr<storm::models::sparse::Dtmc<ValueType>> dtmc;
201 ap.addLabelToState(
"a", 1);
209 std::unique_ptr<storm::modelchecker::CheckResult> result = checker.check(this->env(), *formula);
212 EXPECT_NEAR(this->
parseNumber(
"0.5"), quantitativeResult1[0], this->precision());
213 EXPECT_NEAR(this->
parseNumber(
"0.5"), quantitativeResult1[1], this->precision());
225 ap.addLabelToState(
"a", 1);
233 std::unique_ptr<storm::modelchecker::CheckResult> result = checker.check(this->env(), *formula);
236 EXPECT_NEAR(this->
parseNumber(
"0.5"), quantitativeResult1[0], this->precision());
237 EXPECT_NEAR(this->
parseNumber(
"0.5"), quantitativeResult1[1], this->precision());
249 ap.addLabelToState(
"a", 2);
257 std::unique_ptr<storm::modelchecker::CheckResult> result = checker.check(this->env(), *formula);
260 EXPECT_NEAR(this->
parseNumber(
"1/3"), quantitativeResult1[0], this->precision());
261 EXPECT_NEAR(this->
parseNumber(
"1/3"), quantitativeResult1[1], this->precision());
262 EXPECT_NEAR(this->
parseNumber(
"1/3"), quantitativeResult1[2], this->precision());
266TYPED_TEST(LraDtmcPrctlModelCheckerTest, LRA) {
267 typedef typename TestFixture::ValueType
ValueType;
270 std::shared_ptr<storm::models::sparse::Dtmc<ValueType>> dtmc;
308 ap.addLabelToState(
"a", 1);
309 ap.addLabelToState(
"a", 4);
310 ap.addLabelToState(
"a", 5);
311 ap.addLabelToState(
"a", 7);
312 ap.addLabelToState(
"a", 11);
313 ap.addLabelToState(
"a", 13);
314 ap.addLabelToState(
"a", 14);
322 std::unique_ptr<storm::modelchecker::CheckResult> result = checker.check(this->env(), *formula);
325 EXPECT_NEAR(this->
parseNumber(
"1/10"), quantitativeResult1[0], this->precision());
326 EXPECT_NEAR(this->
parseNumber(
"0"), quantitativeResult1[3], this->precision());
327 EXPECT_NEAR(this->
parseNumber(
"1/3"), quantitativeResult1[6], this->precision());
328 EXPECT_NEAR(this->
parseNumber(
"0"), quantitativeResult1[9], this->precision());
329 EXPECT_NEAR(this->
parseNumber(
"1/10"), quantitativeResult1[12], this->precision());
330 EXPECT_NEAR(this->
parseNumber(
"79/300"), quantitativeResult1[13], this->precision());
331 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