Otawa  0.10
ILPSystemDisplayer.h
Go to the documentation of this file.
1 /*
2  * $Id$
3  * display::ILPSystemDisplayer class interface
4  *
5  * This file is part of OTAWA
6  * Copyright (c) 2008, 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 DISPLAY_ILPSYSTEMDISPLAYER_H_
23 #define DISPLAY_ILPSYSTEMDISPLAYER_H_
24 
25 #include <otawa/proc/Processor.h>
26 #include <otawa/prop/Identifier.h>
27 #include <elm/system/Path.h>
28 #include <elm/io.h>
29 #include <elm/genstruct/HashTable.h>
30 
31 // Extern classes
32 namespace otawa { namespace ilp {
33  class Constraint;
34  class System;
35  class Var;
36 } }
37 
38 namespace otawa { namespace display {
39 
40 using namespace elm;
41 
42 // ILPSystemAddon class
43 class ILPSystemDisplayer;
45 public:
46  virtual cstring title(void) const = 0;
47  virtual void display(io::Output& out, WorkSpace *ws, ILPSystemDisplayer *displayer) = 0;
48 };
49 
50 // ILPSystemDisplayer class
52 public:
55  virtual void configure(const PropList& props);
56 
57  // Configuration
59 
60  // Add-ons
62 
63  // Only for add-ons
64  void displayCons(ilp::Constraint *cons, bool with_label = false);
65  void displayVar(ilp::Var *var);
66  string nameOf(ilp::Var *var);
67 
68 protected:
69  virtual void processWorkSpace(WorkSpace *ws);
70  virtual void setup (WorkSpace *fw);
71 
72 private:
74  int cnt;
78 };
79 
80 } } // display
81 
82 
83 #endif /* DISPLAY_ILPSYSTEMDISPLAYER_H_ */
static Registration< ILPSystemDisplayer > reg
Definition: ILPSystemDisplayer.h:53
Abstract class to represent the registered processors.
Definition: Registration.h:80
Definition: Registration.h:138
static Identifier< ILPSystemAddon * > ADDON
This identifier may be used by ILP system variable and constraint generator to add specific part to t...
Definition: ILPSystemDisplayer.h:61
string nameOf(CFG *cfg)
Find a name for the current CFG.
Definition: mkff.cpp:146
The processor class is implemented by all code processor.
Definition: Processor.h:49
This class is an interface for ILPSystemDisplayer to add to its output specialized information about ...
Definition: ILPSystemDisplayer.h:44
ilp::System * system
Definition: ILPSystemDisplayer.h:75
A workspace represents a program, its run-time and all information about WCET computation or any othe...
Definition: WorkSpace.h:67
Path path
Definition: ILPSystemDisplayer.h:77
elm::genstruct::HashTable< ilp::Var *, string > names
Definition: ILPSystemDisplayer.h:73
sys::SystemOutStream & out
This class is used to represent constraints in an ILP system with the following form: ...
Definition: Constraint.h:33
static Identifier< Path > PATH
Configuration identifier for ILPSystemDisplayer.
Definition: ILPSystemDisplayer.h:58
This class represents identifier with a typed associated value.
Definition: Identifier.h:51
int cnt
Definition: ILPSystemDisplayer.h:74
This a list of properties.
Definition: PropList.h:63
A variable is an identifier used for performing ILP computation.
Definition: Var.h:36
This processor may be used to generate an HTML output of an ILP system used to compute the WCET of a ...
Definition: ILPSystemDisplayer.h:51
An ILP system is a colletion of ILP constraint that may maximize or minimize some object function...
Definition: System.h:42
io::Output cout
Definition: ILPSystemDisplayer.h:76