Browse Source

Merge branch 'master' into menu_games

main
dehnert 9 years ago
parent
commit
241f2777bf
  1. 6
      resources/3rdparty/include_cpptemplate.cmake
  2. 2
      src/storm/builder/JaniGSPNBuilder.h
  3. 2
      src/storm/generator/CompressedState.h
  4. 4
      src/storm/modelchecker/results/QualitativeCheckResult.cpp
  5. 2
      src/storm/parser/GspnParser.cpp
  6. 3
      src/storm/parser/JaniParser.cpp
  7. 23
      src/storm/settings/modules/GSPNExportSettings.cpp
  8. 16
      src/storm/settings/modules/GSPNExportSettings.h
  9. 2
      src/storm/storage/dd/sylvan/InternalSylvanDdManager.cpp
  10. 6
      src/storm/storage/gspn/GspnBuilder.cpp
  11. 2
      src/storm/storage/jani/UnboundedIntegerVariable.cpp
  12. 2
      src/storm/storage/jani/UnboundedIntegerVariable.h

6
resources/3rdparty/include_cpptemplate.cmake

@ -1,8 +1,10 @@
string(REPLACE " " ";" CMAKE_CXX_FLAGS_AS_LIST ${CMAKE_CXX_FLAGS}) string(REPLACE " " ";" CMAKE_CXX_FLAGS_AS_LIST ${CMAKE_CXX_FLAGS})
if(CMAKE_BUILD_TYPE MATCHES DEBUG) if(CMAKE_BUILD_TYPE MATCHES DEBUG)
list(APPEND CMAKE_CXX_FLAGS_AS_LIST ${CMAKE_CXX_FLAGS_DEBUG})
string(REPLACE " " ";" CMAKE_CXX_FLAGS_DEBUG_AS_LIST ${CMAKE_CXX_FLAGS_DEBUG})
list(APPEND CMAKE_CXX_FLAGS_AS_LIST ${CMAKE_CXX_FLAGS_DEBUG_AS_LIST})
else() else()
list(APPEND CMAKE_CXX_FLAGS_AS_LIST ${CMAKE_CXX_FLAGS_RELEASE})
string(REPLACE " " ";" CMAKE_CXX_FLAGS_RELEASE_AS_LIST ${CMAKE_CXX_FLAGS_RELEASE})
list(APPEND CMAKE_CXX_FLAGS_AS_LIST ${CMAKE_CXX_FLAGS_RELEASE_AS_LIST})
endif() endif()
set(CPPTEMPLATE_LIB_DIR ${STORM_3RDPARTY_BINARY_DIR}/cpptemplate) set(CPPTEMPLATE_LIB_DIR ${STORM_3RDPARTY_BINARY_DIR}/cpptemplate)
ExternalProject_Add( ExternalProject_Add(

2
src/storm/builder/JaniGSPNBuilder.h

@ -39,7 +39,7 @@ namespace storm {
storm::jani::Variable* janiVar = nullptr; storm::jani::Variable* janiVar = nullptr;
if (!place.hasRestrictedCapacity()) { if (!place.hasRestrictedCapacity()) {
// Effectively no capacity limit known // Effectively no capacity limit known
janiVar = new storm::jani::UnboundedIntegerVariable(place.getName(), expressionManager->declareIntegerVariable(place.getName()), expressionManager->integer(place.getNumberOfInitialTokens()), false);
janiVar = new storm::jani::UnboundedIntegerVariable(place.getName(), expressionManager->declareIntegerVariable(place.getName()), expressionManager->integer(place.getNumberOfInitialTokens()));
} else { } else {
assert(place.hasRestrictedCapacity()); assert(place.hasRestrictedCapacity());
janiVar = new storm::jani::BoundedIntegerVariable(place.getName(), expressionManager->declareIntegerVariable(place.getName()), expressionManager->integer(place.getNumberOfInitialTokens()), expressionManager->integer(0), expressionManager->integer(place.getCapacity())); janiVar = new storm::jani::BoundedIntegerVariable(place.getName(), expressionManager->declareIntegerVariable(place.getName()), expressionManager->integer(place.getNumberOfInitialTokens()), expressionManager->integer(0), expressionManager->integer(place.getCapacity()));

2
src/storm/generator/CompressedState.h

@ -15,7 +15,7 @@ namespace storm {
typedef storm::storage::BitVector CompressedState; typedef storm::storage::BitVector CompressedState;
class VariableInformation;
struct VariableInformation;
/*! /*!
* Unpacks the compressed state into the evaluator. * Unpacks the compressed state into the evaluator.

4
src/storm/modelchecker/results/QualitativeCheckResult.cpp

@ -5,11 +5,11 @@
namespace storm { namespace storm {
namespace modelchecker { namespace modelchecker {
QualitativeCheckResult& QualitativeCheckResult::operator&=(QualitativeCheckResult const& other) {
QualitativeCheckResult& QualitativeCheckResult::operator&=(QualitativeCheckResult const&) {
STORM_LOG_THROW(false, storm::exceptions::InvalidOperationException, "Unable to perform logical 'and' on the two check results."); STORM_LOG_THROW(false, storm::exceptions::InvalidOperationException, "Unable to perform logical 'and' on the two check results.");
} }
QualitativeCheckResult& QualitativeCheckResult::operator|=(QualitativeCheckResult const& other) {
QualitativeCheckResult& QualitativeCheckResult::operator|=(QualitativeCheckResult const&) {
STORM_LOG_THROW(false, storm::exceptions::InvalidOperationException, "Unable to perform logical 'or' on the two check results."); STORM_LOG_THROW(false, storm::exceptions::InvalidOperationException, "Unable to perform logical 'or' on the two check results.");
} }

2
src/storm/parser/GspnParser.cpp

@ -81,7 +81,7 @@ namespace storm {
delete errHandler; delete errHandler;
xercesc::XMLPlatformUtils::Terminate(); xercesc::XMLPlatformUtils::Terminate();
#else #else
STORM_LOG_THROW(false, storm::exceptions::UnexpectedException, "Storm is not compiled with XML support");
STORM_LOG_THROW(false, storm::exceptions::UnexpectedException, "Storm is not compiled with XML support: " << filename << " can not be parsed");
#endif #endif
} }
} }

3
src/storm/parser/JaniParser.cpp

@ -609,7 +609,8 @@ namespace storm {
} }
return std::make_shared<storm::jani::UnboundedIntegerVariable>(name, expressionManager->declareIntegerVariable(exprManagerName), initVal.get(), transientVar); return std::make_shared<storm::jani::UnboundedIntegerVariable>(name, expressionManager->declareIntegerVariable(exprManagerName), initVal.get(), transientVar);
} }
return std::make_shared<storm::jani::UnboundedIntegerVariable>(name, expressionManager->declareIntegerVariable(exprManagerName), transientVar);
assert(!transientVar); // Checked earlier.
return std::make_shared<storm::jani::UnboundedIntegerVariable>(name, expressionManager->declareIntegerVariable(exprManagerName));
} else if(variableStructure.at("type") == "clock") { } else if(variableStructure.at("type") == "clock") {
STORM_LOG_THROW(false, storm::exceptions::InvalidJaniException, "Unsupported type 'clock' for variable '" << name << "' (scope: " << scopeDescription << ")"); STORM_LOG_THROW(false, storm::exceptions::InvalidJaniException, "Unsupported type 'clock' for variable '" << name << "' (scope: " << scopeDescription << ")");
} else if(variableStructure.at("type") == "continuous") { } else if(variableStructure.at("type") == "continuous") {

23
src/storm/settings/modules/GSPNExportSettings.cpp

@ -16,11 +16,17 @@ namespace storm {
const std::string GSPNExportSettings::moduleName = "exportGspn"; const std::string GSPNExportSettings::moduleName = "exportGspn";
const std::string GSPNExportSettings::writeToDotOptionName = "gspn-dot-output"; const std::string GSPNExportSettings::writeToDotOptionName = "gspn-dot-output";
const std::string GSPNExportSettings::writeToPnmlOptionName = "to-pnml";
const std::string GSPNExportSettings::writeToPnproOptionName = "to-pnpro";
//const std::string GSPNExportSettings::janiFileOptionShortName = "dotoutput"; //const std::string GSPNExportSettings::janiFileOptionShortName = "dotoutput";
GSPNExportSettings::GSPNExportSettings() : ModuleSettings(moduleName) { GSPNExportSettings::GSPNExportSettings() : ModuleSettings(moduleName) {
this->addOption(storm::settings::OptionBuilder(moduleName, writeToDotOptionName, false, "Destination for the dot output.").addArgument(storm::settings::ArgumentBuilder::createStringArgument("filename", "path to file").build()).build()); this->addOption(storm::settings::OptionBuilder(moduleName, writeToDotOptionName, false, "Destination for the dot output.").addArgument(storm::settings::ArgumentBuilder::createStringArgument("filename", "path to file").build()).build());
this->addOption(storm::settings::OptionBuilder(moduleName, writeToPnmlOptionName, false, "Destination for the pnml output").addArgument(storm::settings::ArgumentBuilder::createStringArgument("filename", "path to file").build()).build());
this->addOption(storm::settings::OptionBuilder(moduleName, writeToPnproOptionName, false, "Destination for the pnpro output").addArgument(storm::settings::ArgumentBuilder::createStringArgument("filename", "path to file").build()).build());
} }
bool GSPNExportSettings::isWriteToDotSet() const { bool GSPNExportSettings::isWriteToDotSet() const {
@ -31,6 +37,23 @@ namespace storm {
return this->getOption(writeToDotOptionName).getArgumentByName("filename").getValueAsString(); return this->getOption(writeToDotOptionName).getArgumentByName("filename").getValueAsString();
} }
bool GSPNExportSettings::isWriteToPnmlSet() const {
return this->getOption(writeToPnmlOptionName).getHasOptionBeenSet();
}
std::string GSPNExportSettings::getWriteToPnmlFilename() const {
return this->getOption(writeToPnmlOptionName).getArgumentByName("filename").getValueAsString();
}
bool GSPNExportSettings::isWriteToPnproSet() const {
return this->getOption(writeToPnproOptionName).getHasOptionBeenSet();
}
std::string GSPNExportSettings::getWriteToPnproFilename() const {
return this->getOption(writeToPnproOptionName).getArgumentByName("filename").getValueAsString();
}
void GSPNExportSettings::finalize() { void GSPNExportSettings::finalize() {
} }

16
src/storm/settings/modules/GSPNExportSettings.h

@ -24,6 +24,20 @@ namespace storm {
*/ */
std::string getWriteToDotFilename() const; std::string getWriteToDotFilename() const;
bool isWriteToPnmlSet() const;
/**
*
*/
std::string getWriteToPnmlFilename() const;
bool isWriteToPnproSet() const;
/**
*
*/
std::string getWriteToPnproFilename() const;
bool check() const override; bool check() const override;
void finalize() override; void finalize() override;
@ -32,6 +46,8 @@ namespace storm {
private: private:
static const std::string writeToDotOptionName; static const std::string writeToDotOptionName;
static const std::string writeToPnmlOptionName;
static const std::string writeToPnproOptionName;
//static const std::string writeToDotOptionShortName; //static const std::string writeToDotOptionShortName;
}; };

2
src/storm/storage/dd/sylvan/InternalSylvanDdManager.cpp

@ -135,7 +135,7 @@ namespace storm {
return false; return false;
} }
void InternalDdManager<DdType::Sylvan>::allowDynamicReordering(bool value) {
void InternalDdManager<DdType::Sylvan>::allowDynamicReordering(bool) {
STORM_LOG_THROW(false, storm::exceptions::NotSupportedException, "Operation is not supported by sylvan."); STORM_LOG_THROW(false, storm::exceptions::NotSupportedException, "Operation is not supported by sylvan.");
} }

6
src/storm/storage/gspn/GspnBuilder.cpp

@ -56,7 +56,7 @@ namespace storm {
void GspnBuilder::addInputArc(std::string const& from, std::string const& to, uint64_t multiplicity) { void GspnBuilder::addInputArc(std::string const& from, std::string const& to, uint64_t multiplicity) {
STORM_LOG_THROW(placeNames.count(from) != 0, storm::exceptions::InvalidArgumentException, "Could not find a place with name '" << from << "'"); STORM_LOG_THROW(placeNames.count(from) != 0, storm::exceptions::InvalidArgumentException, "Could not find a place with name '" << from << "'");
STORM_LOG_THROW(transitionNames.count(to) != 0, storm::exceptions::InvalidArgumentException, "Could not find a transition with name << '" << to << "'"); STORM_LOG_THROW(transitionNames.count(to) != 0, storm::exceptions::InvalidArgumentException, "Could not find a transition with name << '" << to << "'");
addInputArc(placeNames.at(from), transitionNames.at(to));
addInputArc(placeNames.at(from), transitionNames.at(to), multiplicity);
} }
void GspnBuilder::addInhibitionArc(uint_fast64_t const& from, uint_fast64_t const& to, uint_fast64_t const& multiplicity) { void GspnBuilder::addInhibitionArc(uint_fast64_t const& from, uint_fast64_t const& to, uint_fast64_t const& multiplicity) {
@ -69,7 +69,7 @@ namespace storm {
void GspnBuilder::addInhibitionArc(std::string const& from, std::string const& to, uint64_t multiplicity) { void GspnBuilder::addInhibitionArc(std::string const& from, std::string const& to, uint64_t multiplicity) {
STORM_LOG_THROW(placeNames.count(from) != 0, storm::exceptions::InvalidArgumentException, "Could not find a place with name '" << from << "'"); STORM_LOG_THROW(placeNames.count(from) != 0, storm::exceptions::InvalidArgumentException, "Could not find a place with name '" << from << "'");
STORM_LOG_THROW(transitionNames.count(to) != 0, storm::exceptions::InvalidArgumentException, "Could not find a transition with name << '" << to << "'"); STORM_LOG_THROW(transitionNames.count(to) != 0, storm::exceptions::InvalidArgumentException, "Could not find a transition with name << '" << to << "'");
addInhibitionArc(placeNames.at(from), transitionNames.at(to));
addInhibitionArc(placeNames.at(from), transitionNames.at(to), multiplicity);
} }
void GspnBuilder::addOutputArc(uint_fast64_t const& from, uint_fast64_t const& to, uint_fast64_t const& multiplicity) { void GspnBuilder::addOutputArc(uint_fast64_t const& from, uint_fast64_t const& to, uint_fast64_t const& multiplicity) {
@ -81,7 +81,7 @@ namespace storm {
void GspnBuilder::addOutputArc(std::string const& from, std::string const& to, uint64_t multiplicity) { void GspnBuilder::addOutputArc(std::string const& from, std::string const& to, uint64_t multiplicity) {
STORM_LOG_THROW(placeNames.count(to) != 0, storm::exceptions::InvalidArgumentException, "Could not find a place with name '" << to << "'"); STORM_LOG_THROW(placeNames.count(to) != 0, storm::exceptions::InvalidArgumentException, "Could not find a place with name '" << to << "'");
STORM_LOG_THROW(transitionNames.count(from) != 0, storm::exceptions::InvalidArgumentException, "Could not find a transition with name << '" << from << "'"); STORM_LOG_THROW(transitionNames.count(from) != 0, storm::exceptions::InvalidArgumentException, "Could not find a transition with name << '" << from << "'");
addOutputArc(transitionNames.at(from), placeNames.at(to));
addOutputArc(transitionNames.at(from), placeNames.at(to), multiplicity);
} }
Transition& GspnBuilder::getTransition(uint64_t id) { Transition& GspnBuilder::getTransition(uint64_t id) {

2
src/storm/storage/jani/UnboundedIntegerVariable.cpp

@ -7,7 +7,7 @@ namespace storm {
// Intentionally left empty. // Intentionally left empty.
} }
UnboundedIntegerVariable::UnboundedIntegerVariable(std::string const& name, storm::expressions::Variable const& variable, bool transient) : Variable(name, variable) {
UnboundedIntegerVariable::UnboundedIntegerVariable(std::string const& name, storm::expressions::Variable const& variable) : Variable(name, variable) {
// Intentionally left empty. // Intentionally left empty.
} }

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

@ -10,7 +10,7 @@ namespace storm {
/*! /*!
* Creates an unbounded integer variable without initial value. * Creates an unbounded integer variable without initial value.
*/ */
UnboundedIntegerVariable(std::string const& name, storm::expressions::Variable const& variable, bool transient=false);
UnboundedIntegerVariable(std::string const& name, storm::expressions::Variable const& variable);
/*! /*!
* Creates an unbounded integer variable with initial value. * Creates an unbounded integer variable with initial value.
*/ */

Loading…
Cancel
Save