def specialize_rule(self, rule, newrule):
    'Specialize the given rule by inserting newrule into the DAG.'
    assert (newrule is not None)
    self.rules.add(newrule)
    self.update_output_index()
Specialize the given rule by inserting newrule into the DAG.
def specialize_rule(self, rule, newrule):
    
    assert (newrule is not None)
    self.rules.add(newrule)
    self.update_output_index()