catchunks: refactor in preparation for CUBIC pipeline.

Rename AIMD pipeline to "Adaptive Pipeline".
Remove "aimd-" from command line options.

Change-Id: Ie5689cf3c0b90bedb322fd42dbf289f8a04e56d2
refs: #4861
diff --git a/tools/chunks/catchunks/ndncatchunks.cpp b/tools/chunks/catchunks/ndncatchunks.cpp
index 92d5401..1405b23 100644
--- a/tools/chunks/catchunks/ndncatchunks.cpp
+++ b/tools/chunks/catchunks/ndncatchunks.cpp
@@ -29,14 +29,14 @@
  * @author Chavoosh Ghasemi
  */
 
-#include "aimd-statistics-collector.hpp"
-#include "aimd-rtt-estimator.hpp"
 #include "consumer.hpp"
 #include "discover-version-fixed.hpp"
 #include "discover-version-realtime.hpp"
-#include "pipeline-interests-aimd.hpp"
-#include "pipeline-interests-fixed-window.hpp"
 #include "options.hpp"
+#include "pipeline-interests-adaptive.hpp"
+#include "pipeline-interests-fixed.hpp"
+#include "rtt-estimator.hpp"
+#include "statistics-collector.hpp"
 #include "core/version.hpp"
 
 #include <fstream>
@@ -93,44 +93,41 @@
                         "size of the Interest pipeline")
     ;
 
-  po::options_description aimdPipeDesc("AIMD pipeline options");
-  aimdPipeDesc.add_options()
-    ("aimd-debug-cwnd", po::value<std::string>(&cwndPath),
-                        "log file for AIMD cwnd statistics")
-    ("aimd-debug-rtt", po::value<std::string>(&rttPath),
-                       "log file for AIMD rtt statistics")
-    ("aimd-disable-cwa", po::bool_switch(&disableCwa),
-                         "disable Conservative Window Adaptation, "
-                         "i.e. reduce window on each congestion event (timeout or congestion mark) "
-                         "instead of at most once per RTT")
-    ("aimd-ignore-cong-marks",  po::bool_switch(&ignoreCongMarks),
-                                "disable reaction to congestion marks, "
-                                "the default is to decrease the window after receiving a congestion mark")
-    ("aimd-reset-cwnd-to-init", po::bool_switch(&resetCwndToInit),
-                                "reset cwnd to initial cwnd when loss event occurs, default is "
-                                "resetting to ssthresh")
-    ("aimd-initial-cwnd",       po::value<int>(&initCwnd)->default_value(initCwnd),
-                                "initial cwnd")
-    ("aimd-initial-ssthresh",   po::value<int>(&initSsthresh),
-                                "initial slow start threshold (defaults to infinity)")
-    ("aimd-aistep",    po::value<double>(&aiStep)->default_value(aiStep),
-                       "additive-increase step")
-    ("aimd-mdcoef",    po::value<double>(&mdCoef)->default_value(mdCoef),
-                       "multiplicative-decrease coefficient")
-    ("aimd-rto-alpha", po::value<double>(&alpha)->default_value(alpha),
-                       "alpha value for rto calculation")
-    ("aimd-rto-beta",  po::value<double>(&beta)->default_value(beta),
-                       "beta value for rto calculation")
-    ("aimd-rto-k",     po::value<int>(&k)->default_value(k),
-                       "k value for rto calculation")
-    ("aimd-rto-min",   po::value<double>(&minRto)->default_value(minRto),
-                       "min rto value in milliseconds")
-    ("aimd-rto-max",   po::value<double>(&maxRto)->default_value(maxRto),
-                       "max rto value in milliseconds")
+  po::options_description adaptivePipeDesc("Adaptive pipeline options (AIMD)");
+  adaptivePipeDesc.add_options()
+    ("log-cwnd", po::value<std::string>(&cwndPath), "log file for cwnd statistics")
+    ("log-rtt", po::value<std::string>(&rttPath), "log file for rtt statistics")
+    ("disable-cwa", po::bool_switch(&disableCwa),
+                    "disable Conservative Window Adaptation, "
+                    "i.e. reduce window on each congestion event (timeout or congestion mark) "
+                    "instead of at most once per RTT")
+    ("ignore-marks", po::bool_switch(&ignoreCongMarks),
+                     "ignore congestion marks, "
+                     "the default is to decrease the window after receiving a congestion mark")
+    ("reset-cwnd-to-init", po::bool_switch(&resetCwndToInit),
+                           "reset cwnd to initial value after loss/mark, default is "
+                           "resetting to ssthresh")
+    ("init-cwnd",       po::value<int>(&initCwnd)->default_value(initCwnd), "initial cwnd")
+    ("init-ssthresh",   po::value<int>(&initSsthresh),
+                        "initial slow start threshold (defaults to infinity)")
+    ("aistep",    po::value<double>(&aiStep)->default_value(aiStep),
+                  "additive-increase step")
+    ("mdcoef",    po::value<double>(&mdCoef)->default_value(mdCoef),
+                  "multiplicative-decrease coefficient")
+    ("rto-alpha", po::value<double>(&alpha)->default_value(alpha),
+                  "alpha value for rto calculation")
+    ("rto-beta",  po::value<double>(&beta)->default_value(beta),
+                  "beta value for rto calculation")
+    ("rto-k",     po::value<int>(&k)->default_value(k),
+                  "k value for rto calculation")
+    ("min-rto",   po::value<double>(&minRto)->default_value(minRto),
+                  "minimum rto value in milliseconds")
+    ("max-rto",   po::value<double>(&maxRto)->default_value(maxRto),
+                  "maximum rto value in milliseconds")
     ;
 
   po::options_description visibleDesc;
