anchor.diff:    }
   
     // Emit expression.
  -  void emitExpr(int depth, DartType tp, {RhsFilter rhsFilter}) {
  +  void emitExpr(int depth, DartType tp,
  +      {RhsFilter rhsFilter, bool includeSemicolon = false}) {
       final resetExprStmt = processExprOpen(tp);
       // Continuing nested expressions becomes less likely as the depth grows.
  -    if (rand.nextInt(depth + 1) > exprDepth) {
  +    if (choose(depth + 1) > exprDepth) {
         emitTerminal(depth, tp, rhsFilter: rhsFilter);
       } else {
         // Possibly nested expression.
  -      switch (rand.nextInt(7)) {
  +      switch (choose(7)) {
           case 0:
             emitUnaryExpr(depth, tp, rhsFilter: rhsFilter);
             break;
  
positive.code:         throw 'Unknown DartType ${tp}';
      }
    }
  
    BigInt genMask(int m) => BigInt.from(1) << m;
  
    // Process the opening of a statement.
    // Determine whether the statement should be skipped based on the
  
negative.code:               'a full stack trace');
        emitLn('// which, in turn, flags the problem prominently');
        emitLn('if (ffiTestFunctions == null) {');
        incIndent();
        emitPrint('Did not load ffi test functions');
        decIndent();
        emitLn('}');
      }
    }
  
    void emitMain() => _emitFunctionDefinition('main', () {
          emitLoadFfiLib();
  
          // Call each global method once.
          for (int i = 0; i < globalMethods.length; i++) {
            emitTryCatchFinally(() {
              emitCall(1, "$methodName${i}", globalMethods[i],
                  includeSemicolon: true);
            }, () {
              emitPrint('$methodName$i throws');
            });
          }
  
          // Call each class method once.
          for (int i = 0; i < classMethods.length; i++) {
            for (int j = 0; j < classMethods[i].length; j++) {
              emitTryCatchFinally(() {
                emitCall(1, "X${i}().$methodName${i}_${j}", classMethods[i][j],
                    includeSemicolon: true);
              }, () {
                emitPrint('X${i}().$methodName${i}_${j}() throws');
              });
            }
            // Call each virtual class method once.
            int parentClass = classParents[i];
            while (parentClass >= 0) {
              if (virtualClassMethods[i].containsKey(parentClass)) {
                for (int j = 0;
                    j < virtualClassMethods[i][parentClass].length;
                    j++) {
                  emitTryCatchFinally(
                      () => emitCall(1, "X${i}().$methodName${parentClass}_${j}",
                          classMethods[parentClass][j], includeSemicolon: true),
                      () => emitPrint(
                          'X${i}().$methodName${parentClass}_${j}() throws'));
                }
              }
              parentClass = classParents[parentClass];
            }
          }
  
          emitTryCatchFinally(() {
            emit('X${classFields.length - 1}().run();');
          }, () {
            emitPrint('X${classFields.length - 1}().run() throws');
          });
  
          emitTryCatchFinally(() {
            String body = '';
            for (int i = 0; i < globalVars.length; i++) {
              body += '\$$varName$i\\n';
            }
            emitPrint('$body');
          }, () => emitPrint('print throws'));
        });
  
    //
    // Declarations.
  