Improvements to efficiency in rule composition