Browse Source

Merge remote-tracking branch 'origin/master' into jani_next_state_generator

main
dehnert 8 years ago
parent
commit
7234ffe5e7
  1. 23
      CHANGELOG.md
  2. 8
      CMakeLists.txt
  3. 11
      resources/3rdparty/CMakeLists.txt
  4. 2
      resources/cmake/stormConfig.cmake.in
  5. 17
      src/storm/builder/jit/ExplicitJitJaniModelBuilder.cpp
  6. 3
      src/storm/builder/jit/ModelComponentsBuilder.cpp
  7. 8
      src/storm/cli/cli.cpp
  8. 4
      src/storm/models/sparse/Ctmc.h
  9. 3
      src/storm/models/sparse/DeterministicModel.h
  10. 2
      src/storm/models/sparse/Dtmc.h
  11. 2
      src/storm/models/sparse/MarkovAutomaton.h
  12. 2
      src/storm/models/sparse/Mdp.h
  13. 4
      src/storm/models/sparse/Model.h
  14. 2
      src/storm/models/sparse/NondeterministicModel.h
  15. 2
      src/storm/models/sparse/StandardRewardModel.h
  16. 2
      src/storm/models/sparse/StochasticTwoPlayerGame.h
  17. 12
      src/storm/settings/Argument.cpp
  18. 19
      src/storm/settings/modules/IOSettings.cpp
  19. 22
      src/storm/settings/modules/IOSettings.h
  20. 2
      src/storm/storage/expressions/BaseExpression.h
  21. 3
      src/storm/storage/expressions/BinaryBooleanFunctionExpression.h
  22. 3
      src/storm/storage/expressions/BinaryExpression.h
  23. 3
      src/storm/storage/expressions/BinaryNumericalFunctionExpression.h
  24. 3
      src/storm/storage/expressions/BinaryRelationExpression.h
  25. 3
      src/storm/storage/expressions/BooleanLiteralExpression.h
  26. 2
      src/storm/storage/expressions/Expression.h
  27. 3
      src/storm/storage/expressions/IfThenElseExpression.h
  28. 3
      src/storm/storage/expressions/IntegerLiteralExpression.h
  29. 2
      src/storm/storage/expressions/LinearCoefficientVisitor.h
  30. 3
      src/storm/storage/expressions/RationalLiteralExpression.h
  31. 2
      src/storm/storage/expressions/UnaryBooleanFunctionExpression.h
  32. 2
      src/storm/storage/expressions/UnaryExpression.h
  33. 3
      src/storm/storage/expressions/UnaryNumericalFunctionExpression.h
  34. 3
      src/storm/storage/expressions/Variable.h
  35. 3
      src/storm/storage/expressions/VariableExpression.h
  36. 31
      src/storm/storage/jani/Automaton.cpp
  37. 2
      src/storm/storage/jani/Automaton.h
  38. 1
      src/storm/storage/jani/JSONExporter.cpp
  39. 29
      src/storm/storage/jani/Model.cpp
  40. 2
      src/storm/storage/jani/Model.h
  41. 2
      src/storm/storage/prism/Assignment.h
  42. 2
      src/storm/storage/prism/BooleanVariable.h
  43. 2
      src/storm/storage/prism/Command.h
  44. 2
      src/storm/storage/prism/Constant.h
  45. 2
      src/storm/storage/prism/Formula.h
  46. 2
      src/storm/storage/prism/InitialConstruct.h
  47. 2
      src/storm/storage/prism/IntegerVariable.h
  48. 2
      src/storm/storage/prism/Label.h
  49. 2
      src/storm/storage/prism/LocatedInformation.h
  50. 2
      src/storm/storage/prism/Module.h
  51. 2
      src/storm/storage/prism/Program.h
  52. 2
      src/storm/storage/prism/RewardModel.h
  53. 2
      src/storm/storage/prism/StateActionReward.h
  54. 2
      src/storm/storage/prism/StateReward.h
  55. 2
      src/storm/storage/prism/SystemCompositionConstruct.h
  56. 2
      src/storm/storage/prism/TransitionReward.h
  57. 2
      src/storm/storage/prism/Update.h
  58. 2
      src/storm/storage/prism/Variable.h
  59. 20
      src/storm/utility/file.h

23
CHANGELOG.md

@ -0,0 +1,23 @@
Changelog
==============
This changelog lists only the most important changes. Smaller (bug)fixes as well as non-mature features are not part of the changelog.
The releases of major and minor versions contain an overview of changes since the last major/minor update.
Version 1.0.x
-------------------
### Version 1.0.1 (2017/4)
- Multi-objective model checking support now fully included
- Several improvements in parameter lifting
- Several improvements in JANI parsing
- Properties can contain model variables
- Support for rational numbers/functions in decision diagrams via sylvan
- Elimination-based solvers (exact solution) for models stored as decision diagrams
- Export of version and configuration to cmake
- Improved building process
### Version 1.0.0 (2017/3)
Start of this changelog

8
CMakeLists.txt

