A novel automata-theoretic approach to timeline-based planning