Browse Source

Merge branch 'master' into janiTests

main
TimQu 7 years ago
parent
commit
4d7246fbd6
  1. 2
      src/storm/generator/TransientVariableInformation.h
  2. 2
      src/storm/generator/VariableInformation.h
  3. 4
      src/storm/solver/EigenLinearEquationSolver.cpp
  4. 2
      src/storm/solver/LinearEquationSolver.cpp
  5. 2
      src/storm/solver/StandardGameSolver.cpp
  6. 8
      src/storm/storage/expressions/CheckIfThenElseGuardVisitor.cpp
  7. 2
      src/storm/storage/geometry/nativepolytopeconversion/SubsetEnumerator.cpp
  8. 20
      src/storm/storage/jani/ArrayEliminator.cpp
  9. 6
      src/storm/storage/jani/FunctionEliminator.cpp
  10. 2
      src/storm/storage/jani/Model.h
  11. 1
      src/storm/storage/jani/expressions/JaniExpressionSubstitutionVisitor.cpp
  12. 1
      src/storm/storage/jani/expressions/JaniExpressionSubstitutionVisitor.h
  13. 14
      src/storm/storage/jani/traverser/ArrayExpressionFinder.cpp
  14. 8
      src/storm/storage/jani/traverser/JaniTraverser.cpp
  15. 2
      src/storm/transformer/GoalStateMerger.cpp
  16. 4
      src/storm/utility/ConstantsComparator.cpp
  17. 2
      src/storm/utility/DirectEncodingExporter.cpp
  18. 2
      src/storm/utility/VectorHelper.cpp
  19. 2
      src/storm/utility/constants.cpp

2
src/storm/generator/TransientVariableInformation.h

@ -16,7 +16,7 @@ namespace storm {
namespace jani { namespace jani {
class Model; class Model;
class Automaton; class Automaton;
class ArrayEliminatorData;
struct ArrayEliminatorData;
class VariableSet; class VariableSet;
} }

2
src/storm/generator/VariableInformation.h

@ -16,7 +16,7 @@ namespace storm {
namespace jani { namespace jani {
class Model; class Model;
class Automaton; class Automaton;
class ArrayEliminatorData;
struct ArrayEliminatorData;
class VariableSet; class VariableSet;
} }

4
src/storm/solver/EigenLinearEquationSolver.cpp

@ -244,7 +244,7 @@ namespace storm {
} }
template<typename ValueType> template<typename ValueType>
LinearEquationSolverProblemFormat EigenLinearEquationSolver<ValueType>::getEquationProblemFormat(Environment const& env) const {
LinearEquationSolverProblemFormat EigenLinearEquationSolver<ValueType>::getEquationProblemFormat(Environment const&) const {
return LinearEquationSolverProblemFormat::EquationSystem; return LinearEquationSolverProblemFormat::EquationSystem;
} }
@ -259,7 +259,7 @@ namespace storm {
} }
template<typename ValueType> template<typename ValueType>
std::unique_ptr<storm::solver::LinearEquationSolver<ValueType>> EigenLinearEquationSolverFactory<ValueType>::create(Environment const& env) const {
std::unique_ptr<storm::solver::LinearEquationSolver<ValueType>> EigenLinearEquationSolverFactory<ValueType>::create(Environment const&) const {
return std::make_unique<storm::solver::EigenLinearEquationSolver<ValueType>>(); return std::make_unique<storm::solver::EigenLinearEquationSolver<ValueType>>();
} }

2
src/storm/solver/LinearEquationSolver.cpp

@ -31,7 +31,7 @@ namespace storm {
} }
template<typename ValueType> template<typename ValueType>
LinearEquationSolverRequirements LinearEquationSolver<ValueType>::getRequirements(Environment const& env) const {
LinearEquationSolverRequirements LinearEquationSolver<ValueType>::getRequirements(Environment const&) const {
return LinearEquationSolverRequirements(); return LinearEquationSolverRequirements();
} }

2
src/storm/solver/StandardGameSolver.cpp

