Otawa  0.10
CFGOutput.h
Go to the documentation of this file.
1 /*
2  * $Id$
3  * CFGOutput class interface
4  *
5  * This file is part of OTAWA
6  * Copyright (c) 2003-08, IRIT UPS.
7  *
8  * OTAWA is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 2 of the License, or
11  * (at your option) any later version.
12  *
13  * OTAWA is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with OTAWA; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21  */
22 #ifndef OTAWA_CFGOUTPUT_H_
23 #define OTAWA_CFGOUTPUT_H_
24 
27 
28 namespace otawa {
29 
30 class Edge;
31 
32 namespace display {
33 
34 class CFGOutputDecorator;
35 
36 // CFGOutput class
37 class CFGOutput: public CFGProcessor {
38  friend class CDFGOutputDeclarator;
39 public:
40  static p::declare reg;
42 
43  // Configuration
46 
47  virtual void genGraphLabel(CFG *cfg, Output& out);
48  virtual void genBBLabel(CFG *cfg, BasicBlock *bb, Output& out);
49  virtual void genEdgeLabel(CFG *cfg, otawa::Edge *edge, Output& out);
50  virtual void genBBInfo(CFG *cfg, BasicBlock *bb, Output& out);
51  virtual void genEdgeInfo(CFG *cfg, otawa::Edge *edge, Output& out);
52 
53 protected:
54  virtual void configure(const PropList &props);
55  virtual void processCFG(WorkSpace *fw, CFG *cfg);
56 
57 private:
59  string path;
60 };
61 
62 } } // otawa::display
63 
64 #endif /* OTAWA_CFGOUTPUT_H_ */
friend class CDFGOutputDeclarator
Definition: CFGOutput.h:38
CFG * cfg(void) const
Get the current CFG.
Definition: CFGProcessor.h:56
dtd::Element edge(dtd::make("edge", _EDGE).attr(source).attr(target).attr(called))
static Identifier< display::kind_t > KIND
Configuration identifier of CFGOutput for the kind of generated file.
Definition: CFGOutput.h:44
virtual void genEdgeInfo(CFG *cfg, otawa::Edge *edge, Output &out)
Generate the information part of an edge (called after the label).
Definition: display_CFGOutput.cpp:261
Abstract class to represent the registered processors.
Definition: Registration.h:80
Class to declare simple a processor.
Definition: Registration.h:213
virtual void processCFG(WorkSpace *fw, CFG *cfg)
Definition: display_CFGOutput.cpp:134
kind_t
Definition: Driver.h:33
virtual void configure(const PropList &props)
Configure the current processor.
Definition: display_CFGOutput.cpp:125
dtd::Element bb(dtd::make("bb", _BB).attr(id).attr(address).attr(size))
Control Flow Graph representation.
Definition: CFG.h:42
CFGOutput(AbstractRegistration &_reg=reg)
Build the processor.
Definition: display_CFGOutput.cpp:105
AbstractRegistration * _reg
Definition: Processor.h:184
static Identifier< string > PATH
Configuration identifier of CFGOutput for the directory path where to create the output file...
Definition: CFGOutput.h:45
virtual void genBBLabel(CFG *cfg, BasicBlock *bb, Output &out)
Called to generate the label of a basic block.
Definition: display_CFGOutput.cpp:182
A workspace represents a program, its run-time and all information about WCET computation or any othe...
Definition: WorkSpace.h:67
This is a specialization of the processor class dedicated to CFG processing.
Definition: CFGProcessor.h:35
This class represents edges in the CFG representation.
Definition: Edge.h:33
virtual void genBBInfo(CFG *cfg, BasicBlock *bb, Output &out)
Generate the information part of a basic block (called after the list of instructions).
Definition: display_CFGOutput.cpp:245
display::kind_t kind
Definition: CFGOutput.h:58
This is the minimal definition of a basic block.
Definition: BasicBlock.h:43
virtual void genEdgeLabel(CFG *cfg, otawa::Edge *edge, Output &out)
Called to generate the label of a basic block.
Definition: display_CFGOutput.cpp:225
Definition: CFGOutput.h:37
This a list of properties.
Definition: PropList.h:63
string path
Definition: CFGOutput.h:59
static p::declare reg
Definition: CFGOutput.h:40
elm::io::Output out
Provide a stream to perform output for the user.
Definition: Monitor.h:56
virtual void genGraphLabel(CFG *cfg, Output &out)
Called to generate the label of the graph.
Definition: display_CFGOutput.cpp:168