souffle
2.0.2-371-g6315b36
|
Database normaliser for MST. More...
#include <MagicSet.h>
Public Member Functions | |
NormaliseDatabaseTransformer * | 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 Member Functions | |
bool | transform (TranslationUnit &translationUnit) override |
Static Private Member Functions | |
static bool | extractIDB (TranslationUnit &translationUnit) |
Separates the IDB from the EDB, so that they are disjoint. More... | |
static bool | normaliseArguments (TranslationUnit &translationUnit) |
Normalise all arguments within each clause. More... | |
static bool | partitionIO (TranslationUnit &translationUnit) |
Partitions the input and output relations. More... | |
static bool | querifyOutputRelations (TranslationUnit &translationUnit) |
Extracts output relations into separate simple query relations, so that they are unused in any other rules. More... | |
Database normaliser for MST.
Effects:
Definition at line 112 of file MagicSet.h.
|
inlineoverridevirtual |
Implements souffle::ast::transform::Transformer.
Definition at line 118 of file MagicSet.h.
|
staticprivate |
Separates the IDB from the EDB, so that they are disjoint.
Program will no longer have input relations that appear as the head of clauses.
Definition at line 380 of file MagicSet.cpp.
References souffle::ast::visitDepthFirst().
|
inlineoverridevirtual |
Implements souffle::ast::transform::Transformer.
Definition at line 114 of file MagicSet.h.
|
staticprivate |
Normalise all arguments within each clause.
All arguments in all clauses will now be either: (1) a variable, or (2) the RHS of a <var> = <arg>
constraint
Definition at line 517 of file MagicSet.cpp.
|
staticprivate |
Partitions the input and output relations.
Program will no longer have relations that are both input and output.
Definition at line 312 of file MagicSet.cpp.
References rel().
|
staticprivate |
Extracts output relations into separate simple query relations, so that they are unused in any other rules.
Programs will only contain output relations which: (1) have exactly one rule defining them (2) do not appear in other rules
Definition at line 443 of file MagicSet.cpp.
References souffle::ast::visitDepthFirst().
|
overrideprivatevirtual |
(1) Partition input and output relations
(2) Separate the IDB from the EDB
(3) Normalise arguments within each clause
(4) Querify output relations
Implements souffle::ast::transform::Transformer.
Definition at line 290 of file MagicSet.cpp.