PandA-2024.02
design_flow_step.hpp
Go to the documentation of this file.
1 /*
2  *
3  * _/_/_/ _/_/ _/ _/ _/_/_/ _/_/
4  * _/ _/ _/ _/ _/_/ _/ _/ _/ _/ _/
5  * _/_/_/ _/_/_/_/ _/ _/_/ _/ _/ _/_/_/_/
6  * _/ _/ _/ _/ _/ _/ _/ _/ _/
7  * _/ _/ _/ _/ _/ _/_/_/ _/ _/
8  *
9  * ***********************************************
10  * PandA Project
11  * URL: http://panda.dei.polimi.it
12  * Politecnico di Milano - DEIB
13  * System Architectures Group
14  * ***********************************************
15  * Copyright (C) 2004-2024 Politecnico di Milano
16  *
17  * This file is part of the PandA framework.
18  *
19  * The PandA framework is free software; you can redistribute it and/or modify
20  * it under the terms of the GNU General Public License as published by
21  * the Free Software Foundation; either version 3 of the License, or
22  * (at your option) any later version.
23  *
24  * This program is distributed in the hope that it will be useful,
25  * but WITHOUT ANY WARRANTY; without even the implied warranty of
26  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27  * GNU General Public License for more details.
28  *
29  * You should have received a copy of the GNU General Public License
30  * along with this program. If not, see <http://www.gnu.org/licenses/>.
31  *
32  */
44 #ifndef DESIGN_FLOW_STEP_HPP
45 #define DESIGN_FLOW_STEP_HPP
46 #include "config_HAVE_UNORDERED.hpp" // for HAVE_UNORDERED
47 
48 #include "graph.hpp" // for vertex
49 #include "refcount.hpp" // for CONSTREF_FORWARD...
50 #include <iosfwd> // for ostream
51 #include <string> // for string
52 
57 
61 #if HAVE_UNORDERED
62 #include "custom_set.hpp"
63 class DesignFlowStepSet : public CustomUnorderedSet<DesignFlowStepRef>
64 {
65 };
66 #else
67 #include <functional> // for binary_function
68 #include <set> // for set
69 class DesignFlowStepSorter : std::binary_function<vertex, vertex, bool>
70 {
71  public:
76 
83  bool operator()(const DesignFlowStepRef x, const DesignFlowStepRef y) const;
84 };
85 
86 class DesignFlowStepSet : public std::set<DesignFlowStepRef, DesignFlowStepSorter>
87 {
88  public:
93 };
94 #endif
95 
98 {
99  ABORTED,
100  EMPTY,
101  NONEXISTENT,
102  SKIPPED,
103  SUCCESS,
104  UNCHANGED,
105  UNEXECUTED,
106  UNNECESSARY,
107 };
108 
113 {
114  protected:
117  bool composed;
118 
121 
124 
127 
129  const int output_level;
130 
131  public:
136  {
139  PRECEDENCE_RELATIONSHIP
140  };
141 
147  DesignFlowStep(const DesignFlowManagerConstRef design_flow_manager, const ParameterConstRef parameters);
148 
152  virtual ~DesignFlowStep();
153 
158  virtual DesignFlowStep_Status Exec() = 0;
159 
164  virtual bool HasToBeExecuted() const = 0;
165 
169  virtual void Initialize();
170 
175  virtual std::string GetSignature() const = 0;
176 
181  virtual std::string GetName() const = 0;
182 
186  DesignFlowStep_Status GetStatus() const;
187 
193  virtual void ComputeRelationships(DesignFlowStepSet& relationship,
194  const DesignFlowStep::RelationshipType relationship_type) = 0;
195 
200  virtual void WriteDot(std::ostream& out) const;
201 
205  virtual DesignFlowStepFactoryConstRef CGetDesignFlowStepFactory() const = 0;
206 
211  bool IsComposed() const;
212 
217  int CGetDebugLevel() const;
218 
222  virtual void PrintInitialIR() const;
223 
227  virtual void PrintFinalIR() const;
228 };
231 
232 #endif
Step does not exits.
Step successfully executed.
const int output_level
The output level.
Step successfully executed but without any IR change.
RelationshipType
The relationship type.
Source must be executed to satisfy target.
Class specification of the graph structures.
The base class for design step.
REF_FORWARD_DECL(DesignFlowStep)
bool composed
True if this step represents a composition of design flow steps (e.g., a flow); must be set by specia...
redefinition of set to manage ordered/unordered structures
const Wrefcount< const DesignFlowManager > design_flow_manager
The design flow manager.
CONSTREF_FORWARD_DECL(DesignFlowManager)
const ParameterConstRef parameters
Set of input parameters.
DesignFlowStep_Status
The status of a step.
Template definition of refcount.
A set of design flow step.
Template borrowed from the ANTLR library by Terence Parr (http://www.jGuru.com - Software rights: htt...
Definition: refcount.hpp:94
x
Return the smallest n such that 2^n >= _x.
int debug_level
The debug level.
Step is symbolic and it has already been marked.
DesignFlowStepSet()
Constructor.
Step not yet executed.

Generated on Mon Feb 12 2024 13:02:51 for PandA-2024.02 by doxygen 1.8.13