40 changed files with 749 additions and 365 deletions
-
6src/storm/abstraction/ExplicitQualitativeGameResultMinMax.h
-
25src/storm/abstraction/ExplicitQualitativeResult.h
-
29src/storm/abstraction/ExplicitQualitativeResultMinMax.cpp
-
28src/storm/abstraction/ExplicitQualitativeResultMinMax.h
-
24src/storm/abstraction/QualitativeGameResult.h
-
25src/storm/abstraction/QualitativeMdpResult.h
-
40src/storm/abstraction/QualitativeMdpResultMinMax.h
-
33src/storm/abstraction/QualitativeResult.cpp
-
23src/storm/abstraction/QualitativeResult.h
-
4src/storm/abstraction/QualitativeResultMinMax.cpp
-
1src/storm/abstraction/QualitativeResultMinMax.h
-
61src/storm/abstraction/QuantitativeGameResult.h
-
22src/storm/abstraction/QuantitativeGameResultMinMax.h
-
19src/storm/abstraction/SymbolicQualitativeGameResult.cpp
-
19src/storm/abstraction/SymbolicQualitativeGameResult.h
-
29src/storm/abstraction/SymbolicQualitativeGameResultMinMax.cpp
-
25src/storm/abstraction/SymbolicQualitativeGameResultMinMax.h
-
20src/storm/abstraction/SymbolicQualitativeMdpResult.cpp
-
23src/storm/abstraction/SymbolicQualitativeMdpResult.h
-
29src/storm/abstraction/SymbolicQualitativeMdpResultMinMax.cpp
-
27src/storm/abstraction/SymbolicQualitativeMdpResultMinMax.h
-
26src/storm/abstraction/SymbolicQualitativeResult.h
-
8src/storm/abstraction/SymbolicQualitativeResultMinMax.cpp
-
14src/storm/abstraction/SymbolicQualitativeResultMinMax.h
-
61src/storm/abstraction/SymbolicQuantitativeGameResult.cpp
-
41src/storm/abstraction/SymbolicQuantitativeGameResult.h
-
12src/storm/abstraction/SymbolicQuantitativeGameResultMinMax.cpp
-
20src/storm/abstraction/SymbolicQuantitativeGameResultMinMax.h
-
97src/storm/modelchecker/abstraction/GameBasedMdpModelChecker.cpp
-
12src/storm/modelchecker/abstraction/GameBasedMdpModelChecker.h
-
4src/storm/settings/modules/AbstractionSettings.cpp
-
2src/storm/settings/modules/AbstractionSettings.h
-
6src/storm/storage/dd/Add.cpp
-
27src/storm/storage/dd/cudd/InternalCuddAdd.cpp
-
22src/storm/storage/dd/cudd/InternalCuddAdd.h
-
29src/storm/storage/dd/sylvan/InternalSylvanAdd.cpp
-
23src/storm/storage/dd/sylvan/InternalSylvanAdd.h
-
16src/storm/utility/graph.cpp
-
12src/storm/utility/graph.h
-
6src/test/storm/utility/GraphTest.cpp
@ -0,0 +1,25 @@ |
|||||
|
#pragma once |
||||
|
|
||||
|
#include "storm/storage/dd/DdType.h" |
||||
|
|
||||
|
#include "storm/abstraction/QualitativeResult.h" |
||||
|
|
||||
|
namespace storm { |
||||
|
namespace storage { |
||||
|
class BitVector; |
||||
|
} |
||||
|
|
||||
|
namespace abstraction { |
||||
|
|
||||
|
class ExplicitQualitativeResult : public QualitativeResult { |
||||
|
public: |
||||
|
virtual ~ExplicitQualitativeResult() = default; |
||||
|
|
||||
|
virtual storm::storage::BitVector const& getStates() const = 0; |
||||
|
}; |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
|
||||
|
|
||||
|
|
@ -0,0 +1,29 @@ |
|||||
|
#include "storm/abstraction/ExplicitQualitativeResultMinMax.h"
|
||||
|
|
||||
|
#include "storm/abstraction/ExplicitQualitativeResult.h"
|
||||
|
|
||||
|
namespace storm { |
||||
|
namespace abstraction { |
||||
|
|
||||
|
bool ExplicitQualitativeResultMinMax::isExplicit() const { |
||||
|
return true; |
||||
|
} |
||||
|
|
||||
|
ExplicitQualitativeResult const& ExplicitQualitativeResultMinMax::getProb0Min() const { |
||||
|
return getProb0(storm::OptimizationDirection::Minimize); |
||||
|
} |
||||
|
|
||||
|
ExplicitQualitativeResult const& ExplicitQualitativeResultMinMax::getProb1Min() const { |
||||
|
return getProb1(storm::OptimizationDirection::Minimize); |
||||
|
} |
||||
|
|
||||
|
ExplicitQualitativeResult const& ExplicitQualitativeResultMinMax::getProb0Max() const { |
||||
|
return getProb0(storm::OptimizationDirection::Maximize); |
||||
|
} |
||||
|
|
||||
|
ExplicitQualitativeResult const& ExplicitQualitativeResultMinMax::getProb1Max() const { |
||||
|
return getProb1(storm::OptimizationDirection::Maximize); |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
} |
@ -0,0 +1,28 @@ |
|||||
|
#pragma once |
||||
|
|
||||
|
#include "storm/solver/OptimizationDirection.h" |
||||
|
|
||||
|
#include "storm/abstraction/QualitativeResultMinMax.h" |
||||
|
|
||||
|
namespace storm { |
||||
|
namespace abstraction { |
||||
|
class ExplicitQualitativeResult; |
||||
|
|
||||
|
class ExplicitQualitativeResultMinMax : public QualitativeResultMinMax { |
||||
|
public: |
||||
|
ExplicitQualitativeResultMinMax() = default; |
||||
|
|
||||
|
virtual bool isExplicit() const override; |
||||
|
|
||||
|
ExplicitQualitativeResult const& getProb0Min() const; |
||||
|
ExplicitQualitativeResult const& getProb1Min() const; |
||||
|
ExplicitQualitativeResult const& getProb0Max() const; |
||||
|
ExplicitQualitativeResult const& getProb1Max() const; |
||||
|
|
||||
|
virtual ExplicitQualitativeResult const& getProb0(storm::OptimizationDirection const& dir) const = 0; |
||||
|
virtual ExplicitQualitativeResult const& getProb1(storm::OptimizationDirection const& dir) const = 0; |
||||
|
}; |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
|
@ -1,24 +0,0 @@ |
|||||
#pragma once |
|
||||
|
|
||||
#include "storm/utility/graph.h" |
|
||||
#include "storm/abstraction/QualitativeResult.h" |
|
||||
|
|
||||
namespace storm { |
|
||||
namespace abstraction { |
|
||||
|
|
||||
template <storm::dd::DdType Type> |
|
||||
struct QualitativeGameResult : public storm::utility::graph::GameProb01Result<Type>, public QualitativeResult<Type> { |
|
||||
QualitativeGameResult() = default; |
|
||||
|
|
||||
QualitativeGameResult(storm::utility::graph::GameProb01Result<Type> const& prob01Result) : storm::utility::graph::GameProb01Result<Type>(prob01Result) { |
|
||||
// Intentionally left empty. |
|
||||
} |
|
||||
|
|
||||
virtual storm::dd::Bdd<Type> const& getStates() const override { |
|
||||
return this->getPlayer1States(); |
|
||||
} |
|
||||
|
|
||||
}; |
|
||||
|
|
||||
} |
|
||||
} |
|
@ -1,25 +0,0 @@ |
|||||
#pragma once |
|
||||
|
|
||||
#include "storm/abstraction/QualitativeResult.h" |
|
||||
|
|
||||
namespace storm { |
|
||||
namespace abstraction { |
|
||||
|
|
||||
template <storm::dd::DdType Type> |
|
||||
struct QualitativeMdpResult : public QualitativeResult<Type> { |
|
||||
QualitativeMdpResult() = default; |
|
||||
|
|
||||
QualitativeMdpResult(storm::dd::Bdd<Type> const& states) : states(states) { |
|
||||
// Intentionally left empty. |
|
||||
} |
|
||||
|
|
||||
virtual storm::dd::Bdd<Type> const& getStates() const override { |
|
||||
return states; |
|
||||
} |
|
||||
|
|
||||
storm::dd::Bdd<Type> states; |
|
||||
}; |
|
||||
|
|
||||
} |
|
||||
} |
|
||||
|
|
@ -1,40 +0,0 @@ |
|||||
#pragma once |
|
||||
|
|
||||
#include "storm/storage/dd/DdType.h" |
|
||||
|
|
||||
#include "storm/abstraction/SymbolicQualitativeResultMinMax.h" |
|
||||
#include "storm/abstraction/QualitativeMdpResult.h" |
|
||||
|
|
||||
namespace storm { |
|
||||
namespace abstraction { |
|
||||
|
|
||||
template<storm::dd::DdType Type> |
|
||||
class QualitativeMdpResultMinMax : public SymbolicQualitativeResultMinMax<Type> { |
|
||||
public: |
|
||||
QualitativeMdpResultMinMax() = default; |
|
||||
|
|
||||
virtual QualitativeResult<Type> const& getProb0(storm::OptimizationDirection const& dir) const override { |
|
||||
if (dir == storm::OptimizationDirection::Minimize) { |
|
||||
return prob0Min; |
|
||||
} else { |
|
||||
return prob0Max; |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
virtual QualitativeResult<Type> const& getProb1(storm::OptimizationDirection const& dir) const override { |
|
||||
if (dir == storm::OptimizationDirection::Minimize) { |
|
||||
return prob1Min; |
|
||||
} else { |
|
||||
return prob1Max; |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
QualitativeMdpResult<Type> prob0Min; |
|
||||
QualitativeMdpResult<Type> prob1Min; |
|
||||
QualitativeMdpResult<Type> prob0Max; |
|
||||
QualitativeMdpResult<Type> prob1Max; |
|
||||
}; |
|
||||
|
|
||||
} |
|
||||
} |
|
||||
|
|
@ -1,3 +1,36 @@ |
|||||
#include "storm/abstraction/QualitativeResult.h"
|
#include "storm/abstraction/QualitativeResult.h"
|
||||
|
|
||||
|
#include "storm/abstraction/SymbolicQualitativeResult.h"
|
||||
|
#include "storm/abstraction/ExplicitQualitativeResult.h"
|
||||
|
|
||||
|
namespace storm { |
||||
|
namespace abstraction { |
||||
|
|
||||
|
bool QualitativeResult::isSymbolic() const { |
||||
|
return false; |
||||
|
} |
||||
|
|
||||
|
bool QualitativeResult::isExplicit() const { |
||||
|
return false; |
||||
|
} |
||||
|
|
||||
|
template<storm::dd::DdType Type> |
||||
|
SymbolicQualitativeResult<Type>& QualitativeResult::asSymbolicQualitativeResult() { |
||||
|
return static_cast<SymbolicQualitativeResult<Type>&>(*this); |
||||
|
} |
||||
|
|
||||
|
template<storm::dd::DdType Type> |
||||
|
SymbolicQualitativeResult<Type> const& QualitativeResult::asSymbolicQualitativeResult() const { |
||||
|
return static_cast<SymbolicQualitativeResult<Type> const&>(*this); |
||||
|
} |
||||
|
|
||||
|
ExplicitQualitativeResult& QualitativeResult::asExplicitQualitativeResult() { |
||||
|
return static_cast<ExplicitQualitativeResult&>(*this); |
||||
|
} |
||||
|
|
||||
|
ExplicitQualitativeResult const& QualitativeResult::asExplicitQualitativeResult() const { |
||||
|
return static_cast<ExplicitQualitativeResult const&>(*this); |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
} |
@ -1,61 +0,0 @@ |
|||||
#pragma once |
|
||||
|
|
||||
#include "storm/storage/dd/DdType.h" |
|
||||
#include "storm/storage/dd/Add.h" |
|
||||
#include "storm/storage/dd/Bdd.h" |
|
||||
|
|
||||
namespace storm { |
|
||||
namespace abstraction { |
|
||||
|
|
||||
template<storm::dd::DdType Type, typename ValueType> |
|
||||
struct QuantitativeGameResult { |
|
||||
QuantitativeGameResult() = default; |
|
||||
|
|
||||
QuantitativeGameResult(storm::dd::Add<Type, ValueType> const& values) : values(values) { |
|
||||
// Intentionally left empty. |
|
||||
} |
|
||||
|
|
||||
QuantitativeGameResult(boost::optional<std::pair<ValueType, ValueType>> const& initialStatesRange, storm::dd::Add<Type, ValueType> const& values, boost::optional<storm::dd::Bdd<Type>> const& player1Strategy, boost::optional<storm::dd::Bdd<Type>> const& player2Strategy) : initialStatesRange(initialStatesRange), values(values), player1Strategy(player1Strategy), player2Strategy(player2Strategy) { |
|
||||
// Intentionally left empty. |
|
||||
} |
|
||||
|
|
||||
bool hasPlayer1Strategy() const { |
|
||||
return static_cast<bool>(player1Strategy); |
|
||||
} |
|
||||
|
|
||||
storm::dd::Bdd<Type> const& getPlayer1Strategy() const { |
|
||||
return player1Strategy.get(); |
|
||||
} |
|
||||
|
|
||||
storm::dd::Bdd<Type>& getPlayer1Strategy() { |
|
||||
return player1Strategy.get(); |
|
||||
} |
|
||||
|
|
||||
bool hasPlayer2Strategy() const { |
|
||||
return static_cast<bool>(player2Strategy); |
|
||||
} |
|
||||
|
|
||||
storm::dd::Bdd<Type> const& getPlayer2Strategy() const { |
|
||||
return player2Strategy.get(); |
|
||||
} |
|
||||
|
|
||||
storm::dd::Bdd<Type>& getPlayer2Strategy() { |
|
||||
return player2Strategy.get(); |
|
||||
} |
|
||||
|
|
||||
bool hasInitialStatesRange() const { |
|
||||
return static_cast<bool>(initialStatesRange); |
|
||||
} |
|
||||
|
|
||||
std::pair<ValueType, ValueType> const& getInitialStatesRange() const { |
|
||||
return initialStatesRange.get(); |
|
||||
} |
|
||||
|
|
||||
boost::optional<std::pair<ValueType, ValueType>> initialStatesRange; |
|
||||
storm::dd::Add<Type, ValueType> values; |
|
||||
boost::optional<storm::dd::Bdd<Type>> player1Strategy; |
|
||||
boost::optional<storm::dd::Bdd<Type>> player2Strategy; |
|
||||
}; |
|
||||
|
|
||||
} |
|
||||
} |
|
@ -1,22 +0,0 @@ |
|||||
#pragma once |
|
||||
|
|
||||
#include "storm/abstraction/QuantitativeGameResult.h" |
|
||||
|
|
||||
namespace storm { |
|
||||
namespace abstraction { |
|
||||
|
|
||||
template<storm::dd::DdType Type, typename ValueType> |
|
||||
class QuantitativeGameResultMinMax { |
|
||||
public: |
|
||||
QuantitativeGameResultMinMax() = default; |
|
||||
|
|
||||
QuantitativeGameResultMinMax(QuantitativeGameResult<Type, ValueType> const& min, QuantitativeGameResult<Type, ValueType> const& max) : min(min), max(max) { |
|
||||
// Intentionally left empty. |
|
||||
} |
|
||||
|
|
||||
QuantitativeGameResult<Type, ValueType> min; |
|
||||
QuantitativeGameResult<Type, ValueType> max; |
|
||||
}; |
|
||||
|
|
||||
} |
|
||||
} |
|
@ -0,0 +1,19 @@ |
|||||
|
#include "storm/abstraction/SymbolicQualitativeGameResult.h"
|
||||
|
|
||||
|
namespace storm { |
||||
|
namespace abstraction { |
||||
|
|
||||
|
template <storm::dd::DdType Type> |
||||
|
SymbolicQualitativeGameResult<Type>::SymbolicQualitativeGameResult(storm::utility::graph::SymbolicGameProb01Result<Type> const& prob01Result) : storm::utility::graph::SymbolicGameProb01Result<Type>(prob01Result) { |
||||
|
// Intentionally left empty.
|
||||
|
} |
||||
|
|
||||
|
template <storm::dd::DdType Type> |
||||
|
storm::dd::Bdd<Type> const& SymbolicQualitativeGameResult<Type>::getStates() const { |
||||
|
return this->getPlayer1States(); |
||||
|
} |
||||
|
|
||||
|
template class SymbolicQualitativeGameResult<storm::dd::DdType::CUDD>; |
||||
|
template class SymbolicQualitativeGameResult<storm::dd::DdType::Sylvan>; |
||||
|
} |
||||
|
} |
@ -0,0 +1,19 @@ |
|||||
|
#pragma once |
||||
|
|
||||
|
#include "storm/utility/graph.h" |
||||
|
#include "storm/abstraction/SymbolicQualitativeResult.h" |
||||
|
|
||||
|
namespace storm { |
||||
|
namespace abstraction { |
||||
|
|
||||
|
template <storm::dd::DdType Type> |
||||
|
class SymbolicQualitativeGameResult : public storm::utility::graph::SymbolicGameProb01Result<Type>, public SymbolicQualitativeResult<Type> { |
||||
|
SymbolicQualitativeGameResult() = default; |
||||
|
|
||||
|
SymbolicQualitativeGameResult(storm::utility::graph::SymbolicGameProb01Result<Type> const& prob01Result); |
||||
|
|
||||
|
virtual storm::dd::Bdd<Type> const& getStates() const override; |
||||
|
}; |
||||
|
|
||||
|
} |
||||
|
} |
@ -0,0 +1,29 @@ |
|||||
|
#include "storm/abstraction/SymbolicQualitativeGameResultMinMax.h"
|
||||
|
|
||||
|
namespace storm { |
||||
|
namespace abstraction { |
||||
|
|
||||
|
template<storm::dd::DdType Type> |
||||
|
SymbolicQualitativeResult<Type> const& SymbolicQualitativeGameResultMinMax<Type>::getProb0(storm::OptimizationDirection const& dir) const { |
||||
|
if (dir == storm::OptimizationDirection::Minimize) { |
||||
|
return prob0Min; |
||||
|
} else { |
||||
|
return prob0Max; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
template<storm::dd::DdType Type> |
||||
|
SymbolicQualitativeResult<Type> const& SymbolicQualitativeGameResultMinMax<Type>::getProb1(storm::OptimizationDirection const& dir) const { |
||||
|
if (dir == storm::OptimizationDirection::Minimize) { |
||||
|
return prob1Min; |
||||
|
} else { |
||||
|
return prob1Max; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
template class SymbolicQualitativeResultMinMax<storm::dd::DdType::CUDD>; |
||||
|
template class SymbolicQualitativeResultMinMax<storm::dd::DdType::Sylvan>; |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
|
@ -0,0 +1,25 @@ |
|||||
|
#pragma once |
||||
|
|
||||
|
#include "storm/storage/dd/DdType.h" |
||||
|
|
||||
|
#include "storm/abstraction/SymbolicQualitativeResultMinMax.h" |
||||
|
|
||||
|
namespace storm { |
||||
|
namespace abstraction { |
||||
|
|
||||
|
template<storm::dd::DdType Type> |
||||
|
class SymbolicQualitativeGameResultMinMax : public SymbolicQualitativeResultMinMax<Type> { |
||||
|
public: |
||||
|
SymbolicQualitativeGameResultMinMax() = default; |
||||
|
|
||||
|
virtual SymbolicQualitativeResult<Type> const& getProb0(storm::OptimizationDirection const& dir) const override; |
||||
|
virtual SymbolicQualitativeResult<Type> const& getProb1(storm::OptimizationDirection const& dir) const override; |
||||
|
|
||||
|
SymbolicQualitativeResult<Type> prob0Min; |
||||
|
SymbolicQualitativeResult<Type> prob1Min; |
||||
|
SymbolicQualitativeResult<Type> prob0Max; |
||||
|
SymbolicQualitativeResult<Type> prob1Max; |
||||
|
}; |
||||
|
|
||||
|
} |
||||
|
} |
@ -0,0 +1,20 @@ |
|||||
|
#include "storm/abstraction/SymbolicQualitativeMdpResult.h"
|
||||
|
|
||||
|
namespace storm { |
||||
|
namespace abstraction { |
||||
|
|
||||
|
template <storm::dd::DdType Type> |
||||
|
SymbolicQualitativeMdpResult<Type>::SymbolicQualitativeMdpResult(storm::dd::Bdd<Type> const& states) : states(states) { |
||||
|
// Intentionally left empty.
|
||||
|
} |
||||
|
|
||||
|
template <storm::dd::DdType Type> |
||||
|
storm::dd::Bdd<Type> const& SymbolicQualitativeMdpResult<Type>::getStates() const { |
||||
|
return states; |
||||
|
} |
||||
|
|
||||
|
template class SymbolicQualitativeMdpResult<storm::dd::DdType::CUDD>; |
||||
|
template class SymbolicQualitativeMdpResult<storm::dd::DdType::Sylvan>; |
||||
|
|
||||
|
} |
||||
|
} |
@ -0,0 +1,23 @@ |
|||||
|
#pragma once |
||||
|
|
||||
|
#include "storm/abstraction/SymbolicQualitativeResult.h" |
||||
|
|
||||
|
#include "storm/storage/dd/Bdd.h" |
||||
|
|
||||
|
namespace storm { |
||||
|
namespace abstraction { |
||||
|
|
||||
|
template <storm::dd::DdType Type> |
||||
|
class SymbolicQualitativeMdpResult : public SymbolicQualitativeResult<Type> { |
||||
|
SymbolicQualitativeMdpResult() = default; |
||||
|
|
||||
|
SymbolicQualitativeMdpResult(storm::dd::Bdd<Type> const& states); |
||||
|
|
||||
|
virtual storm::dd::Bdd<Type> const& getStates() const override; |
||||
|
|
||||
|
storm::dd::Bdd<Type> states; |
||||
|
}; |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
|
@ -0,0 +1,29 @@ |
|||||
|
#include "storm/abstraction/SymbolicQualitativeMdpResultMinMax.h"
|
||||
|
|
||||
|
namespace storm { |
||||
|
namespace abstraction { |
||||
|
|
||||
|
template<storm::dd::DdType Type> |
||||
|
SymbolicQualitativeResult<Type> const& SymbolicQualitativeMdpResultMinMax<Type>::getProb0(storm::OptimizationDirection const& dir) const { |
||||
|
if (dir == storm::OptimizationDirection::Minimize) { |
||||
|
return prob0Min; |
||||
|
} else { |
||||
|
return prob0Max; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
template<storm::dd::DdType Type> |
||||
|
SymbolicQualitativeResult<Type> const& SymbolicQualitativeMdpResultMinMax<Type>::getProb1(storm::OptimizationDirection const& dir) const { |
||||
|
if (dir == storm::OptimizationDirection::Minimize) { |
||||
|
return prob1Min; |
||||
|
} else { |
||||
|
return prob1Max; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
template class SymbolicQualitativeMdpResultMinMax<storm::dd::DdType::CUDD>; |
||||
|
template class SymbolicQualitativeMdpResultMinMax<storm::dd::DdType::Sylvan>; |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
|
@ -0,0 +1,27 @@ |
|||||
|
#pragma once |
||||
|
|
||||
|
#include "storm/storage/dd/DdType.h" |
||||
|
|
||||
|
#include "storm/abstraction/SymbolicQualitativeResultMinMax.h" |
||||
|
#include "storm/abstraction/SymbolicQualitativeMdpResult.h" |
||||
|
|
||||
|
namespace storm { |
||||
|
namespace abstraction { |
||||
|
|
||||
|
template<storm::dd::DdType Type> |
||||
|
class SymbolicQualitativeMdpResultMinMax : public SymbolicQualitativeResultMinMax<Type> { |
||||
|
public: |
||||
|
SymbolicQualitativeMdpResultMinMax() = default; |
||||
|
|
||||
|
virtual SymbolicQualitativeResult<Type> const& getProb0(storm::OptimizationDirection const& dir) const override; |
||||
|
virtual SymbolicQualitativeResult<Type> const& getProb1(storm::OptimizationDirection const& dir) const override; |
||||
|
|
||||
|
SymbolicQualitativeMdpResult<Type> prob0Min; |
||||
|
SymbolicQualitativeMdpResult<Type> prob1Min; |
||||
|
SymbolicQualitativeMdpResult<Type> prob0Max; |
||||
|
SymbolicQualitativeMdpResult<Type> prob1Max; |
||||
|
}; |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
|
@ -0,0 +1,26 @@ |
|||||
|
#pragma once |
||||
|
|
||||
|
#include "storm/storage/dd/DdType.h" |
||||
|
|
||||
|
#include "storm/abstraction/QualitativeResult.h" |
||||
|
|
||||
|
namespace storm { |
||||
|
namespace dd { |
||||
|
template <storm::dd::DdType Type> |
||||
|
class Bdd; |
||||
|
} |
||||
|
|
||||
|
namespace abstraction { |
||||
|
|
||||
|
template <storm::dd::DdType Type> |
||||
|
class SymbolicQualitativeResult : public QualitativeResult { |
||||
|
public: |
||||
|
virtual ~SymbolicQualitativeResult() = default; |
||||
|
|
||||
|
virtual storm::dd::Bdd<Type> const& getStates() const = 0; |
||||
|
}; |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
|
||||
|
|
@ -0,0 +1,61 @@ |
|||||
|
#include "storm/abstraction/SymbolicQuantitativeGameResult.h"
|
||||
|
|
||||
|
namespace storm { |
||||
|
namespace abstraction { |
||||
|
|
||||
|
template<storm::dd::DdType Type, typename ValueType> |
||||
|
SymbolicQuantitativeGameResult<Type, ValueType>::SymbolicQuantitativeGameResult(storm::dd::Add<Type, ValueType> const& values) : values(values) { |
||||
|
// Intentionally left empty.
|
||||
|
} |
||||
|
|
||||
|
template<storm::dd::DdType Type, typename ValueType> |
||||
|
SymbolicQuantitativeGameResult<Type, ValueType>::SymbolicQuantitativeGameResult(boost::optional<std::pair<ValueType, ValueType>> const& initialStatesRange, storm::dd::Add<Type, ValueType> const& values, boost::optional<storm::dd::Bdd<Type>> const& player1Strategy, boost::optional<storm::dd::Bdd<Type>> const& player2Strategy) : initialStatesRange(initialStatesRange), values(values), player1Strategy(player1Strategy), player2Strategy(player2Strategy) { |
||||
|
// Intentionally left empty.
|
||||
|
} |
||||
|
|
||||
|
template<storm::dd::DdType Type, typename ValueType> |
||||
|
bool SymbolicQuantitativeGameResult<Type, ValueType>::hasPlayer1Strategy() const { |
||||
|
return static_cast<bool>(player1Strategy); |
||||
|
} |
||||
|
|
||||
|
template<storm::dd::DdType Type, typename ValueType> |
||||
|
storm::dd::Bdd<Type> const& SymbolicQuantitativeGameResult<Type, ValueType>::getPlayer1Strategy() const { |
||||
|
return player1Strategy.get(); |
||||
|
} |
||||
|
|
||||
|
template<storm::dd::DdType Type, typename ValueType> |
||||
|
storm::dd::Bdd<Type>& SymbolicQuantitativeGameResult<Type, ValueType>::getPlayer1Strategy() { |
||||
|
return player1Strategy.get(); |
||||
|
} |
||||
|
|
||||
|
template<storm::dd::DdType Type, typename ValueType> |
||||
|
bool SymbolicQuantitativeGameResult<Type, ValueType>::hasPlayer2Strategy() const { |
||||
|
return static_cast<bool>(player2Strategy); |
||||
|
} |
||||
|
|
||||
|
template<storm::dd::DdType Type, typename ValueType> |
||||
|
storm::dd::Bdd<Type> const& SymbolicQuantitativeGameResult<Type, ValueType>::getPlayer2Strategy() const { |
||||
|
return player2Strategy.get(); |
||||
|
} |
||||
|
|
||||
|
template<storm::dd::DdType Type, typename ValueType> |
||||
|
storm::dd::Bdd<Type>& SymbolicQuantitativeGameResult<Type, ValueType>::getPlayer2Strategy() { |
||||
|
return player2Strategy.get(); |
||||
|
} |
||||
|
|
||||
|
template<storm::dd::DdType Type, typename ValueType> |
||||
|
bool SymbolicQuantitativeGameResult<Type, ValueType>::hasInitialStatesRange() const { |
||||
|
return static_cast<bool>(initialStatesRange); |
||||
|
} |
||||
|
|
||||
|
template<storm::dd::DdType Type, typename ValueType> |
||||
|
std::pair<ValueType, ValueType> const& SymbolicQuantitativeGameResult<Type, ValueType>::getInitialStatesRange() const { |
||||
|
return initialStatesRange.get(); |
||||
|
} |
||||
|
|
||||
|
template class SymbolicQuantitativeGameResult<storm::dd::DdType::CUDD, double>; |
||||
|
template class SymbolicQuantitativeGameResult<storm::dd::DdType::Sylvan, double>; |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
|
@ -0,0 +1,41 @@ |
|||||
|
#pragma once |
||||
|
|
||||
|
#include "storm/storage/dd/DdType.h" |
||||
|
#include "storm/storage/dd/Add.h" |
||||
|
#include "storm/storage/dd/Bdd.h" |
||||
|
|
||||
|
namespace storm { |
||||
|
namespace abstraction { |
||||
|
|
||||
|
template<storm::dd::DdType Type, typename ValueType> |
||||
|
class SymbolicQuantitativeGameResult { |
||||
|
public: |
||||
|
SymbolicQuantitativeGameResult() = default; |
||||
|
|
||||
|
SymbolicQuantitativeGameResult(storm::dd::Add<Type, ValueType> const& values); |
||||
|
SymbolicQuantitativeGameResult(boost::optional<std::pair<ValueType, ValueType>> const& initialStatesRange, storm::dd::Add<Type, ValueType> const& values, boost::optional<storm::dd::Bdd<Type>> const& player1Strategy, boost::optional<storm::dd::Bdd<Type>> const& player2Strategy); |
||||
|
|
||||
|
bool hasPlayer1Strategy() const; |
||||
|
|
||||
|
storm::dd::Bdd<Type> const& getPlayer1Strategy() const; |
||||
|
|
||||
|
storm::dd::Bdd<Type>& getPlayer1Strategy(); |
||||
|
|
||||
|
bool hasPlayer2Strategy() const; |
||||
|
|
||||
|
storm::dd::Bdd<Type> const& getPlayer2Strategy() const; |
||||
|
|
||||
|
storm::dd::Bdd<Type>& getPlayer2Strategy(); |
||||
|
|
||||
|
bool hasInitialStatesRange() const; |
||||
|
|
||||
|
std::pair<ValueType, ValueType> const& getInitialStatesRange() const; |
||||
|
|
||||
|
boost::optional<std::pair<ValueType, ValueType>> initialStatesRange; |
||||
|
storm::dd::Add<Type, ValueType> values; |
||||
|
boost::optional<storm::dd::Bdd<Type>> player1Strategy; |
||||
|
boost::optional<storm::dd::Bdd<Type>> player2Strategy; |
||||
|
}; |
||||
|
|
||||
|
} |
||||
|
} |
@ -0,0 +1,12 @@ |
|||||
|
#include "storm/abstraction/SymbolicQuantitativeGameResultMinMax.h"
|
||||
|
|
||||
|
namespace storm { |
||||
|
namespace abstraction { |
||||
|
|
||||
|
template<storm::dd::DdType Type, typename ValueType> |
||||
|
SymbolicQuantitativeGameResultMinMax<Type, ValueType>::SymbolicQuantitativeGameResultMinMax(SymbolicQuantitativeGameResult<Type, ValueType> const& min, SymbolicQuantitativeGameResult<Type, ValueType> const& max) : min(min), max(max) { |
||||
|
// Intentionally left empty.
|
||||
|
} |
||||
|
|
||||
|
} |
||||
|
} |
@ -0,0 +1,20 @@ |
|||||
|
#pragma once |
||||
|
|
||||
|
#include "storm/abstraction/SymbolicQuantitativeGameResult.h" |
||||
|
|
||||
|
namespace storm { |
||||
|
namespace abstraction { |
||||
|
|
||||
|
template<storm::dd::DdType Type, typename ValueType> |
||||
|
class SymbolicQuantitativeGameResultMinMax { |
||||
|
public: |
||||
|
SymbolicQuantitativeGameResultMinMax() = default; |
||||
|
|
||||
|
SymbolicQuantitativeGameResultMinMax(SymbolicQuantitativeGameResult<Type, ValueType> const& min, SymbolicQuantitativeGameResult<Type, ValueType> const& max); |
||||
|
|
||||
|
SymbolicQuantitativeGameResult<Type, ValueType> min; |
||||
|
SymbolicQuantitativeGameResult<Type, ValueType> max; |
||||
|
}; |
||||
|
|
||||
|
} |
||||
|
} |
Write
Preview
Loading…
Cancel
Save
Reference in new issue