GEGELATI

Loading...
Searching...
No Matches
tpgExecutionEngineInstrumented.h
1
38#ifndef TPG_EXECUTION_ENGINE_INSTRUMENTED_H
39#define TPG_EXECUTION_ENGINE_INSTRUMENTED_H
40
41#include <set>
42#include <vector>
43
44#include "archive.h"
45#include "program/programExecutionEngine.h"
46#include "tpg/tpgExecutionEngine.h"
47
48#include "tpg/tpgGraph.h"
49
50namespace TPG {
54 class TPGExecutionEngineInstrumented : public TPGExecutionEngine
55 {
56 protected:
59 std::vector<std::vector<const TPGVertex*>> traceHistory;
60
61 public:
72 TPGExecutionEngineInstrumented(const Environment& env,
73 Archive* arch = NULL)
74 : TPGExecutionEngine(env, arch){};
75
83 double evaluateEdge(const TPGEdge& edge) override;
84
93 const TPG::TPGEdge& evaluateTeam(const TPGTeam& team) override;
101 const std::pair<std::vector<const TPG::TPGVertex*>, std::vector<double>>
102 executeFromRoot(const TPG::TPGVertex& root,
103 const std::vector<uint64_t>& initActions = {
104 0}) override;
105
107 const std::vector<std::vector<const TPGVertex*>>& getTraceHistory()
108 const;
109
111 void clearTraceHistory();
112 };
113}; // namespace TPG
114
115#endif
Archive
Definition archive.h:80
Environment
The Environment class contains all information needed to execute a Program.
Definition environment.h:86
TPG::TPGEdge
Class representing edges of the Tangled Program Graphs.
Definition tpgEdge.h:54
TPG::TPGExecutionEngineInstrumented
Definition tpgExecutionEngineInstrumented.h:55
TPG::TPGExecutionEngineInstrumented::traceHistory
std::vector< std::vector< const TPGVertex * > > traceHistory
Definition tpgExecutionEngineInstrumented.h:59
TPG::TPGExecutionEngineInstrumented::TPGExecutionEngineInstrumented
TPGExecutionEngineInstrumented(const Environment &env, Archive *arch=NULL)
Main constructor of the class.
Definition tpgExecutionEngineInstrumented.h:72
TPG::TPGExecutionEngineInstrumented::evaluateTeam
const TPG::TPGEdge & evaluateTeam(const TPGTeam &team) override
Specialization of the evaluateTeam function.
Definition tpgExecutionEngineInstrumented.cpp:49
TPG::TPGExecutionEngineInstrumented::getTraceHistory
const std::vector< std::vector< const TPGVertex * > > & getTraceHistory() const
Get all previous execution traces.
Definition tpgExecutionEngineInstrumented.cpp:77
TPG::TPGExecutionEngineInstrumented::evaluateEdge
double evaluateEdge(const TPGEdge &edge) override
Specialization of the evaluateEdge function.
Definition tpgExecutionEngineInstrumented.cpp:43
TPG::TPGExecutionEngineInstrumented::executeFromRoot
const std::pair< std::vector< const TPG::TPGVertex * >, std::vector< double > > executeFromRoot(const TPG::TPGVertex &root, const std::vector< uint64_t > &initActions={ 0}) override
Specialization of the evaluateTeam function.
Definition tpgExecutionEngineInstrumented.cpp:61
TPG::TPGExecutionEngineInstrumented::clearTraceHistory
void clearTraceHistory()
Clear the trace history from all previous execution trace.
Definition tpgExecutionEngineInstrumented.cpp:82
TPG::TPGExecutionEngine
Definition tpgExecutionEngine.h:57
TPG::TPGExecutionEngine::env
const Environment & env
Environment used.
Definition tpgExecutionEngine.h:67
TPG::TPGTeam
Definition tpgTeam.h:49
TPG::TPGVertex
Abstract class representing the vertices of a TPGGraph.
Definition tpgVertex.h:55
TPG
Definition executionStats.h:44