@ -43,8 +43,10 @@ mark_as_advanced(FORCE_COLOR)
option(STORM_COMPILE_WITH_CCACHE "Compile using CCache [if found]" ON) option(STORM_COMPILE_WITH_CCACHE "Compile using CCache [if found]" ON)
mark_as_advanced(STORM_COMPILE_WITH_CCACHE) mark_as_advanced(STORM_COMPILE_WITH_CCACHE)
option(STORM_LOG_DISABLE_DEBUG "Disable log and trace message support" OFF) option(STORM_LOG_DISABLE_DEBUG "Disable log and trace message support" OFF)
option(STORM_USE_CLN_EA "Sets whether CLN or GMP numbers should be used for exact arithmetic." OFF)
option(STORM_USE_CLN_RF "Sets whether CLN or GMP numbers should be used for rational functions." ON)
option(STORM_USE_CLN_EA "Sets whether CLN instead of GMP numbers should be used for exact arithmetic." OFF)
export_option(STORM_USE_CLN_EA)
option(STORM_USE_CLN_RF "Sets whether CLN instead of GMP numbers should be used for rational functions." ON)
export_option(STORM_USE_CLN_RF)
option(BUILD_SHARED_LIBS "Build the Storm library dynamically" OFF) option(BUILD_SHARED_LIBS "Build the Storm library dynamically" OFF)
set(BOOST_ROOT "" CACHE STRING "A hint to the root directory of Boost (optional).") set(BOOST_ROOT "" CACHE STRING "A hint to the root directory of Boost (optional).")
set(GUROBI_ROOT "" CACHE STRING "A hint to the root directory of Gurobi (optional).") set(GUROBI_ROOT "" CACHE STRING "A hint to the root directory of Gurobi (optional).")
@ -397,6 +399,8 @@ else()
endif() endif()
message(STATUS "Storm - version is ${STORM_VERSION_MAJOR}.${STORM_VERSION_MINOR}.${STORM_VERSION_PATCH} (${STORM_VERSION_COMMITS_AHEAD} commits ahead of tag), building from git: ${STORM_VERSION_GIT_HASH} (dirty: ${STORM_VERSION_DIRTY}).") message(STATUS "Storm - version is ${STORM_VERSION_MAJOR}.${STORM_VERSION_MINOR}.${STORM_VERSION_PATCH} (${STORM_VERSION_COMMITS_AHEAD} commits ahead of tag), building from git: ${STORM_VERSION_GIT_HASH} (dirty: ${STORM_VERSION_DIRTY}).")
endif() endif()
set(STORM_VERSION "${STORM_VERSION_MAJOR}.${STORM_VERSION_MINOR}.${STORM_VERSION_PATCH}")
# Configure a header file to pass some of the CMake settings to the source code # Configure a header file to pass some of the CMake settings to the source code
configure_file ( configure_file (

11
resources/3rdparty/CMakeLists.txt

@ -202,6 +202,14 @@ if(USE_CARL)
find_package(carl QUIET) find_package(carl QUIET)
endif() endif()
if(carl_FOUND AND NOT STORM_FORCE_SHIPPED_CARL) if(carl_FOUND AND NOT STORM_FORCE_SHIPPED_CARL)
get_target_property(carlLOCATION lib_carl LOCATION)
if(${carlLOCATION} STREQUAL "carlLOCATION-NOTFOUND")
message(SEND_ERROR "Library location for carl is not found, did you build carl?")
elseif(EXISTS ${carlLOCATION})
#empty on purpose
else()
message(SEND_ERROR "File ${carlLOCATION} does not exist, did you build carl?")
endif()
set(STORM_SHIPPED_CARL OFF) set(STORM_SHIPPED_CARL OFF)
set(STORM_HAVE_CARL ON) set(STORM_HAVE_CARL ON)
message(STATUS "Storm - Use system version of carl.") message(STATUS "Storm - Use system version of carl.")
@ -412,7 +420,8 @@ endif()
## ##
############################################################# #############################################################
include_directories(${STORM_3RDPARTY_SOURCE_DIR}/cpptemplate)
add_imported_library_interface(CppTemplate "${STORM_3RDPARTY_SOURCE_DIR}/cpptemplate/")
list(APPEND STORM_DEP_TARGETS CppTemplate)
list(APPEND STORM_3RDPARTY_SOURCES ${STORM_3RDPARTY_SOURCE_DIR}/cpptemplate/cpptempl.cpp) list(APPEND STORM_3RDPARTY_SOURCES ${STORM_3RDPARTY_SOURCE_DIR}/cpptemplate/cpptempl.cpp)
############################################################# #############################################################

2
resources/cmake/stormConfig.cmake.in

@ -1,4 +1,4 @@
set(storm_VERSION @storm_VERSION@)
set(storm_VERSION @STORM_VERSION@)
get_filename_component(storm_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) get_filename_component(storm_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)

17
src/storm/builder/jit/ExplicitJitJaniModelBuilder.cpp

@ -32,6 +32,9 @@
#include "storm/settings/SettingsManager.h" #include "storm/settings/SettingsManager.h"
#include "storm/settings/modules/JitBuilderSettings.h" #include "storm/settings/modules/JitBuilderSettings.h"
#include "storm/settings/modules/CoreSettings.h"
#include "storm/utility/OsDetection.h" #include "storm/utility/OsDetection.h"
#include "storm-config.h" #include "storm-config.h"
@ -535,6 +538,12 @@ namespace storm {
} }
modelData["double"] = cpptempl::make_data(list); modelData["double"] = cpptempl::make_data(list);
list = cpptempl::data_list();
if (storm::settings::getModule<storm::settings::modules::CoreSettings>().isDontFixDeadlocksSet()) {
list.push_back(cpptempl::data_map());
}
modelData["dontFixDeadlocks"] = cpptempl::make_data(list);
// If we are building a possibly parametric model, we need to create the parameters. // If we are building a possibly parametric model, we need to create the parameters.
if (std::is_same<storm::RationalFunction, ValueType>::value) { if (std::is_same<storm::RationalFunction, ValueType>::value) {
generateParameters(modelData); generateParameters(modelData);
@ -1657,7 +1666,6 @@ namespace storm {
#include "storm/builder/RewardModelInformation.h" #include "storm/builder/RewardModelInformation.h"
#include "storm/utility/constants.h" #include "storm/utility/constants.h"
#include "storm/exceptions/WrongFormatException.h" #include "storm/exceptions/WrongFormatException.h"
namespace storm { namespace storm {
@ -2279,6 +2287,13 @@ namespace storm {
exploreSynchronizingEdges(currentState, behaviour, statesToExplore); exploreSynchronizingEdges(currentState, behaviour, statesToExplore);
} }
{% if dontFixDeadlocks %}
if (behaviour.empty() && behaviour.isExpanded() ) {
std::cout << currentState << std::endl;
throw storm::exceptions::WrongFormatException("Error while creating sparse matrix from JANI model: found deadlock state and fixing deadlocks was explicitly disabled.");
}
{% endif %}
this->addStateBehaviour(currentIndex, behaviour); this->addStateBehaviour(currentIndex, behaviour);
behaviour.clear(); behaviour.clear();
} }

3
src/storm/builder/jit/ModelComponentsBuilder.cpp

@ -81,7 +81,8 @@ namespace storm {
} }
} else { } else {
if (behaviour.isExpanded() && dontFixDeadlocks) { if (behaviour.isExpanded() && dontFixDeadlocks) {
STORM_LOG_THROW(false, storm::exceptions::WrongFormatException, "Error while creating sparse matrix from JANI model: found deadlock state and fixing deadlocks was explicitly disabled.");
// Skip on purpose; Error is produced in the generated code to provide better diagnostics.
//STORM_LOG_THROW(false, storm::exceptions::WrongFormatException, "Error while creating sparse matrix from JANI model: found deadlock state and fixing deadlocks was explicitly disabled.");
} else { } else {
// Add the self-loop in the transition matrix. // Add the self-loop in the transition matrix.
transitionMatrixBuilder->addNextValue(currentRow, currentRowGroup, storm::utility::one<ValueType>()); transitionMatrixBuilder->addNextValue(currentRow, currentRowGroup, storm::utility::one<ValueType>());

8
src/storm/cli/cli.cpp

@ -15,6 +15,7 @@
#include "storm/settings/modules/JaniExportSettings.h" #include "storm/settings/modules/JaniExportSettings.h"
#include "storm/utility/resources.h" #include "storm/utility/resources.h"
#include "storm/utility/file.h"
#include "storm/utility/storm-version.h" #include "storm/utility/storm-version.h"
@ -242,6 +243,13 @@ namespace storm {
} }
} }
if(ioSettings.isExportJaniDotSet()) {
std::ofstream out;
storm::utility::openFile(ioSettings.getExportJaniDotFilename(), out);
model.asJaniModel().writeDotToStream(out);
storm::utility::closeFile(out);
}
} }
// Get the string that assigns values to the unknown currently undefined constants in the model and formula. // Get the string that assigns values to the unknown currently undefined constants in the model and formula.

4
src/storm/models/sparse/Ctmc.h

