Browse Source

Merge branch 'master' of https://sselab.de/lab9/private/git/storm

Former-commit-id: 461b107a6b
main
sjunges 10 years ago
parent
commit
86b2f8d13e
  1. 3
      src/modelchecker/csl/SparseCtmcCslModelChecker.cpp
  2. 2
      src/modelchecker/csl/SparseMarkovAutomatonCslModelChecker.cpp
  3. 2
      src/modelchecker/prctl/SparseDtmcPrctlModelChecker.cpp
  4. 4
      src/modelchecker/prctl/SparseMdpPrctlModelChecker.cpp
  5. 4
      src/solver/MinMaxLinearEquationSolver.h
  6. 1
      src/solver/SolveGoal.h
  7. 8
      src/storage/SparseMatrix.cpp
  8. 2
      src/utility/graph.cpp
  9. 23
      src/utility/macros.h
  10. 1
      src/utility/solver.h
  11. 1
      test/performance/storage/MaximalEndComponentDecompositionTest.cpp
  12. 1
      test/performance/storage/StronglyConnectedComponentDecompositionTest.cpp

3
src/modelchecker/csl/SparseCtmcCslModelChecker.cpp

@ -3,6 +3,8 @@
#include "src/modelchecker/csl/helper/SparseCtmcCslHelper.h" #include "src/modelchecker/csl/helper/SparseCtmcCslHelper.h"
#include "src/modelchecker/prctl/helper/SparseDtmcPrctlHelper.h" #include "src/modelchecker/prctl/helper/SparseDtmcPrctlHelper.h"
#include "src/models/sparse/StandardRewardModel.h"
#include "src/utility/macros.h" #include "src/utility/macros.h"
#include "src/utility/vector.h" #include "src/utility/vector.h"
#include "src/utility/graph.h" #include "src/utility/graph.h"
@ -15,7 +17,6 @@
#include "src/exceptions/InvalidPropertyException.h" #include "src/exceptions/InvalidPropertyException.h"
#include "src/exceptions/NotImplementedException.h" #include "src/exceptions/NotImplementedException.h"
namespace storm { namespace storm {
namespace modelchecker { namespace modelchecker {
template <typename SparseCtmcModelType> template <typename SparseCtmcModelType>

2
src/modelchecker/csl/SparseMarkovAutomatonCslModelChecker.cpp

@ -2,6 +2,8 @@
#include "src/modelchecker/csl/helper/SparseMarkovAutomatonCslHelper.h" #include "src/modelchecker/csl/helper/SparseMarkovAutomatonCslHelper.h"
#include "src/models/sparse/StandardRewardModel.h"
#include "src/utility/macros.h" #include "src/utility/macros.h"
#include "src/settings/SettingsManager.h" #include "src/settings/SettingsManager.h"

2
src/modelchecker/prctl/SparseDtmcPrctlModelChecker.cpp

@ -11,6 +11,8 @@
#include "src/modelchecker/prctl/helper/SparseDtmcPrctlHelper.h" #include "src/modelchecker/prctl/helper/SparseDtmcPrctlHelper.h"
#include "src/modelchecker/csl/helper/SparseCtmcCslHelper.h" #include "src/modelchecker/csl/helper/SparseCtmcCslHelper.h"
#include "src/models/sparse/StandardRewardModel.h"
#include "src/settings/modules/GeneralSettings.h" #include "src/settings/modules/GeneralSettings.h"
#include "src/exceptions/InvalidStateException.h" #include "src/exceptions/InvalidStateException.h"

4
src/modelchecker/prctl/SparseMdpPrctlModelChecker.cpp

@ -8,11 +8,12 @@
#include "src/modelchecker/results/ExplicitQualitativeCheckResult.h" #include "src/modelchecker/results/ExplicitQualitativeCheckResult.h"
#include "src/modelchecker/results/ExplicitQuantitativeCheckResult.h" #include "src/modelchecker/results/ExplicitQuantitativeCheckResult.h"
#include "src/models/sparse/StandardRewardModel.h"
#include "src/modelchecker/prctl/helper/SparseMdpPrctlHelper.h" #include "src/modelchecker/prctl/helper/SparseMdpPrctlHelper.h"
#include "src/solver/LpSolver.h" #include "src/solver/LpSolver.h"
#include "src/settings/modules/GeneralSettings.h" #include "src/settings/modules/GeneralSettings.h"
#include "src/exceptions/InvalidStateException.h" #include "src/exceptions/InvalidStateException.h"
@ -21,7 +22,6 @@
#include "src/storage/MaximalEndComponentDecomposition.h" #include "src/storage/MaximalEndComponentDecomposition.h"
#include "src/exceptions/InvalidArgumentException.h" #include "src/exceptions/InvalidArgumentException.h"
namespace storm { namespace storm {

4
src/solver/MinMaxLinearEquationSolver.h

@ -3,6 +3,7 @@
#include <vector> #include <vector>
#include <cstdint> #include <cstdint>
#include <memory>
#include "SolverSelectionOptions.h" #include "SolverSelectionOptions.h"
#include "src/storage/sparse/StateType.h" #include "src/storage/sparse/StateType.h"
#include "AllowEarlyTerminationCondition.h" #include "AllowEarlyTerminationCondition.h"
@ -41,6 +42,7 @@ namespace storm {
/// The direction in which to optimize, can be unset. /// The direction in which to optimize, can be unset.
OptimizationDirectionSetting direction; OptimizationDirectionSetting direction;
/// The required precision for the iterative methods. /// The required precision for the iterative methods.
double precision; double precision;
@ -70,7 +72,7 @@ namespace storm {
protected: protected:
MinMaxLinearEquationSolver(storm::storage::SparseMatrix<ValueType> const& matrix, double precision, bool relativeError, uint_fast64_t maxNrIterations, bool trackPolicy, MinMaxTechniqueSelection prefTech) : MinMaxLinearEquationSolver(storm::storage::SparseMatrix<ValueType> const& matrix, double precision, bool relativeError, uint_fast64_t maxNrIterations, bool trackPolicy, MinMaxTechniqueSelection prefTech) :
AbstractMinMaxLinearEquationSolver(precision, relativeError, maxNrIterations, trackPolicy, prefTech), AbstractMinMaxLinearEquationSolver(precision, relativeError, maxNrIterations, trackPolicy, prefTech),
A(matrix), earlyTermination(new NoEarlyTerminationCondition<ValueType>()) {
earlyTermination(new NoEarlyTerminationCondition<ValueType>()), A(matrix) {
// Intentionally left empty. // Intentionally left empty.
} }

1
src/solver/SolveGoal.h

@ -57,6 +57,7 @@ namespace storm {
VT threshold; VT threshold;
storm::storage::BitVector relevantColumnVector; storm::storage::BitVector relevantColumnVector;
}; };
template<typename VT> template<typename VT>
std::unique_ptr<storm::solver::MinMaxLinearEquationSolver<VT>> configureMinMaxLinearEquationSolver(BoundedGoal<VT> const& goal, storm::utility::solver::MinMaxLinearEquationSolverFactory<VT> const& factory, storm::storage::SparseMatrix<VT> const& matrix); std::unique_ptr<storm::solver::MinMaxLinearEquationSolver<VT>> configureMinMaxLinearEquationSolver(BoundedGoal<VT> const& goal, storm::utility::solver::MinMaxLinearEquationSolverFactory<VT> const& factory, storm::storage::SparseMatrix<VT> const& matrix);
template<typename VT> template<typename VT>

8
src/storage/SparseMatrix.cpp

@ -1165,8 +1165,6 @@ namespace storm {
template class SparseMatrix<double>; template class SparseMatrix<double>;
template std::ostream& operator<<(std::ostream& out, SparseMatrix<double> const& matrix); template std::ostream& operator<<(std::ostream& out, SparseMatrix<double> const& matrix);
template std::vector<double> SparseMatrix<double>::getPointwiseProductRowSumVector(storm::storage::SparseMatrix<double> const& otherMatrix) const; template std::vector<double> SparseMatrix<double>::getPointwiseProductRowSumVector(storm::storage::SparseMatrix<double> const& otherMatrix) const;
template std::vector<storm::RationalFunction> SparseMatrix<double>::getPointwiseProductRowSumVector(storm::storage::SparseMatrix<storm::RationalFunction> const& otherMatrix) const;
template std::vector<storm::Interval> SparseMatrix<double>::getPointwiseProductRowSumVector(storm::storage::SparseMatrix<storm::Interval> const& otherMatrix) const;
// float // float
template class MatrixEntry<typename SparseMatrix<float>::index_type, float>; template class MatrixEntry<typename SparseMatrix<float>::index_type, float>;
@ -1175,7 +1173,6 @@ namespace storm {
template class SparseMatrix<float>; template class SparseMatrix<float>;
template std::ostream& operator<<(std::ostream& out, SparseMatrix<float> const& matrix); template std::ostream& operator<<(std::ostream& out, SparseMatrix<float> const& matrix);
template std::vector<float> SparseMatrix<float>::getPointwiseProductRowSumVector(storm::storage::SparseMatrix<float> const& otherMatrix) const; template std::vector<float> SparseMatrix<float>::getPointwiseProductRowSumVector(storm::storage::SparseMatrix<float> const& otherMatrix) const;
template std::vector<storm::RationalFunction> SparseMatrix<float>::getPointwiseProductRowSumVector(storm::storage::SparseMatrix<storm::RationalFunction> const& otherMatrix) const;
// int // int
template class MatrixEntry<typename SparseMatrix<int>::index_type, int>; template class MatrixEntry<typename SparseMatrix<int>::index_type, int>;
@ -1183,7 +1180,6 @@ namespace storm {
template class SparseMatrixBuilder<int>; template class SparseMatrixBuilder<int>;
template class SparseMatrix<int>; template class SparseMatrix<int>;
template std::ostream& operator<<(std::ostream& out, SparseMatrix<int> const& matrix); template std::ostream& operator<<(std::ostream& out, SparseMatrix<int> const& matrix);
template std::vector<storm::RationalFunction> SparseMatrix<int>::getPointwiseProductRowSumVector(storm::storage::SparseMatrix<storm::RationalFunction> const& otherMatrix) const;
#ifdef STORM_HAVE_CARL #ifdef STORM_HAVE_CARL
// Rat Function // Rat Function
@ -1193,8 +1189,12 @@ namespace storm {
template class SparseMatrix<RationalFunction>; template class SparseMatrix<RationalFunction>;
template std::ostream& operator<<(std::ostream& out, SparseMatrix<RationalFunction> const& matrix); template std::ostream& operator<<(std::ostream& out, SparseMatrix<RationalFunction> const& matrix);
template std::vector<storm::RationalFunction> SparseMatrix<RationalFunction>::getPointwiseProductRowSumVector(storm::storage::SparseMatrix<storm::RationalFunction> const& otherMatrix) const; template std::vector<storm::RationalFunction> SparseMatrix<RationalFunction>::getPointwiseProductRowSumVector(storm::storage::SparseMatrix<storm::RationalFunction> const& otherMatrix) const;
template std::vector<storm::RationalFunction> SparseMatrix<double>::getPointwiseProductRowSumVector(storm::storage::SparseMatrix<storm::RationalFunction> const& otherMatrix) const;
template std::vector<storm::RationalFunction> SparseMatrix<float>::getPointwiseProductRowSumVector(storm::storage::SparseMatrix<storm::RationalFunction> const& otherMatrix) const;
template std::vector<storm::RationalFunction> SparseMatrix<int>::getPointwiseProductRowSumVector(storm::storage::SparseMatrix<storm::RationalFunction> const& otherMatrix) const;
// Intervals // Intervals
template std::vector<storm::Interval> SparseMatrix<double>::getPointwiseProductRowSumVector(storm::storage::SparseMatrix<storm::Interval> const& otherMatrix) const;
template class MatrixEntry<typename SparseMatrix<Interval>::index_type, Interval>; template class MatrixEntry<typename SparseMatrix<Interval>::index_type, Interval>;
template std::ostream& operator<<(std::ostream& out, MatrixEntry<uint_fast64_t, Interval> const& entry); template std::ostream& operator<<(std::ostream& out, MatrixEntry<uint_fast64_t, Interval> const& entry);
template class SparseMatrixBuilder<Interval>; template class SparseMatrixBuilder<Interval>;

2
src/utility/graph.cpp

@ -7,8 +7,10 @@
#include "src/storage/sparse/StateType.h" #include "src/storage/sparse/StateType.h"
#include "src/models/symbolic/DeterministicModel.h" #include "src/models/symbolic/DeterministicModel.h"
#include "src/models/symbolic/NondeterministicModel.h" #include "src/models/symbolic/NondeterministicModel.h"
#include "src/models/symbolic/StandardRewardModel.h"
#include "src/models/sparse/DeterministicModel.h" #include "src/models/sparse/DeterministicModel.h"
#include "src/models/sparse/NondeterministicModel.h" #include "src/models/sparse/NondeterministicModel.h"
#include "src/models/sparse/StandardRewardModel.h"
#include "src/utility/constants.h" #include "src/utility/constants.h"
#include "src/exceptions/InvalidArgumentException.h" #include "src/exceptions/InvalidArgumentException.h"
#include "src/storage/dd/CuddBdd.h" #include "src/storage/dd/CuddBdd.h"

23
src/utility/macros.h

@ -14,11 +14,12 @@ extern log4cplus::Logger logger;
#define STORM_LOG_DEBUG(message) \ #define STORM_LOG_DEBUG(message) \
{ \ { \
LOG4CPLUS_DEBUG(logger, message); \ LOG4CPLUS_DEBUG(logger, message); \
} while (false)
} while (false) \
#define STORM_LOG_TRACE(message) \ #define STORM_LOG_TRACE(message) \
{ \ { \
LOG4CPLUS_TRACE(logger, message); \ LOG4CPLUS_TRACE(logger, message); \
} while (false)
} while (false) \
// Define STORM_LOG_ASSERT which is only checked when NDEBUG is not set. // Define STORM_LOG_ASSERT which is only checked when NDEBUG is not set.
#ifndef NDEBUG #ifndef NDEBUG
@ -28,7 +29,8 @@ if (!(cond)) { \
LOG4CPLUS_ERROR(logger, message); \ LOG4CPLUS_ERROR(logger, message); \
assert(cond); \ assert(cond); \
} \ } \
} while (false)
} while (false) \
#else #else
#define STORM_LOG_ASSERT(cond, message) #define STORM_LOG_ASSERT(cond, message)
#endif #endif
@ -39,44 +41,45 @@ assert(cond); \
LOG4CPLUS_ERROR(logger, message); \ LOG4CPLUS_ERROR(logger, message); \
throw exception() << message; \ throw exception() << message; \
} \ } \
} while (false)
} while (false) \
// Define STORM_LOG_WARN, STORM_LOG_ERROR and STORM_LOG_INFO to log the given message with the corresponding log levels. // Define STORM_LOG_WARN, STORM_LOG_ERROR and STORM_LOG_INFO to log the given message with the corresponding log levels.
#define STORM_LOG_WARN(message) \ #define STORM_LOG_WARN(message) \
{ \ { \
LOG4CPLUS_WARN(logger, message); \ LOG4CPLUS_WARN(logger, message); \
} while (false)
} while (false) \
#define STORM_LOG_WARN_COND(cond, message) \ #define STORM_LOG_WARN_COND(cond, message) \
{ \ { \
if (!(cond)) { \ if (!(cond)) { \
LOG4CPLUS_WARN(logger, message); \ LOG4CPLUS_WARN(logger, message); \
} \ } \
} while (false)
} while (false) \
#define STORM_LOG_INFO(message) \ #define STORM_LOG_INFO(message) \
{ \ { \
LOG4CPLUS_INFO(logger, message); \ LOG4CPLUS_INFO(logger, message); \
} while (false)
} while (false) \
#define STORM_LOG_INFO_COND(cond, message) \ #define STORM_LOG_INFO_COND(cond, message) \
{ \ { \
if (!(cond)) { \ if (!(cond)) { \
LOG4CPLUS_INFO(logger, message); \ LOG4CPLUS_INFO(logger, message); \
} \ } \
} while (false)
} while (false) \
#define STORM_LOG_ERROR(message) \ #define STORM_LOG_ERROR(message) \
{ \ { \
LOG4CPLUS_ERROR(logger, message); \ LOG4CPLUS_ERROR(logger, message); \
} while (false)
} while (false) \
#define STORM_LOG_ERROR_COND(cond, message) \ #define STORM_LOG_ERROR_COND(cond, message) \
{ \ { \
if (!(cond)) { \ if (!(cond)) { \
LOG4CPLUS_ERROR(logger, message); \ LOG4CPLUS_ERROR(logger, message); \
} \ } \
} while (false)
} while (false) \
/*! /*!
* Define the macros that print information and optionally also log it. * Define the macros that print information and optionally also log it.

1
src/utility/solver.h

@ -3,6 +3,7 @@
#include <set> #include <set>
#include <vector> #include <vector>
#include <memory>
#include "src/storage/dd/DdType.h" #include "src/storage/dd/DdType.h"
#include "src/solver/SolverSelectionOptions.h" #include "src/solver/SolverSelectionOptions.h"

1
test/performance/storage/MaximalEndComponentDecompositionTest.cpp

@ -3,6 +3,7 @@
#include "src/parser/AutoParser.h" #include "src/parser/AutoParser.h"
#include "src/storage/MaximalEndComponentDecomposition.h" #include "src/storage/MaximalEndComponentDecomposition.h"
#include "src/models/sparse/Mdp.h" #include "src/models/sparse/Mdp.h"
#include "src/models/sparse/StandardRewardModel.h"
TEST(MaximalEndComponentDecomposition, AsynchronousLeader) { TEST(MaximalEndComponentDecomposition, AsynchronousLeader) {
std::shared_ptr<storm::models::sparse::Model<double>> abstractModel = storm::parser::AutoParser::parseModel(STORM_CPP_BASE_PATH "/examples/mdp/asynchronous_leader/leader7.tra", STORM_CPP_BASE_PATH "/examples/mdp/asynchronous_leader/leader7.lab", "", ""); std::shared_ptr<storm::models::sparse::Model<double>> abstractModel = storm::parser::AutoParser::parseModel(STORM_CPP_BASE_PATH "/examples/mdp/asynchronous_leader/leader7.tra", STORM_CPP_BASE_PATH "/examples/mdp/asynchronous_leader/leader7.lab", "", "");

1
test/performance/storage/StronglyConnectedComponentDecompositionTest.cpp

@ -4,6 +4,7 @@
#include "src/storage/StronglyConnectedComponentDecomposition.h" #include "src/storage/StronglyConnectedComponentDecomposition.h"
#include "src/models/sparse/Mdp.h" #include "src/models/sparse/Mdp.h"
#include "src/models/sparse/Dtmc.h" #include "src/models/sparse/Dtmc.h"
#include "src/models/sparse/StandardRewardModel.h"
TEST(StronglyConnectedComponentDecomposition, Crowds) { TEST(StronglyConnectedComponentDecomposition, Crowds) {
std::shared_ptr<storm::models::sparse::Model<double>> abstractModel = storm::parser::AutoParser::parseModel(STORM_CPP_BASE_PATH "/examples/dtmc/crowds/crowds20_5.tra", STORM_CPP_BASE_PATH "/examples/dtmc/crowds/crowds20_5.lab", "", ""); std::shared_ptr<storm::models::sparse::Model<double>> abstractModel = storm::parser::AutoParser::parseModel(STORM_CPP_BASE_PATH "/examples/dtmc/crowds/crowds20_5.tra", STORM_CPP_BASE_PATH "/examples/dtmc/crowds/crowds20_5.lab", "", "");

Loading…
Cancel
Save