P4C
The P4 Compiler
Loading...
Searching...
No Matches
P4::TypeConstraints Class Referencefinal
Inheritance diagram for P4::TypeConstraints:
[legend]

Public Member Functions

 TypeConstraints (const TypeVariableSubstitution *definedVariables, const P4::TypeMap *typeMap)
 
void add (const TypeConstraint *constraint)
 
void addEqualityConstraint (const IR::Node *source, const IR::Type *left, const IR::Type *right)
 
void addImplicitCastConstraint (const IR::Node *source, const IR::Type *left, const IR::Type *right)
 
void addUnifiableTypeVariable (const IR::ITypeVar *typeVariable)
 
void dbprint (std::ostream &out) const
 
const TypeVariableSubstitutiongetCurrentSubstitution () const
 
bool isUnifiableTypeVariable (const IR::Type *type)
 
TypeVariableSubstitutionsolve ()
 
bool solve (const BinaryConstraint *constraint)
 
- Public Member Functions inherited from P4::IHasDbPrint
void print () const
 

Public Attributes

TypeVariableSubstitutionVisitor replaceVariables
 

Member Function Documentation

◆ dbprint()

void P4::TypeConstraints::dbprint ( std::ostream & out) const
virtual

Implements P4::IHasDbPrint.

◆ isUnifiableTypeVariable()

bool P4::TypeConstraints::isUnifiableTypeVariable ( const IR::Type * type)

True if type is a type variable that can be unified. A variable is unifiable if it is marked so and it not already part of definedVariables.