Storm
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
jani.cpp
Go to the documentation of this file.
2
3#include <boost/algorithm/string.hpp>
4
7
10
11namespace storm {
12namespace utility {
13namespace jani {
14
16 if (model.hasUndefinedConstants()) {
17 std::vector<std::reference_wrapper<storm::jani::Constant const>> undefinedConstants = model.getUndefinedConstants();
18 std::stringstream stream;
19 bool printComma = false;
20 for (auto const& constant : undefinedConstants) {
21 if (printComma) {
22 stream << ", ";
23 } else {
24 printComma = true;
25 }
26 stream << constant.get().getName() << " (" << constant.get().getType() << ")";
27 }
28 stream << ".";
29 STORM_LOG_THROW(false, storm::exceptions::InvalidArgumentException, "Model still contains these undefined constants: " + stream.str());
30 }
31}
32} // namespace jani
33} // namespace utility
34} // namespace storm
bool hasUndefinedConstants() const
Retrieves whether the model still has undefined constants.
Definition Model.cpp:1083
std::vector< std::reference_wrapper< Constant const > > getUndefinedConstants() const
Retrieves all undefined constants of the model.
Definition Model.cpp:1092
#define STORM_LOG_THROW(cond, exception, message)
Definition macros.h:30
void requireNoUndefinedConstants(storm::jani::Model const &model)
Definition jani.cpp:15
LabParser.cpp.
Definition cli.cpp:18