Z3
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
More...
 
override bool Equals (object obj)
 Checks if two equality lists are equal. The function does not take symmetries, shuffling, or duplicates into account. More...
 
override int GetHashCode ()
 Gets a hash code for the list of equalities More...
 

Properties

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

Detailed Description

A list of equalities used as justifications for propagation

Definition at line 400 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 425 of file UserPropagator.cs.

425  {
426  lhsList.Add(lhs);
427  rhsList.Add(rhs);
428  }

◆ 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 434 of file UserPropagator.cs.

434  {
435  if (ReferenceEquals(this, obj))
436  return true;
437  if (!(obj is EqualityPairs other))
438  return false;
439  if (lhsList.Count != other.lhsList.Count)
440  return false;
441  for (int i = 0; i < lhsList.Count; i++) {
442  if (!lhsList[i].Equals(other.lhsList[i]))
443  return false;
444  }
445  return true;
446  }
override bool Equals(object obj)
Checks if two equality lists are equal. The function does not take symmetries, shuffling,...

◆ GetHashCode()

override int GetHashCode ( )
inline

Gets a hash code for the list of equalities

Definition at line 451 of file UserPropagator.cs.

451  {
452  int hash = lhsList.Count;
453  unchecked {
454  for (int i = 0; i < lhsList.Count; i++) {
455  hash ^= lhsList[i].GetHashCode();
456  hash *= 17;
457  hash ^= rhsList[i].GetHashCode();
458  hash *= 29;
459  }
460  return hash;
461  }
462  }

Property Documentation

◆ Count

int Count
get

The number of equalities

Definition at line 418 of file UserPropagator.cs.

Referenced by UserPropagator.Propagate().

◆ LHS

Expr [] LHS
get

The left hand sides of the equalities

Definition at line 408 of file UserPropagator.cs.

Referenced by UserPropagator.Propagate().

◆ RHS

Expr [] RHS
get

The right hand sides of the equalities

Definition at line 413 of file UserPropagator.cs.

Referenced by UserPropagator.Propagate().