-  visibleDesc.add(basicDesc).add(realDiscoveryDesc).add(fixedPipeDesc).add(aimdPipeDesc);
+  visibleDesc.add(basicDesc).add(realDiscoveryDesc).add(fixedPipeDesc).add(adaptivePipeDesc);
 
   po::options_description hiddenDesc;
   hiddenDesc.add_options()
@@ -224,28 +221,28 @@
     }
 
     unique_ptr<PipelineInterests> pipeline;
-    unique_ptr<aimd::StatisticsCollector> statsCollector;
-    unique_ptr<aimd::RttEstimator> rttEstimator;
+    unique_ptr<StatisticsCollector> statsCollector;
+    unique_ptr<RttEstimator> rttEstimator;
     std::ofstream statsFileCwnd;
     std::ofstream statsFileRtt;
 
     if (pipelineType == "fixed") {
-      PipelineInterestsFixedWindow::Options optionsPipeline(options);
+      PipelineInterestsFixed::Options optionsPipeline(options);
       optionsPipeline.maxPipelineSize = maxPipelineSize;
-      pipeline = make_unique<PipelineInterestsFixedWindow>(face, optionsPipeline);
+      pipeline = make_unique<PipelineInterestsFixed>(face, optionsPipeline);
     }
     else if (pipelineType == "aimd") {
-      aimd::RttEstimator::Options optionsRttEst;
+      RttEstimator::Options optionsRttEst;
       optionsRttEst.isVerbose = options.isVerbose;
       optionsRttEst.alpha = alpha;
       optionsRttEst.beta = beta;
       optionsRttEst.k = k;
-      optionsRttEst.minRto = aimd::Milliseconds(minRto);
-      optionsRttEst.maxRto = aimd::Milliseconds(maxRto);
+      optionsRttEst.minRto = Milliseconds(minRto);
+      optionsRttEst.maxRto = Milliseconds(maxRto);
 
-      rttEstimator = make_unique<aimd::RttEstimator>(optionsRttEst);
+      rttEstimator = make_unique<RttEstimator>(optionsRttEst);
 
-      PipelineInterestsAimd::Options optionsPipeline(options);
+      PipelineInterestsAdaptive::Options optionsPipeline(options);
       optionsPipeline.disableCwa = disableCwa;
       optionsPipeline.resetCwndToInit = resetCwndToInit;
       optionsPipeline.initCwnd = static_cast<double>(initCwnd);
@@ -254,7 +251,7 @@
       optionsPipeline.mdCoef = mdCoef;
       optionsPipeline.ignoreCongMarks = ignoreCongMarks;
 
-      auto aimdPipeline = make_unique<PipelineInterestsAimd>(face, *rttEstimator, optionsPipeline);
+      auto adaptivePipeline = make_unique<PipelineInterestsAdaptive>(face, *rttEstimator, optionsPipeline);
 
       if (!cwndPath.empty() || !rttPath.empty()) {
         if (!cwndPath.empty()) {
@@ -271,11 +268,11 @@
             return 4;
           }
         }
-        statsCollector = make_unique<aimd::StatisticsCollector>(*aimdPipeline, *rttEstimator,
-                                                                statsFileCwnd, statsFileRtt);
+        statsCollector = make_unique<StatisticsCollector>(*adaptivePipeline, *rttEstimator,
+                                                          statsFileCwnd, statsFileRtt);
       }
 
