rewrite rules so that actual dependencies are encoded