Using linear constraints for logic program termination analysis