souffle  2.0.2-371-g6315b36
Public Member Functions | Static Public Attributes | Private Attributes
souffle::ast::analysis::PolymorphicObjectsAnalysis Class Reference

#include <PolymorphicObjects.h>

Inheritance diagram for souffle::ast::analysis::PolymorphicObjectsAnalysis:
Inheritance graph
Collaboration diagram for souffle::ast::analysis::PolymorphicObjectsAnalysis:
Collaboration graph

Public Member Functions

NumericConstant::Type getInferredType (const NumericConstant *nc) const
 
FunctorOp getOverloadedFunctionOp (const IntrinsicFunctor *inf) const
 
AggregateOp getOverloadedOperator (const Aggregator *agg) const
 
BinaryConstraintOp getOverloadedOperator (const BinaryConstraint *bc) const
 
bool hasInvalidType (const NumericConstant *nc) const
 
 PolymorphicObjectsAnalysis ()
 
void print (std::ostream &os) const override
 print the analysis result in HTML format More...
 
void run (const TranslationUnit &translationUnit) override
 run analysis for a Ast translation unit More...
 
- Public Member Functions inherited from souffle::ast::analysis::Analysis
 Analysis (std::string identifier)
 
virtual const std::string & getName () const
 get name of the analysis More...
 
virtual ~Analysis ()=default
 

Static Public Attributes

static constexpr const char * name = "polymorphic-objects"
 

Private Attributes

const TypeAnalysistypeAnalysis = nullptr
 

Additional Inherited Members

- Protected Attributes inherited from souffle::ast::analysis::Analysis
const std::string identifier
 

Detailed Description

Definition at line 39 of file PolymorphicObjects.h.

Constructor & Destructor Documentation

◆ PolymorphicObjectsAnalysis()

souffle::ast::analysis::PolymorphicObjectsAnalysis::PolymorphicObjectsAnalysis ( )
inline

Definition at line 43 of file PolymorphicObjects.h.

43 : Analysis(name) {}

Member Function Documentation

◆ getInferredType()

NumericConstant::Type souffle::ast::analysis::PolymorphicObjectsAnalysis::getInferredType ( const NumericConstant nc) const

Definition at line 40 of file PolymorphicObjects.cpp.

40  {
41  return !typeAnalysis->hasValidTypeInfo(nc);
42 }

References souffle::ast::analysis::TypeAnalysis::hasValidTypeInfo(), and typeAnalysis.

Here is the call graph for this function:

◆ getOverloadedFunctionOp()

FunctorOp souffle::ast::analysis::PolymorphicObjectsAnalysis::getOverloadedFunctionOp ( const IntrinsicFunctor inf) const

Definition at line 36 of file PolymorphicObjects.cpp.

36  {
38 }

References souffle::ast::analysis::TypeAnalysis::getPolymorphicNumericConstantType(), and typeAnalysis.

Here is the call graph for this function:

◆ getOverloadedOperator() [1/2]

AggregateOp souffle::ast::analysis::PolymorphicObjectsAnalysis::getOverloadedOperator ( const Aggregator agg) const

Definition at line 52 of file PolymorphicObjects.cpp.

◆ getOverloadedOperator() [2/2]

BinaryConstraintOp souffle::ast::analysis::PolymorphicObjectsAnalysis::getOverloadedOperator ( const BinaryConstraint bc) const

Definition at line 48 of file PolymorphicObjects.cpp.

48  {
50 }

References souffle::ast::analysis::TypeAnalysis::getPolymorphicOperator(), and typeAnalysis.

Here is the call graph for this function:

◆ hasInvalidType()

bool souffle::ast::analysis::PolymorphicObjectsAnalysis::hasInvalidType ( const NumericConstant nc) const

Definition at line 44 of file PolymorphicObjects.cpp.

44  {
46 }

References souffle::ast::analysis::TypeAnalysis::getPolymorphicOperator(), and typeAnalysis.

Referenced by souffle::ast::transform::TypeCheckerImpl::visitStringConstant().

Here is the call graph for this function:

◆ print()

void souffle::ast::analysis::PolymorphicObjectsAnalysis::print ( std::ostream &  ) const
overridevirtual

print the analysis result in HTML format

Reimplemented from souffle::ast::analysis::Analysis.

Definition at line 34 of file PolymorphicObjects.cpp.

◆ run()

void souffle::ast::analysis::PolymorphicObjectsAnalysis::run ( const TranslationUnit )
overridevirtual

run analysis for a Ast translation unit

Implements souffle::ast::analysis::Analysis.

Definition at line 30 of file PolymorphicObjects.cpp.

30  {}
31 
32 FunctorOp PolymorphicObjectsAnalysis::getOverloadedFunctionOp(const IntrinsicFunctor* inf) const {

Field Documentation

◆ name

constexpr const char* souffle::ast::analysis::PolymorphicObjectsAnalysis::name = "polymorphic-objects"
staticconstexpr

Definition at line 41 of file PolymorphicObjects.h.

◆ typeAnalysis

const TypeAnalysis* souffle::ast::analysis::PolymorphicObjectsAnalysis::typeAnalysis = nullptr
private

The documentation for this class was generated from the following files:
souffle::ast::analysis::Analysis::Analysis
Analysis(std::string identifier)
Definition: Analysis.h:40
souffle::ast::analysis::PolymorphicObjectsAnalysis::typeAnalysis
const TypeAnalysis * typeAnalysis
Definition: PolymorphicObjects.h:63
souffle::ast::analysis::TypeAnalysis::getPolymorphicOperator
AggregateOp getPolymorphicOperator(const Aggregator *agg) const
Definition: Type.cpp:278
souffle::ast::analysis::TypeAnalysis::getPolymorphicNumericConstantType
NumericConstant::Type getPolymorphicNumericConstantType(const NumericConstant *nc) const
– Polymorphism-related methods –
Definition: Type.cpp:268
souffle::ast::analysis::PolymorphicObjectsAnalysis::getOverloadedFunctionOp
FunctorOp getOverloadedFunctionOp(const IntrinsicFunctor *inf) const
Definition: PolymorphicObjects.cpp:36
souffle::ast::analysis::TypeAnalysis::hasValidTypeInfo
bool hasValidTypeInfo(const Argument *argument) const
Definition: Type.cpp:255
souffle::FunctorOp
FunctorOp
Definition: FunctorOps.h:35
souffle::ast::analysis::PolymorphicObjectsAnalysis::name
static constexpr const char * name
Definition: PolymorphicObjects.h:41