souffle  2.0.2-371-g6315b36
Public Member Functions | Private Member Functions
souffle::ast::transform::ComponentInstantiationTransformer Class Reference

#include <ComponentInstantiation.h>

Inheritance diagram for souffle::ast::transform::ComponentInstantiationTransformer:
Inheritance graph
Collaboration diagram for souffle::ast::transform::ComponentInstantiationTransformer:
Collaboration graph

Public Member Functions

ComponentInstantiationTransformerclone () const override
 
std::string getName () const override
 
- Public Member Functions inherited from souffle::ast::transform::Transformer
bool apply (TranslationUnit &translationUnit)
 
virtual ~Transformer ()=default
 

Private Member Functions

bool transform (TranslationUnit &translationUnit) override
 

Detailed Description

Definition at line 27 of file ComponentInstantiation.h.

Member Function Documentation

◆ clone()

ComponentInstantiationTransformer* souffle::ast::transform::ComponentInstantiationTransformer::clone ( ) const
inlineoverridevirtual

Implements souffle::ast::transform::Transformer.

Definition at line 37 of file ComponentInstantiation.h.

◆ getName()

std::string souffle::ast::transform::ComponentInstantiationTransformer::getName ( ) const
inlineoverridevirtual

Implements souffle::ast::transform::Transformer.

Definition at line 33 of file ComponentInstantiation.h.

33  :
34  bool transform(TranslationUnit& translationUnit) override;
35 };

◆ transform()

bool souffle::ast::transform::ComponentInstantiationTransformer::transform ( TranslationUnit translationUnit)
overrideprivatevirtual

Implements souffle::ast::transform::Transformer.

Definition at line 438 of file ComponentInstantiation.cpp.

438  : program.getComponentInstantiations()) {
439  std::vector<Own<Clause>> orphans;
440 
441  auto content = getInstantiatedContent(program, *cur, nullptr, *componentLookup, orphans, report);
442  if (report.getNumErrors() != 0) continue;
443 
444  for (auto& type : content.types) {
445  program.addType(std::move(type));
446  }
447  for (auto& rel : content.relations) {
448  program.addRelation(std::move(rel));
449  }
450  for (auto& clause : content.clauses) {
451  program.addClause(std::move(clause));
452  }
453  for (auto& orphan : orphans) {
454  program.addClause(std::move(orphan));
455  }
456  for (auto& directive : content.directives) {
457  program.addDirective(std::move(directive));
458  }
459  }
460 
461  // delete components and instantiations
462  program.clearComponents();
463 
464  return true;
465 }
466 
467 } // namespace souffle::ast::transform

References rel().

Here is the call graph for this function:

The documentation for this class was generated from the following files:
souffle::ast::transform::ComponentInstantiationTransformer::transform
bool transform(TranslationUnit &translationUnit) override
Definition: ComponentInstantiation.cpp:438
rel
void rel(size_t limit, bool showLimit=true)
Definition: Tui.h:1086
std::type
ElementType type
Definition: span.h:640