-/* Copyright (c) 2016-2019. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2016-2020. The SimGrid Team. All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
namespace simgrid {
namespace mc {
-void SafetyChecker::check_non_termination(State* current_state)
+void SafetyChecker::check_non_termination(const State* current_state)
{
for (auto state = stack_.rbegin(); state != stack_.rend(); ++state)
if (snapshot_equal((*state)->system_state_.get(), current_state->system_state_.get())) {
if (req->call_ == SIMCALL_MUTEX_LOCK || req->call_ == SIMCALL_MUTEX_TRYLOCK)
xbt_die("Mutex is currently not supported with DPOR, use --cfg=model-check/reduction:none");
- const smx_actor_t issuer = MC_smx_simcall_get_issuer(req);
+ const kernel::actor::ActorImpl* issuer = MC_smx_simcall_get_issuer(req);
for (auto i = stack_.rbegin(); i != stack_.rend(); ++i) {
State* prev_state = i->get();
if (request_depend(req, &prev_state->internal_req_)) {
SIMIX_simcall_name(prev_state->internal_req_.call_));
break;
} else {
- const smx_actor_t previous_issuer = MC_smx_simcall_get_issuer(&prev_state->internal_req_);
+ const kernel::actor::ActorImpl* previous_issuer = MC_smx_simcall_get_issuer(&prev_state->internal_req_);
XBT_DEBUG("Simcall %s, process %ld (state %d) and simcall %s, process %ld (state %d) are independent",
SIMIX_simcall_name(req->call_), issuer->get_pid(), state->num_,
SIMIX_simcall_name(prev_state->internal_req_.call_), previous_issuer->get_pid(), prev_state->num_);
void SafetyChecker::restore_state()
{
/* Intermediate backtracking */
- State* last_state = stack_.back().get();
+ const State* last_state = stack_.back().get();
if (last_state->system_state_) {
last_state->system_state_->restore(&mc_model_checker->process());
return;