@ -498,7 +498,7 @@ namespace storm {
} }
template<typename ValueType> template<typename ValueType>
void StandardGameSolver<ValueType>::getInducedMatrixVector(std::vector<ValueType>& x, std::vector<ValueType> const& b, std::vector<uint_fast64_t> const& player1Choices, std::vector<uint_fast64_t> const& player2Choices, storm::storage::SparseMatrix<ValueType>& inducedMatrix, std::vector<ValueType>& inducedVector) const {
void StandardGameSolver<ValueType>::getInducedMatrixVector(std::vector<ValueType>&, std::vector<ValueType> const& b, std::vector<uint_fast64_t> const& player1Choices, std::vector<uint_fast64_t> const& player2Choices, storm::storage::SparseMatrix<ValueType>& inducedMatrix, std::vector<ValueType>& inducedVector) const {
// Get the rows of the player 2 matrix that are selected by the schedulers. // Get the rows of the player 2 matrix that are selected by the schedulers.
// Note that rows can be selected more than once and in an arbitrary order. // Note that rows can be selected more than once and in an arbitrary order.
std::vector<storm::storage::sparse::state_type> selectedRows; std::vector<storm::storage::sparse::state_type> selectedRows;

8
src/storm/storage/expressions/CheckIfThenElseGuardVisitor.cpp

@ -43,7 +43,7 @@ namespace storm {
boost::any_cast<bool>(expression.getSecondOperand()->accept(*this, data)); boost::any_cast<bool>(expression.getSecondOperand()->accept(*this, data));
} }
boost::any CheckIfThenElseGuardVisitor::visit(VariableExpression const& expression, boost::any const&) {
boost::any CheckIfThenElseGuardVisitor::visit(VariableExpression const&, boost::any const&) {
return false; return false;
} }
@ -55,15 +55,15 @@ namespace storm {
return expression.getOperand()->accept(*this, data); return expression.getOperand()->accept(*this, data);
} }
boost::any CheckIfThenElseGuardVisitor::visit(BooleanLiteralExpression const& expression, boost::any const&) {
boost::any CheckIfThenElseGuardVisitor::visit(BooleanLiteralExpression const&, boost::any const&) {
return false; return false;
} }
boost::any CheckIfThenElseGuardVisitor::visit(IntegerLiteralExpression const& expression, boost::any const&) {
boost::any CheckIfThenElseGuardVisitor::visit(IntegerLiteralExpression const&, boost::any const&) {
return false; return false;
} }
boost::any CheckIfThenElseGuardVisitor::visit(RationalLiteralExpression const& expression, boost::any const&) {
boost::any CheckIfThenElseGuardVisitor::visit(RationalLiteralExpression const&, boost::any const&) {
return false; return false;
} }

2
src/storm/storage/geometry/nativepolytopeconversion/SubsetEnumerator.cpp

@ -84,7 +84,7 @@ namespace storm {
} }
template< typename DataType> template< typename DataType>
bool SubsetEnumerator<DataType>::trueFilter(std::vector<uint_fast64_t> const& subset, uint_fast64_t const& item, DataType const& data){
bool SubsetEnumerator<DataType>::trueFilter(std::vector<uint_fast64_t> const&, uint_fast64_t const&, DataType const&) {
return true; return true;
} }

20
src/storm/storage/jani/ArrayEliminator.cpp

