ilasynth  1.0
ILASynth: Template-based ILA Synthesis Engine
func.hpp
Go to the documentation of this file.
1 
2 #ifndef __AST_FUNC_HPP_DEFINED__
3 #define __AST_FUNC_HPP_DEFINED__
4 
5 #include <boost/lexical_cast.hpp>
6 #include <boost/multiprecision/cpp_int.hpp>
7 #include <boost/python.hpp>
8 #include <boost/shared_ptr.hpp>
9 #include <iostream>
10 #include <string>
11 
12 #include <ilasynth/ast.hpp>
13 #include <ilasynth/ast/node.hpp>
14 #include <ilasynth/type.hpp>
15 
16 namespace ilasynth {
17 class Abstraction;
18 
19 // ---------------------------------------------------------------------- //
20 // Function expression.
21 class FuncExpr : public Node {
22 public:
23  // constructor.
24  FuncExpr(int retWidth, const std::vector<int>& argsWidth);
25  // constructor for ChoiceExpr.
26  FuncExpr(NodeType t);
27  // destructor.
28  virtual ~FuncExpr();
29 };
30 
31 // ---------------------------------------------------------------------- //
32 // Func variables.
33 class FuncVar : public FuncExpr {
34 public:
35  // constructor.
36  FuncVar(const std::string& name, int retWidth,
37  const std::vector<int>& argrsWidth);
38  // destructor.
39  virtual ~FuncVar();
40  // clone.
41  virtual Node* clone() const;
42  // equality method.
43  virtual bool equal(const Node* that) const;
44  // stream output.
45  virtual std::ostream& write(std::ostream& out) const;
46 };
47 } // namespace ilasynth
48 #endif
Definition: func.hpp:33
Definition: func.hpp:21
FuncVar(const std::string &name, int retWidth, const std::vector< int > &argrsWidth)
Definition: type.hpp:11
std::string name
Definition: node.hpp:67
virtual Node * clone() const
virtual bool equal(const Node *that) const
virtual ~FuncVar()
Definition: abstraction.hpp:21
Definition: node.hpp:55
FuncExpr(int retWidth, const std::vector< int > &argsWidth)
virtual std::ostream & write(std::ostream &out) const