@Override
	public ProgramGene<A> newInstance(final Op<A> op) {
		if (value().arity() != op.arity()) {
			throw new IllegalArgumentException(format(
				"New operation must have same arity: %s[%d] != %s[%d]",
				value().name(), value().arity(), op.name(), op.arity()
			));
		}
		return new ProgramGene<>(op, childOffset(), _operations, _terminals);
	}
Create a new program gene with the given operation.

@param op the operation of the new program gene
@return a new program gene with the given operation
@throws NullPointerException if the given {@code op} is {@code null}
@throws IllegalArgumentException if the arity of the given operation is
        different from the arity of the current operation. This restriction
        ensures that only valid program genes are created by this method.
jenetics.prog/src/main/java/io/jenetics/prog/ProgramGene.java