Browse Source

add some trace messages

Former-commit-id: 345e378eaf [formerly 46bc454995]
Former-commit-id: d7ebfccc6d
tempestpy_adaptions
dehnert 8 years ago
parent
commit
5a793839e9
  1. 5
      src/cli/cli.cpp
  2. 12
      src/cli/entrypoints.h

5
src/cli/cli.cpp

@ -207,6 +207,7 @@ namespace storm {
}
void processOptions() {
STORM_LOG_TRACE("Processing options.");
if (storm::settings::getModule<storm::settings::modules::DebugSettings>().isLogfileSet()) {
storm::utility::initializeFileLogging();
}
@ -216,6 +217,7 @@ namespace storm {
storm::storage::SymbolicModelDescription model;
std::vector<storm::jani::Property> properties;
STORM_LOG_TRACE("Parsing symbolic input.");
if (ioSettings.isPrismInputSet()) {
model = storm::parseProgram(ioSettings.getPrismInputFilename());
if (ioSettings.isPrismToJaniSet()) {
@ -234,6 +236,7 @@ namespace storm {
}
// Then proceed to parsing the properties (if given), since the model we are building may depend on the property.
STORM_LOG_TRACE("Parsing properties.");
uint64_t i = 0;
if (storm::settings::getModule<storm::settings::modules::GeneralSettings>().isPropertySet()) {
if (model.isJaniModel()) {
@ -250,6 +253,7 @@ namespace storm {
}
if (model.isJaniModel() && storm::settings::getModule<storm::settings::modules::JaniExportSettings>().isJaniFileSet()) {
STORM_LOG_TRACE("Exporting JANI model.");
if (storm::settings::getModule<storm::settings::modules::JaniExportSettings>().isExportAsStandardJaniSet()) {
storm::jani::Model normalisedModel = storm::jani::Model(model.asJaniModel());
normalisedModel.makeStandardJaniCompliant();
@ -267,6 +271,7 @@ namespace storm {
std::string constantDefinitionString = ioSettings.getConstantDefinitionString();
model = model.preprocess(constantDefinitionString);
STORM_LOG_TRACE("Building and checking symbolic model.");
if (storm::settings::getModule<storm::settings::modules::GeneralSettings>().isParametricSet()) {
#ifdef STORM_HAVE_CARL
buildAndCheckSymbolicModel<storm::RationalFunction>(model, properties, true);

12
src/cli/entrypoints.h

@ -124,30 +124,30 @@ namespace storm {
for (auto const& property : formulas) {
std::cout << std::endl << "Model checking property: " << property << " ...";
bool supportFormula;
bool formulaSupported = false;
std::unique_ptr<storm::modelchecker::CheckResult> result;
if (program.getModelType() == storm::prism::Program::ModelType::DTMC) {
storm::modelchecker::SparseExplorationModelChecker<storm::models::sparse::Dtmc<ValueType>> checker(program);
storm::modelchecker::CheckTask<storm::logic::Formula> task(*property.getFilter().getFormula(), onlyInitialStatesRelevant);
supportFormula = checker.canHandle(task);
if (supportFormula) {
formulaSupported = checker.canHandle(task);
if (formulaSupported) {
result = checker.check(task);
}
} else if (program.getModelType() == storm::prism::Program::ModelType::MDP) {
storm::modelchecker::SparseExplorationModelChecker<storm::models::sparse::Mdp<ValueType>> checker(program);
storm::modelchecker::CheckTask<storm::logic::Formula> task(*property.getFilter().getFormula(), onlyInitialStatesRelevant);
supportFormula = checker.canHandle(task);
if (supportFormula) {
formulaSupported = checker.canHandle(task);
if (formulaSupported) {
result = checker.check(task);
}
} else {
// Should be catched before.
assert(false);
}
if(!supportFormula) {
if (!formulaSupported) {
std::cout << " skipped, because the formula cannot be handled by the selected engine/method." << std::endl;
}

Loading…
Cancel
Save