@ -76,24 +76,24 @@ namespace storm {
return boost::any_cast<std::size_t>(expression.getOperand()->accept(*this, data)); return boost::any_cast<std::size_t>(expression.getOperand()->accept(*this, data));
} }
virtual boost::any visit(storm::expressions::BooleanLiteralExpression const& expression, boost::any const& data) override {
virtual boost::any visit(storm::expressions::BooleanLiteralExpression const&, boost::any const&) override {
return 0; return 0;
} }
virtual boost::any visit(storm::expressions::IntegerLiteralExpression const& expression, boost::any const& data) override {
virtual boost::any visit(storm::expressions::IntegerLiteralExpression const&, boost::any const&) override {
return 0; return 0;
} }
virtual boost::any visit(storm::expressions::RationalLiteralExpression const& expression, boost::any const& data) override {
virtual boost::any visit(storm::expressions::RationalLiteralExpression const&, boost::any const&) override {
return 0; return 0;
} }
virtual boost::any visit(storm::expressions::ValueArrayExpression const& expression, boost::any const& data) override {
virtual boost::any visit(storm::expressions::ValueArrayExpression const& expression, boost::any const&) override {
STORM_LOG_ASSERT(expression.size()->isIntegerLiteralExpression(), "unexpected kind of size expression of ValueArrayExpression (" << expression.size()->toExpression() << ")."); STORM_LOG_ASSERT(expression.size()->isIntegerLiteralExpression(), "unexpected kind of size expression of ValueArrayExpression (" << expression.size()->toExpression() << ").");
return static_cast<std::size_t>(expression.size()->evaluateAsInt()); return static_cast<std::size_t>(expression.size()->evaluateAsInt());
} }
virtual boost::any visit(storm::expressions::ConstructorArrayExpression const& expression, boost::any const& data) override {
virtual boost::any visit(storm::expressions::ConstructorArrayExpression const& expression, boost::any const&) override {
if (!expression.size()->containsVariables()) { if (!expression.size()->containsVariables()) {
return static_cast<std::size_t>(expression.size()->evaluateAsInt()); return static_cast<std::size_t>(expression.size()->evaluateAsInt());
} else { } else {
@ -114,12 +114,12 @@ namespace storm {
} }
} }
virtual boost::any visit(storm::expressions::ArrayAccessExpression const& expression, boost::any const& data) override {
virtual boost::any visit(storm::expressions::ArrayAccessExpression const&, boost::any const&) override {
STORM_LOG_WARN("Found Array access expression within an array expression. This is not expected since nested arrays are currently not supported."); STORM_LOG_WARN("Found Array access expression within an array expression. This is not expected since nested arrays are currently not supported.");
return 0; return 0;
} }
virtual boost::any visit(storm::expressions::FunctionCallExpression const& expression, boost::any const& data) override {
virtual boost::any visit(storm::expressions::FunctionCallExpression const&, boost::any const&) override {
STORM_LOG_THROW(false, storm::exceptions::UnexpectedException, "Found Function call expression within an array expression. This is not expected since functions are expected to be eliminated at this point."); STORM_LOG_THROW(false, storm::exceptions::UnexpectedException, "Found Function call expression within an array expression. This is not expected since functions are expected to be eliminated at this point.");
return 0; return 0;
} }
@ -328,7 +328,7 @@ namespace storm {
return ResultType(boost::any_cast<ResultType>(expression.at(index)->accept(*this, boost::any()))); return ResultType(boost::any_cast<ResultType>(expression.at(index)->accept(*this, boost::any())));
} }
virtual boost::any visit(storm::expressions::ArrayAccessExpression const& expression, boost::any const& data) override {
virtual boost::any visit(storm::expressions::ArrayAccessExpression const& expression, boost::any const&) override {
if (expression.getSecondOperand()->containsVariables()) { if (expression.getSecondOperand()->containsVariables()) {
//get the size of the array expression //get the size of the array expression
uint64_t size = MaxArraySizeExpressionVisitor().getMaxSize(expression.getFirstOperand()->toExpression(), arraySizes); uint64_t size = MaxArraySizeExpressionVisitor().getMaxSize(expression.getFirstOperand()->toExpression(), arraySizes);
@ -349,7 +349,7 @@ namespace storm {
} }
} }
virtual boost::any visit(storm::expressions::FunctionCallExpression const& expression, boost::any const& data) override {
virtual boost::any visit(storm::expressions::FunctionCallExpression const&, boost::any const&) override {
STORM_LOG_THROW(false, storm::exceptions::UnexpectedException, "Found Function call expression while eliminating array expressions. This is not expected since functions are expected to be eliminated at this point."); STORM_LOG_THROW(false, storm::exceptions::UnexpectedException, "Found Function call expression while eliminating array expressions. This is not expected since functions are expected to be eliminated at this point.");
return false; return false;
} }
@ -497,7 +497,7 @@ namespace storm {
} }
} }
void traverse(EdgeDestination& edgeDestination, boost::any const& data) override {
void traverse(EdgeDestination& edgeDestination, boost::any const&) override {
edgeDestination.setProbability(arrayExprEliminator->eliminate(edgeDestination.getProbability())); edgeDestination.setProbability(arrayExprEliminator->eliminate(edgeDestination.getProbability()));
} }

6
src/storm/storage/jani/FunctionEliminator.cpp

@ -91,7 +91,7 @@ namespace storm {
} }
} }
virtual boost::any visit(storm::expressions::VariableExpression const& expression, boost::any const& data) override {
virtual boost::any visit(storm::expressions::VariableExpression const& expression, boost::any const&) override {
return expression.getSharedPointer(); return expression.getSharedPointer();
} }
@ -267,7 +267,7 @@ namespace storm {
} }
} }
virtual void traverse(Model& model, boost::any const& data) override {
virtual void traverse(Model& model, boost::any const&) override {
// First we need to apply functions called in function bodies // First we need to apply functions called in function bodies
FunctionEliminationExpressionVisitor globalFunctionEliminationVisitor(&model.getGlobalFunctionDefinitions()); FunctionEliminationExpressionVisitor globalFunctionEliminationVisitor(&model.getGlobalFunctionDefinitions());
@ -392,7 +392,7 @@ namespace storm {
} }
} }
void traverse(storm::expressions::Expression const& expression, boost::any const& data) override {
void traverse(storm::expressions::Expression const& expression, boost::any const&) override {
STORM_LOG_THROW(getOccurringFunctionCalls(expression).empty(), storm::exceptions::UnexpectedException, "Did not translate functions in expression " << expression); STORM_LOG_THROW(getOccurringFunctionCalls(expression).empty(), storm::exceptions::UnexpectedException, "Did not translate functions in expression " << expression);
} }
}; };

