A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'fix-wakeup-tree-iterator' into 'master'
[simgrid.git]
/
src
/
mc
/
transition
/
Transition.cpp
diff --git
a/src/mc/transition/Transition.cpp
b/src/mc/transition/Transition.cpp
index 3fb8ced4ac329b5d8d532b8c02a8e110d63326b8..84ad991fd5583dd615d5c8069f15499dcfa40869 100644
(file)
--- a/
src/mc/transition/Transition.cpp
+++ b/
src/mc/transition/Transition.cpp
@@
-1,17
+1,20
@@
-/* Copyright (c) 2015-202
2
. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2015-202
3
. 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 "src/mc/transition/Transition.hpp"
/* 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 "src/mc/transition/Transition.hpp"
+#include "src/kernel/actor/Simcall.hpp"
#include "xbt/asserts.h"
#include "xbt/string.hpp"
#include <simgrid/config.h>
#if SIMGRID_HAVE_MC
#include "xbt/asserts.h"
#include "xbt/string.hpp"
#include <simgrid/config.h>
#if SIMGRID_HAVE_MC
-#include "src/mc/ModelChecker.hpp"
+#include "src/mc/explo/Exploration.hpp"
+#include "src/mc/transition/TransitionActorJoin.hpp"
#include "src/mc/transition/TransitionAny.hpp"
#include "src/mc/transition/TransitionComm.hpp"
#include "src/mc/transition/TransitionAny.hpp"
#include "src/mc/transition/TransitionComm.hpp"
+#include "src/mc/transition/TransitionObjectAccess.hpp"
#include "src/mc/transition/TransitionRandom.hpp"
#include "src/mc/transition/TransitionSynchro.hpp"
#endif
#include "src/mc/transition/TransitionRandom.hpp"
#include "src/mc/transition/TransitionSynchro.hpp"
#endif
@@
-41,13
+44,12
@@
std::string Transition::dot_string() const
return xbt::string_printf("label = \"[(%ld)] %s\", color = %s, fontcolor = %s", aid_, Transition::to_c_str(type_),
color, color);
}
return xbt::string_printf("label = \"[(%ld)] %s\", color = %s, fontcolor = %s", aid_, Transition::to_c_str(type_),
color, color);
}
-void Transition::replay() const
+void Transition::replay(
RemoteApp& app
) const
{
replayed_transitions_++;
{
replayed_transitions_++;
-
#if SIMGRID_HAVE_MC
#if SIMGRID_HAVE_MC
-
mc_model_checker->
handle_simcall(aid_, times_considered_, false);
-
mc_model_checker->
wait_for_requests();
+
app.
handle_simcall(aid_, times_considered_, false);
+
app.
wait_for_requests();
#endif
}
#endif
}
@@
-58,13
+60,13
@@
Transition* deserialize_transition(aid_t issuer, int times_considered, std::stri
xbt_assert(stream >> type);
switch (auto simcall = static_cast<Transition::Type>(type)) {
xbt_assert(stream >> type);
switch (auto simcall = static_cast<Transition::Type>(type)) {
- case Transition::Type::BARRIER_LOCK:
+ case Transition::Type::BARRIER_
ASYNC_
LOCK:
case Transition::Type::BARRIER_WAIT:
return new BarrierTransition(issuer, times_considered, simcall, stream);
case Transition::Type::BARRIER_WAIT:
return new BarrierTransition(issuer, times_considered, simcall, stream);
- case Transition::Type::COMM_RECV:
+ case Transition::Type::COMM_
ASYNC_
RECV:
return new CommRecvTransition(issuer, times_considered, stream);
return new CommRecvTransition(issuer, times_considered, stream);
- case Transition::Type::COMM_SEND:
+ case Transition::Type::COMM_
ASYNC_
SEND:
return new CommSendTransition(issuer, times_considered, stream);
case Transition::Type::COMM_TEST:
return new CommTestTransition(issuer, times_considered, stream);
return new CommSendTransition(issuer, times_considered, stream);
case Transition::Type::COMM_TEST:
return new CommTestTransition(issuer, times_considered, stream);
@@
-80,24
+82,32
@@
Transition* deserialize_transition(aid_t issuer, int times_considered, std::stri
return new RandomTransition(issuer, times_considered, stream);
case Transition::Type::MUTEX_TRYLOCK:
return new RandomTransition(issuer, times_considered, stream);
case Transition::Type::MUTEX_TRYLOCK:
- case Transition::Type::MUTEX_LOCK:
+ case Transition::Type::MUTEX_
ASYNC_
LOCK:
case Transition::Type::MUTEX_TEST:
case Transition::Type::MUTEX_WAIT:
case Transition::Type::MUTEX_UNLOCK:
return new MutexTransition(issuer, times_considered, simcall, stream);
case Transition::Type::MUTEX_TEST:
case Transition::Type::MUTEX_WAIT:
case Transition::Type::MUTEX_UNLOCK:
return new MutexTransition(issuer, times_considered, simcall, stream);
- case Transition::Type::SEM_LOCK:
+ case Transition::Type::SEM_
ASYNC_
LOCK:
case Transition::Type::SEM_UNLOCK:
case Transition::Type::SEM_WAIT:
return new SemaphoreTransition(issuer, times_considered, simcall, stream);
case Transition::Type::SEM_UNLOCK:
case Transition::Type::SEM_WAIT:
return new SemaphoreTransition(issuer, times_considered, simcall, stream);
+ case Transition::Type::ACTOR_JOIN:
+ return new ActorJoinTransition(issuer, times_considered, stream);
+
+ case Transition::Type::OBJECT_ACCESS:
+ return new ObjectAccessTransition(issuer, times_considered, stream);
+
case Transition::Type::UNKNOWN:
return new Transition(Transition::Type::UNKNOWN, issuer, times_considered);
default:
break;
}
case Transition::Type::UNKNOWN:
return new Transition(Transition::Type::UNKNOWN, issuer, times_considered);
default:
break;
}
- xbt_die("Invalid transition type %d received", type);
+ xbt_die("Invalid transition type %d received. Did you implement a new observer in the app without implementing the "
+ "corresponding transition in the checker?",
+ type);
#else
xbt_die("Deserializing transitions is only interesting in MC mode.");
#endif
#else
xbt_die("Deserializing transitions is only interesting in MC mode.");
#endif