@ -54,11 +54,9 @@ namespace storm {
Ctmc(Ctmc<ValueType, RewardModelType> const& ctmc) = default; Ctmc(Ctmc<ValueType, RewardModelType> const& ctmc) = default;
Ctmc& operator=(Ctmc<ValueType, RewardModelType> const& ctmc) = default; Ctmc& operator=(Ctmc<ValueType, RewardModelType> const& ctmc) = default;
#ifndef WINDOWS
Ctmc(Ctmc<ValueType, RewardModelType>&& ctmc) = default; Ctmc(Ctmc<ValueType, RewardModelType>&& ctmc) = default;
Ctmc& operator=(Ctmc<ValueType, RewardModelType>&& ctmc) = default; Ctmc& operator=(Ctmc<ValueType, RewardModelType>&& ctmc) = default;
#endif
/*! /*!
* Retrieves the vector of exit rates of the model. * Retrieves the vector of exit rates of the model.
* *

3
src/storm/models/sparse/DeterministicModel.h

@ -47,10 +47,9 @@ namespace storm {
DeterministicModel(DeterministicModel<ValueType, RewardModelType> const& other) = default; DeterministicModel(DeterministicModel<ValueType, RewardModelType> const& other) = default;
DeterministicModel& operator=(DeterministicModel<ValueType, RewardModelType> const& other) = default; DeterministicModel& operator=(DeterministicModel<ValueType, RewardModelType> const& other) = default;
#ifndef WINDOWS
DeterministicModel(DeterministicModel<ValueType, RewardModelType>&& other) = default; DeterministicModel(DeterministicModel<ValueType, RewardModelType>&& other) = default;
DeterministicModel<ValueType, RewardModelType>& operator=(DeterministicModel<ValueType, RewardModelType>&& model) = default; DeterministicModel<ValueType, RewardModelType>& operator=(DeterministicModel<ValueType, RewardModelType>&& model) = default;
#endif
virtual void reduceToStateBasedRewards() override; virtual void reduceToStateBasedRewards() override;

2
src/storm/models/sparse/Dtmc.h

@ -44,10 +44,8 @@ namespace storm {
Dtmc(Dtmc<ValueType, RewardModelType> const& dtmc) = default; Dtmc(Dtmc<ValueType, RewardModelType> const& dtmc) = default;
Dtmc& operator=(Dtmc<ValueType, RewardModelType> const& dtmc) = default; Dtmc& operator=(Dtmc<ValueType, RewardModelType> const& dtmc) = default;
#ifndef WINDOWS
Dtmc(Dtmc<ValueType, RewardModelType>&& dtmc) = default; Dtmc(Dtmc<ValueType, RewardModelType>&& dtmc) = default;
Dtmc& operator=(Dtmc<ValueType, RewardModelType>&& dtmc) = default; Dtmc& operator=(Dtmc<ValueType, RewardModelType>&& dtmc) = default;
#endif
#ifdef STORM_HAVE_CARL #ifdef STORM_HAVE_CARL

2
src/storm/models/sparse/MarkovAutomaton.h

@ -107,10 +107,8 @@ namespace storm {
MarkovAutomaton(MarkovAutomaton<ValueType, RewardModelType> const& other) = default; MarkovAutomaton(MarkovAutomaton<ValueType, RewardModelType> const& other) = default;
MarkovAutomaton& operator=(MarkovAutomaton<ValueType, RewardModelType> const& other) = default; MarkovAutomaton& operator=(MarkovAutomaton<ValueType, RewardModelType> const& other) = default;
#ifndef WINDOWS
MarkovAutomaton(MarkovAutomaton<ValueType, RewardModelType>&& other) = default; MarkovAutomaton(MarkovAutomaton<ValueType, RewardModelType>&& other) = default;
MarkovAutomaton& operator=(MarkovAutomaton<ValueType, RewardModelType>&& other) = default; MarkovAutomaton& operator=(MarkovAutomaton<ValueType, RewardModelType>&& other) = default;
#endif
/*! /*!
* Retrieves whether the Markov automaton is closed. * Retrieves whether the Markov automaton is closed.

2
src/storm/models/sparse/Mdp.h

@ -44,10 +44,8 @@ namespace storm {
Mdp(Mdp<ValueType, RewardModelType> const& other) = default; Mdp(Mdp<ValueType, RewardModelType> const& other) = default;
Mdp& operator=(Mdp<ValueType, RewardModelType> const& other) = default; Mdp& operator=(Mdp<ValueType, RewardModelType> const& other) = default;
#ifndef WINDOWS
Mdp(Mdp<ValueType, RewardModelType>&& other) = default; Mdp(Mdp<ValueType, RewardModelType>&& other) = default;
Mdp& operator=(Mdp<ValueType, RewardModelType>&& other) = default; Mdp& operator=(Mdp<ValueType, RewardModelType>&& other) = default;
#endif
/*! /*!
* Constructs an MDP by copying the current MDP and restricting the choices of each state to the ones * Constructs an MDP by copying the current MDP and restricting the choices of each state to the ones

4
src/storm/models/sparse/Model.h

@ -46,10 +46,6 @@ namespace storm {
Model(Model<ValueType, RewardModelType> const& other) = default; Model(Model<ValueType, RewardModelType> const& other) = default;
Model& operator=(Model<ValueType, RewardModelType> const& other) = default; Model& operator=(Model<ValueType, RewardModelType> const& other) = default;
#ifndef WINDOWS
Model(Model<ValueType, RewardModelType>&& other) = default;
Model& operator=(Model<ValueType, RewardModelType>&& other) = default;
#endif
/*! /*!
* Constructs a model from the given data. * Constructs a model from the given data.

2
src/storm/models/sparse/NondeterministicModel.h

@ -47,10 +47,8 @@ namespace storm {
NondeterministicModel(NondeterministicModel<ValueType, RewardModelType> const& other) = default; NondeterministicModel(NondeterministicModel<ValueType, RewardModelType> const& other) = default;
NondeterministicModel& operator=(NondeterministicModel<ValueType, RewardModelType> const& other) = default; NondeterministicModel& operator=(NondeterministicModel<ValueType, RewardModelType> const& other) = default;
#ifndef WINDOWS
NondeterministicModel(NondeterministicModel<ValueType, RewardModelType>&& other) = default; NondeterministicModel(NondeterministicModel<ValueType, RewardModelType>&& other) = default;
NondeterministicModel& operator=(NondeterministicModel<ValueType, RewardModelType>&& other) = default; NondeterministicModel& operator=(NondeterministicModel<ValueType, RewardModelType>&& other) = default;
#endif
/*! /*!
* Retrieves the number of (nondeterministic) choices in the model. * Retrieves the number of (nondeterministic) choices in the model.

2
src/storm/models/sparse/StandardRewardModel.h

@ -40,10 +40,8 @@ namespace storm {
StandardRewardModel(StandardRewardModel<ValueType> const& dtmc) = default; StandardRewardModel(StandardRewardModel<ValueType> const& dtmc) = default;
StandardRewardModel& operator=(StandardRewardModel<ValueType> const& dtmc) = default; StandardRewardModel& operator=(StandardRewardModel<ValueType> const& dtmc) = default;
#ifndef WINDOWS
StandardRewardModel(StandardRewardModel<ValueType>&& dtmc) = default; StandardRewardModel(StandardRewardModel<ValueType>&& dtmc) = default;
StandardRewardModel& operator=(StandardRewardModel<ValueType>&& dtmc) = default; StandardRewardModel& operator=(StandardRewardModel<ValueType>&& dtmc) = default;
#endif
/*! /*!
* Retrieves whether the reward model has state rewards. * Retrieves whether the reward model has state rewards.

2
src/storm/models/sparse/StochasticTwoPlayerGame.h

@ -52,10 +52,8 @@ namespace storm {
StochasticTwoPlayerGame(StochasticTwoPlayerGame const& other) = default; StochasticTwoPlayerGame(StochasticTwoPlayerGame const& other) = default;
StochasticTwoPlayerGame& operator=(StochasticTwoPlayerGame const& other) = default; StochasticTwoPlayerGame& operator=(StochasticTwoPlayerGame const& other) = default;
#ifndef WINDOWS
StochasticTwoPlayerGame(StochasticTwoPlayerGame&& other) = default; StochasticTwoPlayerGame(StochasticTwoPlayerGame&& other) = default;
StochasticTwoPlayerGame& operator=(StochasticTwoPlayerGame&& other) = default; StochasticTwoPlayerGame& operator=(StochasticTwoPlayerGame&& other) = default;
#endif
/*! /*!
* Retrieves the matrix representing the choices in player 1 states. * Retrieves the matrix representing the choices in player 1 states.

12
src/storm/settings/Argument.cpp

@ -68,9 +68,9 @@ namespace storm {
template<typename T> template<typename T>
void Argument<T>::setFromDefaultValue() { void Argument<T>::setFromDefaultValue() {
STORM_LOG_THROW(this->hasDefaultValue, storm::exceptions::IllegalFunctionCallException, "Unable to set value from default value, because the argument has none.");
STORM_LOG_THROW(this->hasDefaultValue, storm::exceptions::IllegalFunctionCallException, "Unable to set value from default value, because the argument " << name << " has none.");
bool result = this->setFromTypeValue(this->defaultValue, false); bool result = this->setFromTypeValue(this->defaultValue, false);
STORM_LOG_THROW(result, storm::exceptions::IllegalArgumentValueException, "Unable to assign default value to argument, because it was rejected.");
STORM_LOG_THROW(result, storm::exceptions::IllegalArgumentValueException, "Unable to assign default value to argument " << name << ", because it was rejected.");
} }
template<typename T> template<typename T>
@ -95,7 +95,7 @@ namespace storm {
switch (this->argumentType) { switch (this->argumentType) {
case ArgumentType::Integer: case ArgumentType::Integer:
return inferToInteger(ArgumentType::Integer, this->getArgumentValue()); return inferToInteger(ArgumentType::Integer, this->getArgumentValue());
default: STORM_LOG_THROW(false, storm::exceptions::IllegalFunctionCallException, "Unable to retrieve argument value as integer."); break;
default: STORM_LOG_THROW(false, storm::exceptions::IllegalFunctionCallException, "Unable to retrieve argument value for " << name << " as integer."); break;
} }
} }
@ -105,7 +105,7 @@ namespace storm {
switch (this->argumentType) { switch (this->argumentType) {
case ArgumentType::UnsignedInteger: case ArgumentType::UnsignedInteger:
return inferToUnsignedInteger(ArgumentType::UnsignedInteger, this->getArgumentValue()); return inferToUnsignedInteger(ArgumentType::UnsignedInteger, this->getArgumentValue());
default: STORM_LOG_THROW(false, storm::exceptions::IllegalFunctionCallException, "Unable to retrieve argument value as unsigned integer."); break;
default: STORM_LOG_THROW(false, storm::exceptions::IllegalFunctionCallException, "Unable to retrieve argument value for " << name << " as unsigned integer."); break;
} }
} }
@ -115,7 +115,7 @@ namespace storm {
switch (this->argumentType) { switch (this->argumentType) {
case ArgumentType::Double: case ArgumentType::Double:
return inferToDouble(ArgumentType::Double, this->getArgumentValue()); return inferToDouble(ArgumentType::Double, this->getArgumentValue());
default: STORM_LOG_THROW(false, storm::exceptions::IllegalFunctionCallException, "Unable to retrieve argument value as double."); break;
default: STORM_LOG_THROW(false, storm::exceptions::IllegalFunctionCallException, "Unable to retrieve argument value for " << name << " as double."); break;
} }
} }
@ -124,7 +124,7 @@ namespace storm {
switch (this->argumentType) { switch (this->argumentType) {
case ArgumentType::Boolean: case ArgumentType::Boolean:
return inferToBoolean(ArgumentType::Boolean, this->getArgumentValue()); return inferToBoolean(ArgumentType::Boolean, this->getArgumentValue());
default: STORM_LOG_THROW(false, storm::exceptions::IllegalFunctionCallException, "Unable to retrieve argument value as boolean."); break;
default: STORM_LOG_THROW(false, storm::exceptions::IllegalFunctionCallException, "Unable to retrieve argument value for " << name << " as Boolean."); break;
} }
} }

19
src/storm/settings/modules/IOSettings.cpp

@ -19,6 +19,7 @@ namespace storm {
const std::string IOSettings::moduleName = "io"; const std::string IOSettings::moduleName = "io";
const std::string IOSettings::exportDotOptionName = "exportdot"; const std::string IOSettings::exportDotOptionName = "exportdot";
const std::string IOSettings::exportExplicitOptionName = "exportexplicit"; const std::string IOSettings::exportExplicitOptionName = "exportexplicit";
const std::string IOSettings::exportJaniDotOptionName = "exportjanidot";
const std::string IOSettings::explicitOptionName = "explicit"; const std::string IOSettings::explicitOptionName = "explicit";
const std::string IOSettings::explicitOptionShortName = "exp"; const std::string IOSettings::explicitOptionShortName = "exp";
const std::string IOSettings::explicitDrnOptionName = "explicit-drn"; const std::string IOSettings::explicitDrnOptionName = "explicit-drn";
@ -40,6 +41,7 @@ namespace storm {
const std::string IOSettings::prismCompatibilityOptionShortName = "pc"; const std::string IOSettings::prismCompatibilityOptionShortName = "pc";
const std::string IOSettings::noBuildOptionName = "nobuild"; const std::string IOSettings::noBuildOptionName = "nobuild";
const std::string IOSettings::fullModelBuildOptionName = "buildfull"; const std::string IOSettings::fullModelBuildOptionName = "buildfull";
const std::string IOSettings::buildChoiceLabelOptionName = "buildchoicelab";
const std::string IOSettings::janiPropertyOptionName = "janiproperty"; const std::string IOSettings::janiPropertyOptionName = "janiproperty";
const std::string IOSettings::janiPropertyOptionShortName = "jprop"; const std::string IOSettings::janiPropertyOptionShortName = "jprop";
const std::string IOSettings::propertyOptionName = "prop"; const std::string IOSettings::propertyOptionName = "prop";
@ -50,6 +52,8 @@ namespace storm {
this->addOption(storm::settings::OptionBuilder(moduleName, prismCompatibilityOptionName, false, "Enables PRISM compatibility. This may be necessary to process some PRISM models.").setShortName(prismCompatibilityOptionShortName).build()); this->addOption(storm::settings::OptionBuilder(moduleName, prismCompatibilityOptionName, false, "Enables PRISM compatibility. This may be necessary to process some PRISM models.").setShortName(prismCompatibilityOptionShortName).build());
this->addOption(storm::settings::OptionBuilder(moduleName, exportDotOptionName, "", "If given, the loaded model will be written to the specified file in the dot format.") this->addOption(storm::settings::OptionBuilder(moduleName, exportDotOptionName, "", "If given, the loaded model will be written to the specified file in the dot format.")
.addArgument(storm::settings::ArgumentBuilder::createStringArgument("filename", "The name of the file to which the model is to be written.").build()).build()); .addArgument(storm::settings::ArgumentBuilder::createStringArgument("filename", "The name of the file to which the model is to be written.").build()).build());
this->addOption(storm::settings::OptionBuilder(moduleName, exportJaniDotOptionName, "", "If given, the loaded jani model will be written to the specified file in the dot format.")
.addArgument(storm::settings::ArgumentBuilder::createStringArgument("filename", "The name of the file to which the model is to be written.").build()).build());
this->addOption(storm::settings::OptionBuilder(moduleName, exportExplicitOptionName, "", "If given, the loaded model will be written to the specified file in the drn format.") this->addOption(storm::settings::OptionBuilder(moduleName, exportExplicitOptionName, "", "If given, the loaded model will be written to the specified file in the drn format.")
.addArgument(storm::settings::ArgumentBuilder::createStringArgument("filename", "the name of the file to which the model is to be writen.").build()).build()); .addArgument(storm::settings::ArgumentBuilder::createStringArgument("filename", "the name of the file to which the model is to be writen.").build()).build());
this->addOption(storm::settings::OptionBuilder(moduleName, explicitOptionName, false, "Parses the model given in an explicit (sparse) representation.").setShortName(explicitOptionShortName) this->addOption(storm::settings::OptionBuilder(moduleName, explicitOptionName, false, "Parses the model given in an explicit (sparse) representation.").setShortName(explicitOptionShortName)
@ -65,6 +69,7 @@ namespace storm {
this->addOption(storm::settings::OptionBuilder(moduleName, prismToJaniOptionName, false, "If set, the input PRISM model is transformed to JANI.").build()); this->addOption(storm::settings::OptionBuilder(moduleName, prismToJaniOptionName, false, "If set, the input PRISM model is transformed to JANI.").build());
this->addOption(storm::settings::OptionBuilder(moduleName, jitOptionName, false, "If set, the model is built using the JIT model builder.").build()); this->addOption(storm::settings::OptionBuilder(moduleName, jitOptionName, false, "If set, the model is built using the JIT model builder.").build());
this->addOption(storm::settings::OptionBuilder(moduleName, fullModelBuildOptionName, false, "If set, include all rewards and labels.").build()); this->addOption(storm::settings::OptionBuilder(moduleName, fullModelBuildOptionName, false, "If set, include all rewards and labels.").build());
this->addOption(storm::settings::OptionBuilder(moduleName, buildChoiceLabelOptionName, false, "If set, include choice labels").build());
this->addOption(storm::settings::OptionBuilder(moduleName, noBuildOptionName, false, "If set, do not build the model.").build()); this->addOption(storm::settings::OptionBuilder(moduleName, noBuildOptionName, false, "If set, do not build the model.").build());
this->addOption(storm::settings::OptionBuilder(moduleName, propertyOptionName, false, "Specifies the properties to be checked on the model.").setShortName(propertyOptionShortName) this->addOption(storm::settings::OptionBuilder(moduleName, propertyOptionName, false, "Specifies the properties to be checked on the model.").setShortName(propertyOptionShortName)
.addArgument(storm::settings::ArgumentBuilder::createStringArgument("property or filename", "The formula or the file containing the formulas.").build()) .addArgument(storm::settings::ArgumentBuilder::createStringArgument("property or filename", "The formula or the file containing the formulas.").build())
@ -95,6 +100,14 @@ namespace storm {
return this->getOption(exportDotOptionName).getArgumentByName("filename").getValueAsString(); return this->getOption(exportDotOptionName).getArgumentByName("filename").getValueAsString();
} }
bool IOSettings::isExportJaniDotSet() const {
return this->getOption(exportJaniDotOptionName).getHasOptionBeenSet();
}
std::string IOSettings::getExportJaniDotFilename() const {
return this->getOption(exportJaniDotOptionName).getArgumentByName("filename").getValueAsString();
}
bool IOSettings::isExportExplicitSet() const { bool IOSettings::isExportExplicitSet() const {
return this->getOption(exportExplicitOptionName).getHasOptionBeenSet(); return this->getOption(exportExplicitOptionName).getHasOptionBeenSet();
} }
@ -225,6 +238,10 @@ namespace storm {
return this->getOption(noBuildOptionName).getHasOptionBeenSet(); return this->getOption(noBuildOptionName).getHasOptionBeenSet();
} }
bool IOSettings::isBuildChoiceLabelsSet() const {
return this->getOption(buildChoiceLabelOptionName).getHasOptionBeenSet();
}
bool IOSettings::isPropertySet() const { bool IOSettings::isPropertySet() const {
return this->getOption(propertyOptionName).getHasOptionBeenSet(); return this->getOption(propertyOptionName).getHasOptionBeenSet();
} }
@ -247,6 +264,8 @@ namespace storm {
// Ensure that not two explicit input models were given. // Ensure that not two explicit input models were given.
STORM_LOG_THROW(!isExplicitSet() || !isExplicitDRNSet(), storm::exceptions::InvalidSettingsException, "Explicit model "); STORM_LOG_THROW(!isExplicitSet() || !isExplicitDRNSet(), storm::exceptions::InvalidSettingsException, "Explicit model ");
STORM_LOG_THROW(!isExportJaniDotSet() || isJaniInputSet(), storm::exceptions::InvalidSettingsException, "Jani-to-dot export is only available for jani models" );
// Ensure that the model was given either symbolically or explicitly. // Ensure that the model was given either symbolically or explicitly.
STORM_LOG_THROW(!isJaniInputSet() || !isPrismInputSet() || !isExplicitSet() || !isExplicitDRNSet(), storm::exceptions::InvalidSettingsException, "The model may be either given in an explicit or a symbolic format (PRISM or JANI), but not both."); STORM_LOG_THROW(!isJaniInputSet() || !isPrismInputSet() || !isExplicitSet() || !isExplicitDRNSet(), storm::exceptions::InvalidSettingsException, "The model may be either given in an explicit or a symbolic format (PRISM or JANI), but not both.");

22
src/storm/settings/modules/IOSettings.h

@ -35,6 +35,20 @@ namespace storm {
*/ */
std::string getExportDotFilename() const; std::string getExportDotFilename() const;
/*!
* Retrieves whether the export-to-dot option for jani was set.
*
* @return True if the export-to-jani-dot option was set.
*/
bool isExportJaniDotSet() const;
/*!
* Retrieves the name in which to write the jani model in dot format, if the export-to-jani-dot option was set.
*
* @return The name of the file in which to write the exported model.
*/
std::string getExportJaniDotFilename() const;
/*! /*!
* Retrieves whether the export-to-explicit option was set * Retrieves whether the export-to-explicit option was set
* *
@ -277,6 +291,12 @@ namespace storm {
*/ */
bool isBuildFullModelSet() const; bool isBuildFullModelSet() const;
/*!
* Retrieves whether the choice labels should be build
* @return
*/
bool isBuildChoiceLabelsSet() const;
bool check() const override; bool check() const override;
void finalize() override; void finalize() override;
@ -286,6 +306,7 @@ namespace storm {
private: private:
// Define the string names of the options as constants. // Define the string names of the options as constants.
static const std::string exportDotOptionName; static const std::string exportDotOptionName;
static const std::string exportJaniDotOptionName;
static const std::string exportExplicitOptionName; static const std::string exportExplicitOptionName;
static const std::string explicitOptionName; static const std::string explicitOptionName;
static const std::string explicitOptionShortName; static const std::string explicitOptionShortName;
@ -308,6 +329,7 @@ namespace storm {
static const std::string prismCompatibilityOptionShortName; static const std::string prismCompatibilityOptionShortName;
static const std::string fullModelBuildOptionName; static const std::string fullModelBuildOptionName;
static const std::string noBuildOptionName; static const std::string noBuildOptionName;
static const std::string buildChoiceLabelOptionName;
static const std::string janiPropertyOptionName; static const std::string janiPropertyOptionName;
static const std::string janiPropertyOptionShortName; static const std::string janiPropertyOptionShortName;
static const std::string propertyOptionName; static const std::string propertyOptionName;

2
src/storm/storage/expressions/BaseExpression.h

@ -48,10 +48,8 @@ namespace storm {
// Create default versions of constructors and assignments. // Create default versions of constructors and assignments.
BaseExpression(BaseExpression const&) = default; BaseExpression(BaseExpression const&) = default;
BaseExpression& operator=(BaseExpression const&) = delete; BaseExpression& operator=(BaseExpression const&) = delete;
#ifndef WINDOWS
BaseExpression(BaseExpression&&) = default; BaseExpression(BaseExpression&&) = default;
BaseExpression& operator=(BaseExpression&&) = delete; BaseExpression& operator=(BaseExpression&&) = delete;
#endif
// Make the destructor virtual (to allow destruction via base class pointer) and default it. // Make the destructor virtual (to allow destruction via base class pointer) and default it.
virtual ~BaseExpression() = default; virtual ~BaseExpression() = default;

3
src/storm/storage/expressions/BinaryBooleanFunctionExpression.h

@ -27,10 +27,9 @@ namespace storm {
// Instantiate constructors and assignments with their default implementations. // Instantiate constructors and assignments with their default implementations.
BinaryBooleanFunctionExpression(BinaryBooleanFunctionExpression const& other) = default; BinaryBooleanFunctionExpression(BinaryBooleanFunctionExpression const& other) = default;
BinaryBooleanFunctionExpression& operator=(BinaryBooleanFunctionExpression const& other) = delete; BinaryBooleanFunctionExpression& operator=(BinaryBooleanFunctionExpression const& other) = delete;
#ifndef WINDOWS
BinaryBooleanFunctionExpression(BinaryBooleanFunctionExpression&&) = default; BinaryBooleanFunctionExpression(BinaryBooleanFunctionExpression&&) = default;
BinaryBooleanFunctionExpression& operator=(BinaryBooleanFunctionExpression&&) = delete; BinaryBooleanFunctionExpression& operator=(BinaryBooleanFunctionExpression&&) = delete;
#endif
virtual ~BinaryBooleanFunctionExpression() = default; virtual ~BinaryBooleanFunctionExpression() = default;
// Override base class methods. // Override base class methods.

3
src/storm/storage/expressions/BinaryExpression.h

@ -24,10 +24,9 @@ namespace storm {
// Instantiate constructors and assignments with their default implementations. // Instantiate constructors and assignments with their default implementations.
BinaryExpression(BinaryExpression const& other) = default; BinaryExpression(BinaryExpression const& other) = default;
BinaryExpression& operator=(BinaryExpression const& other) = delete; BinaryExpression& operator=(BinaryExpression const& other) = delete;
#ifndef WINDOWS
BinaryExpression(BinaryExpression&&) = default; BinaryExpression(BinaryExpression&&) = default;
BinaryExpression& operator=(BinaryExpression&&) = delete; BinaryExpression& operator=(BinaryExpression&&) = delete;
#endif
virtual ~BinaryExpression() = default; virtual ~BinaryExpression() = default;
// Override base class methods. // Override base class methods.

3
src/storm/storage/expressions/BinaryNumericalFunctionExpression.h

@ -27,10 +27,9 @@ namespace storm {
// Instantiate constructors and assignments with their default implementations. // Instantiate constructors and assignments with their default implementations.
BinaryNumericalFunctionExpression(BinaryNumericalFunctionExpression const& other) = default; BinaryNumericalFunctionExpression(BinaryNumericalFunctionExpression const& other) = default;
BinaryNumericalFunctionExpression& operator=(BinaryNumericalFunctionExpression const& other) = delete; BinaryNumericalFunctionExpression& operator=(BinaryNumericalFunctionExpression const& other) = delete;
#ifndef WINDOWS
BinaryNumericalFunctionExpression(BinaryNumericalFunctionExpression&&) = default; BinaryNumericalFunctionExpression(BinaryNumericalFunctionExpression&&) = default;
BinaryNumericalFunctionExpression& operator=(BinaryNumericalFunctionExpression&&) = delete; BinaryNumericalFunctionExpression& operator=(BinaryNumericalFunctionExpression&&) = delete;
#endif
virtual ~BinaryNumericalFunctionExpression() = default; virtual ~BinaryNumericalFunctionExpression() = default;
// Override base class methods. // Override base class methods.

3
src/storm/storage/expressions/BinaryRelationExpression.h

@ -27,10 +27,9 @@ namespace storm {
// Instantiate constructors and assignments with their default implementations. // Instantiate constructors and assignments with their default implementations.
BinaryRelationExpression(BinaryRelationExpression const& other) = default; BinaryRelationExpression(BinaryRelationExpression const& other) = default;
BinaryRelationExpression& operator=(BinaryRelationExpression const& other) = default; BinaryRelationExpression& operator=(BinaryRelationExpression const& other) = default;
#ifndef WINDOWS
BinaryRelationExpression(BinaryRelationExpression&&) = default; BinaryRelationExpression(BinaryRelationExpression&&) = default;
BinaryRelationExpression& operator=(BinaryRelationExpression&&) = default; BinaryRelationExpression& operator=(BinaryRelationExpression&&) = default;
#endif
virtual ~BinaryRelationExpression() = default; virtual ~BinaryRelationExpression() = default;
// Override base class methods. // Override base class methods.

3
src/storm/storage/expressions/BooleanLiteralExpression.h

@ -19,10 +19,9 @@ namespace storm {
// Instantiate constructors and assignments with their default implementations. // Instantiate constructors and assignments with their default implementations.
BooleanLiteralExpression(BooleanLiteralExpression const& other) = default; BooleanLiteralExpression(BooleanLiteralExpression const& other) = default;
BooleanLiteralExpression& operator=(BooleanLiteralExpression const& other) = delete; BooleanLiteralExpression& operator=(BooleanLiteralExpression const& other) = delete;
#ifndef WINDOWS
BooleanLiteralExpression(BooleanLiteralExpression&&) = default; BooleanLiteralExpression(BooleanLiteralExpression&&) = default;
BooleanLiteralExpression& operator=(BooleanLiteralExpression&&) = delete; BooleanLiteralExpression& operator=(BooleanLiteralExpression&&) = delete;
#endif
virtual ~BooleanLiteralExpression() = default; virtual ~BooleanLiteralExpression() = default;
// Override base class methods. // Override base class methods.

2
src/storm/storage/expressions/Expression.h

@ -76,10 +76,8 @@ namespace storm {
// Instantiate constructors and assignments with their default implementations. // Instantiate constructors and assignments with their default implementations.
Expression(Expression const& other) = default; Expression(Expression const& other) = default;
Expression& operator=(Expression const& other) = default; Expression& operator=(Expression const& other) = default;
#ifndef WINDOWS
Expression(Expression&&) = default; Expression(Expression&&) = default;
Expression& operator=(Expression&&) = default; Expression& operator=(Expression&&) = default;
#endif
/*! /*!
* Converts the expression to an expression over the variables of the provided expression manager. * Converts the expression to an expression over the variables of the provided expression manager.

3
src/storm/storage/expressions/IfThenElseExpression.h

@ -21,10 +21,9 @@ namespace storm {
// Instantiate constructors and assignments with their default implementations. // Instantiate constructors and assignments with their default implementations.
IfThenElseExpression(IfThenElseExpression const& other) = default; IfThenElseExpression(IfThenElseExpression const& other) = default;
IfThenElseExpression& operator=(IfThenElseExpression const& other) = delete; IfThenElseExpression& operator=(IfThenElseExpression const& other) = delete;
#ifndef WINDOWS
IfThenElseExpression(IfThenElseExpression&&) = default; IfThenElseExpression(IfThenElseExpression&&) = default;
IfThenElseExpression& operator=(IfThenElseExpression&&) = delete; IfThenElseExpression& operator=(IfThenElseExpression&&) = delete;
#endif
virtual ~IfThenElseExpression() = default; virtual ~IfThenElseExpression() = default;
// Override base class methods. // Override base class methods.

3
src/storm/storage/expressions/IntegerLiteralExpression.h

@ -19,10 +19,9 @@ namespace storm {
// Instantiate constructors and assignments with their default implementations. // Instantiate constructors and assignments with their default implementations.
IntegerLiteralExpression(IntegerLiteralExpression const& other) = default; IntegerLiteralExpression(IntegerLiteralExpression const& other) = default;
IntegerLiteralExpression& operator=(IntegerLiteralExpression const& other) = delete; IntegerLiteralExpression& operator=(IntegerLiteralExpression const& other) = delete;
#ifndef WINDOWS
IntegerLiteralExpression(IntegerLiteralExpression&&) = default; IntegerLiteralExpression(IntegerLiteralExpression&&) = default;
IntegerLiteralExpression& operator=(IntegerLiteralExpression&&) = delete; IntegerLiteralExpression& operator=(IntegerLiteralExpression&&) = delete;
#endif
virtual ~IntegerLiteralExpression() = default; virtual ~IntegerLiteralExpression() = default;
// Override base class methods. // Override base class methods.

2
src/storm/storage/expressions/LinearCoefficientVisitor.h

@ -18,10 +18,8 @@ namespace storm {
VariableCoefficients(VariableCoefficients const& other) = default; VariableCoefficients(VariableCoefficients const& other) = default;
VariableCoefficients& operator=(VariableCoefficients const& other) = default; VariableCoefficients& operator=(VariableCoefficients const& other) = default;
#ifndef WINDOWS
VariableCoefficients(VariableCoefficients&& other) = default; VariableCoefficients(VariableCoefficients&& other) = default;
VariableCoefficients& operator=(VariableCoefficients&& other) = default; VariableCoefficients& operator=(VariableCoefficients&& other) = default;
#endif
VariableCoefficients& operator+=(VariableCoefficients&& other); VariableCoefficients& operator+=(VariableCoefficients&& other);
VariableCoefficients& operator-=(VariableCoefficients&& other); VariableCoefficients& operator-=(VariableCoefficients&& other);

3
src/storm/storage/expressions/RationalLiteralExpression.h

@ -37,10 +37,9 @@ namespace storm {
// Instantiate constructors and assignments with their default implementations. // Instantiate constructors and assignments with their default implementations.
RationalLiteralExpression(RationalLiteralExpression const& other) = default; RationalLiteralExpression(RationalLiteralExpression const& other) = default;
RationalLiteralExpression& operator=(RationalLiteralExpression const& other) = delete; RationalLiteralExpression& operator=(RationalLiteralExpression const& other) = delete;
#ifndef WINDOWS
RationalLiteralExpression(RationalLiteralExpression&&) = default; RationalLiteralExpression(RationalLiteralExpression&&) = default;
RationalLiteralExpression& operator=(RationalLiteralExpression&&) = delete; RationalLiteralExpression& operator=(RationalLiteralExpression&&) = delete;
#endif
virtual ~RationalLiteralExpression() = default; virtual ~RationalLiteralExpression() = default;
// Override base class methods. // Override base class methods.

2
src/storm/storage/expressions/UnaryBooleanFunctionExpression.h

@ -26,10 +26,8 @@ namespace storm {
// Instantiate constructors and assignments with their default implementations. // Instantiate constructors and assignments with their default implementations.
UnaryBooleanFunctionExpression(UnaryBooleanFunctionExpression const& other) = default; UnaryBooleanFunctionExpression(UnaryBooleanFunctionExpression const& other) = default;
UnaryBooleanFunctionExpression& operator=(UnaryBooleanFunctionExpression const& other) = delete; UnaryBooleanFunctionExpression& operator=(UnaryBooleanFunctionExpression const& other) = delete;
#ifndef WINDOWS
UnaryBooleanFunctionExpression(UnaryBooleanFunctionExpression&&) = default; UnaryBooleanFunctionExpression(UnaryBooleanFunctionExpression&&) = default;
UnaryBooleanFunctionExpression& operator=(UnaryBooleanFunctionExpression&&) = delete; UnaryBooleanFunctionExpression& operator=(UnaryBooleanFunctionExpression&&) = delete;
#endif
virtual ~UnaryBooleanFunctionExpression() = default; virtual ~UnaryBooleanFunctionExpression() = default;
// Override base class methods. // Override base class methods.

2
src/storm/storage/expressions/UnaryExpression.h

@ -20,10 +20,8 @@ namespace storm {
// Instantiate constructors and assignments with their default implementations. // Instantiate constructors and assignments with their default implementations.
UnaryExpression(UnaryExpression const& other) = default; UnaryExpression(UnaryExpression const& other) = default;
UnaryExpression& operator=(UnaryExpression const& other) = delete; UnaryExpression& operator=(UnaryExpression const& other) = delete;
#ifndef WINDOWS
UnaryExpression(UnaryExpression&&) = default; UnaryExpression(UnaryExpression&&) = default;
UnaryExpression& operator=(UnaryExpression&&) = delete; UnaryExpression& operator=(UnaryExpression&&) = delete;
#endif
virtual ~UnaryExpression() = default; virtual ~UnaryExpression() = default;
// Override base class methods. // Override base class methods.

3
src/storm/storage/expressions/UnaryNumericalFunctionExpression.h

@ -26,10 +26,9 @@ namespace storm {
// Instantiate constructors and assignments with their default implementations. // Instantiate constructors and assignments with their default implementations.
UnaryNumericalFunctionExpression(UnaryNumericalFunctionExpression const& other) = default; UnaryNumericalFunctionExpression(UnaryNumericalFunctionExpression const& other) = default;
UnaryNumericalFunctionExpression& operator=(UnaryNumericalFunctionExpression const& other) = delete; UnaryNumericalFunctionExpression& operator=(UnaryNumericalFunctionExpression const& other) = delete;
#ifndef WINDOWS
UnaryNumericalFunctionExpression(UnaryNumericalFunctionExpression&&) = default; UnaryNumericalFunctionExpression(UnaryNumericalFunctionExpression&&) = default;
UnaryNumericalFunctionExpression& operator=(UnaryNumericalFunctionExpression&&) = delete; UnaryNumericalFunctionExpression& operator=(UnaryNumericalFunctionExpression&&) = delete;
#endif
virtual ~UnaryNumericalFunctionExpression() = default; virtual ~UnaryNumericalFunctionExpression() = default;
// Override base class methods. // Override base class methods.

3
src/storm/storage/expressions/Variable.h

@ -31,10 +31,9 @@ namespace storm {
// Default-instantiate some copy/move construction/assignment. // Default-instantiate some copy/move construction/assignment.
Variable(Variable const& other) = default; Variable(Variable const& other) = default;
Variable& operator=(Variable const& other) = default; Variable& operator=(Variable const& other) = default;
#ifndef WINDOWS
Variable(Variable&& other) = default; Variable(Variable&& other) = default;
Variable& operator=(Variable&& other) = default; Variable& operator=(Variable&& other) = default;
#endif
/*! /*!
* Checks the two variables for equality. * Checks the two variables for equality.

3
src/storm/storage/expressions/VariableExpression.h

@ -20,10 +20,9 @@ namespace storm {
// Instantiate constructors and assignments with their default implementations. // Instantiate constructors and assignments with their default implementations.
VariableExpression(VariableExpression const&) = default; VariableExpression(VariableExpression const&) = default;
VariableExpression& operator=(VariableExpression const&) = delete; VariableExpression& operator=(VariableExpression const&) = delete;
#ifndef WINDOWS
VariableExpression(VariableExpression&&) = default; VariableExpression(VariableExpression&&) = default;
VariableExpression& operator=(VariableExpression&&) = delete; VariableExpression& operator=(VariableExpression&&) = delete;
#endif
virtual ~VariableExpression() = default; virtual ~VariableExpression() = default;
// Override base class methods. // Override base class methods.

31
src/storm/storage/jani/Automaton.cpp

@ -528,5 +528,36 @@ namespace storm {
return result; return result;
} }
void Automaton::writeDotToStream(std::ostream& outStream, std::vector<std::string> const& actionNames) const {
outStream << "\tsubgraph " << name << " {" << std::endl;
// Write all locations to the stream.
uint64_t locIndex = 0;
for (auto const& loc : locations) {
outStream << "\t" << name << "_s" << locIndex << "[ label=\"" << loc.getName() << "\"];" << std::endl;
++locIndex;
}
// Write for each edge an node to the stream;
uint64_t edgeIndex = 0;
for (auto const& edge : edges) {
outStream << "\t" << name << "_e" << edgeIndex << "[ label=\"\" , shape=circle, width=.2, style=filled, fillcolor=\"black\"];" << std::endl;
++edgeIndex;
}
// Connect edges
edgeIndex = 0;
for (auto const& edge : edges) {
outStream << "\t" << name << "_s" << edge.getSourceLocationIndex() << " -> " << name << "_e" << edgeIndex << " [label=\"" << actionNames.at(edge.getActionIndex()) << "\"];" << std::endl;
for (auto const& edgeDest : edge.getDestinations()) {
outStream << "\t" << name << "_e" << edgeIndex << " -> " << name << "_s" << edgeDest.getLocationIndex() << ";" << std::endl;
}
++edgeIndex;
}
outStream << "\t}" << std::endl;
}
} }
} }

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

@ -372,6 +372,8 @@ namespace storm {
*/ */
bool isLinear() const; bool isLinear() const;
void writeDotToStream(std::ostream& outStream, std::vector<std::string> const& actionNames) const;
private: private:
/// The name of the automaton. /// The name of the automaton.
std::string name; std::string name;

1
src/storm/storage/jani/JSONExporter.cpp

@ -525,6 +525,7 @@ namespace storm {
} }
} }
STORM_LOG_ASSERT(false, "Expression variable '" << expression.getVariableName() << "' not known in Jani data structures."); STORM_LOG_ASSERT(false, "Expression variable '" << expression.getVariableName() << "' not known in Jani data structures.");
return modernjson::json(); // should not reach this point.
} }
boost::any ExpressionToJson::visit(storm::expressions::UnaryBooleanFunctionExpression const& expression, boost::any const& data) { boost::any ExpressionToJson::visit(storm::expressions::UnaryBooleanFunctionExpression const& expression, boost::any const& data) {
modernjson::json opDecl; modernjson::json opDecl;

29
src/storm/storage/jani/Model.cpp

@ -1,5 +1,7 @@
#include "storm/storage/jani/Model.h" #include "storm/storage/jani/Model.h"
#include <algorithm>
#include "storm/storage/expressions/ExpressionManager.h" #include "storm/storage/expressions/ExpressionManager.h"
@ -1165,5 +1167,32 @@ namespace storm {
return newModel; return newModel;
} }
// Helper for writeDotToStream:
std::string filterName(std::string const& text) {
std::string result = text;
std::replace_if(result.begin() , result.end() ,
[] (const char& c) { return std::ispunct(c) ;},'_');
return result;
}
void Model::writeDotToStream(std::ostream& outStream) const {
outStream << "digraph " << filterName(name) << " {" << std::endl;
std::vector<std::string> actionNames;
for (auto const& act : actions) {
actionNames.push_back(act.getName());
}
for (auto const& automaton : automata) {
automaton.writeDotToStream(outStream, actionNames);
outStream << std::endl;
}
outStream << "}";
}
} }
} }

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

@ -449,6 +449,8 @@ namespace storm {
*/ */
bool reusesActionsInComposition() const; bool reusesActionsInComposition() const;
void writeDotToStream(std::ostream& outStream = std::cout) const;
/// The name of the silent action. /// The name of the silent action.
static const std::string SILENT_ACTION_NAME; static const std::string SILENT_ACTION_NAME;

2
src/storm/storage/prism/Assignment.h

@ -26,10 +26,8 @@ namespace storm {
Assignment() = default; Assignment() = default;
Assignment(Assignment const& other) = default; Assignment(Assignment const& other) = default;
Assignment& operator=(Assignment const& other)= default; Assignment& operator=(Assignment const& other)= default;
#ifndef WINDOWS
Assignment(Assignment&& other) = default; Assignment(Assignment&& other) = default;
Assignment& operator=(Assignment&& other) = default; Assignment& operator=(Assignment&& other) = default;
#endif
/*! /*!
* Retrieves the name of the variable that this assignment targets. * Retrieves the name of the variable that this assignment targets.

2
src/storm/storage/prism/BooleanVariable.h

@ -14,10 +14,8 @@ namespace storm {
BooleanVariable() = default; BooleanVariable() = default;
BooleanVariable(BooleanVariable const& other) = default; BooleanVariable(BooleanVariable const& other) = default;
BooleanVariable& operator=(BooleanVariable const& other)= default; BooleanVariable& operator=(BooleanVariable const& other)= default;
#ifndef WINDOWS
BooleanVariable(BooleanVariable&& other) = default; BooleanVariable(BooleanVariable&& other) = default;
BooleanVariable& operator=(BooleanVariable&& other) = default; BooleanVariable& operator=(BooleanVariable&& other) = default;
#endif
/*! /*!
* Creates a boolean variable with the given constant initial value expression. * Creates a boolean variable with the given constant initial value expression.

2
src/storm/storage/prism/Command.h

@ -32,10 +32,8 @@ namespace storm {
Command() = default; Command() = default;
Command(Command const& other) = default; Command(Command const& other) = default;
Command& operator=(Command const& other) = default; Command& operator=(Command const& other) = default;
#ifndef WINDOWS
Command(Command&& other) = default; Command(Command&& other) = default;
Command& operator=(Command&& other) = default; Command& operator=(Command&& other) = default;
#endif
/*! /*!
* Retrieves the action name of this command. * Retrieves the action name of this command.

2
src/storm/storage/prism/Constant.h

@ -35,10 +35,8 @@ namespace storm {
Constant() = default; Constant() = default;
Constant(Constant const& other) = default; Constant(Constant const& other) = default;
Constant& operator=(Constant const& other)= default; Constant& operator=(Constant const& other)= default;
#ifndef WINDOWS
Constant(Constant&& other) = default; Constant(Constant&& other) = default;
Constant& operator=(Constant&& other) = default; Constant& operator=(Constant&& other) = default;
#endif
/*! /*!
* Retrieves the name of the constant. * Retrieves the name of the constant.

2
src/storm/storage/prism/Formula.h

@ -26,10 +26,8 @@ namespace storm {
Formula() = default; Formula() = default;
Formula(Formula const& other) = default; Formula(Formula const& other) = default;
Formula& operator=(Formula const& other)= default; Formula& operator=(Formula const& other)= default;
#ifndef WINDOWS
Formula(Formula&& other) = default; Formula(Formula&& other) = default;
Formula& operator=(Formula&& other) = default; Formula& operator=(Formula&& other) = default;
#endif
/*! /*!
* Retrieves the name that is associated with this formula. * Retrieves the name that is associated with this formula.

2
src/storm/storage/prism/InitialConstruct.h

@ -32,10 +32,8 @@ namespace storm {
InitialConstruct() = default; InitialConstruct() = default;
InitialConstruct(InitialConstruct const& other) = default; InitialConstruct(InitialConstruct const& other) = default;
InitialConstruct& operator=(InitialConstruct const& other)= default; InitialConstruct& operator=(InitialConstruct const& other)= default;
#ifndef WINDOWS
InitialConstruct(InitialConstruct&& other) = default; InitialConstruct(InitialConstruct&& other) = default;
InitialConstruct& operator=(InitialConstruct&& other) = default; InitialConstruct& operator=(InitialConstruct&& other) = default;
#endif
/*! /*!
* Retrieves the expression characterizing the initial states. * Retrieves the expression characterizing the initial states.

2
src/storm/storage/prism/IntegerVariable.h

@ -14,10 +14,8 @@ namespace storm {
IntegerVariable() = default; IntegerVariable() = default;
IntegerVariable(IntegerVariable const& other) = default; IntegerVariable(IntegerVariable const& other) = default;
IntegerVariable& operator=(IntegerVariable const& other)= default; IntegerVariable& operator=(IntegerVariable const& other)= default;
#ifndef WINDOWS
IntegerVariable(IntegerVariable&& other) = default; IntegerVariable(IntegerVariable&& other) = default;
IntegerVariable& operator=(IntegerVariable&& other) = default; IntegerVariable& operator=(IntegerVariable&& other) = default;
#endif
/*! /*!
* Creates an integer variable with the given initial value expression. * Creates an integer variable with the given initial value expression.

2
src/storm/storage/prism/Label.h

@ -34,10 +34,8 @@ namespace storm {
Label() = default; Label() = default;
Label(Label const& other) = default; Label(Label const& other) = default;
Label& operator=(Label const& other)= default; Label& operator=(Label const& other)= default;
#ifndef WINDOWS
Label(Label&& other) = default; Label(Label&& other) = default;
Label& operator=(Label&& other) = default; Label& operator=(Label&& other) = default;
#endif
/*! /*!
* Retrieves the name that is associated with this label. * Retrieves the name that is associated with this label.

2
src/storm/storage/prism/LocatedInformation.h

@ -22,10 +22,8 @@ namespace storm {
LocatedInformation() = default; LocatedInformation() = default;
LocatedInformation(LocatedInformation const& other) = default; LocatedInformation(LocatedInformation const& other) = default;
LocatedInformation& operator=(LocatedInformation const& other)= default; LocatedInformation& operator=(LocatedInformation const& other)= default;
#ifndef WINDOWS
LocatedInformation(LocatedInformation&& other) = default; LocatedInformation(LocatedInformation&& other) = default;
LocatedInformation& operator=(LocatedInformation&& other) = default; LocatedInformation& operator=(LocatedInformation&& other) = default;
#endif
/*! /*!
* Retrieves the name of the file in which the information was found. * Retrieves the name of the file in which the information was found.

2
src/storm/storage/prism/Module.h

@ -48,10 +48,8 @@ namespace storm {
Module() = default; Module() = default;
Module(Module const& other) = default; Module(Module const& other) = default;
Module& operator=(Module const& other)= default; Module& operator=(Module const& other)= default;
#ifndef WINDOWS
Module(Module&& other) = default; Module(Module&& other) = default;
Module& operator=(Module&& other) = default; Module& operator=(Module&& other) = default;
#endif
/*! /*!
* Retrieves the number of boolean variables in the module. * Retrieves the number of boolean variables in the module.

2
src/storm/storage/prism/Program.h

@ -63,10 +63,8 @@ namespace storm {
Program() = default; Program() = default;
Program(Program const& other) = default; Program(Program const& other) = default;
Program& operator=(Program const& other) = default; Program& operator=(Program const& other) = default;
#ifndef WINDOWS
Program(Program&& other) = default; Program(Program&& other) = default;
Program& operator=(Program&& other) = default; Program& operator=(Program&& other) = default;
#endif
/*! /*!
* Retrieves the model type of the model. * Retrieves the model type of the model.

2
src/storm/storage/prism/RewardModel.h

@ -31,10 +31,8 @@ namespace storm {
RewardModel() = default; RewardModel() = default;
RewardModel(RewardModel const& other) = default; RewardModel(RewardModel const& other) = default;
RewardModel& operator=(RewardModel const& other)= default; RewardModel& operator=(RewardModel const& other)= default;
#ifndef WINDOWS
RewardModel(RewardModel&& other) = default; RewardModel(RewardModel&& other) = default;
RewardModel& operator=(RewardModel&& other) = default; RewardModel& operator=(RewardModel&& other) = default;
#endif
/*! /*!
* Retrieves the name of the reward model. * Retrieves the name of the reward model.

2
src/storm/storage/prism/StateActionReward.h

@ -38,10 +38,8 @@ namespace storm {
StateActionReward() = default; StateActionReward() = default;
StateActionReward(StateActionReward const& other) = default; StateActionReward(StateActionReward const& other) = default;
StateActionReward& operator=(StateActionReward const& other)= default; StateActionReward& operator=(StateActionReward const& other)= default;
#ifndef WINDOWS
StateActionReward(StateActionReward&& other) = default; StateActionReward(StateActionReward&& other) = default;
StateActionReward& operator=(StateActionReward&& other) = default; StateActionReward& operator=(StateActionReward&& other) = default;
#endif
/*! /*!
* Retrieves the action name that is associated with this transition reward. * Retrieves the action name that is associated with this transition reward.

2
src/storm/storage/prism/StateReward.h

@ -35,10 +35,8 @@ namespace storm {
StateReward() = default; StateReward() = default;
StateReward(StateReward const& other) = default; StateReward(StateReward const& other) = default;
StateReward& operator=(StateReward const& other)= default; StateReward& operator=(StateReward const& other)= default;
#ifndef WINDOWS
StateReward(StateReward&& other) = default; StateReward(StateReward&& other) = default;
StateReward& operator=(StateReward&& other) = default; StateReward& operator=(StateReward&& other) = default;
#endif
/*! /*!
* Retrieves the state predicate that is associated with this state reward. * Retrieves the state predicate that is associated with this state reward.

2
src/storm/storage/prism/SystemCompositionConstruct.h

@ -26,10 +26,8 @@ namespace storm {
SystemCompositionConstruct() = default; SystemCompositionConstruct() = default;
SystemCompositionConstruct(SystemCompositionConstruct const& other) = default; SystemCompositionConstruct(SystemCompositionConstruct const& other) = default;
SystemCompositionConstruct& operator=(SystemCompositionConstruct const& other)= default; SystemCompositionConstruct& operator=(SystemCompositionConstruct const& other)= default;
#ifndef WINDOWS
SystemCompositionConstruct(SystemCompositionConstruct&& other) = default; SystemCompositionConstruct(SystemCompositionConstruct&& other) = default;
SystemCompositionConstruct& operator=(SystemCompositionConstruct&& other) = default; SystemCompositionConstruct& operator=(SystemCompositionConstruct&& other) = default;
#endif
Composition const& getSystemComposition() const; Composition const& getSystemComposition() const;

2
src/storm/storage/prism/TransitionReward.h

@ -41,10 +41,8 @@ namespace storm {
TransitionReward() = default; TransitionReward() = default;
TransitionReward(TransitionReward const& other) = default; TransitionReward(TransitionReward const& other) = default;
TransitionReward& operator=(TransitionReward const& other)= default; TransitionReward& operator=(TransitionReward const& other)= default;
#ifndef WINDOWS
TransitionReward(TransitionReward&& other) = default; TransitionReward(TransitionReward&& other) = default;
TransitionReward& operator=(TransitionReward&& other) = default; TransitionReward& operator=(TransitionReward&& other) = default;
#endif
/*! /*!
* Retrieves the action name that is associated with this transition reward. * Retrieves the action name that is associated with this transition reward.

2
src/storm/storage/prism/Update.h

@ -26,10 +26,8 @@ namespace storm {
Update() = default; Update() = default;
Update(Update const& other) = default; Update(Update const& other) = default;
Update& operator=(Update const& other)= default; Update& operator=(Update const& other)= default;
#ifndef WINDOWS
Update(Update&& other) = default; Update(Update&& other) = default;
Update& operator=(Update&& other) = default; Update& operator=(Update&& other) = default;
#endif
/*! /*!
* Retrieves the expression for the likelihood of this update. * Retrieves the expression for the likelihood of this update.

2
src/storm/storage/prism/Variable.h

@ -15,10 +15,8 @@ namespace storm {
// Create default implementations of constructors/assignment. // Create default implementations of constructors/assignment.
Variable(Variable const& otherVariable) = default; Variable(Variable const& otherVariable) = default;
Variable& operator=(Variable const& otherVariable)= default; Variable& operator=(Variable const& otherVariable)= default;
#ifndef WINDOWS
Variable(Variable&& otherVariable) = default; Variable(Variable&& otherVariable) = default;
Variable& operator=(Variable&& otherVariable) = default; Variable& operator=(Variable&& otherVariable) = default;
#endif
/*! /*!
* Retrieves the name of the variable. * Retrieves the name of the variable.

20
src/storm/utility/file.h

@ -1,12 +1,4 @@
/**
* @file: file.h
* @author: Sebastian Junges
*
* @since October 7, 2014
*/
#ifndef STORM_UTILITY_FILE_H_
#define STORM_UTILITY_FILE_H_
#pragma once
#include <iostream> #include <iostream>
@ -19,7 +11,7 @@ namespace storm {
/*! /*!
* Open the given file for writing. * Open the given file for writing.
* *
* @param filename Path and name of the file to be tested.
* @param filepath Path and name of the file to be written to.
* @param filestream Contains the file handler afterwards. * @param filestream Contains the file handler afterwards.
* @param append If true, the new content is appended instead of clearing the existing content. * @param append If true, the new content is appended instead of clearing the existing content.
*/ */
@ -36,7 +28,7 @@ namespace storm {
/*! /*!
* Open the given file for reading. * Open the given file for reading.
* *
* @param filename Path and name of the file to be tested.
* @param filepath Path and name of the file to be tested.
* @param filestream Contains the file handler afterwards. * @param filestream Contains the file handler afterwards.
*/ */
inline void openFile(std::string const& filepath, std::ifstream& filestream) { inline void openFile(std::string const& filepath, std::ifstream& filestream) {
@ -47,7 +39,7 @@ namespace storm {
/*! /*!
* Close the given file after writing. * Close the given file after writing.
* *
* @param filestream Contains the file handler to close.
* @param stream Contains the file handler to close.
*/ */
inline void closeFile(std::ofstream& stream) { inline void closeFile(std::ofstream& stream) {
stream.close(); stream.close();
@ -56,7 +48,7 @@ namespace storm {
/*! /*!
* Close the given file after reading. * Close the given file after reading.
* *
* @param filestream Contains the file handler to close.
* @param stream Contains the file handler to close.
*/ */
inline void closeFile(std::ifstream& stream) { inline void closeFile(std::ifstream& stream) {
stream.close(); stream.close();
@ -77,5 +69,3 @@ namespace storm {
} }
} }
#endif
Loading…
Cancel
Save