1 /* Copyright (c) 2015-2022. The SimGrid Team.
2 * All rights reserved. */
4 /* This program is free software; you can redistribute it and/or modify it
5 * under the terms of the license (GNU LGPL) which comes with this package. */
7 #ifndef SIMGRID_MC_TRANSITION_COMM_HPP
8 #define SIMGRID_MC_TRANSITION_COMM_HPP
10 #include "src/kernel/actor/SimcallObserver.hpp"
11 #include "src/mc/api/Transition.hpp"
19 class CommRecvTransition;
20 class CommSendTransition;
21 class CommTestTransition;
23 class CommWaitTransition : public Transition {
32 friend CommRecvTransition;
33 friend CommSendTransition;
34 friend CommTestTransition;
37 CommWaitTransition(aid_t issuer, int times_considered, std::stringstream& stream);
38 std::string to_string(bool verbose) const override;
39 bool depends(const Transition* other) const override;
41 class CommTestTransition : public Transition {
49 friend CommSendTransition;
50 friend CommRecvTransition;
53 CommTestTransition(aid_t issuer, int times_considered, std::stringstream& stream);
54 std::string to_string(bool verbose) const override;
55 bool depends(const Transition* other) const override;
58 class CommRecvTransition : public Transition {
63 CommRecvTransition(aid_t issuer, int times_considered, std::stringstream& stream);
64 std::string to_string(bool verbose) const override;
65 bool depends(const Transition* other) const override;
68 class CommSendTransition : public Transition {
74 CommSendTransition(aid_t issuer, int times_considered, std::stringstream& stream);
75 std::string to_string(bool verbose) const override;
76 bool depends(const Transition* other) const override;
79 class TestAnyTransition : public Transition {
80 std::vector<Transition*> transitions_;
83 TestAnyTransition(aid_t issuer, int times_considered, std::stringstream& stream);
84 std::string to_string(bool verbose) const override;
85 bool depends(const Transition* other) const override;
88 class WaitAnyTransition : public Transition {
89 std::vector<Transition*> transitions_;
92 WaitAnyTransition(aid_t issuer, int times_considered, std::stringstream& stream);
93 std::string to_string(bool verbose) const override;
94 bool depends(const Transition* other) const override;
97 /** Make a new transition from serialized description */
98 Transition* deserialize_transition(aid_t issuer, int times_considered, std::stringstream& stream);
101 } // namespace simgrid