Started bottom-up reverse rewrite rules implementation