return false;
// Those are internal requests, we do not need indirection because those objects are copies:
- const kernel::activity::CommImpl* synchro1 = get_comm(r1);
- const kernel::activity::CommImpl* synchro2 = get_comm(r2);
+ const kernel::activity::CommImpl* activity1 = get_comm(r1);
+ const kernel::activity::CommImpl* activity2 = get_comm(r2);
if ((r1->call_ == Simcall::COMM_ISEND || r1->call_ == Simcall::COMM_IRECV) && r2->call_ == Simcall::COMM_WAIT) {
auto mbox = get_mbox_remote_addr(r1);
- RemotePtr<kernel::activity::MailboxImpl> synchro2_mbox_cpy = remote(synchro2->mbox_cpy);
+ RemotePtr<kernel::activity::MailboxImpl> activity2_mbox_cpy = remote(activity2->mbox_cpy);
- if (mbox != synchro2_mbox_cpy && simcall_comm_wait__get__timeout(r2) <= 0)
+ if (mbox != activity2_mbox_cpy && simcall_comm_wait__get__timeout(r2) <= 0)
return false;
- if ((r1->issuer_ != synchro2->src_actor_.get()) && (r1->issuer_ != synchro2->dst_actor_.get()) &&
+ if ((r1->issuer_ != activity2->src_actor_.get()) && (r1->issuer_ != activity2->dst_actor_.get()) &&
simcall_comm_wait__get__timeout(r2) <= 0)
return false;
- if ((r1->call_ == Simcall::COMM_ISEND) && (synchro2->type_ == kernel::activity::CommImpl::Type::SEND) &&
- (synchro2->src_buff_ != simcall_comm_isend__get__src_buff(r1)) && simcall_comm_wait__get__timeout(r2) <= 0)
+ if ((r1->call_ == Simcall::COMM_ISEND) && (activity2->type_ == kernel::activity::CommImpl::Type::SEND) &&
+ (activity2->src_buff_ != simcall_comm_isend__get__src_buff(r1)) && simcall_comm_wait__get__timeout(r2) <= 0)
return false;
- if ((r1->call_ == Simcall::COMM_IRECV) && (synchro2->type_ == kernel::activity::CommImpl::Type::RECEIVE) &&
- (synchro2->dst_buff_ != simcall_comm_irecv__get__dst_buff(r1)) && simcall_comm_wait__get__timeout(r2) <= 0)
+ if ((r1->call_ == Simcall::COMM_IRECV) && (activity2->type_ == kernel::activity::CommImpl::Type::RECEIVE) &&
+ (activity2->dst_buff_ != simcall_comm_irecv__get__dst_buff(r1)) && simcall_comm_wait__get__timeout(r2) <= 0)
return false;
}
#endif
if (r1->call_ == Simcall::COMM_WAIT && (r2->call_ == Simcall::COMM_WAIT || r2->call_ == Simcall::COMM_TEST) &&
- (synchro1->src_actor_.get() == nullptr || synchro1->dst_actor_.get() == nullptr))
+ (activity1->src_actor_.get() == nullptr || activity1->dst_actor_.get() == nullptr))
return false;
- if (r1->call_ == Simcall::COMM_TEST &&
- (simcall_comm_test__get__comm(r1) == nullptr || synchro1->src_buff_ == nullptr || synchro1->dst_buff_ == nullptr))
+ if (r1->call_ == Simcall::COMM_TEST && (simcall_comm_test__get__comm(r1) == nullptr ||
+ activity1->src_buff_ == nullptr || activity1->dst_buff_ == nullptr))
return false;
if (r1->call_ == Simcall::COMM_TEST && r2->call_ == Simcall::COMM_WAIT &&
- synchro1->src_buff_ == synchro2->src_buff_ && synchro1->dst_buff_ == synchro2->dst_buff_)
+ activity1->src_buff_ == activity2->src_buff_ && activity1->dst_buff_ == activity2->dst_buff_)
return false;
- if (r1->call_ == Simcall::COMM_WAIT && r2->call_ == Simcall::COMM_TEST && synchro1->src_buff_ != nullptr &&
- synchro1->dst_buff_ != nullptr && synchro2->src_buff_ != nullptr && synchro2->dst_buff_ != nullptr &&
- synchro1->dst_buff_ != synchro2->src_buff_ && synchro1->dst_buff_ != synchro2->dst_buff_ &&
- synchro2->dst_buff_ != synchro1->src_buff_)
+ if (r1->call_ == Simcall::COMM_WAIT && r2->call_ == Simcall::COMM_TEST && activity1->src_buff_ != nullptr &&
+ activity1->dst_buff_ != nullptr && activity2->src_buff_ != nullptr && activity2->dst_buff_ != nullptr &&
+ activity1->dst_buff_ != activity2->src_buff_ && activity1->dst_buff_ != activity2->dst_buff_ &&
+ activity2->dst_buff_ != activity1->src_buff_)
return false;
return true;
std::string Api::get_pattern_comm_rdv(RemotePtr<kernel::activity::CommImpl> const& addr) const
{
- Remote<kernel::activity::CommImpl> temp_synchro;
- mc_model_checker->get_remote_simulation().read(temp_synchro, addr);
- const kernel::activity::CommImpl* synchro = temp_synchro.get_buffer();
+ Remote<kernel::activity::CommImpl> temp_activity;
+ mc_model_checker->get_remote_simulation().read(temp_activity, addr);
+ const kernel::activity::CommImpl* activity = temp_activity.get_buffer();
char* remote_name = mc_model_checker->get_remote_simulation().read<char*>(RemotePtr<char*>(
- (uint64_t)(synchro->get_mailbox() ? &synchro->get_mailbox()->get_name() : &synchro->mbox_cpy->get_name())));
+ (uint64_t)(activity->get_mailbox() ? &activity->get_mailbox()->get_name() : &activity->mbox_cpy->get_name())));
auto rdv = mc_model_checker->get_remote_simulation().read_string(RemotePtr<char>(remote_name));
return rdv;
}
unsigned long Api::get_pattern_comm_src_proc(RemotePtr<kernel::activity::CommImpl> const& addr) const
{
- Remote<kernel::activity::CommImpl> temp_synchro;
- mc_model_checker->get_remote_simulation().read(temp_synchro, addr);
- const kernel::activity::CommImpl* synchro = temp_synchro.get_buffer();
+ Remote<kernel::activity::CommImpl> temp_activity;
+ mc_model_checker->get_remote_simulation().read(temp_activity, addr);
+ const kernel::activity::CommImpl* activity = temp_activity.get_buffer();
auto src_proc =
- mc_model_checker->get_remote_simulation().resolve_actor(mc::remote(synchro->src_actor_.get()))->get_pid();
+ mc_model_checker->get_remote_simulation().resolve_actor(mc::remote(activity->src_actor_.get()))->get_pid();
return src_proc;
}
unsigned long Api::get_pattern_comm_dst_proc(RemotePtr<kernel::activity::CommImpl> const& addr) const
{
- Remote<kernel::activity::CommImpl> temp_synchro;
- mc_model_checker->get_remote_simulation().read(temp_synchro, addr);
- const kernel::activity::CommImpl* synchro = temp_synchro.get_buffer();
+ Remote<kernel::activity::CommImpl> temp_activity;
+ mc_model_checker->get_remote_simulation().read(temp_activity, addr);
+ const kernel::activity::CommImpl* activity = temp_activity.get_buffer();
auto src_proc =
- mc_model_checker->get_remote_simulation().resolve_actor(mc::remote(synchro->dst_actor_.get()))->get_pid();
+ mc_model_checker->get_remote_simulation().resolve_actor(mc::remote(activity->dst_actor_.get()))->get_pid();
return src_proc;
}
return request_depend_asymmetric(req1, req2) && request_depend_asymmetric(req2, req1);
// Those are internal requests, we do not need indirection because those objects are copies:
- const kernel::activity::CommImpl* synchro1 = get_comm(req1);
- const kernel::activity::CommImpl* synchro2 = get_comm(req2);
+ const kernel::activity::CommImpl* activity1 = get_comm(req1);
+ const kernel::activity::CommImpl* activity2 = get_comm(req2);
switch (req1->call_) {
case Simcall::COMM_ISEND:
case Simcall::COMM_IRECV:
return simcall_comm_irecv__get__mbox(req1) == simcall_comm_irecv__get__mbox(req2);
case Simcall::COMM_WAIT:
- if (synchro1->src_buff_ == synchro2->src_buff_ && synchro1->dst_buff_ == synchro2->dst_buff_)
+ if (activity1->src_buff_ == activity2->src_buff_ && activity1->dst_buff_ == activity2->dst_buff_)
return false;
- if (synchro1->src_buff_ != nullptr && synchro1->dst_buff_ != nullptr && synchro2->src_buff_ != nullptr &&
- synchro2->dst_buff_ != nullptr && synchro1->dst_buff_ != synchro2->src_buff_ &&
- synchro1->dst_buff_ != synchro2->dst_buff_ && synchro2->dst_buff_ != synchro1->src_buff_)
+ if (activity1->src_buff_ != nullptr && activity1->dst_buff_ != nullptr && activity2->src_buff_ != nullptr &&
+ activity2->dst_buff_ != nullptr && activity1->dst_buff_ != activity2->src_buff_ &&
+ activity1->dst_buff_ != activity2->dst_buff_ && activity2->dst_buff_ != activity1->src_buff_)
return false;
return true;
default:
} else {
type = "Wait";
- simgrid::mc::Remote<simgrid::kernel::activity::CommImpl> temp_synchro;
+ simgrid::mc::Remote<simgrid::kernel::activity::CommImpl> temp_activity;
const simgrid::kernel::activity::CommImpl* act;
- mc_model_checker->get_remote_simulation().read(temp_synchro, remote(remote_act));
- act = temp_synchro.get_buffer();
+ mc_model_checker->get_remote_simulation().read(temp_activity, remote(remote_act));
+ act = temp_activity.get_buffer();
smx_actor_t src_proc =
mc_model_checker->get_remote_simulation().resolve_actor(simgrid::mc::remote(act->src_actor_.get()));
case Simcall::COMM_TEST: {
simgrid::kernel::activity::CommImpl* remote_act = simcall_comm_test__getraw__comm(req);
- simgrid::mc::Remote<simgrid::kernel::activity::CommImpl> temp_synchro;
+ simgrid::mc::Remote<simgrid::kernel::activity::CommImpl> temp_activity;
const simgrid::kernel::activity::CommImpl* act;
- mc_model_checker->get_remote_simulation().read(temp_synchro, remote(remote_act));
- act = temp_synchro.get_buffer();
+ mc_model_checker->get_remote_simulation().read(temp_activity, remote(remote_act));
+ act = temp_activity.get_buffer();
if (act->src_actor_.get() == nullptr || act->dst_actor_.get() == nullptr) {
type = "Test FALSE";