/// Invoked after we have determined that every strand in `table`
/// encounters a cycle, and that some of those cycles involve
/// negative edges. In that case, walks all negative edges and
/// converts them to delayed literals.
Invoked after we have determined that every strand in `table`
encounters a cycle, and that some of those cycles involve
negative edges. In that case, walks all negative edges and
converts them to delayed literals.
Invoked after we have determined that every strand in ` table ` encounters a cycle and that some of those cycles involve negative edges . In that case walks all negative edges and converts them to delayed literals .
fn delay_strands_after_cycle(&mut self, table: TableIndex, visited: &mut FxHashSet<TableIndex>) {
        let mut tables = vec![];
        let num_universes = CO::num_universes(&self.tables[table].table_goal);
        for canonical_strand in self.tables[table].strands_mut() {
            // FIXME if CanonicalExClause were not held abstract, we
            // could do this in place like we used to (and
            // `instantiate_strand` could take ownership), since we
            // don't really need to instantiate here to do this
            // operation.
            let (delayed_strand, subgoal_table) = Self::with_instantiated_strand(
                self.context.clone(),
                num_universes,
                canonical_strand,
                DelayStrandAfterCycle { table },
            );
            *canonical_strand = delayed_strand;
            if visited.insert(subgoal_table) {
                tables.push(subgoal_table);
            }
        }
        for table in tables {
            self.delay_strands_after_cycle(table, visited);
        }
    }
fn delay_strands_after_cycle ( & mut self , table : TableIndex , visited : & mut FxHashSet < TableIndex > ) { let mut tables = vec ! [ ] ; let num_universes = CO :: num_universes ( & self . tables [ table ] . table_goal ) ; for canonical_strand in self . tables [ table ] . strands_mut ( ) { // FIXME if CanonicalExClause were not held abstract, we // could do this in place like we used to (and // `instantiate_strand` could take ownership), since we // don't really need to instantiate here to do this // operation. let ( delayed_strand , subgoal_table ) = Self :: with_instantiated_strand ( self . context . clone ( ) , num_universes , canonical_strand , DelayStrandAfterCycle { table } , ) ; * canonical_strand = delayed_strand ; if visited . insert ( subgoal_table ) { tables . push ( subgoal_table ) ; } } for table in tables { self . delay_strands_after_cycle ( table , visited ) ; } }
Invoked after we have determined that every strand in `table`
encounters a cycle, and that some of those cycles involve
negative edges.
Invoked after we have determined that every strand in ` table ` encounters a cycle and that some of those cycles involve negative edges .
&mut self
table
TableIndex
visited
&mut FxHashSet<TableIndex>