1 /* Copyright (c) 2007-2023. The SimGrid Team. All rights reserved. */
3 /* This program is free software; you can redistribute it and/or modify it
4 * under the terms of the license (GNU LGPL) which comes with this package. */
6 /** @file udpor_tests_private.hpp
8 * A private header file for tests involving events in
12 #ifndef SIMGRID_MC_UDPOR_TEST_PRIVATE_HPP
13 #define SIMGRID_MC_UDPOR_TEST_PRIVATE_HPP
15 namespace simgrid::mc::udpor {
17 struct IndependentAction : public Transition {
18 // Independent with everyone else
19 bool depends(const Transition* other) const override { return false; }
22 struct DependentAction : public Transition {
23 // Dependent with everyone else (except IndependentAction)
24 bool depends(const Transition* other) const override
26 return dynamic_cast<const IndependentAction*>(other) == nullptr;
30 struct ConditionallyDependentAction : public Transition {
31 // Dependent only with DependentAction (i.e. not itself)
32 bool depends(const Transition* other) const override
34 return dynamic_cast<const DependentAction*>(other) != nullptr;
38 } // namespace simgrid::mc::udpor