cloud9_root/src/third_party/stp/src/simplifier/constantBitP/ConstantBitPropagation.cpp
// Put anything that's entirely fixed into a from->to map.
Put anything that's entirely fixed into a from->to map.
Put anything that ' s entirely fixed into a from - > to map .
ASTNodeMap
    ConstantBitPropagation::getAllFixed()
    {
      NodeToFixedBitsMap::NodeToFixedBitsMapType::iterator it;
      ASTNodeMap toFrom;
      for (it = fixedMap->map->begin(); it != fixedMap->map->end(); it++)
        {
          const ASTNode& node = (it->first);
          const FixedBits& bits = *it->second;
          if (node.isConstant())
              continue;
          if (BVCONCAT == node.GetKind())
            continue;
          if (bits.isTotallyFixed())
            {
              toFrom.insert(std::make_pair(node, bitsToNode(node, bits)));
            }
        }
      return toFrom;
    }
ASTNodeMap ConstantBitPropagation :: getAllFixed ( ) { NodeToFixedBitsMap :: NodeToFixedBitsMapType :: iterator it ; ASTNodeMap toFrom ; for ( it = fixedMap -> map -> begin ( ) ; it != fixedMap -> map -> end ( ) ; it ++ ) { const ASTNode & node = ( it -> first ) ; const FixedBits & bits = * it -> second ; if ( node . isConstant ( ) ) continue ; if ( BVCONCAT == node . GetKind ( ) ) continue ; if ( bits . isTotallyFixed ( ) ) { toFrom . insert ( std :: make_pair ( node , bitsToNode ( node , bits ) ) ) ; } } return toFrom ; }
Put anything that's entirely fixed into a from->to map.
Put anything that ' s entirely fixed into a from - > to map .
// iterates through all the pairs of node->fixedBits. // Don't constrain nodes we already know all about. // Concat doesn't change the fixings. Ignore it.