- First one concerning the MappedFileTest in which I neglected to consider that the number of characters used to signal a new line differs between Linux (\n -> 1) and Windows (\r\n -> 2) which caused the test to fail on all OS using two characters (hence not on Linux, where I ran the tests).
- Second bug concerned the case that a transition reward file contained more states than the corresponding transition file.
In that case the parser tried to acces the entry of the rowGroupIndices vector behind the last actual entry, which caused an exception to be thrown.
Now there is a check whether the highest state index found by the parser does exceed the highest state index of the model.
Former-commit-id: bc83267f3c
- Fixed comments.
- It seems to be ASSERT_EQ(expected, actual);
|-> Switched arguments of nearly all ASSERT_EQs to correctly use this macro in the parser tests.
Former-commit-id: e5059709f2
- Some renaming (among others unmatched -> mismatched).
- Added checks and tests for doubled or skipped lines as well as lines concerning the same transition.
Next up: Remerge.)
Former-commit-id: 05efcbf91c
- Done with the tests. At least for now.
|- There are tests for all parsers and helper classes now.
Next up: Some minor fixes and finally the merge.
Former-commit-id: ebb2ea50d5
- Eliminated the need for SupportedLineEndings (I hope...should work on all os, but have only tested this on linux)
- Moved fileExistsAndIsReadable to MappedFile
- Removed scanForModelHint and replaced it with its contents at the one point where is was used in the AutoParser
- Moved and renamed remaining part of Parser.cpp/.h to src/utility/cstring.cpp/.h
|- New namespace of the cstring manipulation functions is storm::utility::cstring
|- Used a using namespace storm::utility::cstring to eliminate the full namespace specification within the needing parsers. This keeps the code readable.
- Threw out some unnessesary includes.
Next up: Commenting and making things look nice.
Former-commit-id: c983d1e1a2
- Removed the RewardMatrixInformationStruct since it was only used as function argument.
|- Replaced its function by the respective results of the transition parser (for det/non-det)
- Moved the MappedFile class to separate file.
- Renamed the SupportedFileEndingsEnum enum to SupportedFileEndings.
- Whats left in Parser.*:
|- A bunch of free functions for manipulation of c-style strings, a function to read the model hint and the SupportedFileEndings enum with its recognition function.
Im not exactly sure what to do with this.
- I think the name Parser.* implies a parser base class, while it is not. Therefore: Renaming.
- The c-style string manipulation functions might also needed elsewhere. Therefore: Moving them into the utility folder/namespace.
- The model hint function would fit in the AutoParser, except for its signature (low level arguments vs. high level arguments of the AutoParser). Therefore: Either moving it to the Auto Parser or leave it as helper function with the others (c-style string handling and low level OS detection)
- The SupportedLineEndings and its assorted functions either belong to the string manipulation functions or to the MappedFile class. Therefor: Moving them accordingly.
- Once all things have moved the Parser.* will be empty. Therefore: Deletion.
Next up: Trying to decide what to do with the rest of the Parser.* and doing it.
Former-commit-id: aa7417e5e1
-Changed structure to conform to common parser structure: static class with two passes and structs to handle value passing.
-Killed all warnings (signed unsigned interger compare)
-Made parser more flexible: Is now able to ignore arbitrarily many columns after the value column (instead of only one).
-Threw out a number of unnecessary includes.
-more...
Next up: Refactor NondeterministicModelParser.h/.cpp
Former-commit-id: fd2fdb7fdf
the first run checks the syntax and calculates
* overall number of nondeterministic choices, i.e. number of rows
* overall number of transitions, i.e. nonzero elements
* maximum node id, i.e. number of columns
Markt und Straßen stehn verlassen,
still erleuchtet jedes Haus,
Sinnend' geh ich durch die Gassen,
alles sieht so festlich aus.
An den Fenstern haben Frauen
buntes Spielzeug fromm geschmückt,
Tausend Kindlein stehn und schauen,
sind so wunderstill beglückt.
Und ich wandre aus den Mauern
Bis hinaus ins freie Feld,
Hehres Glänzen, heil'ges Schauern!
Wie so weit und still die Welt!
Sterne hoch die Kreise schlingen,
Aus des Schnees Einsamkeit
Steigt's wie wunderbares Singen-
O du gnadenreiche Zeit!
Merry Christmas commit ;)
This parser shall parse transition systems having transitions of the form
<from> <choice> <to> <probability>
Where every node <from> can first decide nondeterministically on a <choice>.
Then, for every <choice> he has a given set of nodes <to> with assigned <probability>.
While the parsing itself works and the number of non-zero non-diagonal entries for each choice class works, we have not decided on the exact way to store such transition systems in matrices...