public static Entry<byte[], TraceMemoryState> evaluateBytesWithState(String expr, Trace trace,
			long snap, TraceThread thread, int frame) {
		Language language = trace.getBaseLanguage();
		if (!(language instanceof SleighLanguage)) {
			throw new IllegalArgumentException("Trace must use a sleigh-based language");
		}
		return evaluateBytesWithState(
			SleighProgramCompiler.compileExpression((SleighLanguage) language, expr),
			trace, snap, thread, frame);
	}
Evaluate a Sleigh expression on the given trace

@param expr the expression
@param trace the trace
@param snap the snap
@param thread the thread, required if register space is used
@param frame the frame, for when register space is used
@return the value and state of the expression
Ghidra/Debug/Framework-TraceModeling/src/main/java/ghidra/pcode/exec/trace/TraceSleighUtils.java