Browse Source

Merge branch 'master' into menu_games

tempestpy_adaptions
dehnert 8 years ago
parent
commit
7f8b821f18
  1. 5
      CMakeLists.txt
  2. 12
      resources/3rdparty/CMakeLists.txt
  3. 12
      resources/3rdparty/include_cudd.cmake
  4. 15
      resources/3rdparty/include_xerces.cmake
  5. 10
      resources/cmake/find_modules/FindXerces.cmake
  6. 4
      src/CMakeLists.txt
  7. 4
      src/storm-dft-cli/CMakeLists.txt
  8. 9
      src/storm-dft-cli/storm-dyftee.cpp
  9. 13
      src/storm-dft/CMakeLists.txt
  10. 3
      src/storm-dft/builder/DftExplorationHeuristic.cpp
  11. 6
      src/storm-dft/builder/DftExplorationHeuristic.h
  12. 10
      src/storm-dft/builder/ExplicitDFTModelBuilder.cpp
  13. 24
      src/storm-dft/builder/ExplicitDFTModelBuilder.h
  14. 10
      src/storm-dft/builder/ExplicitDFTModelBuilderApprox.cpp
  15. 27
      src/storm-dft/builder/ExplicitDFTModelBuilderApprox.h
  16. 2
      src/storm-dft/generator/DftNextStateGenerator.cpp
  17. 10
      src/storm-dft/generator/DftNextStateGenerator.h
  18. 0
      src/storm-dft/modelchecker/dft/DFTASFChecker.cpp
  19. 3
      src/storm-dft/modelchecker/dft/DFTASFChecker.h
  20. 13
      src/storm-dft/modelchecker/dft/DFTModelChecker.cpp
  21. 10
      src/storm-dft/modelchecker/dft/DFTModelChecker.h
  22. 0
      src/storm-dft/parser/DFTGalileoParser.cpp
  23. 14
      src/storm-dft/parser/DFTGalileoParser.h
  24. 2
      src/storm-dft/settings/modules/DFTSettings.cpp
  25. 8
      src/storm-dft/settings/modules/DFTSettings.h
  26. 2
      src/storm-dft/storage/BucketPriorityQueue.cpp
  27. 8
      src/storm-dft/storage/BucketPriorityQueue.h
  28. 14
      src/storm-dft/storage/dft/DFT.cpp
  29. 21
      src/storm-dft/storage/dft/DFT.h
  30. 9
      src/storm-dft/storage/dft/DFTBuilder.cpp
  31. 17
      src/storm-dft/storage/dft/DFTBuilder.h
  32. 7
      src/storm-dft/storage/dft/DFTElementState.h
  33. 5
      src/storm-dft/storage/dft/DFTElementType.h
  34. 12
      src/storm-dft/storage/dft/DFTElements.h
  35. 7
      src/storm-dft/storage/dft/DFTIsomorphism.h
  36. 4
      src/storm-dft/storage/dft/DFTState.cpp
  37. 14
      src/storm-dft/storage/dft/DFTState.h
  38. 0
      src/storm-dft/storage/dft/DFTStateGenerationInfo.h
  39. 10
      src/storm-dft/storage/dft/DFTStateSpaceGenerationQueues.h
  40. 5
      src/storm-dft/storage/dft/DFTUnit.h
  41. 2
      src/storm-dft/storage/dft/OrderDFTElementsById.cpp
  42. 7
      src/storm-dft/storage/dft/OrderDFTElementsById.h
  43. 0
      src/storm-dft/storage/dft/SymmetricUnits.h
  44. 0
      src/storm-dft/storage/dft/elements/DFTAnd.h
  45. 0
      src/storm-dft/storage/dft/elements/DFTBE.h
  46. 0
      src/storm-dft/storage/dft/elements/DFTConst.h
  47. 0
      src/storm-dft/storage/dft/elements/DFTDependency.h
  48. 0
      src/storm-dft/storage/dft/elements/DFTElement.cpp
  49. 0
      src/storm-dft/storage/dft/elements/DFTElement.h
  50. 0
      src/storm-dft/storage/dft/elements/DFTGate.h
  51. 0
      src/storm-dft/storage/dft/elements/DFTOr.h
  52. 0
      src/storm-dft/storage/dft/elements/DFTPand.h
  53. 0
      src/storm-dft/storage/dft/elements/DFTPor.h
  54. 0
      src/storm-dft/storage/dft/elements/DFTRestriction.h
  55. 0
      src/storm-dft/storage/dft/elements/DFTSpare.h
  56. 0
      src/storm-dft/storage/dft/elements/DFTVot.h
  57. 3
      src/storm-gspn-cli/CMakeLists.txt
  58. 12
      src/storm-gspn-cli/storm-gspn.cpp
  59. 13
      src/storm-gspn/CMakeLists.txt
  60. 0
      src/storm-gspn/adapters/XercesAdapter.h
  61. 0
      src/storm-gspn/builder/ExplicitGspnModelBuilder.cpp
  62. 0
      src/storm-gspn/builder/ExplicitGspnModelBuilder.h
  63. 0
      src/storm-gspn/builder/JaniGSPNBuilder.cpp
  64. 2
      src/storm-gspn/builder/JaniGSPNBuilder.h
  65. 0
      src/storm-gspn/parser/GreatSpnEditorProjectParser.cpp
  66. 0
      src/storm-gspn/parser/GreatSpnEditorProjectParser.h
  67. 2
      src/storm-gspn/parser/GspnParser.cpp
  68. 2
      src/storm-gspn/parser/GspnParser.h
  69. 2
      src/storm-gspn/parser/PnmlParser.cpp
  70. 0
      src/storm-gspn/parser/PnmlParser.h
  71. 13
      src/storm-gspn/storage/gspn/GSPN.cpp
  72. 8
      src/storm-gspn/storage/gspn/GSPN.h
  73. 4
      src/storm-gspn/storage/gspn/GspnBuilder.cpp
  74. 0
      src/storm-gspn/storage/gspn/GspnBuilder.h
  75. 7
      src/storm-gspn/storage/gspn/ImmediateTransition.h
  76. 5
      src/storm-gspn/storage/gspn/Marking.cpp
  77. 0
      src/storm-gspn/storage/gspn/Marking.h
  78. 0
      src/storm-gspn/storage/gspn/Place.cpp
  79. 0
      src/storm-gspn/storage/gspn/Place.h
  80. 9
      src/storm-gspn/storage/gspn/TimedTransition.h
  81. 2
      src/storm-gspn/storage/gspn/Transition.cpp
  82. 4
      src/storm-gspn/storage/gspn/Transition.h
  83. 12
      src/storm/CMakeLists.txt
  84. 6
      src/storm/adapters/Smt2ExpressionAdapter.h
  85. 120
      src/storm/builder/DftSmtBuilder.cpp
  86. 49
      src/storm/builder/DftSmtBuilder.h
  87. 2
      src/storm/cli/entrypoints.h
  88. 12
      src/storm/storage/dft/DFTElements.h
  89. 1
      src/storm/utility/math.h
  90. 4
      src/storm/utility/storm.h
  91. 2
      src/storm/utility/sylvan.h
  92. 3
      stormpy/CMakeLists.txt
  93. 6
      stormpy/src/mod_expressions.cpp

5
CMakeLists.txt

@ -1,4 +1,4 @@
cmake_minimum_required (VERSION 2.8.6)
cmake_minimum_required (VERSION 3.2)
cmake_policy(VERSION 3.2)
# Set project name
@ -168,6 +168,7 @@ elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel")
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
message(FATAL_ERROR "Visual Studio compiler is currently not supported.")
endif()
set(STORM_COMPILER_VERSION ${CMAKE_CXX_COMPILER_VERSION})
if(CCACHE_FOUND)
set(STORM_COMPILER_ID "${STORM_COMPILER_ID} (ccache)")
@ -260,7 +261,7 @@ if ("${CMAKE_GENERATOR}" STREQUAL "Xcode")
endif()
# Display information about build configuration.
message(STATUS "Storm - Using compiler configuration ${STORM_COMPILER_ID}.")
message(STATUS "Storm - Using compiler configuration ${STORM_COMPILER_ID} ${STORM_COMPILER_VERSION}.")
if (STORM_DEVELOPER)
message(STATUS "Storm - CXX Flags: ${CMAKE_CXX_FLAGS}")
message(STATUS "Storm - CXX Debug Flags: ${CMAKE_CXX_FLAGS_DEBUG}")

