cloud9_root/src/third_party/stp/src/simplifier/constantBitP/FixedBits.cpp
// If the oldBits can't become the new bits. While respecting the lattice rules. That's bad.
// For example. A transfer function shouldn't unfix bits. Or chance the fixed bits value.
If the oldBits can't become the new bits. While respecting the lattice rules. That's bad.
For example. A transfer function shouldn't unfix bits. Or chance the fixed bits value.
If the oldBits can ' t become the new bits . While respecting the lattice rules . That ' s bad . For example . A transfer function shouldn ' t unfix bits . Or chance the fixed bits value .
bool
    FixedBits::updateOK(const FixedBits& o, const FixedBits &n)
    {
      if (n.getWidth() != o.getWidth())
        return false;
      for (int i = 0; i < n.getWidth(); i++)
        {
          if (n.isFixed(i) && o.isFixed(i))
            {
              if (n.getValue(i) != o.getValue(i))
                {
                  return false;
                }
            }
          else if (o.isFixed(i) && !n.isFixed(i))
            {
              return false;
            }
        }
      return true;
    }
bool FixedBits :: updateOK ( const FixedBits & o , const FixedBits & n ) { if ( n . getWidth ( ) != o . getWidth ( ) ) return false ; for ( int i = 0 ; i < n . getWidth ( ) ; i ++ ) { if ( n . isFixed ( i ) && o . isFixed ( i ) ) { if ( n . getValue ( i ) != o . getValue ( i ) ) { return false ; } } else if ( o . isFixed ( i ) && ! n . isFixed ( i ) ) { return false ; } } return true ; }
If the oldBits can't become the new bits.
If the oldBits can ' t become the new bits .