-/* Copyright (c) 2008-2015. The SimGrid Team.
- * All rights reserved. */
+/* Copyright (c) 2008-2017. 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. */
#include <cassert>
+#include "src/include/mc/mc.h"
#include "src/mc/ModelChecker.hpp"
-#include "src/mc/mc_request.h"
-#include "src/mc/mc_smx.h"
+#include "src/mc/mc_request.hpp"
+#include "src/mc/mc_smx.hpp"
#include "src/mc/mc_xbt.hpp"
using simgrid::mc::remote;
if (synchro1->src_buff == synchro2->src_buff
&& synchro1->dst_buff == synchro2->dst_buff)
return false;
- else 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 (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)
return false;
- else
- return true;
+ return true;
default:
return true;
}
std::string simgrid::mc::request_to_string(smx_simcall_t req, int value, simgrid::mc::RequestType request_type)
{
- xbt_assert(mc_model_checker != nullptr);
+ xbt_assert(mc_model_checker != nullptr, "Must be called from MCer");
bool use_remote_comm = true;
switch(request_type) {
case SIMCALL_COMM_IRECV: {
size_t* remote_size = simcall_comm_irecv__get__dst_buff_size(req);
-
- // size_t size = size_pointer ? *size_pointer : 0;
size_t size = 0;
if (remote_size)
mc_model_checker->process().read_bytes(&size, sizeof(size),
return comm->src_proc && comm->dst_proc;
}
-bool actor_is_enabled(smx_actor_t actor)
-{
- return simgrid::mc::request_is_enabled(&actor->simcall);
-}
static const char* colors[] = {
"blue",