First draft of refactored bounded_trace solver