Otawa  0.10
BBPathDriver.h
Go to the documentation of this file.
1 /*
2  * BBPathDriver class implementation
3  *
4  * This file is part of OTAWA
5  * Copyright (c) 2005-08, 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_SIM_BBPATHDRIVER_H
22 #define OTAWA_SIM_BBPATHDRIVER_H
23 
24 #include <otawa/cfg.h>
25 #include <otawa/tsim/BBPath.h>
26 #include <otawa/sim/State.h>
27 
28 namespace otawa { namespace sim {
29 
30 class InstIterator;
31 
32 class BBPathDriver: public Driver {
35  bool ended;
36 public:
37  BBPathDriver(tsim::BBPath& bbpath);
38  virtual ~BBPathDriver();
39  virtual Inst* firstInstruction(State &state);
40  virtual Inst* nextInstruction(State &state, Inst *inst);
41  virtual void terminateInstruction(State &state, Inst *inst);
42 };
43 
44 } }
45 
46 #endif /* OTAWA_SIM_BBPATHDRIVER_H*/
struct otawa::sem::inst inst
Definition: BBPathDriver.h:32
bool ended
Definition: BBPathDriver.h:35
BasicBlock::InstIter * inst_iter
Definition: BBPathDriver.h:34
virtual Inst * firstInstruction(State &state)
Definition: sim_BBPathDriver.cpp:26
This class is used to drive a simulator.
Definition: Driver.h:23
tsim::BBPath::BBIterator bb_iter
Definition: BBPathDriver.h:33
Definition: BBPath.h:72
virtual ~BBPathDriver()
Definition: sim_BBPathDriver.cpp:22
Definition: BBPath.h:35
virtual Inst * nextInstruction(State &state, Inst *inst)
This method is called each time the simulator needs the next instruction to execute.
Definition: sim_BBPathDriver.cpp:30
This class represents assembly instruction of a piece of code.
Definition: Inst.h:62
BBPathDriver(tsim::BBPath &bbpath)
Definition: sim_BBPathDriver.cpp:10
This class represents a running simulator.
Definition: State.h:38
virtual void terminateInstruction(State &state, Inst *inst)
This method is called when an instruction is terminated.
Definition: sim_BBPathDriver.cpp:50
Iterator for instructions in the basic block.
Definition: BasicBlock.h:70