Subsys inv com and rewriting invGen.