#include "src/mc/Checker.hpp"
#include "src/mc/SafetyChecker.hpp"
#include "src/mc/VisitedState.hpp"
+#include "src/mc/Transition.hpp"
#include "src/xbt/mmalloc/mmprivate.h"
{
std::vector<std::string> trace;
for (auto const& state : stack_) {
- int value = state->req_num;
+ int value = state->transition.argument;
smx_simcall_t req = &state->executed_req;
if (req)
trace.push_back(simgrid::mc::request_to_string(
{
this->init();
- int value;
-
while (!stack_.empty()) {
/* Get current state */
// let's back-track.
smx_simcall_t req = nullptr;
if (stack_.size() > (std::size_t) _sg_mc_max_depth
- || (req = MC_state_get_request(state, &value)) == nullptr
+ || (req = MC_state_get_request(state)) == nullptr
|| visitedState_ != nullptr) {
int res = this->backtrack();
if (res)
continue;
}
+ int req_num = state->transition.argument;
+
// If there are processes to interleave and the maximum depth has not been
// reached then perform one step of the exploration algorithm.
XBT_DEBUG("Execute: %s",
simgrid::mc::request_to_string(
- req, value, simgrid::mc::RequestType::simix).c_str());
+ req, req_num, simgrid::mc::RequestType::simix).c_str());
std::string req_str;
if (dot_output != nullptr)
- req_str = simgrid::mc::request_get_dot_output(req, value);
+ req_str = simgrid::mc::request_get_dot_output(req, req_num);
mc_stats->executed_transitions++;
// TODO, bundle both operations in a single message
- // MC_execute_transition(req, value)
+ // MC_execute_transition(req, req_num)
/* Answer the request */
- simgrid::mc::handle_simcall(req, value);
+ mc_model_checker->handle_simcall(state->transition);
mc_model_checker->wait_for_requests();
/* Create the new expanded state */
&& simgrid::mc::request_depend(req, &prev_state->internal_req)) {
if (XBT_LOG_ISENABLED(mc_safety, xbt_log_priority_debug)) {
XBT_DEBUG("Dependent Transitions:");
- int value = prev_state->req_num;
+ int value = prev_state->transition.argument;
smx_simcall_t prev_req = &prev_state->executed_req;
XBT_DEBUG("%s (state=%d)",
simgrid::mc::request_to_string(
prev_req, value, simgrid::mc::RequestType::internal).c_str(),
prev_state->num);
- value = state->req_num;
+ value = state->transition.argument;
prev_req = &state->executed_req;
XBT_DEBUG("%s (state=%d)",
simgrid::mc::request_to_string(