Otawa
0.10
|
The abstract state of the computer (abstract domain). More...
#include <otawa/data/clp/ClpState.h>
Classes | |
class | Iter |
class | Node |
A node in the memory list. More... | |
Public Member Functions | |
State (const Value &def=Value::all) | |
Constructors of a new State. More... | |
State (const State &state) | |
Copy constructor. More... | |
~State (void) | |
Destructor. More... | |
State & | operator= (const State &state) |
bool | operator== (const State &state) const |
void | copy (const State &state) |
Change the state to be a copy of the given one. More... | |
void | clear (void) |
Remove all nodes from the state. More... | |
void | set (const Value &addr, const Value &val) |
Define a value into a register or the memory. More... | |
void | clear (t::uint32 base, t::uint32 size) |
Set to T the memories on the given area. More... | |
bool | equals (const State &state) const |
void | join (const State &state) |
Merge a state with the current one. More... | |
void | widening (const State &state, int loopBound) |
Perform a widening. More... | |
void | print (io::Output &out, const hard::Platform *pf=0) const |
Print the state. More... | |
const Value & | get (const Value &addr) const |
Return a stored value. More... | |
Static Public Attributes | |
static const State | EMPTY |
static const State | FULL |
Protected Attributes | |
Node | first |
genstruct::Vector< Value > | registers |
genstruct::Vector< Value > | tmpreg |
The abstract state of the computer (abstract domain).
state for the CLP Analysis analysis.
The abstract state is a list of register states and memory states.
|
inline |
Constructors of a new State.
|
inline |
Destructor.
References clear().
void otawa::clp::State::clear | ( | void | ) |
Set to T the memories on the given area.
base | Base address of the area. |
size | Size of the area. |
References otawa::clp::State::Node::getNext().
void otawa::clp::State::copy | ( | const State & | state | ) |
Change the state to be a copy of the given one.
state | the state to be copied |
References elm::cerr, clear(), elm::io::endl, first, otawa::clp::State::Node::next, otawa::p::print(), print(), registers, tmpreg, and TRACED.
Referenced by operator=(), and State().
bool otawa::clp::State::equals | ( | const State & | state | ) | const |
References otawa::clp::State::Node::addr, first, otawa::clp::Value::kind(), otawa::clp::State::Node::next, registers, and otawa::clp::State::Node::val.
Referenced by operator==().
Return a stored value.
addr | is the addresse to get the value of. The kind of the value can be REG for a register, or VAL for memory. The address is considered as constant, the lower() attribute is the value. |
References otawa::clp::State::Node::addr, otawa::clp::Value::isConst(), otawa::clp::Value::kind(), otawa::clp::Value::lower(), otawa::clp::State::Node::next, otawa::clp::REG, and otawa::clp::State::Node::val.
Referenced by otawa::se::getFilterForAddr(), otawa::se::getFilterForReg(), and otawa::dcache::CLPBlockBuilder::processBB().
void otawa::clp::State::join | ( | const State & | state | ) |
Merge a state with the current one.
References otawa::clp::ALL, elm::cerr, copy(), elm::io::endl, first, otawa::clp::Value::join(), otawa::clp::State::Node::next, otawa::p::print(), print(), registers, tmpreg, TRACED, TRACEJ, and otawa::clp::State::Node::val.
void otawa::clp::State::print | ( | io::Output & | out, |
const hard::Platform * | pf = 0 |
||
) | const |
Print the state.
References CLP_END, CLP_START, otawa::hard::Platform::findReg(), otawa::clp::Value::kind(), otawa::hard::Register::name(), otawa::clp::State::Node::next, and otawa::clp::VAL.
Referenced by copy(), join(), otawa::clp::operator<<(), and widening().
Define a value into a register or the memory.
addr | a value of kind REG for a register, VAL for the memory. The value must be a constant (only the lower() attribute will be used) or all. |
val | the value to store at the given address |
References otawa::clp::ALL, elm::cerr, clear(), elm::io::endl, otawa::clp::Value::isConst(), otawa::clp::Value::kind(), otawa::clp::Value::lower(), otawa::clp::State::Node::next, otawa::p::print(), otawa::clp::REG, and TRACED.
void otawa::clp::State::widening | ( | const State & | state, |
int | loopBound | ||
) |
Perform a widening.
state | the state of the next iteration |
loopBound | is the number of iteration of the loop. A different widening operation will be used if the loopBound is known (>=0) or not. |
References otawa::clp::ALL, elm::cerr, copy(), elm::io::endl, otawa::clp::Value::ffwidening(), first, otawa::clp::State::Node::next, otawa::p::print(), print(), registers, tmpreg, TRACED, and otawa::clp::State::Node::val.
|
static |
Referenced by otawa::DeadCodeAnalysis::processWorkSpace(), and otawa::clp::ClpStatePack::state_after().
|
protected |
Referenced by copy(), equals(), join(), and widening().
|
static |
|
protected |
Referenced by copy(), equals(), otawa::clp::State::Iter::isReg(), otawa::clp::State::Iter::item(), join(), and widening().
|
protected |
Referenced by copy(), join(), and widening().