@SuppressWarnings({"unchecked", "rawtypes"})
	static Object read(final ObjectInput in)
		throws IOException, ClassNotFoundException
	{
		final var length = readInt(in);
		final var rules = MSeq.ofLength(length);
		for (int i = 0; i < length; ++i) {
			rules.set(i, in.readObject());
		}

		return new TRS(rules.toISeq());
	}
Create a new TRS from the given rewrite rules.

@param rules the rewrite rules
@return a new TRS
@throws NullPointerException if one of the arguments is {@code null}
@throws IllegalArgumentException if the given {@code rules} sequence is
        empty
jenetics.ext/src/main/java/io/jenetics/ext/rewriting/TRS.java