Browse Source

Minor improvements

Former-commit-id: 63dfd49048
tempestpy_adaptions
Mavo 9 years ago
parent
commit
4c09f9ce29
  1. 12
      src/parser/DFTGalileoParser.cpp
  2. 2
      src/solver/Z3SmtSolver.cpp
  3. 1
      src/storm-dyftee.cpp

12
src/parser/DFTGalileoParser.cpp

@ -41,7 +41,7 @@ namespace storm {
template<typename ValueType>
bool DFTGalileoParser<ValueType>::readFile(const std::string& filename) {
// constants
std::string topleveltoken = "toplevel";
std::string toplevelToken = "toplevel";
std::string toplevelId;
std::ifstream file;
@ -57,23 +57,21 @@ namespace storm {
std::string line;
bool generalSuccess = true;
while(std::getline(file, line))
{
while(std::getline(file, line)) {
bool success = true;
STORM_LOG_TRACE("Parsing: " << line);
size_t commentstarts = line.find("//");
line = line.substr(0, commentstarts);
size_t firstsemicolon = line.find(";");
line = line.substr(0, firstsemicolon);
if (line.find_first_not_of(' ') == std::string::npos)
{
if (line.find_first_not_of(' ') == std::string::npos) {
// Only whitespace
continue;
}
// Top level indicator.
if(boost::starts_with(line, topleveltoken)) {
toplevelId = stripQuotsFromName(line.substr(topleveltoken.size() + 1));
if(boost::starts_with(line, toplevelToken)) {
toplevelId = stripQuotsFromName(line.substr(toplevelToken.size() + 1));
}
else
{

2
src/solver/Z3SmtSolver.cpp

@ -323,7 +323,7 @@ namespace storm {
std::vector<storm::expressions::Expression> Z3SmtSolver::getUnsatAssumptions() {
#ifdef STORM_HAVE_Z3
STORM_LOG_THROW(lastResult == SmtSolver::CheckResult::Unsat, storm::exceptions::InvalidStateException, "Unable to generate unsatisfiable core of assumptions, because the last check did not determine the formulas to be unsatisfiable.")
STORM_LOG_THROW(lastResult == SmtSolver::CheckResult::Unsat, storm::exceptions::InvalidStateException, "Unable to generate unsatisfiable core of assumptions, because the last check did not determine the formulas to be unsatisfiable.");
STORM_LOG_THROW(lastCheckAssumptions, storm::exceptions::InvalidStateException, "Unable to generate unsatisfiable core of assumptions, because the last check did not involve assumptions.");
z3::expr_vector z3UnsatAssumptions = this->solver->unsat_core();

1
src/storm-dyftee.cpp

@ -13,6 +13,7 @@
int main(int argc, char** argv) {
if(argc < 2) {
std::cout << "Storm-DyFTeE should be called with a filename as argument." << std::endl;
return 1;
}
storm::utility::setUp();

Loading…
Cancel
Save