Z3
 
Loading...
Searching...
No Matches
Public Member Functions | Properties
EqualityPairs Class Reference

A list of equalities used as justifications for propagation. More...

Public Member Functions

void Add (Expr lhs, Expr rhs)
 Adds an equality to the list. The sorts of the arguments have to be the same.

Parameters
lhsThe left hand side of the equality
rhsThe right hand side of the equality

 
override bool Equals (object obj)
 Checks if two equality lists are equal. The function does not take symmetries, shuffling, or duplicates into account.
 
override int GetHashCode ()
 Gets a hash code for the list of equalities.
 

Properties

Expr[] LHS [get]
 The left hand sides of the equalities.
 
Expr[] RHS [get]
 The right hand sides of the equalities.
 
int Count [get]
 The number of equalities.
 

Detailed Description

A list of equalities used as justifications for propagation.

Definition at line 439 of file UserPropagator.cs.

Member Function Documentation

◆ Add()

void Add ( Expr  lhs,
Expr  rhs 
)
inline

Adds an equality to the list. The sorts of the arguments have to be the same.

Parameters
lhsThe left hand side of the equality
rhsThe right hand side of the equality

Definition at line 464 of file UserPropagator.cs.

464 {
465 lhsList.Add(lhs);
466 rhsList.Add(rhs);
467 }

◆ Equals()

override bool Equals ( object  obj)
inline

Checks if two equality lists are equal. The function does not take symmetries, shuffling, or duplicates into account.

Definition at line 473 of file UserPropagator.cs.

473 {
474 if (ReferenceEquals(this, obj))
475 return true;
476 if (!(obj is EqualityPairs other))
477 return false;
478 if (lhsList.Count != other.lhsList.Count)
479 return false;
480 for (int i = 0; i < lhsList.Count; i++) {
481 if (!lhsList[i].Equals(other.lhsList[i]))
482 return false;
483 }
484 return true;
485 }
override bool Equals(object obj)
Checks if two equality lists are equal. The function does not take symmetries, shuffling,...

Referenced by EqualityPairs.Equals().

◆ GetHashCode()

override int GetHashCode ( )
inline

Gets a hash code for the list of equalities.

Definition at line 490 of file UserPropagator.cs.

490 {
491 int hash = lhsList.Count;
492 unchecked {
493 for (int i = 0; i < lhsList.Count; i++) {
494 hash ^= lhsList[i].GetHashCode();
495 hash *= 17;
496 hash ^= rhsList[i].GetHashCode();
497 hash *= 29;
498 }
499 return hash;
500 }
501 }

Property Documentation

◆ Count

int Count
get

The number of equalities.

Definition at line 457 of file UserPropagator.cs.

Referenced by UserPropagator.Propagate().

◆ LHS

Expr [] LHS
get

The left hand sides of the equalities.

Definition at line 447 of file UserPropagator.cs.

Referenced by UserPropagator.Propagate().

◆ RHS

Expr [] RHS
get

The right hand sides of the equalities.

Definition at line 452 of file UserPropagator.cs.

Referenced by UserPropagator.Propagate().