diff --git a/src/storm/logic/ShieldExpression.cpp b/src/storm/logic/ShieldExpression.cpp new file mode 100644 index 000000000..2959cfd0d --- /dev/null +++ b/src/storm/logic/ShieldExpression.cpp @@ -0,0 +1,31 @@ +#include "storm/logic/ShieldExpression.h" + +namespace storm { + namespace logic { + ShieldExpression::ShieldExpression() {} + + ShieldExpression::ShieldExpression(ShieldingType type, ShieldComparison comparison, double value) : type(type), comparison(comparison), value(value) { + //Intentionally left empty + } + + bool ShieldExpression::isRelative() const { + return comparison == storm::logic::ShieldComparison::Relative; + } + + bool ShieldExpression::isPreSafetyShield() const { + return type == storm::logic::ShieldingType::PreSafety; + } + + bool ShieldExpression::isPostSafetyShield() const { + return type == storm::logic::ShieldingType::PostSafety; + } + + bool ShieldExpression::isOptiomalShield() const { + return type == storm::logic::ShieldingType::Optimal; + } + + double ShieldExpression::getValue() const { + return value; + } + } +} diff --git a/src/storm/logic/ShieldExpression.h b/src/storm/logic/ShieldExpression.h new file mode 100644 index 000000000..9305a2f1f --- /dev/null +++ b/src/storm/logic/ShieldExpression.h @@ -0,0 +1,34 @@ +#pragma once + +#include + +namespace storm { + namespace logic { + + enum class ShieldingType { + PostSafety, + PreSafety, + Optimal + }; + + enum class ShieldComparison { Absolute, Relative }; + + class ShieldExpression { + public: + ShieldExpression(); + ShieldExpression(ShieldingType type, ShieldComparison comparison, double value); + + bool isRelative() const; + bool isPreSafetyShield() const; + bool isPostSafetyShield() const; + bool isOptiomalShield() const; + + double getValue() const; + + private: + ShieldingType type; + ShieldComparison comparison; + double value; + }; + } +}