1#include "storm-config.h"
23class GBGmmxxDoubleGmresEnvironment {
26 static const bool isExact =
false;
39class GBEigenDoubleDGmresEnvironment {
42 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;
102class DistrGmmxxDoubleGmresEnvironment {
105 static const bool isExact =
false;
119class DistrEigenRationalLUEnvironment {
122 static const bool isExact =
true;
132class DistrNativeWalkerChaeEnvironment {
135 static const bool isExact =
false;
148class ValueIterationEnvironment {
151 static const bool isExact =
false;
160template<
typename TestType>
161class LraDtmcPrctlModelCheckerTest :
public ::testing::Test {
163 typedef typename TestType::ValueType
ValueType;
164 LraDtmcPrctlModelCheckerTest() : _environment(TestType::createEnvironment()) {}
169 return storm::utility::convertNumber<ValueType>(input);
179typedef ::testing::Types<
181 GBGmmxxDoubleGmresEnvironment, GBEigenDoubleDGmresEnvironment, DistrGmmxxDoubleGmresEnvironment,
183 GBEigenRationalLUEnvironment, GBNativeSorEnvironment, GBNativeWalkerChaeEnvironment, DistrEigenRationalLUEnvironment, DistrNativeWalkerChaeEnvironment,
184 ValueIterationEnvironment>
189TYPED_TEST(LraDtmcPrctlModelCheckerTest, LRASingleBscc) {
190 typedef typename TestFixture::ValueType
ValueType;
193 std::shared_ptr<storm::models::sparse::Dtmc<ValueType>> dtmc;
206 ap.addLabelToState(
"a", 1);
214 std::unique_ptr<storm::modelchecker::CheckResult> result = checker.check(this->env(), *formula);
217 EXPECT_NEAR(this->
parseNumber(
"0.5"), quantitativeResult1[0], this->precision());
218 EXPECT_NEAR(this->
parseNumber(
"0.5"), quantitativeResult1[1], this->precision());
230 ap.addLabelToState(
"a", 1);
238 std::unique_ptr<storm::modelchecker::CheckResult> result = checker.check(this->env(), *formula);
241 EXPECT_NEAR(this->
parseNumber(
"0.5"), quantitativeResult1[0], this->precision());
242 EXPECT_NEAR(this->
parseNumber(
"0.5"), quantitativeResult1[1], this->precision());
254 ap.addLabelToState(
"a", 2);
262 std::unique_ptr<storm::modelchecker::CheckResult> result = checker.check(this->env(), *formula);
265 EXPECT_NEAR(this->
parseNumber(
"1/3"), quantitativeResult1[0], this->precision());
266 EXPECT_NEAR(this->
parseNumber(
"1/3"), quantitativeResult1[1], this->precision());
267 EXPECT_NEAR(this->
parseNumber(
"1/3"), quantitativeResult1[2], this->precision());
271TYPED_TEST(LraDtmcPrctlModelCheckerTest, LRA) {
272 typedef typename TestFixture::ValueType
ValueType;
275 std::shared_ptr<storm::models::sparse::Dtmc<ValueType>> dtmc;
313 ap.addLabelToState(
"a", 1);
314 ap.addLabelToState(
"a", 4);
315 ap.addLabelToState(
"a", 5);
316 ap.addLabelToState(
"a", 7);
317 ap.addLabelToState(
"a", 11);
318 ap.addLabelToState(
"a", 13);
319 ap.addLabelToState(
"a", 14);
327 std::unique_ptr<storm::modelchecker::CheckResult> result = checker.check(this->env(), *formula);
330 EXPECT_NEAR(this->
parseNumber(
"1/10"), quantitativeResult1[0], this->precision());
331 EXPECT_NEAR(this->
parseNumber(
"0"), quantitativeResult1[3], this->precision());
332 EXPECT_NEAR(this->
parseNumber(
"1/3"), quantitativeResult1[6], this->precision());
333 EXPECT_NEAR(this->
parseNumber(
"0"), quantitativeResult1[9], this->precision());
334 EXPECT_NEAR(this->
parseNumber(
"1/10"), quantitativeResult1[12], this->precision());
335 EXPECT_NEAR(this->
parseNumber(
"79/300"), quantitativeResult1[13], this->precision());
336 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