souffle
2.0.2-371-g6315b36
|
#include <Component.h>
Public Member Functions | |
void | addBaseComponent (Own< ComponentType > component) |
Add base components. More... | |
void | addClause (Own< Clause > c) |
Add clause. More... | |
void | addComponent (Own< Component > c) |
Add components. More... | |
void | addDirective (Own< Directive > directive) |
Add directive. More... | |
void | addInstantiation (Own< ComponentInit > i) |
Add instantiation. More... | |
void | addOverride (const std::string &name) |
Add override. More... | |
void | addRelation (Own< Relation > r) |
Add relation. More... | |
void | addType (Own< Type > t) |
Add type. More... | |
void | apply (const NodeMapper &mapper) override |
Apply the mapper to all child nodes. More... | |
Component * | clone () const override |
Create a clone (i.e. More... | |
void | copyBaseComponents (const Component &other) |
Copy base components. More... | |
const std::vector< ComponentType * > | getBaseComponents () const |
Get base components. More... | |
std::vector< const Node * > | getChildNodes () const override |
Obtain a list of all embedded AST child nodes. More... | |
std::vector< Clause * > | getClauses () const |
Get clauses. More... | |
std::vector< Component * > | getComponents () const |
Get components. More... | |
const ComponentType * | getComponentType () const |
Get component type. More... | |
std::vector< Directive * > | getDirectives () const |
Get directive statements. More... | |
std::vector< ComponentInit * > | getInstantiations () const |
Get instantiation. More... | |
const std::set< std::string > & | getOverridden () const |
Get override. More... | |
std::vector< Relation * > | getRelations () const |
Get relations. More... | |
std::vector< Type * > | getTypes () const |
Get types. More... | |
void | setComponentType (Own< ComponentType > other) |
Set component type. More... | |
Public Member Functions inherited from souffle::ast::Node | |
std::string | extloc () const |
Return source location of the syntactic element. 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 &os) const override |
Output to a given output stream. More... | |
Protected Attributes | |
VecOwn< ComponentType > | baseComponents |
Base components of component. More... | |
VecOwn< Clause > | clauses |
Clauses. More... | |
VecOwn< Component > | components |
Nested components. More... | |
Own< ComponentType > | componentType |
Name of component and its formal component arguments. More... | |
VecOwn< Directive > | directives |
I/O directives. More... | |
VecOwn< ComponentInit > | instantiations |
Nested component instantiations. More... | |
std::set< std::string > | overrideRules |
Clauses of relations that are overwritten by this component. More... | |
VecOwn< Relation > | relations |
Relations. More... | |
VecOwn< Type > | types |
Types declarations. More... | |
Component class.
Example: .comp X = { .decl A(y:number) A(1). }
Component consists of type declaration, relations, rules, etc.
Definition at line 58 of file Component.h.
|
inline |
Add base components.
Definition at line 76 of file Component.h.
|
inline |
Add instantiation.
Definition at line 136 of file Component.h.
|
inline |
|
inlineoverridevirtual |
Apply the mapper to all child nodes.
Reimplemented from souffle::ast::Node.
Definition at line 169 of file Component.h.
|
inlineoverridevirtual |
Create a clone (i.e.
deep copy) of this node
Implements souffle::ast::Node.
Definition at line 155 of file Component.h.
|
inline |
Copy base components.
Definition at line 91 of file Component.h.
|
inlineoverrideprotectedvirtual |
Abstract equality check for two AST nodes.
Reimplemented from souffle::ast::Node.
Definition at line 242 of file Component.h.
|
inline |
|
inlineoverridevirtual |
Obtain a list of all embedded AST child nodes.
Reimplemented from souffle::ast::Node.
Definition at line 194 of file Component.h.
|
inline |
Get clauses.
Definition at line 111 of file Component.h.
|
inline |
Get components.
Definition at line 131 of file Component.h.
Referenced by souffle::ast::analysis::ComponentLookupAnalysis::run().
|
inline |
Get component type.
Definition at line 61 of file Component.h.
|
inline |
Get directive statements.
Definition at line 121 of file Component.h.
|
inline |
Get instantiation.
Definition at line 141 of file Component.h.
|
inline |
Get override.
Definition at line 151 of file Component.h.
|
inline |
Get relations.
Definition at line 101 of file Component.h.
|
inline |
|
inlineoverrideprotectedvirtual |
Output to a given output stream.
Implements souffle::ast::Node.
Definition at line 223 of file Component.h.
|
inline |
|
protected |
Base components of component.
Definition at line 279 of file Component.h.
Clauses.
Definition at line 288 of file Component.h.
Nested components.
Definition at line 294 of file Component.h.
|
protected |
Name of component and its formal component arguments.
Definition at line 276 of file Component.h.
I/O directives.
Definition at line 291 of file Component.h.
|
protected |
Nested component instantiations.
Definition at line 297 of file Component.h.
|
protected |
Clauses of relations that are overwritten by this component.
Definition at line 300 of file Component.h.
Relations.
Definition at line 285 of file Component.h.
Types declarations.
Definition at line 282 of file Component.h.