/// Invoked after we have determined that every strand in `table`
/// encounters a cycle; `strands` is the set of strands (which
/// have been moved out of the table). This method then
/// recursively clears the active strands from the tables
/// referenced in `strands`, since all of them must encounter
/// cycles too.
Invoked after we have determined that every strand in `table`
encounters a cycle; `strands` is the set of strands (which
have been moved out of the table). This method then
recursively clears the active strands from the tables
referenced in `strands`, since all of them must encounter
cycles too.
Invoked after we have determined that every strand in ` table ` encounters a cycle ; ` strands ` is the set of strands ( which have been moved out of the table ) . This method then recursively clears the active strands from the tables referenced in ` strands ` since all of them must encounter cycles too .
fn clear_strands_after_cycle(
        &mut self,
        table: TableIndex,
        strands: impl IntoIterator<Item = CanonicalStrand<C>>,
    ) {
        assert!(self.tables[table].pop_next_strand().is_none());
        for strand in strands {
            let CanonicalStrand {
                canonical_ex_clause,
                selected_subgoal,
            } = strand;
            let selected_subgoal = selected_subgoal.unwrap_or_else(|| {
                panic!(
                    "clear_strands_after_cycle invoked on strand in table {:?} \
                     without a selected subgoal: {:?}",
                    table, canonical_ex_clause,
                )
            });
            let strand_table = selected_subgoal.subgoal_table;
            let strands = self.tables[strand_table].take_strands();
            self.clear_strands_after_cycle(strand_table, strands);
        }
    }
fn clear_strands_after_cycle ( & mut self , table : TableIndex , strands : impl IntoIterator < Item = CanonicalStrand < C > > , ) { assert ! ( self tables [ table ] pop_next_strand ( ) is_none ( ) ) ; for strand in strands { let CanonicalStrand { canonical_ex_clause , selected_subgoal , } = strand ; let selected_subgoal = selected_subgoal . unwrap_or_else ( | | { panic ! ( " \
 " table canonical_ex_clause ) } ) ; let strand_table = selected_subgoal . subgoal_table ; let strands = self . tables [ strand_table ] . take_strands ( ) ; self . clear_strands_after_cycle ( strand_table , strands ) ; } }
Invoked after we have determined that every strand in `table`
encounters a cycle; `strands` is the set of strands (which
have been moved out of the table).
Invoked after we have determined that every strand in ` table ` encounters a cycle ; ` strands ` is the set of strands ( which have been moved out of the table ) .
&mut self
table
TableIndex
strands
impl IntoIterator<Item = CanonicalStrand<C>>