Automatic complexity analysis tool for higher-order systems