Browse Source

add some trace messages

Former-commit-id: 345e378eaf [formerly 46bc454995]
Former-commit-id: d7ebfccc6d
main
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() { void processOptions() {
STORM_LOG_TRACE("Processing options.");
if (storm::settings::getModule<storm::settings::modules::DebugSettings>().isLogfileSet()) { if (storm::settings::getModule<storm::settings::modules::DebugSettings>().isLogfileSet()) {
storm::utility::initializeFileLogging(); storm::utility::initializeFileLogging();
} }
@ -216,6 +217,7 @@ namespace storm {
storm::storage::SymbolicModelDescription model; storm::storage::SymbolicModelDescription model;
std::vector<storm::jani::Property> properties; std::vector<storm::jani::Property> properties;
STORM_LOG_TRACE("Parsing symbolic input.");
if (ioSettings.isPrismInputSet()) { if (ioSettings.isPrismInputSet()) {
model = storm::parseProgram(ioSettings.getPrismInputFilename()); model = storm::parseProgram(ioSettings.getPrismInputFilename());
if (ioSettings.isPrismToJaniSet()) { 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. // 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; uint64_t i = 0;
if (storm::settings::getModule<storm::settings::modules::GeneralSettings>().isPropertySet()) { if (storm::settings::getModule<storm::settings::modules::GeneralSettings>().isPropertySet()) {
if (model.isJaniModel()) { if (model.isJaniModel()) {
@ -250,6 +253,7 @@ namespace storm {
} }
if (model.isJaniModel() && storm::settings::getModule<storm::settings::modules::JaniExportSettings>().isJaniFileSet()) { 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()) { if (storm::settings::getModule<storm::settings::modules::JaniExportSettings>().isExportAsStandardJaniSet()) {
storm::jani::Model normalisedModel = storm::jani::Model(model.asJaniModel()); storm::jani::Model normalisedModel = storm::jani::Model(model.asJaniModel());
normalisedModel.makeStandardJaniCompliant(); normalisedModel.makeStandardJaniCompliant();
@ -267,6 +271,7 @@ namespace storm {
std::string constantDefinitionString = ioSettings.getConstantDefinitionString(); std::string constantDefinitionString = ioSettings.getConstantDefinitionString();
model = model.preprocess(constantDefinitionString); model = model.preprocess(constantDefinitionString);
STORM_LOG_TRACE("Building and checking symbolic model.");
if (storm::settings::getModule<storm::settings::modules::GeneralSettings>().isParametricSet()) { if (storm::settings::getModule<storm::settings::modules::GeneralSettings>().isParametricSet()) {
#ifdef STORM_HAVE_CARL #ifdef STORM_HAVE_CARL
buildAndCheckSymbolicModel<storm::RationalFunction>(model, properties, true); buildAndCheckSymbolicModel<storm::RationalFunction>(model, properties, true);

12
src/cli/entrypoints.h

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

Loading…
Cancel
Save