souffle  2.0.2-371-g6315b36
Namespaces | Functions
Utils.cpp File Reference
#include "ast/utility/Utils.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/Constraint.h"
#include "ast/Directive.h"
#include "ast/ExecutionPlan.h"
#include "ast/IntrinsicFunctor.h"
#include "ast/Literal.h"
#include "ast/Negation.h"
#include "ast/Node.h"
#include "ast/Program.h"
#include "ast/QualifiedName.h"
#include "ast/Relation.h"
#include "ast/TranslationUnit.h"
#include "ast/analysis/Functor.h"
#include "ast/analysis/RelationDetailCache.h"
#include "ast/analysis/Type.h"
#include "ast/analysis/TypeSystem.h"
#include "ast/utility/NodeMapper.h"
#include "ast/utility/Visitor.h"
#include "souffle/BinaryConstraintOps.h"
#include "souffle/TypeAttribute.h"
#include "souffle/utility/ContainerUtil.h"
#include "souffle/utility/FunctionalUtil.h"
#include "souffle/utility/MiscUtil.h"
#include "souffle/utility/StringUtil.h"
#include <algorithm>
#include <cassert>
#include <memory>
Include dependency graph for Utils.cpp:

Go to the source code of this file.

Namespaces

 souffle
 
 souffle::ast
 

Functions

Clause * souffle::ast::cloneHead (const Clause *clause)
 Returns a clause which contains head of the given clause. More...
 
const Relation * souffle::ast::getAtomRelation (const Atom *atom, const Program *program)
 Returns the relation referenced by the given atom. More...
 
std::set< const Relation * > souffle::ast::getBodyRelations (const Clause *clause, const Program *program)
 Returns the relations referenced in the body of the given clause. More...
 
size_t souffle::ast::getClauseNum (const Program *program, const Clause *clause)
 Returns the index of a clause within its relation, ignoring facts. More...
 
std::vector< Clause * > souffle::ast::getClauses (const Program &program, const QualifiedName &relationName)
 Returns a vector of clauses in the program describing the relation with the given name. More...
 
std::vector< Clause * > souffle::ast::getClauses (const Program &program, const Relation &rel)
 Returns a vector of clauses in the program describing the given relation. More...
 
std::vector< Directive * > souffle::ast::getDirectives (const Program &program, const QualifiedName &relationName)
 
const Relation * souffle::ast::getHeadRelation (const Clause *clause, const Program *program)
 Returns the relation referenced by the head of the given clause. More...
 
std::vector< const RecordInit * > souffle::ast::getRecords (const Node &root)
 Obtains a list of all records referenced within the AST rooted by the given root node. More...
 
Relation * souffle::ast::getRelation (const Program &program, const QualifiedName &name)
 Returns the relation with the given name in the program. More...
 
std::vector< const Variable * > souffle::ast::getVariables (const Node &root)
 Obtains a list of all variables referenced within the AST rooted by the given root node. More...
 
bool souffle::ast::hasClauseWithAggregatedRelation (const Relation *relation, const Relation *aggRelation, const Program *program, const Literal *&foundLiteral)
 Returns whether the given relation has any clauses which contain an aggregation over of a specific relation. More...
 
bool souffle::ast::hasClauseWithNegatedRelation (const Relation *relation, const Relation *negRelation, const Program *program, const Literal *&foundLiteral)
 Returns whether the given relation has any clauses which contain a negation of a specific relation. More...
 
bool souffle::ast::isDeltaRelation (const QualifiedName &name)
 Returns whether the given atom is a delta relation. More...
 
bool souffle::ast::isFact (const Clause &clause)
 Returns whether the given clause is a fact. More...
 
bool souffle::ast::isProposition (const Atom *atom)
 Returns whether the given atom is a propositon. More...
 
bool souffle::ast::isRecursiveClause (const Clause &clause)
 Returns whether the given clause is recursive. More...
 
bool souffle::ast::isRule (const Clause &clause)
 Returns whether the given clause is a rule. More...
 
void souffle::ast::negateConstraintInPlace (Constraint &constraint)
 Negate an ast constraint. More...
 
std::string souffle::ast::pprint (const Node &node)
 
void souffle::ast::removeRelation (TranslationUnit &tu, const QualifiedName &name)
 Remove relation and all its clauses from the program. More...
 
void souffle::ast::removeRelationClauses (TranslationUnit &tu, const QualifiedName &name)
 Removes the set of clauses with the given relation name. More...
 
void souffle::ast::removeRelationIOs (TranslationUnit &tu, const QualifiedName &name)
 Removes the set of IOs with the given relation name. More...
 
bool souffle::ast::renameAtoms (Node &node, const std::map< QualifiedName, QualifiedName > &oldToNew)
 Rename all atoms hat appear in a node to a given name. More...
 
Clause * souffle::ast::reorderAtoms (const Clause *clause, const std::vector< unsigned int > &newOrder)
 Reorders the atoms of a clause to be in the given order. More...