Otawa  0.10
otawa::ast::ASTInfo Class Reference

This class stores all the function known for the current framework. More...

#include <otawa/ast/ASTInfo.h>

Inheritance diagram for otawa::ast::ASTInfo:
otawa::PropList

Classes

class  Iterator
 

Public Member Functions

 ~ASTInfo (void)
 
FunASTgetFunction (Inst *inst)
 Find the function at the given instruction. More...
 
void add (FunAST *fun)
 Add a function to the AST information. More...
 
Option< FunAST * > get (const string &name)
 
PropertygetProp (const AbstractIdentifier *id) const
 Find a property by its identifier. More...
 
void setProp (Property *prop)
 Set the property in the property list removing any double. More...
 
void setProp (const AbstractIdentifier *id)
 
void removeProp (const AbstractIdentifier *id)
 Remove a property matching the given identifier. More...
 
void removeProp (const AbstractIdentifier &id)
 
PropertyextractProp (const AbstractIdentifier *id)
 Remove a property matching the given identifier and return it. More...
 
PropertyextractProp (const AbstractIdentifier &id)
 Remove a property matching the given identifier and return it. More...
 
void addProp (Property *prop)
 Add property to the list without checking of duplication. More...
 
void removeAllProp (const AbstractIdentifier *id)
 Remove all the properties matching the given identifier. More...
 
bool hasProp (const AbstractIdentifier &id) const
 Test if the property list contains a property matching the given identifier. More...
 
void clearProps (void)
 Remove all properties from the list. More...
 
void addProps (const PropList &props)
 Add all properties from the given property list, in a reverse order. More...
 
void print (elm::io::Output &out) const
 Display the current property list. More...
 

Static Public Member Functions

static ASTInfogetInfo (WorkSpace *ws)
 Find or create the AST information attached to the given process. More...
 

Static Public Attributes

static const PropList EMPTY
 This is an empty proplist for convenience. More...
 

Private Member Functions

friend int::heptane_parse (void)
 
 ASTInfo (WorkSpace *ws)
 Build an new AST info linked to the given framework. More...
 

Private Attributes

elm::genstruct::Vector< FunAST * > funs
 
elm::genstruct::HashTable
< String, FunAST * > 
_map
 

Friends

class CallAST
 
class FunAST
 
class GenericProperty< ASTInfo * >
 

Detailed Description

This class stores all the function known for the current framework.

It provides list access name mapped access.

Constructor & Destructor Documentation

otawa::ast::ASTInfo::~ASTInfo ( void  )

References funs.

otawa::ast::ASTInfo::ASTInfo ( WorkSpace ws)
private

Build an new AST info linked to the given framework.

Parameters
wsWorkspace to link to.

References otawa::PropList::addProp(), and otawa::ast::INFO.

Referenced by getInfo().

Member Function Documentation

void otawa::ast::ASTInfo::add ( FunAST fun)

Add a function to the AST information.

Parameters
funFunction to add.

References _map, funs, otawa::ast::FunAST::name(), and name.

Referenced by otawa::ast::FunAST::FunAST(), and yyparse().

void otawa::PropList::clearProps ( void  )
inherited
Property * otawa::PropList::extractProp ( const AbstractIdentifier id)
inherited

Remove a property matching the given identifier and return it.

Caller is responsible of the management of the obtained property.

Parameters
idIdentifier of the property to extract.

References otawa::Property::_next, and otawa::Property::next().

Referenced by otawa::script::Script::makeConfig().

Property * otawa::PropList::extractProp ( const AbstractIdentifier id)
inlineinherited

Remove a property matching the given identifier and return it.

Caller is responsible of the management of the obtained property.

Parameters
idIdentifier of the property to extract.

References otawa::PropList::extractProp().

Referenced by otawa::PropList::extractProp().

FunAST * otawa::ast::ASTInfo::getFunction ( Inst inst)

Find the function at the given instruction.

If no functions exsists, return a new created function.

Parameters
instFirst instruction of the function.
Returns
Found or created AST function.

References otawa::ast::FUN, and FunAST.

Referenced by otawa::ast::CallAST::CallAST(), otawa::ast::ASTLoader::makeBlock(), and yyparse().

ASTInfo * otawa::ast::ASTInfo::getInfo ( WorkSpace ws)
static

Find or create the AST information attached to the given process.

Parameters
wsWorkspace to look in.
Returns
AST information of the process.

References ASTInfo(), and otawa::ast::INFO.

Referenced by otawa::ast::ASTLoader::makeBlock(), and otawa::ast::FunProcessor::processWorkSpace().

bool otawa::PropList::hasProp ( const AbstractIdentifier id) const
inlineinherited

Test if the property list contains a property matching the given identifier.

Parameters
idProperty identifier to look for.
Returns
True if the list contains the matching property, false else.

References otawa::PropList::getProp().

Referenced by otawa::ipet::BasicConstraintsBuilder::addEntryConstraint(), otawa::Monitor::configure(), otawa::ImmutableRef< T, I >::exists(), and otawa::Manager::setVerbosity().

void otawa::PropList::print ( elm::io::Output out) const
inherited

Display the current property list.

Parameters
outOutput to use.

Referenced by otawa::operator<<(), and otawa::ContextualProperty::print().

void otawa::PropList::removeAllProp ( const AbstractIdentifier id)
inherited

Remove all the properties matching the given identifier.

Parameters
idIdentifier of properties to remove.

References otawa::Property::_next, and otawa::Property::next().

Referenced by otawa::LoopUnroller::unroll().

void otawa::PropList::removeProp ( const AbstractIdentifier id)
inherited
void otawa::PropList::removeProp ( const AbstractIdentifier id)
inlineinherited
void otawa::PropList::setProp ( Property prop)
inherited

Set the property in the property list removing any double.

Parameters
propProperty to set.

References otawa::Property::_next, otawa::Property::id(), and otawa::Property::next().

void otawa::PropList::setProp ( const AbstractIdentifier id)
inlineinherited

Friends And Related Function Documentation

friend class CallAST
friend
friend class FunAST
friend

Referenced by getFunction().

friend class GenericProperty< ASTInfo * >
friend

Member Data Documentation

elm::genstruct::HashTable<String, FunAST *> otawa::ast::ASTInfo::_map
private

Referenced by add(), and get().

const PropList otawa::PropList::EMPTY
staticinherited

This is an empty proplist for convenience.

elm::genstruct::Vector<FunAST *> otawa::ast::ASTInfo::funs
private

Referenced by add(), and ~ASTInfo().


The documentation for this class was generated from the following files: