1#include "storm-config.h"
11TEST(SparseItemLabelingParserTest, NonExistingFile) {
14 storm::exceptions::FileIoException);
17TEST(SparseItemLabelingParserTest, BasicDeterministicParsing) {
26 char phi[] =
"phi", psi[] =
"psi", smth[] =
"smth";
77TEST(SparseItemLabelingParserTest, BasicNondeterministicParsing) {
78 std::vector<uint_fast64_t> choiceIndices{0, 3, 5, 6, 9, 11};
104TEST(SparseItemLabelingParserTest, NoDeclarationTagHeader) {
107 storm::exceptions::WrongFormatException);
110TEST(SparseItemLabelingParserTest, NoEndTagHeader) {
113 storm::exceptions::WrongFormatException);
116TEST(SparseItemLabelingParserTest, MisspelledDeclarationTagHeader) {
120 storm::exceptions::WrongFormatException);
123TEST(SparseItemLabelingParserTest, MisspelledEndTagHeader) {
126 storm::exceptions::WrongFormatException);
129TEST(SparseItemLabelingParserTest, NoLabelDeclaredNoneGiven) {
134 for (uint_fast64_t i = 0; i < 13; i++) {
139TEST(SparseItemLabelingParserTest, UndeclaredLabelsGiven) {
143 storm::exceptions::WrongFormatException);
146TEST(SparseItemLabelingParserTest, LabelForNonExistentState) {
150 storm::exceptions::OutOfRangeException);
155TEST(SparseItemLabelingParserTest, DoubledLines) {
158 storm::exceptions::WrongFormatException);
163 storm::exceptions::WrongFormatException);
166TEST(SparseItemLabelingParserTest, WrongProposition) {
170 storm::exceptions::WrongFormatException);
173TEST(SparseItemLabelingParserTest, Whitespaces) {
183 ASSERT_TRUE(labeling == labeling2);
TEST(SparseItemLabelingParserTest, NonExistingFile)
This class manages the labeling of the choice space with a number of (atomic) labels.
storm::storage::BitVector const & getChoices(std::string const &label) const
Returns the labeling of choices associated with the given label.
bool getChoiceHasLabel(std::string const &label, uint64_t choice) const
Checks whether a given choice is labeled with the given label.
bool containsLabel(std::string const &label) const
Checks whether a label is registered within this labeling.
std::size_t getNumberOfLabels() const
Returns the number of labels managed by this object.
This class manages the labeling of the state space with a number of (atomic) labels.
bool getStateHasLabel(std::string const &label, storm::storage::sparse::state_type state) const
Checks whether a given state is labeled with the given label.
std::set< std::string > getLabelsOfState(storm::storage::sparse::state_type state) const
Retrieves the set of labels attached to the given state.
static storm::models::sparse::ChoiceLabeling parseChoiceLabeling(uint_fast64_t choiceCount, std::string const &filename, boost::optional< std::vector< uint_fast64_t > > const &nondeterministicChoiceIndices=boost::none)
Parses the given file and returns the resulting choice labeling.
static storm::models::sparse::StateLabeling parseAtomicPropositionLabeling(uint_fast64_t stateCount, std::string const &filename)
Parses the given file and returns the resulting state labeling.
bool empty() const
Retrieves whether no bits are set to true in this bit vector.
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)