souffle
2.0.2-371-g6315b36
|
Go to the documentation of this file.
34 class BinaryConstraint;
37 class FunctorDeclaration;
38 class IntrinsicFunctor;
39 class NumericConstant;
40 class UserDefinedFunctor;
47 static constexpr
const char*
name =
"type-analysis";
53 void print(std::ostream& os)
const override;
102 std::map<const IntrinsicFunctor*, const IntrinsicFunctorInfo*>
functorInfo;
static constexpr const char * name
bool analyseBinaryConstraints(const TranslationUnit &translationUnit)
bool analyseIntrinsicFunctors(const TranslationUnit &translationUnit)
std::stringstream analysisLogs
AggregateOp getPolymorphicOperator(const Aggregator *agg) const
NumericConstant::Type getPolymorphicNumericConstantType(const NumericConstant *nc) const
– Polymorphism-related methods –
static std::map< const Argument *, TypeSet > analyseTypes(const TranslationUnit &tu, const Clause &clause, std::ostream *logs=nullptr)
Analyse the given clause and computes for each contained argument a set of potential types.
AggregateOp
Types of aggregation functions.
std::map< const IntrinsicFunctor *, const IntrinsicFunctorInfo * > functorInfo
TypeSet const & getTypes(const Argument *argument) const
Get the computed types for the given argument.
void run(const TranslationUnit &translationUnit) override
run analysis for a Ast translation unit
IntrinsicFunctors getValidIntrinsicFunctorOverloads(const IntrinsicFunctor &inf) const
– Functor-related methods –
Intermediate representation of a horn clause.
User-Defined functor class.
std::map< const Argument *, TypeSet > argumentTypes
bool hasValidTypeInfo(const Argument *argument) const
A collection to represent sets of types.
std::map< const NumericConstant *, NumericConstant::Type > numericConstantType
std::vector< std::reference_wrapper< const IntrinsicFunctorInfo > > IntrinsicFunctors
An abstract class for arguments.
TypeAttribute getFunctorReturnType(const Functor *functor) const
void print(std::ostream &os) const override
print the analysis result in HTML format
bool analyseAggregators(const TranslationUnit &translationUnit)
bool isFloat(const Argument *argument) const
Intrinsic Functor class for functors are in-built.
Translation unit class for the translation pipeline.
static Own< Clause > createAnnotatedClause(const Clause *clause, const std::map< const Argument *, TypeSet > argumentTypes)
bool analyseNumericConstants(const TranslationUnit &translationUnit)
BinaryConstraintOp
Binary Constraint Operators.
TypeAttribute getFunctorArgType(const Functor *functor, const size_t idx) const
VecOwn< Clause > annotatedClauses
Abstract class for a AST Analysis.
std::set< TypeAttribute > getTypeAttributes(const Argument *arg) const
std::map< const Aggregator *, AggregateOp > aggregatorType
Defines the aggregator class.
std::map< const BinaryConstraint *, BinaryConstraintOp > constraintType
bool isUnsigned(const Argument *argument) const
const std::map< const NumericConstant *, NumericConstant::Type > & getNumericConstantTypes() const
static bool isMultiResultFunctor(const Functor &functor)
const std::vector< TypeAttribute > & getFunctorArgTypes(const UserDefinedFunctor &udf) const
bool isSymbol(const Argument *argument) const
std::map< std::string, const FunctorDeclaration * > udfDeclaration
bool isStatefulFunctor(const UserDefinedFunctor *udf) const
std::vector< Own< A > > VecOwn