souffle
2.0.2-371-g6315b36
|
Go to the documentation of this file.
32 class TypeEnvironmentAnalysis :
public Analysis {
34 static constexpr
const char*
name =
"type-environment";
40 void print(std::ostream& os)
const override;
64 const QualifiedName& typeName,
const std::map<QualifiedName, const ast::Type*>& nameToType);
const std::string identifier
std::map< QualifiedName, std::set< QualifiedName > > primitiveTypesInUnions
const std::set< QualifiedName > & getPrimitiveTypesInUnion(const QualifiedName &identifier) const
Analysis(std::string identifier)
bool contains(const C &container, const typename C::value_type &element)
A utility to check generically whether a given element is contained in a given container.
bool isCyclic(const QualifiedName &identifier) const
An abstract base class for types to be covered within a type environment.
void run(const TranslationUnit &translationUnit) override
run analysis for a Ast translation unit
const Type * createType(const QualifiedName &typeName, const std::map< QualifiedName, const ast::Type * > &nameToType)
Recursively create a type in env, that is first create its base types and then the type itself.
A type environment is a set of types.
Translation unit class for the translation pipeline.
std::set< QualifiedName > cyclicTypes
static constexpr const char * name
const TypeEnvironment & getTypeEnvironment() const
TypeEnvironmentAnalysis()
void print(std::ostream &os) const override
print the analysis result in HTML format
Qualified Name class defines fully/partially qualified names to identify objects in components.