cprover
base_type.h File Reference

Base Type Computation. More...

+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

bool base_type_eq (const typet &type1, const typet &type2, const namespacet &ns)
 Check types for equality across all levels of hierarchy. More...
 
bool base_type_eq (const exprt &expr1, const exprt &expr2, const namespacet &ns)
 Check expressions for equality across all levels of hierarchy. More...
 

Detailed Description

Base Type Computation.

Definition in file base_type.h.

Function Documentation

◆ base_type_eq() [1/2]

bool base_type_eq ( const typet type1,
const typet type2,
const namespacet ns 
)

Check types for equality across all levels of hierarchy.

For equality in the top level of the hierarchy only use type_eq. Example:

  • symbol_typet("a") and ns.lookup("a").type will compare equal,
  • struct_typet {symbol_typet("a")} and struct_typet {ns.lookup("a") .type} will also compare equal.
    Parameters
    type1The first type to compare.
    type2The second type to compare.
    nsThe namespace, needed for resolution of symbols.

Definition at line 332 of file base_type.cpp.

◆ base_type_eq() [2/2]

bool base_type_eq ( const exprt expr1,
const exprt expr2,
const namespacet ns 
)

Check expressions for equality across all levels of hierarchy.

Parameters
expr1The first expression to compare.
expr2The second expression to compare.
nsThe namespace, needed for resolution of symbols.

Definition at line 345 of file base_type.cpp.