Otawa  0.10
Output.h
Go to the documentation of this file.
1 /*
2  * CFGOutput class interface
3  *
4  * This file is part of OTAWA
5  * Copyright (c) 2013, IRIT UPS.
6  *
7  * OTAWA is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 2 of the License, or
10  * (at your option) any later version.
11  *
12  * OTAWA is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with OTAWA; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20  */
21 #ifndef OTAWA_CFGIO_OUTPUT_H_
22 #define OTAWA_CFGIO_OUTPUT_H_
23 
24 #include <otawa/cfg.h>
25 #include <otawa/proc/BBProcessor.h>
26 #include <elm/xom.h>
27 #include <elm/genstruct/Vector.h>
28 
29 namespace otawa { namespace cfgio {
30 
31 using namespace elm;
32 
33 class Output: public BBProcessor {
34 public:
35  static p::declare reg;
36  Output(void);
37 protected:
38  virtual void processWorkSpace(WorkSpace *ws);
39  virtual void processCFG(WorkSpace *ws, CFG *cfg);
40  virtual void processBB(WorkSpace *ws, CFG *cfg, BasicBlock *bb);
41 private:
42  string id(CFG *cfg);
43  string id(BasicBlock *bb);
44  void processProps(xom::Element *parent, PropList& props);
45  xom::Element *root, *cfg_node;
46  int last_bb;
48 };
49 
50 } } // otawa::cfgio
51 
52 #endif /* OTAWA_CFGIO_OUTPUT_H_ */
This processor is dedicated to the basic block process thru proccessBB() method.
Definition: BBProcessor.h:72
Class to declare simple a processor.
Definition: Registration.h:213
xom::Element * root
Definition: Output.h:45
dtd::Element bb(dtd::make("bb", _BB).attr(id).attr(address).attr(size))
Control Flow Graph representation.
Definition: CFG.h:42
genstruct::Vector< Edge * > edges
Definition: Output.h:47
A workspace represents a program, its run-time and all information about WCET computation or any othe...
Definition: WorkSpace.h:67
dtd::IDAttr id("id", dtd::STRICT|dtd::REQUIRED)
static p::declare reg
Definition: Output.h:35
int last_bb
Definition: Output.h:46
dtd::Element cfg(dtd::make("cfg", _CFG).attr(id).content((entry,*bb, exit,*edge)))
This is the minimal definition of a basic block.
Definition: BasicBlock.h:43
This a list of properties.
Definition: PropList.h:63
Output the current CFG collection in XML matching the DTA ${OTAWA_HOME}/share/Otawa/dtd/cfg.dtd .
Definition: Output.h:33