souffle  2.0.2-371-g6315b36
Data Structures | Namespaces | Functions
InlineRelations.cpp File Reference
#include "ast/transform/InlineRelations.h"
#include "AggregateOp.h"
#include "RelationTag.h"
#include "ast/Aggregator.h"
#include "ast/Argument.h"
#include "ast/Atom.h"
#include "ast/BinaryConstraint.h"
#include "ast/BooleanConstraint.h"
#include "ast/Clause.h"
#include "ast/Constant.h"
#include "ast/Constraint.h"
#include "ast/Functor.h"
#include "ast/IntrinsicFunctor.h"
#include "ast/Literal.h"
#include "ast/Negation.h"
#include "ast/Node.h"
#include "ast/NumericConstant.h"
#include "ast/Program.h"
#include "ast/QualifiedName.h"
#include "ast/RecordInit.h"
#include "ast/Relation.h"
#include "ast/TranslationUnit.h"
#include "ast/TypeCast.h"
#include "ast/UnnamedVariable.h"
#include "ast/UserDefinedFunctor.h"
#include "ast/Variable.h"
#include "ast/analysis/PolymorphicObjects.h"
#include "ast/utility/NodeMapper.h"
#include "ast/utility/Utils.h"
#include "ast/utility/Visitor.h"
#include "souffle/BinaryConstraintOps.h"
#include "souffle/utility/MiscUtil.h"
#include <algorithm>
#include <cassert>
#include <cstddef>
#include <memory>
#include <optional>
#include <ostream>
#include <set>
#include <string>
#include <utility>
#include <vector>
Include dependency graph for InlineRelations.cpp:

Go to the source code of this file.

Data Structures

class  souffle::ast::transform::NullableVector< T >
 

Namespaces

 souffle
 
 souffle::ast
 
 souffle::ast::transform
 

Functions

Argument * souffle::ast::transform::combineAggregators (std::vector< Aggregator * > aggrs, std::string fun)
 
std::vector< std::vector< Literal * > > souffle::ast::transform::combineNegatedLiterals (std::vector< std::vector< Literal * >> litGroups)
 Return the negated version of a disjunction of conjunctions. More...
 
bool souffle::ast::transform::containsInlinedAtom (const Program &program, const Clause &clause)
 Checks if a given clause contains an atom that should be inlined. More...
 
std::vector< std::vector< Literal * > > souffle::ast::transform::formNegatedLiterals (Program &program, Atom *atom)
 Forms the bodies that will replace the negation of a given inlined atom. More...
 
NullableVector< Argument * > souffle::ast::transform::getInlinedArgument (Program &program, const Argument *arg)
 Returns a vector of arguments that should replace the given argument after one step of inlining. More...
 
NullableVector< Atom * > souffle::ast::transform::getInlinedAtom (Program &program, Atom &atom)
 Returns a vector of atoms that should replace the given atom after one step of inlining. More...
 
std::vector< Clause * > souffle::ast::transform::getInlinedClause (Program &program, const Clause &clause)
 Returns a list of clauses that should replace the given clause after one step of inlining. More...
 
NullableVector< std::vector< Literal * > > souffle::ast::transform::getInlinedLiteral (Program &program, Literal *lit)
 Tries to perform a single step of inlining on the given literal. More...
 
std::pair< NullableVector< Literal * >, std::vector< BinaryConstraint * > > souffle::ast::transform::inlineBodyLiterals (Atom *atom, Clause *atomInlineClause)
 Inlines the given atom based on a given clause. More...
 
bool souffle::ast::transform::nameInlinedUnderscores (Program &program)
 Removes all underscores in all atoms of inlined relations. More...
 
Literal * souffle::ast::transform::negateLiteral (Literal *lit)
 Returns the negated version of a given literal. More...
 
bool souffle::ast::transform::normaliseInlinedHeads (Program &program)
 Replace constants in the head of inlined clauses with (constrained) variables. More...
 
bool souffle::ast::transform::reduceSubstitution (std::vector< std::pair< Argument *, Argument * >> &sub)
 Reduces a vector of substitutions. More...
 
void souffle::ast::transform::renameVariables (Argument *arg)
 Renames all variables in a given argument uniquely. More...
 
NullableVector< std::pair< Argument *, Argument * > > souffle::ast::transform::unifyAtoms (Atom *first, Atom *second)
 Returns the nullable vector of substitutions needed to unify the two given atoms. More...