21 #ifndef OTAWA_AST_AST_H
22 #define OTAWA_AST_AST_H
24 #include <elm/util/AutoPtr.h>
28 namespace otawa {
namespace ast {
64 virtual bool isNOP(
void) {
return false; };
65 virtual bool isUndef(
void) {
return false; };
78 #endif // OTAWA_AST_AST_H
This class represents functions in the AST representation.
Definition: FunAST.h:32
Representation of C language FOR loop.
Definition: ForAST.h:29
Representation of an iteration with test at start of the loop.
Definition: WhileAST.h:29
static AST & UNDEF
Unique instance of the Undef AST.
Definition: AST.h:59
virtual ast_kind_t kind(void) const =0
Get the kind of the AST.
This class is a specialized block AST ended by a function call.
Definition: CallAST.h:30
virtual IfAST * toIf(void)
Get the selection AST if this AST is a selection, null else.
Definition: AST.h:69
virtual BlockAST * toBlock(void)
Get the block AST if this AST is a block, null else.
Definition: AST.h:66
virtual ~AST(void)
Definition: AST.h:56
static AST & NOP
Unique instance of the NOP AST.
Definition: AST.h:56
virtual int countInstructions(void) const =0
Count the number of instructions in the ast block.
Definition: AST.cpp:174
virtual void release(void)
Deletion of AST can only be performed using this method.
Definition: AST.cpp:92
virtual Inst * first(void)=0
virtual SeqAST * toSeq(void)
Get the sequence AST if this AST is a sequence, null else.
Definition: AST.h:68
virtual ForAST * toFor(void)
Get the repetition AST if this AST is a repetition, null else.
Definition: AST.h:72
virtual bool isNOP(void)
Test if the AST is the NOP AST.
Definition: AST.h:64
virtual CallAST * toCall(void)
Get the call AST if this AST is a call, null else.
Definition: AST.h:67
virtual WhileAST * toWhile(void)
Get the repetition AST if this AST is a repeatition, null else.
Definition: AST.h:70
AST for representing selections.
Definition: IfAST.h:29
This class represents the leafs of the AST.
Definition: BlockAST.h:30
This is the base class for the representation of programs as Abstract Syntax Trees.
Definition: AST.h:53
virtual DoWhileAST * toDoWhile(void)
Get the repetition AST if this AST is a repetition, null else.
Definition: AST.h:71
This class represents assembly instruction of a piece of code.
Definition: Inst.h:62
virtual bool isUndef(void)
Test if the AST is the undefined AST.
Definition: AST.h:65
This a list of properties.
Definition: PropList.h:63
This AST represents sequences.
Definition: SeqAST.h:29
ast_kind_t
Definition: AST.h:40
Representation of C do{ ...
Definition: DoWhileAST.h:29