12
resources/3rdparty/CMakeLists.txt

@ -4,10 +4,14 @@ add_custom_target(test-resources)
set(STORM_3RDPARTY_SOURCE_DIR ${PROJECT_SOURCE_DIR}/resources/3rdparty)
set(STORM_3RDPARTY_BINARY_DIR ${PROJECT_BINARY_DIR}/resources/3rdparty)
####
#### Find autoreconf for cudd update step
find_program(AUTORECONF autoreconf)
mark_as_advanced(AUTORECONF)
if (STORM_PYTHON)
find_package(PythonInterp 3 REQUIRED QUIET)
find_package(PythonLibs 3 REQUIRED QUIET)
message(STATUS "Python executable: ${PYTHON_EXECUTABLE}")
message(STATUS "Python include: ${PYTHON_INCLUDE_DIRS}")
message(STATUS "Python include: ${PYTHON_LIBRARIES}")
endif()
#############################################################
##

12
resources/3rdparty/include_cudd.cmake

@ -1,7 +1,19 @@
####
#### Find autoreconf for cudd update step
find_program(AUTORECONF autoreconf)
find_program(ACLOCAL aclocal)
mark_as_advanced(AUTORECONF)
mark_as_advanced(ACLOCAL)
if (NOT AUTORECONF)
message(FATAL_ERROR "Cannot find autoreconf, cannot compile cudd3.")
endif()
if (NOT ACLOCAL)
message(FATAL_ERROR "Cannot find aclocal, cannot compile cudd3.")
endif()
set(CUDD_LIB_DIR ${STORM_3RDPARTY_BINARY_DIR}/cudd-3.0.0/lib)
ExternalProject_Add(

15
resources/3rdparty/include_xerces.cmake

@ -1,7 +1,6 @@
if(USE_XERCESC)
set(XERCESC_FIND_QUIETLY ON)
find_package(Xerces QUIET REQUIRED)
if(XERCESC_FOUND)
find_package(XercesC QUIET)
if(XercesC_FOUND)
message(STATUS "Storm - Use system version of xerces.")
else()
message(STATUS "Storm - Use shipped version of xerces.")
@ -20,13 +19,13 @@ if(USE_XERCESC)
)
set(XERCESC_ROOT ${STORM_3RDPARTY_BINARY_DIR}/xercesc-3.1.2)
set(XERCESC_INCLUDE ${XERCESC_ROOT}/include)
set(XercesC_INCLUDE_DIRS ${XERCESC_ROOT}/include)
set(XERCESC_LIBRARY_PATH ${XERCESC_LIB_DIR})
if(BUILD_STATIC)
set(XERCESC_LIBRARIES ${XERCESC_LIBRARY_PATH}/libxerces-c${STATIC_EXT})
set(XercesC_LIBRARIES ${XERCESC_LIBRARY_PATH}/libxerces-c${STATIC_EXT})
else()
set(XERCESC_LIBRARIES ${XERCESC_LIBRARY_PATH}/libxerces-c${DYNAMIC_EXT})
set(XercesC_LIBRARIES ${XERCESC_LIBRARY_PATH}/libxerces-c${DYNAMIC_EXT})
endif()
add_dependencies(resources xercesc)
@ -34,7 +33,7 @@ if(USE_XERCESC)
message (STATUS "Storm - Linking with xercesc.")
set(STORM_HAVE_XERCES ON)
include_directories(${XERCESC_INCLUDE})
include_directories(${XercesC_INCLUDE_DIRS})
if(APPLE)
FIND_LIBRARY(COREFOUNDATION_LIBRARY CoreFoundation )
FIND_LIBRARY(CORESERVICES_LIBRARY CoreServices )
@ -42,7 +41,7 @@ if(USE_XERCESC)
mark_as_advanced(CORESERVICES_LIBRARY)
endif()
find_package(CURL)
list(APPEND STORM_LINK_LIBRARIES ${XERCESC_LIBRARIES} ${COREFOUNDATION_LIBRARY} ${CORESERVICES_LIBRARY} ${CURL_LIBRARIES})
list(APPEND STORM_GSPN_LINK_LIBRARIES ${XercesC_LIBRARIES} ${COREFOUNDATION_LIBRARY} ${CORESERVICES_LIBRARY} ${CURL_LIBRARIES})
else()
message (WARNING "Storm - Building without Xerces disables parsing XML formats (for GSPNs)")
endif(USE_XERCESC)

10
resources/cmake/find_modules/FindXerces.cmake

