@@ -505,12 +505,12 @@ void RewriteSystem::minimizeRewriteSystem() {
505
505
const auto &loop = HomotopyGenerators[loopID];
506
506
507
507
SmallVector<unsigned > redundancyCandidates =
508
- loop.second .findRulesAppearingOnceInEmptyContext ();
508
+ loop.Path .findRulesAppearingOnceInEmptyContext ();
509
509
if (redundancyCandidates.empty ())
510
510
continue ;
511
511
512
512
auto ruleID = redundancyCandidates.front ();
513
- RewritePath replacementPath = loop.second .splitCycleAtRule (ruleID);
513
+ RewritePath replacementPath = loop.Path .splitCycleAtRule (ruleID);
514
514
515
515
deletedRules.insert (ruleID);
516
516
deletedHomotopyGenerators.insert (loopID);
@@ -538,30 +538,30 @@ void RewriteSystem::minimizeRewriteSystem() {
538
538
continue ;
539
539
540
540
auto &loop = HomotopyGenerators[loopID];
541
- bool changed = loop.second .replaceRuleWithPath (ruleID, replacementPath);
541
+ bool changed = loop.Path .replaceRuleWithPath (ruleID, replacementPath);
542
542
543
543
if (changed) {
544
- unsigned size = loop.second .size ();
544
+ unsigned size = loop.Path .size ();
545
545
546
546
bool changed;
547
547
do {
548
548
changed = false ;
549
- changed |= loop.second .computeFreelyReducedPath ();
550
- changed |= loop.second .computeCyclicallyReducedLoop (loop.first , *this );
551
- changed |= loop.second .computeLeftCanonicalForm (*this );
549
+ changed |= loop.Path .computeFreelyReducedPath ();
550
+ changed |= loop.Path .computeCyclicallyReducedLoop (loop.Basepoint , *this );
551
+ changed |= loop.Path .computeLeftCanonicalForm (*this );
552
552
} while (changed);
553
553
554
554
if (Debug.contains (DebugFlags::HomotopyReduction)) {
555
- if (size != loop.second .size ()) {
556
- llvm::dbgs () << " ** Note: Cyclically reduced the loop to eliminate "
557
- << (size - loop.second .size ()) << " steps\n " ;
555
+ if (size != loop.Path .size ()) {
556
+ llvm::dbgs () << " ** Note: Reducing the loop eliminated "
557
+ << (size - loop.Path .size ()) << " steps\n " ;
558
558
}
559
559
}
560
560
561
561
if (Debug.contains (DebugFlags::HomotopyReduction)) {
562
562
llvm::dbgs () << " ** Updated homotopy generator: " ;
563
- llvm::dbgs () << " - " << loop.first << " : " ;
564
- loop.second .dump (llvm::dbgs (), loop.first , *this );
563
+ llvm::dbgs () << " - " << loop.Basepoint << " : " ;
564
+ loop.Path .dump (llvm::dbgs (), loop.Basepoint , *this );
565
565
llvm::dbgs () << " \n " ;
566
566
}
567
567
}
@@ -587,16 +587,16 @@ void RewriteSystem::minimizeRewriteSystem() {
587
587
continue ;
588
588
589
589
const auto &loop = HomotopyGenerators[loopID];
590
- if (loop.second .empty ())
590
+ if (loop.Path .empty ())
591
591
continue ;
592
592
593
593
llvm::dbgs () << " (#" << loopID << " ) " ;
594
- llvm::dbgs () << loop.first << " : " ;
595
- loop.second .dump (llvm::dbgs (), loop.first , *this );
594
+ llvm::dbgs () << loop.Basepoint << " : " ;
595
+ loop.Path .dump (llvm::dbgs (), loop.Basepoint , *this );
596
596
llvm::dbgs () << " \n " ;
597
597
598
- MutableTerm basepoint = loop.first ;
599
- for (auto step : loop.second ) {
598
+ MutableTerm basepoint = loop.Basepoint ;
599
+ for (auto step : loop.Path ) {
600
600
step.apply (basepoint, *this );
601
601
llvm::dbgs () << " - " << basepoint << " \n " ;
602
602
}
@@ -608,15 +608,15 @@ void RewriteSystem::minimizeRewriteSystem() {
608
608
void RewriteSystem::verifyHomotopyGenerators () const {
609
609
#ifndef NDEBUG
610
610
for (const auto &loop : HomotopyGenerators) {
611
- auto term = loop.first ;
611
+ auto term = loop.Basepoint ;
612
612
613
- for (const auto &step : loop.second ) {
613
+ for (const auto &step : loop.Path ) {
614
614
step.apply (term, *this );
615
615
}
616
616
617
- if (term != loop.first ) {
617
+ if (term != loop.Basepoint ) {
618
618
llvm::errs () << " Not a loop: " ;
619
- loop.second .dump (llvm::errs (), loop.first , *this );
619
+ loop.Path .dump (llvm::errs (), loop.Basepoint , *this );
620
620
llvm::errs () << " \n " ;
621
621
abort ();
622
622
}
0 commit comments