Storm 1.14.0.1
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
HOAParsingTest.cpp
Go to the documentation of this file.
1#include "storm-config.h"
2#include "test/storm_gtest.h"
3
4#include <sstream>
5#include <string>
6
8
9TEST(DeterministicAutomaton, ParseAutomaton) {
10#if !defined(STORM_HAVE_Z3) && !defined(STORM_HAVE_MATHSAT) && !defined(STORM_HAVE_CVC5)
11 GTEST_SKIP() << "Parsing this HOA automaton requires an SMT solver.";
12#endif
13 std::string aUb =
14 "HOA: v1\n"
15 "States: 3\n"
16 "Start: 0\n"
17 "acc-name: Rabin 1\n"
18 "Acceptance: 2 (Fin(0) & Inf(1))\n"
19 "AP: 2 \"a\" \"b\""
20 "--BODY--\n"
21 "State: 0 \"a U b\" { 0 }\n"
22 " 2 /* !a & !b */\n"
23 " 0 /* a & !b */\n"
24 " 1 /* !a & b */\n"
25 " 1 /* a & b */\n"
26 "State: 1 { 1 }\n"
27 " 1 1 1 1 /* four transitions on one line */\n"
28 "State: 2 \"sink state\" { 0 }\n"
29 " 2 2 2 2\n"
30 "--END--\n";
31
32 std::istringstream in = std::istringstream(aUb);
34 ASSERT_NO_THROW(da = storm::automata::DeterministicAutomaton::parse(in));
35 // da->printHOA(std::cout);
36}
TEST(DeterministicAutomaton, ParseAutomaton)
std::shared_ptr< DeterministicAutomaton > ptr
static DeterministicAutomaton::ptr parse(std::istream &in)