Browse Source

added SMG ModelType

tempestpy_adaptions
Stefan Pranger 4 years ago
parent
commit
55f4efd40a
  1. 6
      src/storm-parsers/parser/PrismParser.h
  2. 3
      src/storm/generator/NextStateGenerator.h
  3. 1
      src/storm/generator/PrismNextStateGenerator.cpp
  4. 1
      src/storm/storage/SymbolicModelDescription.cpp
  5. 2
      src/storm/storage/SymbolicModelDescription.h
  6. 2
      src/storm/storage/prism/Program.cpp
  7. 3
      src/storm/storage/prism/Program.h

6
src/storm-parsers/parser/PrismParser.h

@ -101,7 +101,8 @@ namespace storm {
("ctmdp", storm::prism::Program::ModelType::CTMDP)
("ma", storm::prism::Program::ModelType::MA)
("pomdp", storm::prism::Program::ModelType::POMDP)
("pta", storm::prism::Program::ModelType::PTA);
("pta", storm::prism::Program::ModelType::PTA)
("smg", storm::prism::Program::ModelType::SMG);
}
};
@ -131,7 +132,8 @@ namespace storm {
("init", 21)
("endinit", 22)
("invariant", 23)
("endinvariant", 24);
("endinvariant", 24)
("smg", 25);
}
};

3
src/storm/generator/NextStateGenerator.h

@ -30,7 +30,8 @@ namespace storm {
CTMC,
MDP,
MA,
POMDP
POMDP,
SMG
};
template<typename ValueType, typename StateType = uint32_t>

1
src/storm/generator/PrismNextStateGenerator.cpp

@ -127,6 +127,7 @@ namespace storm {
case storm::prism::Program::ModelType::MDP: return ModelType::MDP;
case storm::prism::Program::ModelType::MA: return ModelType::MA;
case storm::prism::Program::ModelType::POMDP: return ModelType::POMDP;
case storm::prism::Program::ModelType::SMG: return ModelType::SMG;
default:
STORM_LOG_THROW(false, storm::exceptions::WrongFormatException, "Invalid model type.");
}

1
src/storm/storage/SymbolicModelDescription.cpp

@ -65,6 +65,7 @@ namespace storm {
case storm::prism::Program::ModelType::MDP: return SymbolicModelDescription::ModelType::MDP;
case storm::prism::Program::ModelType::POMDP: return SymbolicModelDescription::ModelType::POMDP;
case storm::prism::Program::ModelType::MA: return SymbolicModelDescription::ModelType::MA;
case storm::prism::Program::ModelType::SMG: return SymbolicModelDescription::ModelType::SMG;
default:
STORM_LOG_THROW(false, storm::exceptions::InvalidTypeException, "Expected other PRISM model type.");
}

2
src/storm/storage/SymbolicModelDescription.h

@ -11,7 +11,7 @@ namespace storm {
class SymbolicModelDescription {
public:
enum class ModelType {
DTMC, CTMC, MDP, MA, POMDP
DTMC, CTMC, MDP, MA, POMDP, SMG
};
SymbolicModelDescription() = default;

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

@ -187,7 +187,7 @@ namespace storm {
}
bool Program::isDiscreteTimeModel() const {
return modelType == ModelType::DTMC || modelType == ModelType::MDP || modelType == ModelType::POMDP;
return modelType == ModelType::DTMC || modelType == ModelType::MDP || modelType == ModelType::POMDP || modelType == ModelType::SMG;
}
bool Program::isDeterministicModel() const {

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

@ -15,6 +15,7 @@
#include "storm/storage/prism/SystemCompositionConstruct.h"
#include "storm/storage/prism/InitialConstruct.h"
#include "storm/storage/prism/Composition.h"
#include "storm/storage/prism/Player.h"
#include "storm/storage/BoostTypes.h"
#include "storm/utility/solver.h"
#include "storm/utility/OsDetection.h"
@ -31,7 +32,7 @@ namespace storm {
/*!
* An enum for the different model types.
*/
enum class ModelType {UNDEFINED, DTMC, CTMC, MDP, CTMDP, MA, POMDP, PTA};
enum class ModelType {UNDEFINED, DTMC, CTMC, MDP, CTMDP, MA, POMDP, PTA, SMG};
enum class ValidityCheckLevel : unsigned {VALIDINPUT = 0, READYFORPROCESSING = 1};

Loading…
Cancel
Save