anchor.diff:    final _incompatibilities = <PackageId, Set<Incompatibility>>{};
   
     final _toProcess = new Queue<Fact>();
  +
  +  /// Facts derived from the current fact being processed in [add].
  +  ///
  +  /// These may or may not be added to [_toProcess], depending on whether the
  +  /// current fact ends up being determined to be redundant.
  +  final _fromCurrent = <Fact>[];
   
     void setAllIds(List<PackageId> ids) {
       var ref = ids.first.toRef();
  
positive.code:   // was added.
    Required _requiredIntoRequired(Required fact) {
      var existing = _required[fact.name];
      if (existing == null) {
        _required[fact.name] = fact;
        return fact;
      }
  
      var intersection = _intersectDeps(existing.dep, fact.dep);
      if (intersection == null) {
        throw "Incompatible constraints!";
      }
  
      if (intersection.constraint == existing.dep.constraint) return null;
  
      _required[fact.name] = new Required(intersection, [existing, fact]);
      return _required[fact.name];
    }
  
    // Returns whether [fact] should continue to be processed as-is.
    bool _requiredIntoDisallowed(Required fact) {
      var disallowed = _disallowed[fact.dep.toRef()];
      if (disallowed == null) return true;
  
      // Remove [disallowed] since it's redundant with [fact]. We'll update [fact]
      // to encode the relevant information.
      _removeDisallowed(disallowed);
  
      // TODO: delete Disalloweds with the same name but different source/desc
  
      // If the required version was trimmed, stop processing, since we'll just
      // process the narrower version later on.
      return !_requiredAndDisallowed(fact, disallowed);
    }
  
    void _requiredIntoDependencies(Required fact) {
      // Dependencies whose depender is [fact.dep], grouped by the names of
      // packages they depend on.
      var matchingByAllowed = <String, Set<Dependency>>{};
  
      // Fill [matchingByAllowed] and trim any irrelevant dependencies while we're
  
negative.code: 
        if (intersection.isEmpty) {
          // If no versions in [fact] have this dependency, then it's irrelevant.
          // For example, if
          //
          // * a [0, 1) is required (fact)
          // * a [1, 2) depends on b [0, 2) (dependency)
          //
          // we can throw away [dependency].
          _removeDependency(dependency);
        } else if (intersection != dependency.depender.constraint) {
          // If only some versions [dependency.depender] are in [fact], we can
          // trim the ones that aren't. For example, if
          //
          // * a [0, 2) is required (fact)
          // * a [1, 3) depends on b [0, 2) (dependency)
          //
          // we can remove [dependency] and add
          //
          // * a [1, 2) depends on b [0, 2) (newDependency)
          _removeDependency(dependency);
          var newDependency = new Dependency(
              dependency.depender.withConstraint(intersection),
              dependency.allowed,
              [dependency, fact]);
          _fromCurrent.add(newDependency);
          matchingByAllowed[newDependency.allowed.name] = newDependency;
        } else {
          matchingByAllowed[dependency.allowed.name] = dependency;
  