Otawa  0.10
FunAST.h
Go to the documentation of this file.
1 /*
2  * FunAST class interface
3  *
4  * This file is part of OTAWA
5  * Copyright (c) 2003, 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_AST_FUN_AST_H
22 #define OTAWA_AST_FUN_AST_H
23 
24 #include <otawa/ast/AST.h>
25 #include <otawa/manager.h>
26 
27 namespace otawa { namespace ast {
28 
29 class ASTInfo;
30 
31 // FunAST class
32 class FunAST: public Lock {
33  friend class ASTInfo;
38  ~FunAST(void);
39 public:
40  FunAST(WorkSpace *ws, Inst *entry, String name = "");
42  inline Inst *entry(void) const { return ent; };
43  inline String& name(void) { return _name; };
44  inline AST *ast(void) const { return _ast; };
45  void setAst(AST *ast);
46  inline void setName(const String& name) { _name = name; };
47 };
48 
49 } } // otawa::ast
50 
51 #endif // OTAWA_AST_FUN_AST_H
void setAst(AST *ast)
Modify the AST representing the body of this function.
Definition: FunAST.cpp:111
This class represents functions in the AST representation.
Definition: FunAST.h:32
String & name(void)
Get the name of the function.
Definition: FunAST.h:43
AST * ast(void) const
Get the AST representing the body of this function.
Definition: FunAST.h:44
ASTInfo * info
Definition: FunAST.h:34
Inst * ent
Definition: FunAST.h:35
AST * _ast
Definition: FunAST.h:37
~FunAST(void)
Remove any link with the instruction representation.
Definition: FunAST.cpp:80
FunAST(WorkSpace *ws, Inst *entry, String name="")
Build a new function AST.
Definition: FunAST.cpp:58
void setName(const String &name)
Definition: FunAST.h:46
Inst * entry(void) const
Get the instruction entry of this function.
Definition: FunAST.h:42
A workspace represents a program, its run-time and all information about WCET computation or any othe...
Definition: WorkSpace.h:67
This class stores all the function known for the current framework.
Definition: ASTInfo.h:34
This is the base class for the representation of programs as Abstract Syntax Trees.
Definition: AST.h:53
This class represents assembly instruction of a piece of code.
Definition: Inst.h:62
String _name
Definition: FunAST.h:36