applying each rule once, dependencies (does not handle any recursion)