for (auto const& s : mc_model_checker->getChecker()->getTextualTrace())
XBT_INFO(" %s", s.c_str());
simgrid::mc::dumpRecordPath();
- simgrid::mc::session->logState();
+ simgrid::mc::session->log_state();
XBT_INFO("Stack trace:");
mc_model_checker->process().dumpStack();
}
for (auto const& s : mc_model_checker->getChecker()->getTextualTrace())
XBT_INFO(" %s", s.c_str());
simgrid::mc::dumpRecordPath();
- simgrid::mc::session->logState();
+ simgrid::mc::session->log_state();
}
bool ModelChecker::handle_message(char* buffer, ssize_t size)
#else
process->privatized(false);
#endif
- modelChecker_.reset(new simgrid::mc::ModelChecker(std::move(process)));
+ model_checker_.reset(new simgrid::mc::ModelChecker(std::move(process)));
xbt_assert(mc_model_checker == nullptr);
- mc_model_checker = modelChecker_.get();
+ mc_model_checker = model_checker_.get();
mc_model_checker->start();
}
void Session::initialize()
{
- xbt_assert(initialSnapshot_ == nullptr);
+ xbt_assert(initial_snapshot_ == nullptr);
mc_model_checker->wait_for_requests();
- initialSnapshot_ = simgrid::mc::take_snapshot(0);
+ initial_snapshot_ = simgrid::mc::take_snapshot(0);
}
void Session::execute(Transition const& transition)
{
- modelChecker_->handle_simcall(transition);
- modelChecker_->wait_for_requests();
+ model_checker_->handle_simcall(transition);
+ model_checker_->wait_for_requests();
}
-void Session::restoreInitialState()
+void Session::restore_initial_state()
{
- this->initialSnapshot_->restore(&mc_model_checker->process());
+ this->initial_snapshot_->restore(&mc_model_checker->process());
}
-void Session::logState()
+void Session::log_state()
{
mc_model_checker->getChecker()->logState();
void Session::close()
{
- initialSnapshot_ = nullptr;
- if (modelChecker_) {
- modelChecker_->shutdown();
- modelChecker_ = nullptr;
+ initial_snapshot_ = nullptr;
+ if (model_checker_) {
+ model_checker_->shutdown();
+ model_checker_ = nullptr;
mc_model_checker = nullptr;
}
}
*/
class Session {
private:
- std::unique_ptr<ModelChecker> modelChecker_;
- std::shared_ptr<simgrid::mc::Snapshot> initialSnapshot_;
+ std::unique_ptr<ModelChecker> model_checker_;
+ std::shared_ptr<simgrid::mc::Snapshot> initial_snapshot_;
Session(pid_t pid, int socket);
void initialize();
void execute(Transition const& transition);
- void logState();
+ void log_state();
- void restoreInitialState();
+ void restore_initial_state();
// static constructors
XBT_INFO("%s", this->send_diff);
xbt_free(this->send_diff);
this->send_diff = nullptr;
- simgrid::mc::session->logState();
+ simgrid::mc::session->log_state();
mc_model_checker->exit(SIMGRID_MC_EXIT_NON_DETERMINISM);
} else if (_sg_mc_comms_determinism && (not this->send_deterministic && not this->recv_deterministic)) {
XBT_INFO("****************************************************");
this->send_diff = nullptr;
xbt_free(this->recv_diff);
this->recv_diff = nullptr;
- simgrid::mc::session->logState();
+ simgrid::mc::session->log_state();
mc_model_checker->exit(SIMGRID_MC_EXIT_NON_DETERMINISM);
}
}
}
/* Restore the initial state */
- simgrid::mc::session->restoreInitialState();
+ simgrid::mc::session->restore_initial_state();
unsigned n = MC_smx_get_maxpid();
assert(n == incomplete_communications_pattern.size());
}
}
- simgrid::mc::session->logState();
+ simgrid::mc::session->log_state();
}
void CommunicationDeterminismChecker::run()
}
/* Restore the initial state */
- simgrid::mc::session->restoreInitialState();
+ simgrid::mc::session->restore_initial_state();
/* Traverse the stack from the initial state and re-execute the transitions */
int depth = 1;
for (auto const& s : this->getTextualTrace())
XBT_INFO(" %s", s.c_str());
simgrid::mc::dumpRecordPath();
- simgrid::mc::session->logState();
+ simgrid::mc::session->log_state();
XBT_INFO("Counter-example depth: %zu", depth);
}
}
XBT_INFO("No property violation found.");
- simgrid::mc::session->logState();
+ simgrid::mc::session->log_state();
}
Checker* createLivenessChecker(Session& s)
for (auto const& s : mc_model_checker->getChecker()->getTextualTrace())
XBT_INFO(" %s", s.c_str());
simgrid::mc::dumpRecordPath();
- simgrid::mc::session->logState();
+ simgrid::mc::session->log_state();
throw simgrid::mc::TerminationError();
}
}
XBT_INFO("No property violation found.");
- simgrid::mc::session->logState();
+ simgrid::mc::session->log_state();
}
void SafetyChecker::backtrack()
}
/* Restore the initial state */
- simgrid::mc::session->restoreInitialState();
+ simgrid::mc::session->restore_initial_state();
/* Traverse the stack from the state at position start and re-execute the transitions */
for (std::unique_ptr<simgrid::mc::State> const& state : stack_) {
for (auto const& s : mc_model_checker->getChecker()->getTextualTrace())
XBT_INFO(" %s", s.c_str());
simgrid::mc::dumpRecordPath();
- simgrid::mc::session->logState();
+ simgrid::mc::session->log_state();
}
void MC_automaton_load(const char *file)