|
souffle
2.0.2-371-g6315b36
|
User-defined functor declaration. More...
#include <FunctorDeclaration.h>


Public Member Functions | |
| FunctorDeclaration * | clone () const override |
| Create a clone (i.e. More... | |
| FunctorDeclaration (std::string name, std::vector< TypeAttribute > argsTypes, TypeAttribute returnType, bool stateful, SrcLocation loc={}) | |
| const std::vector< TypeAttribute > & | getArgsTypes () const |
| Return type. More... | |
| size_t | getArity () const |
| Return number of arguments. More... | |
| const std::string & | getName () const |
| Return name. More... | |
| TypeAttribute | getReturnType () const |
| Get return type. More... | |
| bool | isStateful () const |
| Check whether functor is stateful. More... | |
Public Member Functions inherited from souffle::ast::Node | |
| virtual void | apply (const NodeMapper &) |
| Apply the mapper to all child nodes. More... | |
| std::string | extloc () const |
| Return source location of the syntactic element. More... | |
| virtual std::vector< const Node * > | getChildNodes () const |
| Obtain a list of all embedded AST child nodes. More... | |
| const SrcLocation & | getSrcLoc () const |
| Return source location of the Node. More... | |
| Node (SrcLocation loc={}) | |
| bool | operator!= (const Node &other) const |
| Inequality check for two AST nodes. More... | |
| bool | operator== (const Node &other) const |
| Equivalence check for two AST nodes. More... | |
| void | setSrcLoc (SrcLocation l) |
| Set source location for the Node. More... | |
| virtual | ~Node ()=default |
Protected Member Functions | |
| bool | equal (const Node &node) const override |
| Abstract equality check for two AST nodes. More... | |
| void | print (std::ostream &out) const override |
| Output to a given output stream. More... | |
Protected Attributes | |
| const std::vector< TypeAttribute > | argsTypes |
| Types of arguments. More... | |
| const std::string | name |
| Name of functor. More... | |
| const TypeAttribute | returnType |
| Type of the return value. More... | |
| const bool | stateful |
| Stateful flag. More... | |
User-defined functor declaration.
Example: .declfun foo(x:number, y:number):number
Definition at line 49 of file FunctorDeclaration.h.
|
inline |
|
inlineoverridevirtual |
Create a clone (i.e.
deep copy) of this node
Implements souffle::ast::Node.
Definition at line 83 of file FunctorDeclaration.h.
References souffle::Float, souffle::Signed, and souffle::Symbol.
|
inlineoverrideprotectedvirtual |
Abstract equality check for two AST nodes.
Reimplemented from souffle::ast::Node.
Definition at line 109 of file FunctorDeclaration.h.
|
inline |
|
inline |
|
inline |
Return name.
Definition at line 59 of file FunctorDeclaration.h.
Referenced by souffle::ast::analysis::TypeAnalysis::run().
|
inline |
|
inline |
|
inlineoverrideprotectedvirtual |
Output to a given output stream.
Implements souffle::ast::Node.
Definition at line 88 of file FunctorDeclaration.h.
|
protected |
Types of arguments.
Definition at line 119 of file FunctorDeclaration.h.
|
protected |
Name of functor.
Definition at line 116 of file FunctorDeclaration.h.
Referenced by FunctorDeclaration().
|
protected |
Type of the return value.
Definition at line 122 of file FunctorDeclaration.h.
|
protected |
Stateful flag.
Definition at line 125 of file FunctorDeclaration.h.
1.8.17