1#include "storm-config.h"
9TEST(MarkovAutomatonParserTest, NonExistingFile) {
13 STORM_TEST_RESOURCES_DIR
"/nonExistingFile.not", STORM_TEST_RESOURCES_DIR
"/nonExistingFile.not", STORM_TEST_RESOURCES_DIR
"/nonExistingFile.not"),
14 storm::exceptions::FileIoException);
17TEST(MarkovAutomatonParserTest, BasicParsing) {
20 STORM_TEST_RESOURCES_DIR
"/tra/ma_general.tra", STORM_TEST_RESOURCES_DIR
"/lab/ma_general.lab", STORM_TEST_RESOURCES_DIR
"/rew/ma_general.state.rew");
49 for (uint_fast64_t i = 0; i < result.
getRewardModel(
"").getStateRewardVector().size(); i++) {
52 ASSERT_EQ(1015.765099984, rewardSum);
59TEST(MarkovAutomatonParserTest, MismatchedFiles) {
64 STORM_TEST_RESOURCES_DIR
"/lab/ma_mismatched.lab"),
65 storm::exceptions::OutOfRangeException);
69 STORM_TEST_RESOURCES_DIR
"/lab/ma_general.lab",
70 STORM_TEST_RESOURCES_DIR
"/rew/ma_mismatched.state.rew"),
71 storm::exceptions::OutOfRangeException);
TEST(MarkovAutomatonParserTest, NonExistingFile)
std::size_t getNumberOfLabels() const
Returns the number of labels managed by this object.
This class represents a Markov automaton.
bool isMarkovianState(storm::storage::sparse::state_type state) const
Retrieves whether the given state is a Markovian state.
std::vector< ValueType > const & getExitRates() const
Retrieves the vector representing the exit rates of the states.
ValueType const & getExitRate(storm::storage::sparse::state_type state) const
Retrieves the exit rate of the given state.
std::set< std::string > getLabelsOfState(storm::storage::sparse::state_type state) const
Retrieves the set of labels attached to the given state.
virtual bool hasRewardModel(std::string const &rewardModelName) const override
Retrieves whether the model has a reward model with the given name.
storm::models::sparse::StateLabeling const & getStateLabeling() const
Returns the state labeling associated with this model.
virtual uint_fast64_t getNumberOfTransitions() const override
Returns the number of (non-zero) transitions of the model.
virtual uint_fast64_t getNumberOfStates() const override
Returns the number of states of the model.
RewardModelType const & getRewardModel(std::string const &rewardModelName) const
Retrieves the reward model with the given name, if one exists.
storm::storage::BitVector const & getInitialStates() const
Retrieves the initial states of the model.
uint_fast64_t getNumberOfChoices(uint_fast64_t state) const
storm::storage::BitVector const & getStates(std::string const &label) const
Returns the labeling of states associated with the given label.
Loads a labeled Markov automaton from files.
static storm::models::sparse::MarkovAutomaton< ValueType, storm::models::sparse::StandardRewardModel< RewardValueType > > parseMarkovAutomaton(std::string const &transitionsFilename, std::string const &labelingFilename, std::string const &stateRewardFilename="", std::string const &transitionRewardFilename="", std::string const &choiceLabelingFilename="")
Parses the given Markov automaton and returns an object representing the automaton.
uint_fast64_t getNumberOfSetBits() const
Returns the number of bits that are set to true in this bit vector.
#define STORM_SILENT_ASSERT_THROW(statement, expected_exception)