Browse Source

Fix warnings

tempestpy_adaptions
Jip Spel 4 years ago
parent
commit
24fa7c9529
  1. 1
      src/storm-pars-cli/storm-pars.cpp
  2. 4
      src/storm-pars/analysis/AssumptionChecker.cpp
  3. 4
      src/storm-pars/analysis/LocalMonotonicityResult.cpp
  4. 2
      src/storm-pars/analysis/MonotonicityHelper.cpp
  5. 2
      src/storm-pars/modelchecker/region/RegionModelChecker.cpp
  6. 7
      src/storm-pars/modelchecker/region/SparseDtmcParameterLiftingModelChecker.cpp
  7. 1
      src/storm-pars/modelchecker/region/SparseParameterLiftingModelChecker.cpp
  8. 4
      src/storm-pars/storage/ParameterRegion.cpp
  9. 6
      src/storm-pars/storage/ParameterRegion.h

1
src/storm-pars-cli/storm-pars.cpp

@ -567,7 +567,6 @@ namespace storm {
auto parametricSettings = storm::settings::getModule<storm::settings::modules::ParametricSettings>(); auto parametricSettings = storm::settings::getModule<storm::settings::modules::ParametricSettings>();
auto regionSettings = storm::settings::getModule<storm::settings::modules::RegionSettings>(); auto regionSettings = storm::settings::getModule<storm::settings::modules::RegionSettings>();
auto engine = regionSettings.getRegionCheckEngine();
std::function<std::unique_ptr<storm::modelchecker::CheckResult>(std::shared_ptr<storm::logic::Formula const> const& formula)> verificationCallback; std::function<std::unique_ptr<storm::modelchecker::CheckResult>(std::shared_ptr<storm::logic::Formula const> const& formula)> verificationCallback;
std::function<void(std::unique_ptr<storm::modelchecker::CheckResult> const&)> postprocessingCallback; std::function<void(std::unique_ptr<storm::modelchecker::CheckResult> const&)> postprocessingCallback;

4
src/storm-pars/analysis/AssumptionChecker.cpp

@ -74,8 +74,8 @@ namespace storm {
template <typename ValueType, typename ConstantType> template <typename ValueType, typename ConstantType>
AssumptionStatus AssumptionChecker<ValueType, ConstantType>::validateAssumption(uint_fast64_t val1, uint_fast64_t val2,std::shared_ptr<expressions::BinaryRelationExpression> assumption, std::shared_ptr<Order> order, storage::ParameterRegion<ValueType> region, std::vector<ConstantType>const minValues, std::vector<ConstantType>const maxValues) const { AssumptionStatus AssumptionChecker<ValueType, ConstantType>::validateAssumption(uint_fast64_t val1, uint_fast64_t val2,std::shared_ptr<expressions::BinaryRelationExpression> assumption, std::shared_ptr<Order> order, storage::ParameterRegion<ValueType> region, std::vector<ConstantType>const minValues, std::vector<ConstantType>const maxValues) const {
// First check if based on sample points the assumption can be discharged // First check if based on sample points the assumption can be discharged
assert (val1 == std::stoi(assumption->getFirstOperand()->asVariableExpression().getVariableName()));
assert (val2 == std::stoi(assumption->getSecondOperand()->asVariableExpression().getVariableName()));
assert (val1 == std::stoull(assumption->getFirstOperand()->asVariableExpression().getVariableName()));
assert (val2 == std::stoull(assumption->getSecondOperand()->asVariableExpression().getVariableName()));
AssumptionStatus result = AssumptionStatus::UNKNOWN; AssumptionStatus result = AssumptionStatus::UNKNOWN;
if (useSamples) { if (useSamples) {
result = checkOnSamples(assumption); result = checkOnSamples(assumption);

4
src/storm-pars/analysis/LocalMonotonicityResult.cpp

@ -57,7 +57,7 @@ namespace storm {
template <typename VariableType> template <typename VariableType>
std::shared_ptr<LocalMonotonicityResult<VariableType>> LocalMonotonicityResult<VariableType>::copy() { std::shared_ptr<LocalMonotonicityResult<VariableType>> LocalMonotonicityResult<VariableType>::copy() {
std::shared_ptr<LocalMonotonicityResult<VariableType>> copy = std::make_shared<LocalMonotonicityResult<VariableType>>(stateMonRes.size()); std::shared_ptr<LocalMonotonicityResult<VariableType>> copy = std::make_shared<LocalMonotonicityResult<VariableType>>(stateMonRes.size());
for (auto state = 0; state < stateMonRes.size(); state++) {
for (size_t state = 0; state < stateMonRes.size(); state++) {
if (stateMonRes[state] != nullptr) { if (stateMonRes[state] != nullptr) {
copy->setMonotonicityResult(state, stateMonRes[state]->copy()); copy->setMonotonicityResult(state, stateMonRes[state]->copy());
} }
@ -138,7 +138,7 @@ namespace storm {
template <typename VariableType> template <typename VariableType>
std::string LocalMonotonicityResult<VariableType>::toString() const { std::string LocalMonotonicityResult<VariableType>::toString() const {
std::string result = "Local Monotonicity Result: \n"; std::string result = "Local Monotonicity Result: \n";
for (auto i = 0; i < stateMonRes.size(); ++i) {
for (size_t i = 0; i < stateMonRes.size(); ++i) {
result += "state "; result += "state ";
result += std::to_string(i); result += std::to_string(i);
if (stateMonRes[i] != nullptr) { if (stateMonRes[i] != nullptr) {

2
src/storm-pars/analysis/MonotonicityHelper.cpp

@ -60,7 +60,7 @@ namespace storm {
this->extender = new analysis::OrderExtender<ValueType, ConstantType>(model, formulas[0]); this->extender = new analysis::OrderExtender<ValueType, ConstantType>(model, formulas[0]);
for (auto i = 0; i < matrix.getRowCount(); ++i) {
for (size_t i = 0; i < matrix.getRowCount(); ++i) {
std::set<VariableType> occurringVariables; std::set<VariableType> occurringVariables;
for (auto &entry : matrix.getRow(i)) { for (auto &entry : matrix.getRow(i)) {

2
src/storm-pars/modelchecker/region/RegionModelChecker.cpp

@ -115,8 +115,6 @@ namespace storm {
RegionResult::Unknown); RegionResult::Unknown);
currentRegion.split(currentRegion.getCenterPoint(), newRegions); currentRegion.split(currentRegion.getCenterPoint(), newRegions);
bool first = true;
for (auto& newRegion : newRegions) { for (auto& newRegion : newRegions) {
unprocessedRegions.emplace(std::move(newRegion), initResForNewRegions); unprocessedRegions.emplace(std::move(newRegion), initResForNewRegions);
refinementDepths.push(currentDepth + 1); refinementDepths.push(currentDepth + 1);

7
src/storm-pars/modelchecker/region/SparseDtmcParameterLiftingModelChecker.cpp

@ -317,7 +317,7 @@ namespace storm {
// TODO: this only works since we decided to keep all columns // TODO: this only works since we decided to keep all columns
auto const & occuringVariables = parameterLifter->getOccurringVariablesAtState(); auto const & occuringVariables = parameterLifter->getOccurringVariablesAtState();
for (auto state = 0; state < parameterLifter->getRowGroupCount(); ++state) {
for (uint_fast64_t state = 0; state < parameterLifter->getRowGroupCount(); ++state) {
auto oldStateNumber = parameterLifter->getOriginalStateNumber(state); auto oldStateNumber = parameterLifter->getOriginalStateNumber(state);
auto& variables = occuringVariables.at(oldStateNumber); auto& variables = occuringVariables.at(oldStateNumber);
// point at which we start with rows for this state // point at which we start with rows for this state
@ -410,10 +410,6 @@ namespace storm {
auto const& matrix = parameterLifter->getMatrix(); auto const& matrix = parameterLifter->getMatrix();
auto const& vector = parameterLifter->getVector(); auto const& vector = parameterLifter->getVector();
auto i = 0;
for (auto & x : vector) {
++i;
}
std::vector<ConstantType> stateResults; std::vector<ConstantType> stateResults;
for (uint64_t state = 0; state < schedulerChoices.size(); ++state) { for (uint64_t state = 0; state < schedulerChoices.size(); ++state) {
uint64_t rowOffset = matrix.getRowGroupIndices()[state]; uint64_t rowOffset = matrix.getRowGroupIndices()[state];
@ -591,7 +587,6 @@ namespace storm {
bool done = true; bool done = true;
for (auto const& state : states) { for (auto const& state : states) {
done &= order->contains(state) && localMonotonicityResult->getMonotonicity(state, var) != Monotonicity::Unknown; done &= order->contains(state) && localMonotonicityResult->getMonotonicity(state, var) != Monotonicity::Unknown;
auto check = localMonotonicityResult->getMonotonicity(state, var);
if (!done) { if (!done) {
break; break;
} }

1
src/storm-pars/modelchecker/region/SparseParameterLiftingModelChecker.cpp

@ -508,7 +508,6 @@ namespace storm {
std::set<VariableType>& possibleNotMonotoneParameters, std::set<VariableType>& possibleNotMonotoneParameters,
std::set<VariableType>const& consideredVariables, std::set<VariableType>const& consideredVariables,
storm::solver::OptimizationDirection const& dir) { storm::solver::OptimizationDirection const& dir) {
bool minimize = storm::solver::minimize(dir);
typedef typename storm::storage::ParameterRegion<typename SparseModelType::ValueType>::Valuation Valuation; typedef typename storm::storage::ParameterRegion<typename SparseModelType::ValueType>::Valuation Valuation;
typedef typename storm::storage::ParameterRegion<typename SparseModelType::ValueType>::CoefficientType CoefficientType; typedef typename storm::storage::ParameterRegion<typename SparseModelType::ValueType>::CoefficientType CoefficientType;
ConstantType value = storm::solver::minimize(dir) ? 1 : 0; ConstantType value = storm::solver::minimize(dir) ? 1 : 0;

4
src/storm-pars/storage/ParameterRegion.cpp

@ -283,12 +283,12 @@ namespace storm {
} }
template <typename ParametricType> template <typename ParametricType>
void ParameterRegion<ParametricType>::setSplitThreshold(int splitThreshold) {
void ParameterRegion<ParametricType>::setSplitThreshold(size_t splitThreshold) {
this->splitThreshold = splitThreshold; this->splitThreshold = splitThreshold;
} }
template <typename ParametricType> template <typename ParametricType>
int ParameterRegion<ParametricType>::getSplitThreshold() const {
size_t ParameterRegion<ParametricType>::getSplitThreshold() const {
return splitThreshold; return splitThreshold;
} }

6
src/storm-pars/storage/ParameterRegion.h

@ -57,8 +57,8 @@ namespace storm {
*/ */
Valuation getCenterPoint() const; Valuation getCenterPoint() const;
void setSplitThreshold(int splitThreshold);
int getSplitThreshold() const;
void setSplitThreshold(size_t splitThreshold);
size_t getSplitThreshold() const;
/*! /*!
* Returns the area of this region * Returns the area of this region
@ -89,7 +89,7 @@ namespace storm {
void init(); void init();
bool lastSplitMonotone = false; bool lastSplitMonotone = false;
int splitThreshold;
size_t splitThreshold;
Valuation lowerBoundaries; Valuation lowerBoundaries;
Valuation upperBoundaries; Valuation upperBoundaries;

Loading…
Cancel
Save