-      pipeline = std::move(aimdPipeline);
+      pipeline = std::move(adaptivePipeline);
     }
     else {
       std::cerr << "ERROR: Interest pipeline type not valid" << std::endl;
diff --git a/tools/chunks/catchunks/pipeline-interests-aimd.cpp b/tools/chunks/catchunks/pipeline-interests-adaptive.cpp
similarity index 89%
rename from tools/chunks/catchunks/pipeline-interests-aimd.cpp
rename to tools/chunks/catchunks/pipeline-interests-adaptive.cpp
index b802e34..7e394ef 100644
--- a/tools/chunks/catchunks/pipeline-interests-aimd.cpp
+++ b/tools/chunks/catchunks/pipeline-interests-adaptive.cpp
@@ -23,22 +23,23 @@
  * @author Shuo Yang
  * @author Weiwei Liu
  * @author Chavoosh Ghasemi
+ * @author Klaus Schneider
  */
 
-#include "pipeline-interests-aimd.hpp"
+#include "pipeline-interests-adaptive.hpp"
 #include "data-fetcher.hpp"
 
 #include <cmath>
 #include <iomanip>
 
+
 namespace ndn {
 namespace chunks {
-namespace aimd {
 
-constexpr double PipelineInterestsAimd::MIN_SSTHRESH;
+constexpr double PipelineInterestsAdaptive::MIN_SSTHRESH;
 
-PipelineInterestsAimd::PipelineInterestsAimd(Face& face, RttEstimator& rttEstimator,
-                                             const Options& options)
+PipelineInterestsAdaptive::PipelineInterestsAdaptive(Face& face, RttEstimator& rttEstimator,
+                                                     const Options& options)
   : PipelineInterests(face)
   , m_options(options)
   , m_rttEstimator(rttEstimator)
@@ -64,13 +65,13 @@
   }
 }
 
-PipelineInterestsAimd::~PipelineInterestsAimd()
+PipelineInterestsAdaptive::~PipelineInterestsAdaptive()
 {
   cancel();
 }
 
 void
-PipelineInterestsAimd::doRun()
+PipelineInterestsAdaptive::doRun()
 {
   if (allSegmentsReceived()) {
     cancel();
@@ -87,14 +88,14 @@
 }
 
 void
-PipelineInterestsAimd::doCancel()
+PipelineInterestsAdaptive::doCancel()
 {
   m_checkRtoEvent.cancel();
   m_segmentInfo.clear();
 }
 
 void
-PipelineInterestsAimd::checkRto()
+PipelineInterestsAdaptive::checkRto()
 {
   if (isStopping())
     return;
@@ -123,7 +124,7 @@
 }
 
 void
-PipelineInterestsAimd::sendInterest(uint64_t segNo, bool isRetransmission)
+PipelineInterestsAdaptive::sendInterest(uint64_t segNo, bool isRetransmission)
 {
   if (isStopping())
     return;
@@ -165,9 +166,9 @@
 
   SegmentInfo& segInfo = m_segmentInfo[segNo];
   segInfo.interestHdl = m_face.expressInterest(interest,
-                                               bind(&PipelineInterestsAimd::handleData, this, _1, _2),
-                                               bind(&PipelineInterestsAimd::handleNack, this, _1, _2),
-                                               bind(&PipelineInterestsAimd::handleLifetimeExpiration, this, _1));
+                                               bind(&PipelineInterestsAdaptive::handleData, this, _1, _2),
+                                               bind(&PipelineInterestsAdaptive::handleNack, this, _1, _2),
+                                               bind(&PipelineInterestsAdaptive::handleLifetimeExpiration, this, _1));
   segInfo.timeSent = time::steady_clock::now();
   segInfo.rto = m_rttEstimator.getEstimatedRto();
 
@@ -185,7 +186,7 @@
 }
 
 void
-PipelineInterestsAimd::schedulePackets()
+PipelineInterestsAdaptive::schedulePackets()
 {
   BOOST_ASSERT(m_nInFlight >= 0);
   auto availableWindowSize = static_cast<int64_t>(m_cwnd) - m_nInFlight;
@@ -209,7 +210,7 @@
 }
 
 void
-PipelineInterestsAimd::handleData(const Interest& interest, const Data& data)
+PipelineInterestsAdaptive::handleData(const Interest& interest, const Data& data)
 {
   if (isStopping())
     return;
@@ -305,7 +306,7 @@
 }
 
 void
-PipelineInterestsAimd::handleNack(const Interest& interest, const lp::Nack& nack)
+PipelineInterestsAdaptive::handleNack(const Interest& interest, const lp::Nack& nack)
 {
   if (isStopping())
     return;
@@ -334,7 +335,7 @@
 }
 
 void
-PipelineInterestsAimd::handleLifetimeExpiration(const Interest& interest)
+PipelineInterestsAdaptive::handleLifetimeExpiration(const Interest& interest)
 {
   if (isStopping())
     return;
@@ -346,7 +347,7 @@
 }
 
 void
-PipelineInterestsAimd::recordTimeout()
+PipelineInterestsAdaptive::recordTimeout()
 {
   if (m_options.disableCwa || m_highData > m_recPoint) {
     // react to only one timeout per RTT (conservative window adaptation)
@@ -364,7 +365,7 @@
 }
 
 void
-PipelineInterestsAimd::enqueueForRetransmission(uint64_t segNo)
+PipelineInterestsAdaptive::enqueueForRetransmission(uint64_t segNo)
 {
   BOOST_ASSERT(m_nInFlight > 0);
   m_nInFlight--;
@@ -373,7 +374,7 @@
 }
 
 void
-PipelineInterestsAimd::handleFail(uint64_t segNo, const std::string& reason)
+PipelineInterestsAdaptive::handleFail(uint64_t segNo, const std::string& reason)
 {
   if (isStopping())
     return;
@@ -399,7 +400,7 @@
 }
 
 void
-PipelineInterestsAimd::increaseWindow()
+PipelineInterestsAdaptive::increaseWindow()
 {
   if (m_cwnd < m_ssthresh) {
     m_cwnd += m_options.aiStep; // additive increase
@@ -412,7 +413,7 @@
 }
 
 void
-PipelineInterestsAimd::decreaseWindow()
+PipelineInterestsAdaptive::decreaseWindow()
 {
   // please refer to RFC 5681, Section 3.1 for the rationale behind it
   m_ssthresh = std::max(MIN_SSTHRESH, m_cwnd * m_options.mdCoef); // multiplicative decrease
@@ -422,7 +423,7 @@
 }
 
 void
-PipelineInterestsAimd::cancelInFlightSegmentsGreaterThan(uint64_t segNo)
+PipelineInterestsAdaptive::cancelInFlightSegmentsGreaterThan(uint64_t segNo)
 {
   for (auto it = m_segmentInfo.begin(); it != m_segmentInfo.end();) {
     // cancel fetching all segments that follow
@@ -437,7 +438,7 @@
 }
 
 void
-PipelineInterestsAimd::printSummary() const
+PipelineInterestsAdaptive::printSummary() const
 {
   PipelineInterests::printSummary();
   std::cerr << "Congestion marks: " << m_nCongMarks << " (caused " << m_nMarkDecr << " window decreases)\n"
@@ -477,9 +478,9 @@
 }
 
 std::ostream&
-operator<<(std::ostream& os, const PipelineInterestsAimdOptions& options)
+operator<<(std::ostream& os, const PipelineInterestsAdaptiveOptions& options)
 {
-  os << "AIMD pipeline parameters:\n"
+  os << "Adaptive pipeline parameters:\n"
      << "\tInitial congestion window size = " << options.initCwnd << "\n"
      << "\tInitial slow start threshold = " << options.initSsthresh << "\n"
      << "\tAdditive increase step = " << options.aiStep << "\n"
@@ -493,6 +494,5 @@
   return os;
 }
 
-} // namespace aimd
 } // namespace chunks
 } // namespace ndn
diff --git a/tools/chunks/catchunks/pipeline-interests-aimd.hpp b/tools/chunks/catchunks/pipeline-interests-adaptive.hpp
similarity index 84%
rename from tools/chunks/catchunks/pipeline-interests-aimd.hpp
rename to tools/chunks/catchunks/pipeline-interests-adaptive.hpp
index 4ef21ac..b65a2c3 100644
--- a/tools/chunks/catchunks/pipeline-interests-aimd.hpp
+++ b/tools/chunks/catchunks/pipeline-interests-adaptive.hpp
@@ -23,13 +23,14 @@
  * @author Shuo Yang
  * @author Weiwei Liu
  * @author Chavoosh Ghasemi
+ * @author Klaus Schneider
  */
 
-#ifndef NDN_TOOLS_CHUNKS_CATCHUNKS_PIPELINE_INTERESTS_AIMD_HPP
-#define NDN_TOOLS_CHUNKS_CATCHUNKS_PIPELINE_INTERESTS_AIMD_HPP
+#ifndef NDN_TOOLS_CHUNKS_CATCHUNKS_PIPELINE_INTERESTS_ADAPTIVE_HPP
+#define NDN_TOOLS_CHUNKS_CATCHUNKS_PIPELINE_INTERESTS_ADAPTIVE_HPP
 
 #include "options.hpp"
-#include "aimd-rtt-estimator.hpp"
+#include "rtt-estimator.hpp"
 #include "pipeline-interests.hpp"
 
 #include <queue>
@@ -37,13 +38,12 @@
 
 namespace ndn {
 namespace chunks {
-namespace aimd {
 
-class PipelineInterestsAimdOptions : public Options
+class PipelineInterestsAdaptiveOptions : public Options
 {
 public:
   explicit
-  PipelineInterestsAimdOptions(const Options& options = Options())
+  PipelineInterestsAdaptiveOptions(const Options& options = Options())
     : Options(options)
   {
   }
@@ -85,7 +85,7 @@
 /**
  * @brief Service for retrieving Data via an Interest pipeline
  *
- * Retrieves all segmented Data under the specified prefix by maintaining a dynamic AIMD
+ * Retrieves all segmented Data under the specified prefix by maintaining a dynamic
  * congestion window combined with a Conservative Loss Adaptation algorithm. For details,
  * please refer to the description in section "Interest pipeline types in ndncatchunks" of
  * tools/chunks/README.md
@@ -93,22 +93,22 @@
  * Provides retrieved Data on arrival with no ordering guarantees. Data is delivered to the
  * PipelineInterests' user via callback immediately upon arrival.
  */
-class PipelineInterestsAimd : public PipelineInterests
+class PipelineInterestsAdaptive : public PipelineInterests
 {
 public:
-  typedef PipelineInterestsAimdOptions Options;
+  typedef PipelineInterestsAdaptiveOptions Options;
 
 public:
   /**
-   * @brief create a PipelineInterestsAimd service
+   * @brief create a PipelineInterestsAdaptive service
    *
    * Configures the pipelining service without specifying the retrieval namespace. After this
    * configuration the method run must be called to start the Pipeline.
    */
-  PipelineInterestsAimd(Face& face, RttEstimator& rttEstimator,
-                        const Options& options = Options());
+  PipelineInterestsAdaptive(Face& face, RttEstimator& rttEstimator,
+                            const Options& options = Options());
 
-  ~PipelineInterestsAimd() final;
+  ~PipelineInterestsAdaptive() final;
 
   /**
    * @brief Signals when cwnd changes
@@ -116,14 +116,15 @@
    * The callback function should be: void(Milliseconds age, double cwnd) where age is the
    * duration since pipeline starts, and cwnd is the new congestion window size (in segments).
    */
-  signal::Signal<PipelineInterestsAimd, Milliseconds, double> afterCwndChange;
+  signal::Signal<PipelineInterestsAdaptive, Milliseconds, double> afterCwndChange;
 
 private:
   /**
    * @brief fetch all the segments between 0 and lastSegment of the specified prefix
    *
-   * Starts the pipeline with an AIMD algorithm to control the window size. The pipeline will
-   * fetch every segment until the last segment is successfully received or an error occurs.
+   * Starts the pipeline with an adaptive window algorithm to control the window size.
+   * The pipeline will fetch every segment until the last segment is successfully received
+   * or an error occurs.
    */
   void
   doRun() final;
@@ -169,13 +170,13 @@
   handleFail(uint64_t segNo, const std::string& reason);
 
   /**
-   * @brief increase congestion window size based on AIMD scheme
+   * @brief increase congestion window size
    */
   void
   increaseWindow();
 
   /**
-   * @brief decrease congestion window size based on AIMD scheme
+   * @brief decrease congestion window size
    */
   void
   decreaseWindow();
@@ -225,13 +226,10 @@
 };
 
 std::ostream&
-operator<<(std::ostream& os, const PipelineInterestsAimdOptions& options);
+operator<<(std::ostream& os, const PipelineInterestsAdaptiveOptions& options);
 
-} // namespace aimd
-
-using aimd::PipelineInterestsAimd;
 
 } // namespace chunks
 } // namespace ndn
 
-#endif // NDN_TOOLS_CHUNKS_CATCHUNKS_PIPELINE_INTERESTS_AIMD_HPP
+#endif // NDN_TOOLS_CHUNKS_CATCHUNKS_PIPELINE_INTERESTS_ADAPTIVE_HPP
diff --git a/tools/chunks/catchunks/pipeline-interests-fixed-window.cpp b/tools/chunks/catchunks/pipeline-interests-fixed.cpp
similarity index 87%
rename from tools/chunks/catchunks/pipeline-interests-fixed-window.cpp
rename to tools/chunks/catchunks/pipeline-interests-fixed.cpp
index 1794310..6df6d27 100644
--- a/tools/chunks/catchunks/pipeline-interests-fixed-window.cpp
+++ b/tools/chunks/catchunks/pipeline-interests-fixed.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2016-2018, Regents of the University of California,
+ * Copyright (c) 2016-2019, Regents of the University of California,
  *                          Colorado State University,
  *                          University Pierre & Marie Curie, Sorbonne University.
  *
@@ -27,13 +27,13 @@
  * @author Chavoosh Ghasemi
  */
 
-#include "pipeline-interests-fixed-window.hpp"
+#include "pipeline-interests-fixed.hpp"
 #include "data-fetcher.hpp"
 
 namespace ndn {
 namespace chunks {
 
-PipelineInterestsFixedWindow::PipelineInterestsFixedWindow(Face& face, const Options& options)
+PipelineInterestsFixed::PipelineInterestsFixed(Face& face, const Options& options)
   : PipelineInterests(face)
   , m_options(options)
   , m_hasFailure(false)
@@ -41,13 +41,13 @@
   m_segmentFetchers.resize(m_options.maxPipelineSize);
 }
 
-PipelineInterestsFixedWindow::~PipelineInterestsFixedWindow()
+PipelineInterestsFixed::~PipelineInterestsFixed()
 {
   cancel();
 }
 
 void
-PipelineInterestsFixedWindow::doRun()
+PipelineInterestsFixed::doRun()
 {
   // if the FinalBlockId is unknown, this could potentially request non-existent segments
   for (size_t nRequestedSegments = 0;
@@ -60,7 +60,7 @@
 }
 
 bool
-PipelineInterestsFixedWindow::fetchNextSegment(std::size_t pipeNo)
+PipelineInterestsFixed::fetchNextSegment(std::size_t pipeNo)
 {
   if (isStopping())
     return false;
@@ -86,9 +86,9 @@
   auto fetcher = DataFetcher::fetch(m_face, interest,
                                     m_options.maxRetriesOnTimeoutOrNack,
                                     m_options.maxRetriesOnTimeoutOrNack,
-                                    bind(&PipelineInterestsFixedWindow::handleData, this, _1, _2, pipeNo),
-                                    bind(&PipelineInterestsFixedWindow::handleFail, this, _2, pipeNo),
-                                    bind(&PipelineInterestsFixedWindow::handleFail, this, _2, pipeNo),
+                                    bind(&PipelineInterestsFixed::handleData, this, _1, _2, pipeNo),
+                                    bind(&PipelineInterestsFixed::handleFail, this, _2, pipeNo),
+                                    bind(&PipelineInterestsFixed::handleFail, this, _2, pipeNo),
                                     m_options.isVerbose);
 
   BOOST_ASSERT(!m_segmentFetchers[pipeNo].first || !m_segmentFetchers[pipeNo].first->isRunning());
@@ -98,7 +98,7 @@
 }
 
 void
-PipelineInterestsFixedWindow::doCancel()
+PipelineInterestsFixed::doCancel()
 {
   for (auto& fetcher : m_segmentFetchers) {
     if (fetcher.first)
@@ -109,7 +109,7 @@
 }
 
 void
-PipelineInterestsFixedWindow::handleData(const Interest& interest, const Data& data, size_t pipeNo)
+PipelineInterestsFixed::handleData(const Interest& interest, const Data& data, size_t pipeNo)
 {
   if (isStopping())
     return;
@@ -150,7 +150,7 @@
   }
 }
 
-void PipelineInterestsFixedWindow::handleFail(const std::string& reason, std::size_t pipeNo)
+void PipelineInterestsFixed::handleFail(const std::string& reason, std::size_t pipeNo)
 {
   if (isStopping())
     return;
diff --git a/tools/chunks/catchunks/pipeline-interests-fixed-window.hpp b/tools/chunks/catchunks/pipeline-interests-fixed.hpp
similarity index 81%
rename from tools/chunks/catchunks/pipeline-interests-fixed-window.hpp
rename to tools/chunks/catchunks/pipeline-interests-fixed.hpp
index 22f1a4b..d7fd95d 100644
--- a/tools/chunks/catchunks/pipeline-interests-fixed-window.hpp
+++ b/tools/chunks/catchunks/pipeline-interests-fixed.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2016-2017,  Regents of the University of California,
+ * Copyright (c) 2016-2019,  Regents of the University of California,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University.
  *
@@ -27,8 +27,8 @@
  * @author Chavoosh Ghasemi
  */
 
-#ifndef NDN_TOOLS_CHUNKS_CATCHUNKS_PIPELINE_INTERESTS_FIXED_WINDOW_HPP
-#define NDN_TOOLS_CHUNKS_CATCHUNKS_PIPELINE_INTERESTS_FIXED_WINDOW_HPP
+#ifndef NDN_TOOLS_CHUNKS_CATCHUNKS_PIPELINE_INTERESTS_FIXED_HPP
+#define NDN_TOOLS_CHUNKS_CATCHUNKS_PIPELINE_INTERESTS_FIXED_HPP
 
 #include "options.hpp"
 #include "pipeline-interests.hpp"
@@ -38,11 +38,11 @@
 
 class DataFetcher;
 
-class PipelineInterestsFixedWindowOptions : public Options
+class PipelineInterestsFixedOptions : public Options
 {
 public:
   explicit
-  PipelineInterestsFixedWindowOptions(const Options& options = Options())
+  PipelineInterestsFixedOptions(const Options& options = Options())
     : Options(options)
     , maxPipelineSize(1)
   {
@@ -62,22 +62,22 @@
  * No guarantees are made as to the order in which segments are fetched or callbacks are invoked,
  * i.e. out-of-order delivery is possible.
  */
-class PipelineInterestsFixedWindow : public PipelineInterests
+class PipelineInterestsFixed : public PipelineInterests
 {
 public:
-  typedef PipelineInterestsFixedWindowOptions Options;
+  typedef PipelineInterestsFixedOptions Options;
 
 public:
   /**
-   * @brief create a PipelineInterestsFixedWindow service
+   * @brief create a PipelineInterestsFixed service
    *
    * Configures the pipelining service without specifying the retrieval namespace. After this
    * configuration the method run must be called to start the Pipeline.
    */
   explicit
-  PipelineInterestsFixedWindow(Face& face, const Options& options = Options());
+  PipelineInterestsFixed(Face& face, const Options& options = Options());
 
-  ~PipelineInterestsFixedWindow() final;
+  ~PipelineInterestsFixed() final;
 
 private:
   /**
@@ -120,4 +120,4 @@
 } // namespace chunks
 } // namespace ndn
 
-#endif // NDN_TOOLS_CHUNKS_CATCHUNKS_PIPELINE_INTERESTS_FIXED_WINDOW_HPP
+#endif // NDN_TOOLS_CHUNKS_CATCHUNKS_PIPELINE_INTERESTS_FIXED_HPP
diff --git a/tools/chunks/catchunks/aimd-rtt-estimator.cpp b/tools/chunks/catchunks/rtt-estimator.cpp
similarity index 95%
rename from tools/chunks/catchunks/aimd-rtt-estimator.cpp
rename to tools/chunks/catchunks/rtt-estimator.cpp
index 2e1852f..fd3a592 100644
--- a/tools/chunks/catchunks/aimd-rtt-estimator.cpp
+++ b/tools/chunks/catchunks/rtt-estimator.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2016-2018, Arizona Board of Regents.
+ * Copyright (c) 2016-2019, Arizona Board of Regents.
  *
  * This file is part of ndn-tools (Named Data Networking Essential Tools).
  * See AUTHORS.md for complete list of ndn-tools authors and contributors.
@@ -23,13 +23,12 @@
  * @author Chavoosh Ghasemi
  */
 
-#include "aimd-rtt-estimator.hpp"
+#include "rtt-estimator.hpp"
 
 #include <cmath>
 
 namespace ndn {
 namespace chunks {
-namespace aimd {
 
 RttEstimator::RttEstimator(const Options& options)
   : m_options(options)
@@ -93,6 +92,5 @@
   return os;
 }
 
-} // namespace aimd
 } // namespace chunks
 } // namespace ndn
diff --git a/tools/chunks/catchunks/aimd-rtt-estimator.hpp b/tools/chunks/catchunks/rtt-estimator.hpp
similarity index 93%
rename from tools/chunks/catchunks/aimd-rtt-estimator.hpp
rename to tools/chunks/catchunks/rtt-estimator.hpp
index d7d1aca..6f10326 100644
--- a/tools/chunks/catchunks/aimd-rtt-estimator.hpp
+++ b/tools/chunks/catchunks/rtt-estimator.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016-2018,  Arizona Board of Regents.
+ * Copyright (c) 2016-2019,  Arizona Board of Regents.
  *
  * This file is part of ndn-tools (Named Data Networking Essential Tools).
  * See AUTHORS.md for complete list of ndn-tools authors and contributors.
@@ -22,14 +22,13 @@
  * @author Chavoosh Ghasemi
  */
 
-#ifndef NDN_TOOLS_CHUNKS_CATCHUNKS_AIMD_RTT_ESTIMATOR_HPP
-#define NDN_TOOLS_CHUNKS_CATCHUNKS_AIMD_RTT_ESTIMATOR_HPP
+#ifndef NDN_TOOLS_CHUNKS_CATCHUNKS_RTT_ESTIMATOR_HPP
+#define NDN_TOOLS_CHUNKS_CATCHUNKS_RTT_ESTIMATOR_HPP
 
 #include "core/common.hpp"
 
 namespace ndn {
 namespace chunks {
-namespace aimd {
 
 typedef time::duration<double, time::milliseconds::period> Milliseconds;
 
@@ -161,8 +160,7 @@
 std::ostream&
 operator<<(std::ostream& os, const RttEstimator::Options& options);
 
-} // namespace aimd
 } // namespace chunks
 } // namespace ndn
 
-#endif // NDN_TOOLS_CHUNKS_CATCHUNKS_AIMD_RTT_ESTIMATOR_HPP
+#endif // NDN_TOOLS_CHUNKS_CATCHUNKS_RTT_ESTIMATOR_HPP
diff --git a/tools/chunks/catchunks/aimd-statistics-collector.cpp b/tools/chunks/catchunks/statistics-collector.cpp
similarity index 81%
rename from tools/chunks/catchunks/aimd-statistics-collector.cpp
rename to tools/chunks/catchunks/statistics-collector.cpp
index 9462b4f..44c342c 100644
--- a/tools/chunks/catchunks/aimd-statistics-collector.cpp
+++ b/tools/chunks/catchunks/statistics-collector.cpp
@@ -1,7 +1,7 @@
-/**
- * Copyright (c) 2016,  Regents of the University of California,
- *                      Colorado State University,
- *                      University Pierre & Marie Curie, Sorbonne University.
+/*
+ * Copyright (c) 2016-2019,  Regents of the University of California,
+ *                           Colorado State University,
+ *                           University Pierre & Marie Curie, Sorbonne University.
  *
  * This file is part of ndn-tools (Named Data Networking Essential Tools).
  * See AUTHORS.md for complete list of ndn-tools authors and contributors.
@@ -22,13 +22,12 @@
  * @author Weiwei Liu
  */
 
-#include "aimd-statistics-collector.hpp"
+#include "statistics-collector.hpp"
 
 namespace ndn {
 namespace chunks {
-namespace aimd {
 
-StatisticsCollector::StatisticsCollector(PipelineInterestsAimd& pipeline, RttEstimator& rttEstimator,
+StatisticsCollector::StatisticsCollector(PipelineInterestsAdaptive& pipeline, RttEstimator& rttEstimator,
                                          std::ostream& osCwnd, std::ostream& osRtt)
   : m_osCwnd(osCwnd)
   , m_osRtt(osRtt)
@@ -49,6 +48,5 @@
     });
 }
 
-} // namespace aimd
 } // namespace chunks
 } // namespace ndn
\ No newline at end of file
diff --git a/tools/chunks/catchunks/aimd-statistics-collector.hpp b/tools/chunks/catchunks/statistics-collector.hpp
similarity index 65%
rename from tools/chunks/catchunks/aimd-statistics-collector.hpp
rename to tools/chunks/catchunks/statistics-collector.hpp
index 3e11a38..cd71018 100644
--- a/tools/chunks/catchunks/aimd-statistics-collector.hpp
+++ b/tools/chunks/catchunks/statistics-collector.hpp
@@ -1,7 +1,7 @@
-/**
- * Copyright (c) 2016,  Regents of the University of California,
- *                      Colorado State University,
- *                      University Pierre & Marie Curie, Sorbonne University.
+/*
+ * Copyright (c) 2016-2019,  Regents of the University of California,
+ *                           Colorado State University,
+ *                           University Pierre & Marie Curie, Sorbonne University.
  *
  * This file is part of ndn-tools (Named Data Networking Essential Tools).
  * See AUTHORS.md for complete list of ndn-tools authors and contributors.
@@ -22,23 +22,22 @@
  * @author Weiwei Liu
  */
 
-#ifndef NDN_TOOLS_CHUNKS_CATCHUNKS_AIMD_STATISTICS_COLLECTOR_HPP
-#define NDN_TOOLS_CHUNKS_CATCHUNKS_AIMD_STATISTICS_COLLECTOR_HPP
+#ifndef NDN_TOOLS_CHUNKS_CATCHUNKS_STATISTICS_COLLECTOR_HPP
+#define NDN_TOOLS_CHUNKS_CATCHUNKS_STATISTICS_COLLECTOR_HPP
 
-#include "pipeline-interests-aimd.hpp"
-#include "aimd-rtt-estimator.hpp"
+#include "pipeline-interests-adaptive.hpp"
+#include "rtt-estimator.hpp"
 
 namespace ndn {
 namespace chunks {
-namespace aimd {
 
 /**
- * @brief Statistics collector for AIMD pipeline
+ * @brief Statistics collector for Adaptive pipelines
  */
 class StatisticsCollector : noncopyable
 {
 public:
-  StatisticsCollector(PipelineInterestsAimd& pipeline, RttEstimator& rttEstimator,
+  StatisticsCollector(PipelineInterestsAdaptive& pipeline, RttEstimator& rttEstimator,
                       std::ostream& osCwnd, std::ostream& osRtt);
 
 private:
@@ -46,8 +45,7 @@
   std::ostream& m_osRtt;
 };
 
-} // namespace aimd
 } // namespace chunks
 } // namespace ndn
 
-#endif // NDN_TOOLS_CHUNKS_CATCHUNKS_AIMD_STATISTICS_COLLECTOR_HPP
+#endif // NDN_TOOLS_CHUNKS_CATCHUNKS_STATISTICS_COLLECTOR_HPP