public Sequence relativize(Sequence prefix) {
		if (prefix.isNop()) {
			return this;
		}
		CompareResult comp = compareSeq(prefix);
		Sequence result = new Sequence();
		if (comp == CompareResult.EQUALS) {
			return result;
		}
		if (comp != CompareResult.REL_GT) {
			throw new IllegalArgumentException(String.format(
				"The given prefix (%s) is not actually a prefix of this (%s).", prefix, this));
		}

		int lastStepIndex = prefix.steps.size() - 1;
		Step ancestorLast = prefix.steps.get(lastStepIndex);
		Step continuation = this.steps.get(lastStepIndex);
		result.advance(continuation.subtract(ancestorLast));
		result.steps.addAll(steps.subList(prefix.steps.size(), steps.size()));
		return result;
	}
Compute the sequence which concatenated to the given prefix would result in this sequence

<p>
The returned step sequence should not be manipulated, since it may just be this sequence.

@see #compareSeq(Sequence)
@param prefix the prefix
@return the relative sequence from prefix to this
@throws IllegalArgumentException if prefix is not a prefix of this sequence
Ghidra/Debug/Framework-TraceModeling/src/main/java/ghidra/trace/model/time/schedule/Sequence.java