Browse Source

properties now hold information about shield query

main
Stefan Pranger 4 years ago
parent
commit
16fafbcfcc
  1. 9
      src/storm/storage/jani/Property.cpp
  2. 18
      src/storm/storage/jani/Property.h

9
src/storm/storage/jani/Property.cpp

@ -17,6 +17,11 @@ namespace storm {
// Intentionally left empty.
}
Property::Property(std::string const& name, std::shared_ptr<storm::logic::Formula const> const& formula, std::set<storm::expressions::Variable> const& undefinedConstants, storm::logic::ShieldExpression shieldExpression, std::string const& comment)
: name(name), comment(comment), filterExpression(FilterExpression(formula)), undefinedConstants(undefinedConstants), shieldingExpression(shieldingExpression) {
// Intentionally left empty.
}
std::string const& Property::getName() const {
return this->name;
}
@ -86,6 +91,10 @@ namespace storm {
return this->filterExpression.getFormula();
}
bool Property::isShieldingProperty() const {
return shieldingExpression.is_initialized();
}
std::set<storm::expressions::Variable> const& Property::getUndefinedConstants() const {
return undefinedConstants;
}

18
src/storm/storage/jani/Property.h

@ -2,10 +2,13 @@
#include <functional>
#include <boost/optional.hpp>
#include "storm/modelchecker/results/FilterType.h"
#include "storm/logic/Formulas.h"
#include "storm/logic/FragmentSpecification.h"
#include "storm/logic/CloneVisitor.h"
#include "storm/logic/ShieldExpression.h"
#include "storm/utility/macros.h"
#include "storm/exceptions/InvalidArgumentException.h"
@ -111,6 +114,15 @@ namespace storm {
*/
Property(std::string const& name, FilterExpression const& fe, std::set<storm::expressions::Variable> const& undefinedConstants, std::string const& comment = "");
/**
* Constructs the property
* @param name the name
* @param formula the formula representation
* @param shieldExpression the shielding expression
* @param comment An optional comment
*/
Property(std::string const& name, std::shared_ptr<storm::logic::Formula const> const& formula, std::set<storm::expressions::Variable> const& undefinedConstants, storm::logic::ShieldExpression shieldExpression, std::string const& comment = "");
/**
* Get the provided name
* @return the name
@ -141,15 +153,19 @@ namespace storm {
std::shared_ptr<storm::logic::Formula const> getRawFormula() const;
bool isShieldingProperty() const;
private:
std::string name;
std::string comment;
FilterExpression filterExpression;
std::set<storm::expressions::Variable> undefinedConstants;
// TODO might need refactoring, this cannot be expressed by JANI yet, so this is totally wrong here.
boost::optional<storm::logic::ShieldExpression> shieldingExpression;
};
std::ostream& operator<<(std::ostream& os, Property const& p);
}
}
Loading…
Cancel
Save