souffle
2.0.2-371-g6315b36
|
Go to the documentation of this file.
35 bool operator()(TypeSet& a,
const TypeSet&
b)
const {
40 if (greatestCommonSubtypes == a) {
45 a = greatestCommonSubtypes;
A base class for ConstraintAnalysis collecting constraints for an analysis by visiting every node of ...
bool operator()(TypeSet &a, const TypeSet &b) const
void visitTypeCast(const ast::TypeCast &typeCast) override
A variable type to be utilized by AST constraint analysis.
auto map(const std::vector< A > &xs, F &&f)
Applies a function to each element of a vector and returns the results.
void visitFunctor(const Functor &fun) override
Intermediate representation of a horn clause.
An abstract base class for types to be covered within a type environment.
const TranslationUnit & tu
A collection to represent sets of types.
counter functor (incrementing a value after each invocation)
void visitCounter(const Counter &counter) override
TypeSet getGreatestCommonSubtypes(const Type &a, const Type &b)
Computes the greatest common sub types of the two given types.
An abstract class for arguments.
The program class consists of relations, clauses and types.
const TypeAnalysis & typeAnalysis
void visitBinaryConstraint(const BinaryConstraint &rel) override
void visitSink(const Atom &atom)
Defines a type cast class for expressions.
const TypeEnvironment & typeEnv
Negation of an atom negated atom.
void visitStringConstant(const StringConstant &cnst) override
A type environment is a set of types.
Translation unit class for the translation pipeline.
std::shared_ptr< Constraint< TypeVar > > TypeConstraint
The definition of the type of constraint to be utilized in the type analysis.
A MPL type for defining a property space.
std::set< const Atom * > sinks
Constraint analysis framework for types.
Analysis * getAnalysis() const
get analysis: analysis is generated on the fly if not present
Defines the aggregator class.
l j a showGridBackground &&c b raw series this eventEmitter b
void visitNegation(const Negation &cur) override
void visitNumericConstant(const NumericConstant &constant) override
const SumTypeBranchesAnalysis & sumTypesBranches
TypeSet operator()() const
void collectConstraints(const Clause &clause) override
Visitors.
TypeConstraintsAnalysis(const TranslationUnit &tu)
void visitBranchInit(const BranchInit &adt) override
Initialization of ADT instance.
void visitAggregator(const Aggregator &agg) override
void iterateOverAtom(const Atom &atom, std::function< void(const Argument &, const Type &)> map)
Utility function.
void rel(size_t limit, bool showLimit=true)
void visitRecordInit(const RecordInit &record) override
Program & getProgram() const
Return the program.
A factory for computing sets of types covering all potential types.
The type lattice forming the property space for the Type analysis.
Defines a record initialization class.
void visitAtom(const Atom &atom) override