Termination of Simply Moded Logic Programs with Dynamic Scheduling.