2
src/storm/storage/jani/Model.h

@ -35,7 +35,7 @@ namespace storm {
class Automaton; class Automaton;
class Exporter; class Exporter;
class SynchronizationVector; class SynchronizationVector;
class ArrayEliminatorData;
struct ArrayEliminatorData;
class Property; class Property;
class Model { class Model {

1
src/storm/storage/jani/expressions/JaniExpressionSubstitutionVisitor.cpp

@ -14,7 +14,6 @@ namespace storm {
} }
} }
namespace expressions { namespace expressions {
template<typename MapType> template<typename MapType>

1
src/storm/storage/jani/expressions/JaniExpressionSubstitutionVisitor.h

@ -21,6 +21,7 @@ namespace storm {
* @param variableToExpressionMapping A mapping from variables to expressions. * @param variableToExpressionMapping A mapping from variables to expressions.
*/ */
JaniExpressionSubstitutionVisitor(MapType const& variableToExpressionMapping); JaniExpressionSubstitutionVisitor(MapType const& variableToExpressionMapping);
using SubstitutionVisitor<MapType>::visit;
virtual boost::any visit(ValueArrayExpression const& expression, boost::any const& data) override; virtual boost::any visit(ValueArrayExpression const& expression, boost::any const& data) override;
virtual boost::any visit(ConstructorArrayExpression const& expression, boost::any const& data) override; virtual boost::any visit(ConstructorArrayExpression const& expression, boost::any const& data) override;

14
src/storm/storage/jani/traverser/ArrayExpressionFinder.cpp

@ -36,7 +36,7 @@ namespace storm {
boost::any_cast<bool>(expression.getSecondOperand()->accept(*this, data)); boost::any_cast<bool>(expression.getSecondOperand()->accept(*this, data));
} }
virtual boost::any visit(storm::expressions::VariableExpression const& expression, boost::any const&) override {
virtual boost::any visit(storm::expressions::VariableExpression const&, boost::any const&) override {
return false; return false;
} }
@ -48,27 +48,27 @@ namespace storm {
return expression.getOperand()->accept(*this, data); return expression.getOperand()->accept(*this, data);
} }
virtual boost::any visit(storm::expressions::BooleanLiteralExpression const& expression, boost::any const&) override {
virtual boost::any visit(storm::expressions::BooleanLiteralExpression const&, boost::any const&) override {
return false; return false;
} }
virtual boost::any visit(storm::expressions::IntegerLiteralExpression const& expression, boost::any const&) override {
virtual boost::any visit(storm::expressions::IntegerLiteralExpression const&, boost::any const&) override {
return false; return false;
} }
virtual boost::any visit(storm::expressions::RationalLiteralExpression const& expression, boost::any const&) override {
virtual boost::any visit(storm::expressions::RationalLiteralExpression const&, boost::any const&) override {
return false; return false;
} }
virtual boost::any visit(storm::expressions::ValueArrayExpression const& expression, boost::any const& data) override {
virtual boost::any visit(storm::expressions::ValueArrayExpression const&, boost::any const&) override {
return true; return true;
} }
virtual boost::any visit(storm::expressions::ConstructorArrayExpression const& expression, boost::any const& data) override {
virtual boost::any visit(storm::expressions::ConstructorArrayExpression const&, boost::any const&) override {
return true; return true;
} }
virtual boost::any visit(storm::expressions::ArrayAccessExpression const& expression, boost::any const& data) override {
virtual boost::any visit(storm::expressions::ArrayAccessExpression const&, boost::any const&) override {
return true; return true;
} }

8
src/storm/storage/jani/traverser/JaniTraverser.cpp

@ -26,7 +26,7 @@ namespace storm {
} }
} }
void JaniTraverser::traverse(Action const& action, boost::any const& data) {
void JaniTraverser::traverse(Action const&, boost::any const&) {
// Intentionally left empty. // Intentionally left empty.
} }
@ -166,7 +166,7 @@ namespace storm {
} }
} }
void JaniTraverser::traverse(storm::expressions::Expression const& expression, boost::any const& data) {
void JaniTraverser::traverse(storm::expressions::Expression const&, boost::any const&) {
// intentionally left empty. // intentionally left empty.
} }
@ -192,7 +192,7 @@ namespace storm {
} }
} }
void ConstJaniTraverser::traverse(Action const& action, boost::any const& data) {
void ConstJaniTraverser::traverse(Action const&, boost::any const&) {
// Intentionally left empty. // Intentionally left empty.
} }
@ -331,7 +331,7 @@ namespace storm {
} }
} }
void ConstJaniTraverser::traverse(storm::expressions::Expression const& expression, boost::any const& data) {
void ConstJaniTraverser::traverse(storm::expressions::Expression const&, boost::any const&) {
// intentionally left empty. // intentionally left empty.
} }

