Esempio n. 1
0
 bool Z3Sort::operator == (const Z3Object& Other) const
 {
     auto AsZ3Sort = dynamic_cast<const Z3Sort*>(&Other);
     if (AsZ3Sort == nullptr) {
         return false;
     }
     if (Ctx == nullptr || Sort == nullptr) {
         return (AsZ3Sort->Ctx == Ctx && AsZ3Sort->Sort == Sort);
     } else {
         return (Ctx == AsZ3Sort->Ctx && Z3_is_eq_sort(Ctx, Sort, AsZ3Sort->Sort));
     }
 }
Esempio n. 2
0
bool Z3Sort::operator == (const Z3Object& Other) const
{
    auto OtherAsPtr = Other.As<Z3Sort>();
    if (OtherAsPtr == nullptr) {
        return false;
    }
    if (Ctx != OtherAsPtr->Ctx) {
        return false;
    }
    if (Ctx == Z3Ctx::NullPtr) {
        return true;
    }

    return (Z3_is_eq_sort(*Ctx, Sort, OtherAsPtr->Sort));
}