trace-based prediction