2
src/storm/transformer/GoalStateMerger.cpp

@ -276,7 +276,7 @@ namespace storm {
} }
template <typename SparseModelType> template <typename SparseModelType>
std::shared_ptr<SparseModelType> GoalStateMerger<SparseModelType>::buildOutputModel(storm::storage::BitVector const& maybeStates, GoalStateMerger::ReturnType const& resultData, storm::storage::SparseMatrix<typename SparseModelType::ValueType>&& transitionMatrix, storm::models::sparse::StateLabeling&& labeling, std::unordered_map<std::string, typename SparseModelType::RewardModelType>&& rewardModels) const {
std::shared_ptr<SparseModelType> GoalStateMerger<SparseModelType>::buildOutputModel(storm::storage::BitVector const&, GoalStateMerger::ReturnType const&, storm::storage::SparseMatrix<typename SparseModelType::ValueType>&& transitionMatrix, storm::models::sparse::StateLabeling&& labeling, std::unordered_map<std::string, typename SparseModelType::RewardModelType>&& rewardModels) const {
return std::make_shared<SparseModelType>(std::move(transitionMatrix), std::move(labeling), std::move(rewardModels)); return std::make_shared<SparseModelType>(std::move(transitionMatrix), std::move(labeling), std::move(rewardModels));
} }

4
src/storm/utility/ConstantsComparator.cpp

@ -142,11 +142,11 @@ namespace storm {
} }
} }
bool ConstantsComparator<storm::RationalNumber>::isConstant(storm::RationalNumber const& value) const {
bool ConstantsComparator<storm::RationalNumber>::isConstant(storm::RationalNumber const&) const {
return true; return true;
} }
bool ConstantsComparator<storm::RationalNumber>::isInfinity(storm::RationalNumber const& value) const {
bool ConstantsComparator<storm::RationalNumber>::isInfinity(storm::RationalNumber const&) const {
return false; return false;
} }

2
src/storm/utility/DirectEncodingExporter.cpp

@ -145,7 +145,7 @@ namespace storm {
} }
template<typename ValueType> template<typename ValueType>
std::vector<std::string> getParameters(std::shared_ptr<storm::models::sparse::Model<ValueType>> sparseModel) {
std::vector<std::string> getParameters(std::shared_ptr<storm::models::sparse::Model<ValueType>>) {
return {}; return {};
} }

2
src/storm/utility/VectorHelper.cpp

@ -43,7 +43,7 @@ namespace storm {
} }
template<> template<>
void VectorHelper<storm::RationalFunction>::reduceVector(storm::solver::OptimizationDirection dir, std::vector<storm::RationalFunction> const& source, std::vector<storm::RationalFunction>& target, std::vector<uint_fast64_t> const& rowGrouping, std::vector<uint_fast64_t>* choices) const {
void VectorHelper<storm::RationalFunction>::reduceVector(storm::solver::OptimizationDirection, std::vector<storm::RationalFunction> const&, std::vector<storm::RationalFunction>&, std::vector<uint_fast64_t> const&, std::vector<uint_fast64_t>*) const {
STORM_LOG_THROW(false, storm::exceptions::NotSupportedException, "This operation is not supported."); STORM_LOG_THROW(false, storm::exceptions::NotSupportedException, "This operation is not supported.");
} }

2
src/storm/utility/constants.cpp

@ -46,7 +46,7 @@ namespace storm {
} }
template<typename ValueType> template<typename ValueType>
bool isNan(ValueType const& value) {
bool isNan(ValueType const&) {
return false; return false;
} }

Loading…
Cancel
Save