* We do so iteratively instead of recursively, dealing with the call stack manually.
* This allows to explore the call stack at wish. */
* We do so iteratively instead of recursively, dealing with the call stack manually.
* This allows to explore the call stack at wish. */
std::unique_ptr<simgrid::mc::State> next_state =
std::unique_ptr<simgrid::mc::State>(new simgrid::mc::State(++expandedStatesCount_));
std::unique_ptr<simgrid::mc::State> next_state =
std::unique_ptr<simgrid::mc::State>(new simgrid::mc::State(++expandedStatesCount_));
this->checkNonTermination(next_state.get());
/* Check whether we already explored next_state in the past (but only if interested in state-equality reduction) */
this->checkNonTermination(next_state.get());
/* Check whether we already explored next_state in the past (but only if interested in state-equality reduction) */
visitedState_ = visitedStates_.addVisitedState(expandedStatesCount_, next_state.get(), true);
/* If this is a new state (or if we don't care about state-equality reduction) */
visitedState_ = visitedStates_.addVisitedState(expandedStatesCount_, next_state.get(), true);
/* If this is a new state (or if we don't care about state-equality reduction) */
executed before it. If it does then add it to the interleave set of the
state that executed that previous request. */
executed before it. If it does then add it to the interleave set of the
state that executed that previous request. */
std::unique_ptr<simgrid::mc::State> state = std::move(stack_.back());
stack_.pop_back();
if (reductionMode_ == simgrid::mc::ReductionMode::dpor) {
smx_simcall_t req = &state->internal_req;
if (req->call == SIMCALL_MUTEX_LOCK || req->call == SIMCALL_MUTEX_TRYLOCK)
std::unique_ptr<simgrid::mc::State> state = std::move(stack_.back());
stack_.pop_back();
if (reductionMode_ == simgrid::mc::ReductionMode::dpor) {
smx_simcall_t req = &state->internal_req;
if (req->call == SIMCALL_MUTEX_LOCK || req->call == SIMCALL_MUTEX_TRYLOCK)
const smx_actor_t issuer = MC_smx_simcall_get_issuer(req);
for (auto i = stack_.rbegin(); i != stack_.rend(); ++i) {
simgrid::mc::State* prev_state = i->get();
const smx_actor_t issuer = MC_smx_simcall_get_issuer(req);
for (auto i = stack_.rbegin(); i != stack_.rend(); ++i) {
simgrid::mc::State* prev_state = i->get();
prev_state->interleave(issuer);
else
XBT_DEBUG("Process %p is in done set", req->issuer);
prev_state->interleave(issuer);
else
XBT_DEBUG("Process %p is in done set", req->issuer);
- XBT_DEBUG("Simcall %d, process %lu (state %d) and simcall %d, process %lu (state %d) are independant",
+ XBT_DEBUG("Simcall %d, process %lu (state %d) and simcall %d, process %lu (state %d) are independent",
req->call, issuer->pid, state->num,
prev_state->internal_req.call,
previous_issuer->pid,
req->call, issuer->pid, state->num,
prev_state->internal_req.call,
previous_issuer->pid,
- XBT_INFO("Check a safety property");
+ XBT_INFO("Check a safety property. Reduction is: %s.",
+ (reductionMode_ == simgrid::mc::ReductionMode::none ? "none":
+ (reductionMode_ == simgrid::mc::ReductionMode::dpor ? "dpor": "unknown")));