@ -12,14 +12,6 @@ IF (XERCESC_INCLUDE AND XERCESC_LIBRARY)
SET(XERCESC_FIND_QUIETLY TRUE)
ENDIF (XERCESC_INCLUDE AND XERCESC_LIBRARY)
OPTION(XERCESC_STATIC "Set to ON to link your project with static library (instead of DLL)." ON)
IF (NOT ${XERCESC_WAS_STATIC} STREQUAL ${XERCESC_STATIC})
UNSET(XERCESC_LIBRARY CACHE)
UNSET(XERCESC_LIBRARY_DEBUG CACHE)
ENDIF (NOT ${XERCESC_WAS_STATIC} STREQUAL ${XERCESC_STATIC})
SET(XERCESC_WAS_STATIC ${XERCESC_STATIC} CACHE INTERNAL "" )
FIND_PATH(XERCESC_INCLUDE NAMES xercesc/util/XercesVersion.hpp
PATHS
@ -101,4 +93,4 @@ IF(XERCESC_FOUND)
ENDIF(XERCESC_FOUND)
MARK_AS_ADVANCED(XERCESC_INCLUDE XERCESC_LIBRARIES)
MARK_AS_ADVANCED(XERCESC_INCLUDE XERCESC_LIBRARIES)

4
src/CMakeLists.txt

@ -1,4 +1,8 @@
add_subdirectory(storm)
add_subdirectory(storm-pgcl)
add_subdirectory(storm-pgcl-cli)
add_subdirectory(storm-gspn)
add_subdirectory(storm-gspn-cli)
add_subdirectory(storm-dft)
add_subdirectory(storm-dft-cli)
add_subdirectory(test)

4
src/storm-dft-cli/CMakeLists.txt

@ -0,0 +1,4 @@
# Create storm-dft.
add_executable(storm-dft-cli ${PROJECT_SOURCE_DIR}/src/storm-dft-cli/storm-dyftee.cpp)
target_link_libraries(storm-dft-cli storm-dft) # Adding headers for xcode
set_target_properties(storm-dft-cli PROPERTIES OUTPUT_NAME "storm-dft")

9
src/storm/storm-dyftee.cpp → src/storm-dft-cli/storm-dyftee.cpp

@ -1,18 +1,17 @@
#include "storm/logic/Formula.h"
#include "storm/utility/initialize.h"
#include "storm/utility/storm.h"
#include "storm/parser/DFTGalileoParser.h"
#include "storm/modelchecker/dft/DFTModelChecker.h"
#include "storm-dft/parser/DFTGalileoParser.h"
#include "storm-dft/modelchecker/dft/DFTModelChecker.h"
#include "storm/modelchecker/dft/DFTASFChecker.h"
#include "storm-dft/modelchecker/dft/DFTASFChecker.h"
#include "storm/cli/cli.h"
#include "storm/exceptions/BaseException.h"
#include "storm/utility/macros.h"
#include "storm/builder/DftSmtBuilder.h"
#include "storm/settings/modules/GeneralSettings.h"
#include "storm/settings/modules/DFTSettings.h"
#include "storm-dft/settings/modules/DFTSettings.h"
#include "storm/settings/modules/CoreSettings.h"
#include "storm/settings/modules/DebugSettings.h"
//#include "storm/settings/modules/CounterexampleGeneratorSettings.h"

13
src/storm-dft/CMakeLists.txt

@ -0,0 +1,13 @@
file(GLOB_RECURSE ALL_FILES ${PROJECT_SOURCE_DIR}/src/storm-dft/*.h ${PROJECT_SOURCE_DIR}/src/storm-dft/*.cpp)
register_source_groups_from_filestructure("${ALL_FILES}" storm-dft)
file(GLOB_RECURSE STORM_DFT_SOURCES ${PROJECT_SOURCE_DIR}/src/storm-dft/*/*.cpp)
file(GLOB_RECURSE STORM_DFT_HEADERS ${PROJECT_SOURCE_DIR}/src/storm-dft/*/*.h)
# Create storm-pgcl.
add_library(storm-dft SHARED ${STORM_DFT_SOURCES} ${STORM_DFT_HEADERS})
target_link_libraries(storm-dft storm ${STORM_DFT_LINK_LIBRARIES})

3
src/storm/builder/DftExplorationHeuristic.cpp → src/storm-dft/builder/DftExplorationHeuristic.cpp

@ -1,4 +1,5 @@
#include "storm/builder/DftExplorationHeuristic.h"
#include "DftExplorationHeuristic.h"
#include "storm/adapters/CarlAdapter.h"
#include "storm/utility/macros.h"
#include "storm/utility/constants.h"

6
src/storm/builder/DftExplorationHeuristic.h → src/storm-dft/builder/DftExplorationHeuristic.h

@ -1,6 +1,4 @@
#ifndef STORM_BUILDER_DFTEXPLORATIONHEURISTIC_H_
#define STORM_BUILDER_DFTEXPLORATIONHEURISTIC_H_
#pragma once
#include <memory>
namespace storm {
@ -186,5 +184,3 @@ namespace storm {
}
}
#endif /* STORM_BUILDER_DFTEXPLORATIONHEURISTIC_H_ */

10
src/storm/builder/ExplicitDFTModelBuilder.cpp → src/storm-dft/builder/ExplicitDFTModelBuilder.cpp

@ -1,12 +1,16 @@
#include "storm/builder/ExplicitDFTModelBuilder.h"
#include "ExplicitDFTModelBuilder.h"
#include <map>
#include "storm/models/sparse/MarkovAutomaton.h"
#include "storm/models/sparse/Ctmc.h"
#include "storm/utility/constants.h"
#include "storm/utility/vector.h"
#include "storm/exceptions/UnexpectedException.h"
#include "storm/settings/modules/DFTSettings.h"
#include "storm/settings/SettingsManager.h"
#include <map>
#include "storm-dft/settings/modules/DFTSettings.h"
namespace storm {
namespace builder {

24
src/storm/builder/ExplicitDFTModelBuilder.h → src/storm-dft/builder/ExplicitDFTModelBuilder.h

@ -1,17 +1,23 @@
#ifndef EXPLICITDFTMODELBUILDER_H
#define EXPLICITDFTMODELBUILDER_H
#pragma once
#include <boost/container/flat_set.hpp>
#include <boost/optional/optional.hpp>
#include <stack>
#include <unordered_set>
#include "storm/models/sparse/StateLabeling.h"
#include "storm/models/sparse/StandardRewardModel.h"
#include "storm/models/sparse/Model.h"
#include "storm/storage/SparseMatrix.h"
#include "storm/storage/BitVectorHashMap.h"
#include "storm/storage/dft/DFT.h"
#include "storm/storage/dft/SymmetricUnits.h"
#include <boost/container/flat_set.hpp>
#include <boost/optional/optional.hpp>
#include <stack>
#include <unordered_set>
#include "storm-dft/storage/dft/DFT.h"
#include "storm-dft/storage/dft/SymmetricUnits.h"
namespace storm {
namespace builder {
@ -93,5 +99,3 @@ namespace storm {
};
}
}
#endif /* EXPLICITDFTMODELBUILDER_H */

10
src/storm/builder/ExplicitDFTModelBuilderApprox.cpp → src/storm-dft/builder/ExplicitDFTModelBuilderApprox.cpp

@ -1,13 +1,17 @@
#include "storm/builder/ExplicitDFTModelBuilderApprox.h"
#include "ExplicitDFTModelBuilderApprox.h"
#include <map>
#include "storm/models/sparse/MarkovAutomaton.h"
#include "storm/models/sparse/Ctmc.h"
#include "storm/utility/constants.h"
#include "storm/utility/vector.h"
#include "storm/utility/bitoperations.h"
#include "storm/exceptions/UnexpectedException.h"
#include "storm/settings/modules/DFTSettings.h"
#include "storm/settings/SettingsManager.h"
#include <map>
#include "storm-dft/settings/modules/DFTSettings.h"
namespace storm {
namespace builder {

27
src/storm/builder/ExplicitDFTModelBuilderApprox.h → src/storm-dft/builder/ExplicitDFTModelBuilderApprox.h

@ -1,22 +1,23 @@
#ifndef EXPLICITDFTMODELBUILDERAPPROX_H
#define EXPLICITDFTMODELBUILDERAPPROX_H
#pragma once
#include "storm/builder/DftExplorationHeuristic.h"
#include "storm/models/sparse/StateLabeling.h"
#include "storm/models/sparse/StandardRewardModel.h"
#include "storm/models/sparse/Model.h"
#include "storm/generator/DftNextStateGenerator.h"
#include "storm/storage/SparseMatrix.h"
#include "storm/storage/sparse/StateStorage.h"
#include "storm/storage/dft/DFT.h"
#include "storm/storage/dft/SymmetricUnits.h"
#include "storm/storage/BucketPriorityQueue.h"
#include <boost/container/flat_set.hpp>
#include <boost/optional/optional.hpp>
#include <stack>
#include <unordered_set>
#include <limits>
#include "storm/models/sparse/StateLabeling.h"
#include "storm/models/sparse/StandardRewardModel.h"
#include "storm/models/sparse/Model.h"
#include "storm/storage/SparseMatrix.h"
#include "storm/storage/sparse/StateStorage.h"
#include "storm-dft/builder/DftExplorationHeuristic.h"
#include "storm-dft/generator/DftNextStateGenerator.h"
#include "storm-dft/storage/dft/DFT.h"
#include "storm-dft/storage/dft/SymmetricUnits.h"
#include "storm-dft/storage/BucketPriorityQueue.h"
namespace storm {
namespace builder {
@ -331,5 +332,3 @@ namespace storm {
}
}
#endif /* EXPLICITDFTMODELBUILDERAPPROX_H */

2
src/storm/generator/DftNextStateGenerator.cpp → src/storm-dft/generator/DftNextStateGenerator.cpp

@ -1,4 +1,4 @@
#include "storm/generator/DftNextStateGenerator.h"
#include "DftNextStateGenerator.h"
#include "storm/utility/constants.h"
#include "storm/utility/macros.h"

10
src/storm/generator/DftNextStateGenerator.h → src/storm-dft/generator/DftNextStateGenerator.h

@ -1,11 +1,11 @@
#ifndef STORM_GENERATOR_DFTNEXTSTATEGENERATOR_H_
#define STORM_GENERATOR_DFTNEXTSTATEGENERATOR_H_
#pragma once
#include "storm/generator/NextStateGenerator.h"
#include "storm/storage/dft/DFT.h"
#include "storm/utility/ConstantsComparator.h"
#include "storm-dft/storage/dft/DFT.h"
namespace storm {
namespace generator {
@ -69,5 +69,3 @@ namespace storm {
}
}
#endif /* STORM_GENERATOR_DFTNEXTSTATEGENERATOR_H_ */

0
src/storm/modelchecker/dft/DFTASFChecker.cpp → src/storm-dft/modelchecker/dft/DFTASFChecker.cpp

3
src/storm/modelchecker/dft/DFTASFChecker.h → src/storm-dft/modelchecker/dft/DFTASFChecker.h

@ -3,7 +3,8 @@
#include <string>
#include <vector>
#include <unordered_map>
#include "storm/storage/dft/DFT.h"
#include "storm-dft/storage/dft/DFT.h"
namespace storm {

13
src/storm/modelchecker/dft/DFTModelChecker.cpp → src/storm-dft/modelchecker/dft/DFTModelChecker.cpp

@ -1,12 +1,13 @@
#include "storm/modelchecker/dft/DFTModelChecker.h"
#include "DFTModelChecker.h"
#include "storm/builder/ExplicitDFTModelBuilder.h"
#include "storm/builder/ExplicitDFTModelBuilderApprox.h"
#include "storm/builder/ParallelCompositionBuilder.h"
#include "storm/storage/dft/DFTIsomorphism.h"
#include "storm/settings/modules/DFTSettings.h"
#include "storm/utility/bitoperations.h"
#include "storm-dft/builder/ExplicitDFTModelBuilder.h"
#include "storm-dft/builder/ExplicitDFTModelBuilderApprox.h"
#include "storm-dft/storage/dft/DFTIsomorphism.h"
#include "storm-dft/settings/modules/DFTSettings.h"
namespace storm {
namespace modelchecker {
@ -395,7 +396,7 @@ namespace storm {
}
template<typename ValueType>
bool DFTModelChecker<ValueType>::isApproximationSufficient(ValueType lowerBound, ValueType upperBound, double approximationError, bool relative) {
bool DFTModelChecker<ValueType>::isApproximationSufficient(ValueType , ValueType , double , bool ) {
STORM_LOG_THROW(false, storm::exceptions::NotImplementedException, "Approximation works only for double.");
}

10
src/storm/modelchecker/dft/DFTModelChecker.h → src/storm-dft/modelchecker/dft/DFTModelChecker.h

@ -1,9 +1,10 @@
#ifndef STORM_MODELCHECKER_DFT_DFTMODELCHECKER_H_
#pragma once
#include "storm/logic/Formula.h"
#include "storm/modelchecker/results/CheckResult.h"
#include "storm/storage/dft/DFT.h"
#include "storm/utility/storm.h"
#include "storm/utility/storm.h" // TODO this should not be included here.
#include "storm-dft/storage/dft/DFT.h"
#include <chrono>
@ -136,5 +137,4 @@ namespace storm {
};
}
}
#endif /* STORM_MODELCHECKER_DFT_DFTMODELCHECKER_H_ */
}

0
src/storm/parser/DFTGalileoParser.cpp → src/storm-dft/parser/DFTGalileoParser.cpp

14
src/storm/parser/DFTGalileoParser.h → src/storm-dft/parser/DFTGalileoParser.h

@ -1,13 +1,14 @@
#ifndef DFTGALILEOPARSER_H
#define DFTGALILEOPARSER_H
#pragma once
#include <map>
#include "storm/storage/dft/DFT.h"
#include "storm/storage/dft/DFTBuilder.h"
#include "storm/storage/expressions/ExpressionManager.h"
#include "storm/parser/ExpressionParser.h"
#include "storm/storage/expressions/ExpressionEvaluator.h"
#include <map>
#include "storm-dft/storage/dft/DFT.h"
#include "storm-dft/storage/dft/DFTBuilder.h"
namespace storm {
namespace parser {
@ -39,6 +40,3 @@ namespace storm {
};
}
}
#endif /* DFTGALILEOPARSER_H */

2
src/storm/settings/modules/DFTSettings.cpp → src/storm-dft/settings/modules/DFTSettings.cpp

@ -1,4 +1,4 @@
#include "storm/settings/modules/DFTSettings.h"
#include "DFTSettings.h"
#include "storm/settings/SettingsManager.h"
#include "storm/settings/SettingMemento.h"

8
src/storm/settings/modules/DFTSettings.h → src/storm-dft/settings/modules/DFTSettings.h

@ -1,9 +1,9 @@
#ifndef STORM_SETTINGS_MODULES_DFTSETTINGS_H_
#define STORM_SETTINGS_MODULES_DFTSETTINGS_H_
#pragma once
#include "storm-config.h"
#include "storm/settings/modules/ModuleSettings.h"
#include "storm/builder/DftExplorationHeuristic.h"
#include "storm-dft/builder/DftExplorationHeuristic.h"
namespace storm {
namespace settings {
@ -167,5 +167,3 @@ namespace storm {
} // namespace modules
} // namespace settings
} // namespace storm
#endif /* STORM_SETTINGS_MODULES_DFTSETTINGS_H_ */

2
src/storm/storage/BucketPriorityQueue.cpp → src/storm-dft/storage/BucketPriorityQueue.cpp

@ -1,4 +1,4 @@
#include "storm/storage/BucketPriorityQueue.h"
#include "BucketPriorityQueue.h"
#include "storm/utility/macros.h"
#include "storm/adapters/CarlAdapter.h"

8
src/storm/storage/BucketPriorityQueue.h → src/storm-dft/storage/BucketPriorityQueue.h

@ -1,12 +1,12 @@
#ifndef STORM_STORAGE_BUCKETPRIORITYQUEUE_H_
#define STORM_STORAGE_BUCKETPRIORITYQUEUE_H_
#pragma once
#include "storm/builder/DftExplorationHeuristic.h"
#include <algorithm>
#include <functional>
#include <unordered_map>
#include <vector>
#include "storm-dft/builder/DftExplorationHeuristic.h"
namespace storm {
namespace storage {
@ -69,5 +69,3 @@ namespace storm {
}
}
#endif // STORM_STORAGE_BUCKETPRIORITYQUEUE_H_

14
src/storm/storage/dft/DFT.cpp → src/storm-dft/storage/dft/DFT.cpp

@ -1,13 +1,15 @@
#include <boost/container/flat_set.hpp>
#include "DFT.h"
#include <boost/container/flat_set.hpp>
#include <map>
#include "DFT.h"
#include "DFTBuilder.h"
#include "storm/exceptions/NotSupportedException.h"
#include "storm/utility/iota_n.h"
#include "storm/utility/vector.h"
#include "storm-dft/storage/dft/DFTBuilder.h"
#include "storm-dft/storage/dft/DFTIsomorphism.h"
#include "DFTIsomorphism.h"
#include "utility/iota_n.h"
#include "utility/vector.h"
namespace storm {
namespace storage {

21
src/storm/storage/dft/DFT.h → src/storm-dft/storage/dft/DFT.h

@ -1,6 +1,4 @@
#ifndef DFT_H
#define DFT_H
#pragma once
#include <memory>
#include <unordered_map>
@ -10,13 +8,14 @@
#include <boost/iterator/counting_iterator.hpp>
#include "DFTElements.h"
#include "elements/DFTRestriction.h"
#include "../BitVector.h"
#include "SymmetricUnits.h"
#include "../../utility/math.h"
#include "storm/storage/BitVector.h"
#include "storm/utility/math.h"
#include "storm/utility/macros.h"
#include "DFTStateGenerationInfo.h"
#include "storm-dft/storage/dft/DFTElements.h"
#include "storm-dft/storage/dft/SymmetricUnits.h"
#include "storm-dft/storage/dft/DFTStateGenerationInfo.h"
namespace storm {
namespace storage {
@ -38,8 +37,6 @@ namespace storm {
template<typename T> class DFTBuilder;
/**
* Represents a Dynamic Fault Tree
@ -281,5 +278,3 @@ namespace storm {
}
}
#endif /* DFT_H */

9
src/storm/storage/dft/DFTBuilder.cpp → src/storm-dft/storage/dft/DFTBuilder.cpp

@ -1,14 +1,13 @@
#include "DFTBuilder.h"
#include <algorithm>
#include "DFT.h"
#include "OrderDFTElementsById.h"
#include "storm/utility/macros.h"
#include "storm/exceptions/NotSupportedException.h"
#include "../../exceptions/WrongFormatException.h"
#include "storm/exceptions/WrongFormatException.h"
#include "storm-dft/storage/dft/DFT.h"
#include "storm-dft/storage/dft/OrderDFTElementsById.h"
namespace storm {

17
src/storm/storage/dft/DFTBuilder.h → src/storm-dft/storage/dft/DFTBuilder.h

@ -1,14 +1,14 @@
#ifndef DFTBUILDER_H
#define DFTBUILDER_H
#include "DFTElements.h"
#include "elements/DFTRestriction.h"
#pragma once
#include <iostream>
#include <unordered_map>
#include <map>
#include "storm/utility/macros.h"
#include "storm-dft/storage/dft/DFTElements.h"
#include "storm-dft/storage/dft/elements/DFTRestriction.h"
namespace storm {
namespace storage {
template<typename ValueType>
@ -190,8 +190,3 @@ namespace storm {
};
}
}
#endif /* DFTBUILDER_H */

7
src/storm/storage/dft/DFTElementState.h → src/storm-dft/storage/dft/DFTElementState.h

@ -1,6 +1,4 @@
#ifndef DFTELEMENTSTATE_H
#define DFTELEMENTSTATE_H
#pragma once
#include "storm/utility/macros.h"
@ -77,6 +75,3 @@ namespace storm {
}
}
#endif /* DFTELEMENTSTATE_H */

5
src/storm/storage/dft/DFTElementType.h → src/storm-dft/storage/dft/DFTElementType.h

@ -1,5 +1,4 @@
#ifndef DFTELEMENTTYPE_H
#define DFTELEMENTTYPE_H
#pragma once
#include "storm/utility/macros.h"
@ -83,5 +82,3 @@ namespace storm {
}
}
#endif /* DFTELEMENTTYPE_H */

12
src/storm-dft/storage/dft/DFTElements.h

@ -0,0 +1,12 @@
#pragma once
#include "storm-dft/storage/dft/elements/DFTAnd.h"
#include "storm-dft/storage/dft/elements/DFTBE.h"
#include "storm-dft/storage/dft/elements/DFTConst.h"
#include "storm-dft/storage/dft/elements/DFTDependency.h"
#include "storm-dft/storage/dft/elements/DFTOr.h"
#include "storm-dft/storage/dft/elements/DFTPand.h"
#include "storm-dft/storage/dft/elements/DFTPor.h"
#include "storm-dft/storage/dft/elements/DFTRestriction.h"
#include "storm-dft/storage/dft/elements/DFTSpare.h"
#include "storm-dft/storage/dft/elements/DFTVot.h"

7
src/storm/storage/dft/DFTIsomorphism.h → src/storm-dft/storage/dft/DFTIsomorphism.h

@ -3,9 +3,10 @@
#include <vector>
#include <unordered_map>
#include <utility>
#include "DFTElementType.h"
#include "DFTElements.h"
#include "DFT.h"
#include "storm-dft/storage/dft/DFTElementType.h"
#include "storm-dft/storage/dft/DFTElements.h"
#include "storm-dft/storage/dft/DFT.h"
namespace storm {
namespace storage {

4
src/storm/storage/dft/DFTState.cpp → src/storm-dft/storage/dft/DFTState.cpp

@ -1,6 +1,6 @@
#include "DFTState.h"
#include "DFTElements.h"
#include "DFT.h"
#include "storm-dft/storage/dft/DFTElements.h"
#include "storm-dft/storage/dft/DFT.h"
namespace storm {
namespace storage {

14
src/storm/storage/dft/DFTState.h → src/storm-dft/storage/dft/DFTState.h

@ -1,13 +1,13 @@
#ifndef DFTSTATE_H
#define DFTSTATE_H
#include "storm/storage/dft/DFTElementState.h"
#include "storm/storage/BitVector.h"
#include "storm/builder/DftExplorationHeuristic.h"
#pragma once
#include <sstream>
#include <memory>
#include "storm/storage/BitVector.h"
#include "storm-dft/storage/dft/DFTElementState.h"
#include "storm-dft/builder/DftExplorationHeuristic.h"
namespace storm {
namespace storage {
@ -306,5 +306,3 @@ namespace std {
};
}
#endif /* DFTSTATE_H */

0
src/storm/storage/dft/DFTStateGenerationInfo.h → src/storm-dft/storage/dft/DFTStateGenerationInfo.h

10
src/storm/storage/dft/DFTStateSpaceGenerationQueues.h → src/storm-dft/storage/dft/DFTStateSpaceGenerationQueues.h

@ -1,12 +1,11 @@
#ifndef DFTSTATESPACEGENERATIONQUEUES_H
#define DFTSTATESPACEGENERATIONQUEUES_H
#pragma once
#include <list>
#include <queue>
#include <vector>
#include <deque>
#include "OrderDFTElementsById.h"
#include "storm-dft/storage/dft/OrderDFTElementsById.h"
namespace storm {
namespace storage {
@ -99,7 +98,4 @@ namespace storm {
};
}
}
#endif /* DFTSTATESPACEGENERATIONQUEUES_H */
}

5
src/storm/storage/dft/DFTUnit.h → src/storm-dft/storage/dft/DFTUnit.h

@ -1,7 +1,6 @@
#ifndef DFTUNIT_H
#define DFTUNIT_H
#pragma once
#include "../BitVector.h"
#include "storm/storage/BitVector.h"
namespace storm {
namespace storage {

2
src/storm/storage/dft/OrderDFTElementsById.cpp → src/storm-dft/storage/dft/OrderDFTElementsById.cpp

@ -1,5 +1,5 @@
#include "OrderDFTElementsById.h"
#include "DFTElements.h"
#include "storm-dft/storage/dft/DFTElements.h"
namespace storm {
namespace storage {

7
src/storm/storage/dft/OrderDFTElementsById.h → src/storm-dft/storage/dft/OrderDFTElementsById.h

@ -1,6 +1,4 @@
#ifndef ORDERDFTELEMENTS_H
#define ORDERDFTELEMENTS_H
#pragma once
#include <memory>
namespace storm {
@ -25,6 +23,3 @@ namespace storm {
}
}
#endif /* ORDERDFTELEMENTSBYID_H */

0
src/storm/storage/dft/SymmetricUnits.h → src/storm-dft/storage/dft/SymmetricUnits.h

0
src/storm/storage/dft/elements/DFTAnd.h → src/storm-dft/storage/dft/elements/DFTAnd.h

0
src/storm/storage/dft/elements/DFTBE.h → src/storm-dft/storage/dft/elements/DFTBE.h

0
src/storm/storage/dft/elements/DFTConst.h → src/storm-dft/storage/dft/elements/DFTConst.h

0
src/storm/storage/dft/elements/DFTDependency.h → src/storm-dft/storage/dft/elements/DFTDependency.h

0
src/storm/storage/dft/elements/DFTElement.cpp → src/storm-dft/storage/dft/elements/DFTElement.cpp

0
src/storm/storage/dft/elements/DFTElement.h → src/storm-dft/storage/dft/elements/DFTElement.h

0
src/storm/storage/dft/elements/DFTGate.h → src/storm-dft/storage/dft/elements/DFTGate.h

0
src/storm/storage/dft/elements/DFTOr.h → src/storm-dft/storage/dft/elements/DFTOr.h

0
src/storm/storage/dft/elements/DFTPand.h → src/storm-dft/storage/dft/elements/DFTPand.h

0
src/storm/storage/dft/elements/DFTPor.h → src/storm-dft/storage/dft/elements/DFTPor.h

0
src/storm/storage/dft/elements/DFTRestriction.h → src/storm-dft/storage/dft/elements/DFTRestriction.h

0
src/storm/storage/dft/elements/DFTSpare.h → src/storm-dft/storage/dft/elements/DFTSpare.h

0
src/storm/storage/dft/elements/DFTVot.h → src/storm-dft/storage/dft/elements/DFTVot.h

3
src/storm-gspn-cli/CMakeLists.txt

@ -0,0 +1,3 @@
add_executable(storm-gspn-cli ${PROJECT_SOURCE_DIR}/src/storm-gspn-cli/storm-gspn.cpp)
target_link_libraries(storm-gspn-cli storm-gspn) # Adding headers for xcode
set_target_properties(storm-gspn-cli PROPERTIES OUTPUT_NAME "storm-gspn")

12
src/storm/storm-gspn.cpp → src/storm-gspn-cli/storm-gspn.cpp

@ -1,9 +1,12 @@
#include "storm/builder/ExplicitGspnModelBuilder.h"
#include "storm-gspn/builder/ExplicitGspnModelBuilder.h"
#include "storm-gspn/parser/GspnParser.h"
#include "storm-gspn/storage/gspn/GSPN.h"
#include "storm-gspn/storage/gspn/GspnBuilder.h"
#include "storm-gspn/builder/JaniGSPNBuilder.h"
#include "storm/exceptions/BaseException.h"
#include "storm/exceptions/WrongFormatException.h"
#include "storm/parser/GspnParser.h"
#include "storm/storage/gspn/GSPN.h"
#include "storm/storage/gspn/GspnBuilder.h"
#include "storm/utility/macros.h"
#include "storm/utility/initialize.h"
@ -13,7 +16,6 @@
#include "storm/storage/expressions/ExpressionManager.h"
#include "storm/storage/jani/Model.h"
#include "storm/storage/jani/JSONExporter.h"
#include "storm/builder/JaniGSPNBuilder.h"
#include <fstream>
#include <iostream>
#include <string>

13
src/storm-gspn/CMakeLists.txt

@ -0,0 +1,13 @@
file(GLOB_RECURSE ALL_FILES ${PROJECT_SOURCE_DIR}/src/storm-gspn/*.h ${PROJECT_SOURCE_DIR}/src/storm-gspn/*.cpp)
register_source_groups_from_filestructure("${ALL_FILES}" storm-gspn)
file(GLOB_RECURSE STORM_GSPN_SOURCES ${PROJECT_SOURCE_DIR}/src/storm-gspn/*/*.cpp)
file(GLOB_RECURSE STORM_GSPN_HEADERS ${PROJECT_SOURCE_DIR}/src/storm-gspn/*/*.h)
# Create storm-pgcl.
add_library(storm-gspn SHARED ${STORM_GSPN_SOURCES} ${STORM_GSPN_HEADERS})
target_link_libraries(storm-gspn storm ${STORM_GSPN_LINK_LIBRARIES})

0
src/storm/adapters/XercesAdapter.h → src/storm-gspn/adapters/XercesAdapter.h

0
src/storm/builder/ExplicitGspnModelBuilder.cpp → src/storm-gspn/builder/ExplicitGspnModelBuilder.cpp

0
src/storm/builder/ExplicitGspnModelBuilder.h → src/storm-gspn/builder/ExplicitGspnModelBuilder.h

0
src/storm/builder/JaniGSPNBuilder.cpp → src/storm-gspn/builder/JaniGSPNBuilder.cpp

2
src/storm/builder/JaniGSPNBuilder.h → src/storm-gspn/builder/JaniGSPNBuilder.h

@ -1,6 +1,6 @@
#pragma once
#include "storm/storage/gspn/GSPN.h"
#include "storm-gspn/storage/gspn/GSPN.h"
#include "storm/storage/jani/Model.h"
#include "storm/storage/expressions/ExpressionManager.h"

0
src/storm/parser/GreatSpnEditorProjectParser.cpp → src/storm-gspn/parser/GreatSpnEditorProjectParser.cpp

0
src/storm/parser/GreatSpnEditorProjectParser.h → src/storm-gspn/parser/GreatSpnEditorProjectParser.h

2
src/storm/parser/GspnParser.cpp → src/storm-gspn/parser/GspnParser.cpp

@ -1,6 +1,6 @@
#include "GspnParser.h"
#include "storm-config.h"
#include "storm/adapters/XercesAdapter.h"
#include "storm-gspn/adapters/XercesAdapter.h"
#include "storm/exceptions/UnexpectedException.h"
#include "storm/exceptions/WrongFormatException.h"

2
src/storm/parser/GspnParser.h → src/storm-gspn/parser/GspnParser.h

@ -1,4 +1,4 @@
#include "storm/storage/gspn/GSPN.h"
#include "storm-gspn/storage/gspn/GSPN.h"
namespace storm {
namespace parser {

2
src/storm/parser/PnmlParser.cpp → src/storm-gspn/parser/PnmlParser.cpp

@ -1,5 +1,5 @@
#include "storm/parser/PnmlParser.h"
#include "storm-gspn/parser/PnmlParser.h"
#ifdef USE_XERCES
#include <iostream>

0
src/storm/parser/PnmlParser.h → src/storm-gspn/parser/PnmlParser.h

13
src/storm/storage/gspn/GSPN.cpp → src/storm-gspn/storage/gspn/GSPN.cpp

@ -1,11 +1,14 @@
#include "storm/storage/gspn/GSPN.h"
#include "storm/utility/macros.h"
#include "storm/exceptions/InvalidArgumentException.h"
#include "GSPN.h"
#include <unordered_map>
#include <boost/lexical_cast.hpp>
#include "storm/utility/macros.h"
#include "storm/exceptions/InvalidArgumentException.h"
namespace storm {
namespace gspn {
uint64_t GSPN::timedTransitionIdToTransitionId(uint64_t ttId) {
@ -169,7 +172,7 @@ namespace storm {
if (trans.getInhibitionPlaces().count(outEntry.first) == 1) {
outStream << "\t" << trans.getName() << " -> " << places.at(outEntry.first).getName() << "[arrowtail=\"dot\", label=\"" << (outEntry.second > 1 ? std::to_string(outEntry.second) : "") << "\", dir=both];" << std::endl;
} else if (trans.getInputPlaces().count(outEntry.first) == 1) {
outStream << "\t" << trans.getName() << " -> " << places.at(outEntry.first).getName() << "[arrowtail=\"dot\", label=\"" << (outEntry.second > 1 ? std::to_string(outEntry.second) : "")<< "\", dir=both];" << std::endl;
outStream << "\t" << trans.getName() << " -> " << places.at(outEntry.first).getName() << "[label=\"" << (outEntry.second > 1 ? std::to_string(outEntry.second) : "")<< "\", dir=both];" << std::endl;
} else {
outStream << "\t" << trans.getName() << " -> " << places.at(outEntry.first).getName() << "[label=\"" << (outEntry.second > 1 ? std::to_string(outEntry.second) : "") << "\"];" << std::endl;
}
@ -193,7 +196,7 @@ namespace storm {
if (trans.getInhibitionPlaces().count(outEntry.first) == 1) {
outStream << "\t" << trans.getName() << " -> " << places.at(outEntry.first).getName() << "[arrowtail=\"dot\", label=\"" << (outEntry.second > 1 ? std::to_string(outEntry.second) : "") << "\", dir=both];" << std::endl;
} else if (trans.getInputPlaces().count(outEntry.first) == 1) {
outStream << "\t" << trans.getName() << " -> " << places.at(outEntry.first).getName() << "[arrowtail=\"dot\", label=\"" << (outEntry.second > 1 ? std::to_string(outEntry.second) : "")<< "\", dir=both];" << std::endl;
outStream << "\t" << trans.getName() << " -> " << places.at(outEntry.first).getName() << "[label=\"" << (outEntry.second > 1 ? std::to_string(outEntry.second) : "")<< "\", dir=both];" << std::endl;
} else {
outStream << "\t" << trans.getName() << " -> " << places.at(outEntry.first).getName() << "[label=\"" << (outEntry.second > 1 ? std::to_string(outEntry.second) : "") << "\"];" << std::endl;
}

8
src/storm/storage/gspn/GSPN.h → src/storm-gspn/storage/gspn/GSPN.h

@ -6,10 +6,10 @@
#include <memory>
#include <unordered_map>
#include "storm/storage/gspn/ImmediateTransition.h"
#include "storm/storage/gspn/Marking.h"
#include "storm/storage/gspn/Place.h"
#include "storm/storage/gspn/TimedTransition.h"
#include "storm-gspn/storage/gspn/ImmediateTransition.h"
#include "storm-gspn/storage/gspn/Marking.h"
#include "storm-gspn/storage/gspn/Place.h"
#include "storm-gspn/storage/gspn/TimedTransition.h"
namespace storm {
namespace gspn {

4
src/storm/storage/gspn/GspnBuilder.cpp → src/storm-gspn/storage/gspn/GspnBuilder.cpp

@ -1,6 +1,8 @@
#include "storm/exceptions/IllegalFunctionCallException.h"
#include "GspnBuilder.h"
#include "storm/exceptions/IllegalFunctionCallException.h"
#include "storm/utility/macros.h"
#include "storm/exceptions/IllegalFunctionCallException.h"
#include "storm/exceptions/InvalidArgumentException.h"

0
src/storm/storage/gspn/GspnBuilder.h → src/storm-gspn/storage/gspn/GspnBuilder.h

7
src/storm/storage/gspn/ImmediateTransition.h → src/storm-gspn/storage/gspn/ImmediateTransition.h

@ -1,7 +1,6 @@
#ifndef STORM_STORAGE_GSPN_IMMEDIATETRANSITION_H_
#define STORM_STORAGE_GSPN_IMMEDIATETRANSITION_H_
#pragma once
#include "storm/storage/gspn/Transition.h"
#include "storm-gspn/storage/gspn/Transition.h"
#include "storm/utility/constants.h"
namespace storm {
@ -39,5 +38,3 @@ namespace storm {
};
}
}
#endif //STORM_STORAGE_GSPN_IMMEDIATETRANSITION_H_

5
src/storm/storage/gspn/Marking.cpp → src/storm-gspn/storage/gspn/Marking.cpp

@ -1,5 +1,8 @@
#include "Marking.h"
#include <stdint.h>
#include "storm/storage/gspn/Marking.h"
namespace storm {
namespace gspn {

0
src/storm/storage/gspn/Marking.h → src/storm-gspn/storage/gspn/Marking.h

0
src/storm/storage/gspn/Place.cpp → src/storm-gspn/storage/gspn/Place.cpp

0
src/storm/storage/gspn/Place.h → src/storm-gspn/storage/gspn/Place.h

9
src/storm/storage/gspn/TimedTransition.h → src/storm-gspn/storage/gspn/TimedTransition.h

@ -1,7 +1,6 @@
#ifndef STORM_STORAGE_GSPN_TIMEDTRANSITION_H_
#define STORM_STORAGE_GSPN_TIMEDTRANSITION_H_
#pragma once
#include "storm/storage/gspn/Transition.h"
#include "storm-gspn/storage/gspn/Transition.h"
namespace storm {
namespace gspn {
@ -31,6 +30,4 @@ namespace storm {
RateType rate;
};
}
}
#endif //STORM_STORAGE_GSPN_TIMEDTRANSITION_H_
}

2
src/storm/storage/gspn/Transition.cpp → src/storm-gspn/storage/gspn/Transition.cpp

@ -1,4 +1,4 @@
#include "storm/storage/gspn/Transition.h"
#include "Transition.h"
#include "storm/utility/macros.h"

4
src/storm/storage/gspn/Transition.h → src/storm-gspn/storage/gspn/Transition.h

@ -3,8 +3,8 @@
#include <map>
#include <unordered_map>
#include <vector>
#include "storm/storage/gspn/Marking.h"
#include "storm/storage/gspn/Place.h"
#include "storm-gspn/storage/gspn/Marking.h"
#include "storm-gspn/storage/gspn/Place.h"
namespace storm {
namespace gspn {

12
src/storm/CMakeLists.txt

@ -10,8 +10,6 @@ register_source_groups_from_filestructure("${ALL_FILES}" storm)
file(GLOB_RECURSE STORM_HEADERS ${PROJECT_SOURCE_DIR}/src/storm/*.h)
file(GLOB_RECURSE STORM_SOURCES_WITHOUT_MAIN ${PROJECT_SOURCE_DIR}/src/storm/*/*.cpp)
file(GLOB_RECURSE STORM_MAIN_FILE ${PROJECT_SOURCE_DIR}/src/storm/storm.cpp)
file(GLOB_RECURSE STORM_DFT_MAIN_FILE ${PROJECT_SOURCE_DIR}/src/storm/storm-dyftee.cpp)
file(GLOB_RECURSE STORM_GSPN_MAIN_FILE ${PROJECT_SOURCE_DIR}/src/storm/storm-gspn.cpp)
# Additional include files like the storm-config.h
file(GLOB_RECURSE STORM_BUILD_HEADERS ${PROJECT_BINARY_DIR}/include/*.h)
@ -19,8 +17,6 @@ file(GLOB_RECURSE STORM_BUILD_HEADERS ${PROJECT_BINARY_DIR}/include/*.h)
set(STORM_LIB_SOURCES ${STORM_SOURCES_WITHOUT_MAIN})
set(STORM_LIB_HEADERS ${STORM_HEADERS})
set(STORM_MAIN_SOURCES ${STORM_MAIN_FILE})
set(STORM_DFT_MAIN_SOURCES ${STORM_DFT_MAIN_FILE})
set(STORM_GSPN_MAIN_SOURCES ${STORM_GSPN_MAIN_FILE})
# Add custom additional include or link directories
if (ADDITIONAL_INCLUDE_DIRS)
@ -50,14 +46,6 @@ add_executable(storm-main ${STORM_MAIN_SOURCES} ${STORM_MAIN_HEADERS})
target_link_libraries(storm-main storm)
set_target_properties(storm-main PROPERTIES OUTPUT_NAME "storm")
# Create storm-dft.
add_executable(storm-dft-main ${STORM_DFT_MAIN_SOURCES} ${STORM_MAIN_HEADERS})
target_link_libraries(storm-dft-main storm) # Adding headers for xcode
set_target_properties(storm-dft-main PROPERTIES OUTPUT_NAME "storm-dft")
add_executable(storm-gspn-main ${STORM_GSPN_MAIN_SOURCES} ${STORM_MAIN_HEADERS})
target_link_libraries(storm-gspn-main storm) # Adding headers for xcode
set_target_properties(storm-gspn-main PROPERTIES OUTPUT_NAME "storm-gspn")
# Install storm headers to include directory.
foreach(HEADER ${STORM_LIB_HEADERS})

6
src/storm/adapters/Smt2ExpressionAdapter.h

@ -35,7 +35,7 @@ namespace storm {
* @param expression The expression to translate.
* @return An equivalent expression for Smt2.
*/
std::string translateExpression(storm::expressions::Expression const& expression) {
std::string translateExpression(storm::expressions::Expression const& ) {
STORM_LOG_THROW(false, storm::exceptions::NotImplementedException, "functionality not (yet) implemented");
}
@ -98,7 +98,7 @@ namespace storm {
* @param variable The variable to translate.
* @return An equivalent expression for smt2.
*/
std::string translateExpression(storm::expressions::Variable const& variable) {
std::string translateExpression(storm::expressions::Variable const& ) {
STORM_LOG_THROW(false, storm::exceptions::NotImplementedException, "functionality not (yet) implemented");
}
@ -108,7 +108,7 @@ namespace storm {
* @param smt2Declaration The declaration for which to find the equivalent.
* @return The equivalent counterpart.
*/
storm::expressions::Variable const& getVariable(std::string smt2Declaration) {
storm::expressions::Variable const& getVariable(std::string const&) {
STORM_LOG_THROW(false, storm::exceptions::NotImplementedException, "functionality not (yet) implemented");
}

120
src/storm/builder/DftSmtBuilder.cpp

@ -1,120 +0,0 @@
#include "storm/builder/DftSmtBuilder.h"
#include "storm/exceptions/NotImplementedException.h"
namespace storm {
namespace builder {
template <typename ValueType>
DFTSMTBuilder<ValueType>::DFTSMTBuilder() : manager(std::make_shared<storm::expressions::ExpressionManager>()) {
solver = storm::utility::solver::SmtSolverFactory().create(*manager);
}
template <typename ValueType>
void DFTSMTBuilder<ValueType>::convertToSMT(storm::storage::DFT<ValueType> const& dft) {
std::cout << "Convert DFT to SMT" << std::endl;
timeMax = manager->integer(dft.nrBasicElements());
timeFailSafe = manager->integer(dft.nrBasicElements() + 1);
timeZero = manager->integer(0);
// Convert all elements
for (size_t i = 0; i < dft.nrElements(); ++i) {
std::shared_ptr<storm::storage::DFTElement<ValueType> const> element = dft.getElement(i);
std::cout << "Consider " << element->toString() << std::endl;
if (element->isBasicElement()) {
storm::expressions::Variable varBE = convert(std::static_pointer_cast<storm::storage::DFTBE<ValueType> const>(element));
varsBE.push_back(varBE);
} else if (element->isGate()) {
storm::expressions::Variable varGate = convert(std::static_pointer_cast<storm::storage::DFTGate<ValueType> const>(element));
if (dft.getTopLevelIndex() == i) {
topLevel = varGate;
}
} else if (element->isDependency()) {
convert(std::static_pointer_cast<storm::storage::DFTDependency<ValueType> const>(element));
} else if (element->isRestriction()) {
convert(std::static_pointer_cast<storm::storage::DFTRestriction<ValueType> const>(element));
}
}
// No simultaneous fails can occur
for (size_t i = 0; i < varsBE.size() - 1; ++i) {
storm::expressions::Expression be = varsBE[i];
for (size_t j = i + 1; j < varsBE.size(); ++j) {
storm::expressions::Expression assertion = be != varsBE[j];
solver->add(assertion);
}
}
// For every time-point one BE must fail
for (size_t time = 1; time <= dft.nrBasicElements(); ++time) {
storm::expressions::Expression exprTime = manager->integer(time);
storm::expressions::Expression assertion = varsBE[0] == exprTime;
for (size_t i = 1; i < varsBE.size(); ++i) {
assertion = assertion || varsBE[i] == exprTime;
}
assertion = assertion || topLevel <= exprTime;
solver->add(assertion);
}
}
template <typename ValueType>
storm::expressions::Variable DFTSMTBuilder<ValueType>::convert(std::shared_ptr<storm::storage::DFTBE<ValueType> const> const& be) {
storm::expressions::Variable var = manager->declareIntegerVariable(be->name());
storm::expressions::Expression assertion = timeZero < var && var < timeFailSafe;
solver->add(assertion);
return var;
}
template <typename ValueType>
storm::expressions::Variable DFTSMTBuilder<ValueType>::convert(std::shared_ptr<storm::storage::DFTGate<ValueType> const> const& gate) {
storm::expressions::Variable var = manager->declareIntegerVariable(gate->name());
storm::expressions::Expression assertion = timeZero < var && var <= timeFailSafe;
solver->add(assertion);
return var;
}
template <typename ValueType>
storm::expressions::Variable DFTSMTBuilder<ValueType>::convert(std::shared_ptr<storm::storage::DFTDependency<ValueType> const> const& dependency) {
STORM_LOG_THROW(false, storm::exceptions::NotImplementedException, "The dependency cannot be converted into SMT.");
}
template <typename ValueType>
storm::expressions::Variable DFTSMTBuilder<ValueType>::convert(std::shared_ptr<storm::storage::DFTRestriction<ValueType> const> const& restriction) {
STORM_LOG_THROW(false, storm::exceptions::NotImplementedException, "The restriction cannot be converted into SMT.");
}
template <typename ValueType>
bool DFTSMTBuilder<ValueType>::check() const {
std::cout << "Check" << std::endl;
storm::solver::SmtSolver::CheckResult result = solver->check();
switch (result) {
case solver::SmtSolver::CheckResult::Sat:
{
std::cout << "SAT with model:" << std::endl;
std::shared_ptr<storm::solver::SmtSolver::ModelReference> model = solver->getModel();
for (auto const& pair : *manager) {
std::cout << pair.first.getName() << "->" << model->getIntegerValue(pair.first) << std::endl;
}
return true;
}
case solver::SmtSolver::CheckResult::Unsat:
return false;
case solver::SmtSolver::CheckResult::Unknown:
default:
STORM_LOG_ASSERT(false, "Result is unknown.");
return false;
}
}
// Explicitly instantiate the class.
template class DFTSMTBuilder<double>;
#ifdef STORM_HAVE_CARL
template class DFTSMTBuilder<storm::RationalFunction>;
#endif
} // namespace builder
} // namespace storm

49
src/storm/builder/DftSmtBuilder.h

@ -1,49 +0,0 @@
#ifndef DFTSMTBUILDER_H
#define DFTSMTBUILDER_H
#include "storm/solver/SmtSolver.h"
#include "storm/utility/solver.h"
#include "storm/storage/dft/DFT.h"
namespace storm {
namespace builder {
template<typename ValueType>
class DFTSMTBuilder {
public:
DFTSMTBuilder();
void convertToSMT(storm::storage::DFT<ValueType> const& dft);
bool check() const;
private:
std::shared_ptr<storm::solver::SmtSolver> solver;
std::shared_ptr<storm::expressions::ExpressionManager> manager;
storm::expressions::Expression timeMax;
storm::expressions::Expression timeFailSafe;
storm::expressions::Expression timeZero;
storm::expressions::Expression topLevel;
std::vector<storm::expressions::Variable> varsBE;
storm::expressions::Variable convert(std::shared_ptr<storm::storage::DFTBE<ValueType> const> const& be);
storm::expressions::Variable convert(std::shared_ptr<storm::storage::DFTGate<ValueType> const> const& gate);
storm::expressions::Variable convert(std::shared_ptr<storm::storage::DFTDependency<ValueType> const> const& dependency);
storm::expressions::Variable convert(std::shared_ptr<storm::storage::DFTRestriction<ValueType> const> const& restriction);
};
}
}
#endif /* DFTSMTBUILDER_H */

2
src/storm/cli/entrypoints.h

@ -178,7 +178,7 @@ namespace storm {
#ifdef STORM_HAVE_CARL
template<>
void verifySymbolicModelWithExplorationEngine<storm::RationalFunction>(storm::storage::SymbolicModelDescription const& model, std::vector<storm::jani::Property> const& formulas, bool onlyInitialStatesRelevant) {
void verifySymbolicModelWithExplorationEngine<storm::RationalFunction>(storm::storage::SymbolicModelDescription const& , std::vector<storm::jani::Property> const& , bool ) {
STORM_LOG_THROW(false, storm::exceptions::InvalidSettingsException, "Exploration-based verification does currently not support parametric models.");
}
#endif

12
src/storm/storage/dft/DFTElements.h

@ -1,12 +0,0 @@
#pragma once
#include "elements/DFTAnd.h"
#include "elements/DFTBE.h"
#include "elements/DFTConst.h"
#include "elements/DFTDependency.h"
#include "elements/DFTOr.h"
#include "elements/DFTPand.h"
#include "elements/DFTPor.h"
#include "elements/DFTRestriction.h"
#include "elements/DFTSpare.h"
#include "elements/DFTVot.h"

1
src/storm/utility/math.h

@ -3,6 +3,7 @@
#include <cmath>
#include "storm/utility/macros.h"
#include "storm/utility/OsDetection.h"
namespace storm {

4
src/storm/utility/storm.h

@ -270,12 +270,12 @@ namespace storm {
#ifdef STORM_HAVE_CARL
template<>
inline void generateCounterexample(storm::storage::SymbolicModelDescription const& model, std::shared_ptr<storm::models::sparse::Model<storm::RationalNumber>> markovModel, std::shared_ptr<storm::logic::Formula const> const& formula) {
inline void generateCounterexample(storm::storage::SymbolicModelDescription const&, std::shared_ptr<storm::models::sparse::Model<storm::RationalNumber>> , std::shared_ptr<storm::logic::Formula const> const& ) {
STORM_LOG_THROW(false, storm::exceptions::InvalidSettingsException, "Unable to generate counterexample for exact arithmetic model.");
}
template<>
inline void generateCounterexample(storm::storage::SymbolicModelDescription const& model, std::shared_ptr<storm::models::sparse::Model<storm::RationalFunction>> markovModel, std::shared_ptr<storm::logic::Formula const> const& formula) {
inline void generateCounterexample(storm::storage::SymbolicModelDescription const&, std::shared_ptr<storm::models::sparse::Model<storm::RationalFunction>> , std::shared_ptr<storm::logic::Formula const> const& ) {
STORM_LOG_THROW(false, storm::exceptions::InvalidSettingsException, "Unable to generate counterexample for parametric model.");
}
#endif

2
src/storm/utility/sylvan.h

@ -10,6 +10,8 @@
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wpedantic"
#pragma GCC system_header // Only way to suppress some warnings atm.
#include "sylvan_obj.hpp"
#include "sylvan_storm_rational_function.h"

3
stormpy/CMakeLists.txt

@ -1,6 +1,3 @@
find_package(PythonInterp REQUIRED)
find_package(PythonLibs REQUIRED)
set(STORMPY_OUTPUT_DIR "${PROJECT_BINARY_DIR}/stormpy")
set(STORMPY_SOURCE_DIR "${PROJECT_SOURCE_DIR}/stormpy")

6
stormpy/src/mod_expressions.cpp

@ -9,6 +9,12 @@ PYBIND11_PLUGIN(expressions) {
;
py::class_<storm::expressions::Expression>(m, "Expression", "Holds an expression")
.def("__str__", &storm::expressions::Expression::toString)
.def_property_readonly("contains_variables", &storm::expressions::Expression::containsVariables)
.def_property_readonly("has_boolean_type", &storm::expressions::Expression::hasBooleanType)
.def_property_readonly("has_integer_type", &storm::expressions::Expression::hasIntegerType)
.def_property_readonly("has_rational_type", &storm::expressions::Expression::hasRationalType)
;
return m.ptr();

Loading…
Cancel
Save