* Returns a randomly-generated document mutation based on the given document,
* parameters, and schema.
*/
public static Nindo generate(RandomProvider r, Parameters p,
DocumentSchema s, IndexedDocument<Node, Element, Text> doc) {
Nindo m = new Generator(r, p, s, doc).generate();
ViolationCollector v = NindoValidator.validate(doc, m, s);
assert !v.isIllFormed();
assert p.getValidity() == v.isValid();
return m;
}