souffle
2.0.2-371-g6315b36
|
Database adornment. More...
#include <MagicSet.h>
Public Member Functions | |
AdornDatabaseTransformer * | clone () const override |
std::string | getName () const override |
Public Member Functions inherited from souffle::ast::transform::Transformer | |
bool | apply (TranslationUnit &translationUnit) |
virtual | ~Transformer ()=default |
Private Types | |
using | adorned_predicate = std::pair< QualifiedName, std::string > |
Private Member Functions | |
Own< Clause > | adornClause (const Clause *clause, const std::string &adornmentMarker) |
Returns the adorned version of a clause. More... | |
bool | hasAdornmentToProcess () const |
Check if any more relations need to be adorned. More... | |
adorned_predicate | nextAdornmentToProcess () |
Pop off the next predicate adornment to process. More... | |
void | queueAdornment (const QualifiedName &relName, const std::string &adornmentMarker) |
Add an adornment to the ToDo queue if it hasn't been processed before. More... | |
bool | transform (TranslationUnit &translationUnit) override |
Static Private Member Functions | |
static QualifiedName | getAdornmentID (const QualifiedName &relName, const std::string &adornmentMarker) |
Get the unique identifier corresponding to an adorned predicate. More... | |
Private Attributes | |
VecOwn< Clause > | adornedClauses |
std::set< QualifiedName > | headAdornmentsSeen |
std::set< adorned_predicate > | headAdornmentsToDo |
VecOwn< Clause > | redundantClauses |
std::set< QualifiedName > | weaklyIgnoredRelations |
Database adornment.
Adorns the rules of a database with variable flow and binding information. Prerequisite for the magic set transformation.
Definition at line 230 of file MagicSet.h.
|
private |
Definition at line 241 of file MagicSet.h.
|
private |
Returns the adorned version of a clause.
Definition at line 628 of file MagicSet.cpp.
References souffle::ast::BindingStore::bindVariableWeakly(), and i.
|
inlineoverridevirtual |
Implements souffle::ast::transform::Transformer.
Definition at line 236 of file MagicSet.h.
|
staticprivate |
Get the unique identifier corresponding to an adorned predicate.
Definition at line 618 of file MagicSet.cpp.
Referenced by queueAdornment().
|
inlineoverridevirtual |
Implements souffle::ast::transform::Transformer.
Definition at line 232 of file MagicSet.h.
|
inlineprivate |
Check if any more relations need to be adorned.
Definition at line 265 of file MagicSet.h.
References headAdornmentsToDo.
Referenced by nextAdornmentToProcess().
|
inlineprivate |
Pop off the next predicate adornment to process.
Definition at line 270 of file MagicSet.h.
References hasAdornmentToProcess(), and headAdornmentsToDo.
|
inlineprivate |
Add an adornment to the ToDo queue if it hasn't been processed before.
Definition at line 256 of file MagicSet.h.
References souffle::contains(), getAdornmentID(), headAdornmentsSeen, and headAdornmentsToDo.
|
overrideprivatevirtual |
Implements souffle::ast::transform::Transformer.
Definition at line 730 of file MagicSet.cpp.
References rel().
|
private |
Definition at line 246 of file MagicSet.h.
|
private |
Definition at line 244 of file MagicSet.h.
Referenced by queueAdornment().
|
private |
Definition at line 243 of file MagicSet.h.
Referenced by hasAdornmentToProcess(), nextAdornmentToProcess(), and queueAdornment().
|
private |
Definition at line 247 of file MagicSet.h.
|
private |
Definition at line 248 of file MagicSet.h.