anchor.diff:  [[constraintStreamsImplementations]]
   == Variant implementation types
   
  -Constraint streams come in two flavors, a default implementation using Drools under the hood and a pure Java-based
  -implementation called _Bavet_.
  -The Drools-based implementation is more feature-complete.
  -Both of these variants implement the same `ConstraintProvider` API.
  -No Java code changes are necessary to switch between the two.
  -
  -Bavet is an experimental implementation that focuses on raw speed and provides superior performance.
  -However, it lacks features and therefore many of the <<examplesOverview,examples>> are not supported.
  -To try it out, implement the `ConstraintProvider` interface and use the following in your solver config:
  -
  +Constraint streams come in two flavors:
  +
  +* *CS Drools* (default): a fast, feature-complete implementation that uses Drools underneath.
  +
  +* *Bavet*: a fast, experimental implementation.
  +It lacks features and therefore many of the <<examplesOverview,examples>> are not supported.
  +To try it out set the `constraintStreamImplType` to `BAVET` in your solver config:
  ++
   [source,xml,options="nowrap"]
   ----
       <solver xmlns="https://www.optaplanner.org/xsd/solver" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="https://www.optaplanner.org/xsd/solver https://www.optaplanner.org/xsd/solver/solver.xsd">
         <scoreDirectorFactory>
  +        <!-- BAVET is experimental -->
           <constraintStreamImplType>BAVET</constraintStreamImplType>
           <constraintProviderClass>com.example.MyConstraintProvider</constraintProviderClass>
         </scoreDirectorFactory>
         ...
       </solver>
   ----
  +
  +Both of these variants implement the same `ConstraintProvider` API.
  +No Java code changes are necessary to switch between the two.
  
positive.code: ----
  
  The `verifyThat(...)` call is used to specify a method on the `NQueensConstraintProvider` class which is under test.
  This method must be visible to the test class, which the Java compiler will enforce.
  
  The `given(...)` call is used to enumerate all the facts that the constraint stream will operate on.
  In this case, the `given(...)` call takes the `queen1` and `queen2` instances previously created.
  Alternatively, you can use a `givenSolution(...)` method here and provide a planning solution instead.
  
  
negative.code: In the example above, the mapping function produces duplicate tuples
  if `Job.getRequiredRoles()` contains duplicate values.
  Assuming that the function returns `[USER, USER, ADMIN]`,
  the tuple `(SomePerson, USER)` is sent downstream twice.
  See <<constraintStreamsDealingWithDuplicateTuplesUsingDistinct,`distinct()`>> for how to deal with duplicate tuples.
  ====
  
  