Experimental Data for "Analysing Parallel Complexity of Term Rewriting"

We revisit parallel-innermost term rewriting as a model of parallel computation on inductive data structures and provide a corresponding notion of runtime complexity parametric in the size of the start term. We propose automatic techniques to derive both upper and lower bounds on parallel complexity of rewriting that enable a direct reuse of existing techniques for sequential complexity. The applicability and the precision of the method are demonstrated by the relatively light effort in extending the program analysis tool AProVE and by experiments on numerous benchmarks from the literature.

On this web page, we provide the experimental data supporting our claims.


Benchmarks

Here we provide the benchmark collections that we used for our experiments. The source of our benchmarks is the Termination Problem Data Base (TPDB), version 11.2.

We considered the 663 benchmarks for (sequential) runtime complexity of innermost rewriting in the subdirectory Runtime_Complexity_Innermost_Rewriting. Our benchmark files are available here: benchmarks.zip

These files are in the (human-readable) format used in the Termination Competition in earlier years.

The line

(GOAL COMPLEXITY)

denotes that complexity bounds are supposed to be analysed (rather than checking termination of the input).

The line

(STARTTERM CONSTRUCTOR-BASED)

denotes that only basic start terms are supposed to be considered (runtime complexity)

The line

(STRATEGY INNERMOST)

denotes that only (sequential) innermost rewrite strategies are considered.

To indicate that runtime complexity of parallel-innermost rewrite strategies is supposed to be analysed, replace this line by:

(STRATEGY PARALLELINNERMOST)


Experiments and Tool Configuration

We conducted our experiments on the StarExec platform, a cross-community computing platform for conducting experiments with automatic deduction tools. In particular, this is also the platform on which the annual Termination and Complexity Competition is run to assess the state of the art in automated analysis of tools for termination and complexity analysis of programs and term rewrite systems.

We used the all.q computer queue and a timeout of 300 seconds per example.

As far as we are aware, so far there have not been any automated tools able to analyse runtime complexity of parallel-innermost rewriting. However, an upper bound on runtime complexity of innermost rewriting is always also an upper bound on runtime complexity of parallel-innermost rewriting: pircR(n) ≤ ircR(n) holds for all TRSs R.

Thus, as the state of the art for upper bounds of runtime complexity of parallel-innermost rewriting with which to compare our contributions, we used the complexity analysis tools AProVE and TcT (Starexec URL for TcT) from the Termination and Complexity Competition in 2021 to analyse runtime complexity for innermost rewriting. We used the "tct_rci" configuration of TcT from StarExec. The corresponding tool configurations are labelled "AProVE irc" and "TcT irc" in our tables.

We have assessed the following configurations of AProVE and TcT as the state of the art in searching for upper bounds of parallel-innermost complexity. You can find the resulting data from these experiments downloaded from StarExec here:

Note that the lower bounds found in the above experiments are not valid for runtime complexity of parallel-innermost rewriting!

We implemented our contributions in the complexity analysis tool AProVE. The configuration "AProVE pircR(n) Section 3" includes the techniques from Section 3, and the configuration "AProVE pircR(n) Sections 3 & 4" includes the techniques from both Section 3 and Section 4. We used these configurations to obtain upper and lower bounds on the runtime complexity of parallel-innermost rewriting for the TRSs from our benchmark suite. You can find the data from these experiments here:


Result summary: all examples

The tables in this result summary give an overview over our experimental results.

  1. Upper bounds for runtime complexity of (parallel-)innermost rewriting

    Tool O(1) ≤ O(n) ≤ O(n2) ≤ O(n3) ≤ O(n≥4)
    TcT irc 19145173188188
    AProVE irc 26193301330338
    AProVE pirc Section 3 26210317346353
    AProVE pirc Sections 3 and 4 26212318346351

    The first table gives an overview over our experimental results for upper bounds. For each configuration, we state the number of examples for which the corresponding asymptotic complexity bound could be inferred. A row "≤ O(nk)" means that the corresponding tools proved a bound "≤ O(nk)" (e.g., in Table 1 right below, the configuration "AProVE irc" proved constant or linear upper bounds in 193 cases).

    We observe that upper complexity bounds improve in a noticeable number of cases, e.g., linear bounds on pirc can now be inferred for 212 TRSs rather than for 193 TRSs (using upper bounds on ircR as a correct but imprecise over-approximation for pircR).

    The improvement from irc to pirc can be drastic: for example, for the TRS TCT_12/recursion_10, the bounds found by AProVE change from an upper bound of sequential complexity of O(n10) to a (tight) upper bound for parallel complexity of O(n). (This TRS models a specific recursion structure, with rules { f0(x) → a } ∪ { fi(x) → gi(x,x), gi(s(x), y) → b(fi-1(y), gi(x,y)) | 1 ≤ i ≤ 10 }, and is highly amenable to parallelisation.) We observe that adding the techniques from Section 4 to the techniques from Section 3 leads to only few examples for which better upper bounds can be found.

  2. Lower bounds for runtime complexity of parallel-innermost rewriting

    Tool Confluent ≥ Ω(n) ≥ Ω(n2) ≥ Ω(n3) ≥ Ω(n≥4)
    AProVE pirc Sections 3 and 4 4473073881

    The second table shows our results for lower bounds on pirc. Here we evaluated only our own implementation in AProVE. The reason is that a lower bound on irc is not necessarily also a lower bound for pirc (the whole point of performing innermost rewriting in parallel is to reduce the asymptotic complexity!), so using results by tools that compute lower bounds on irc for comparison would not make sense. We observe that non-trivial lower bounds can be inferred for 307 out of 633 examples. This shows that our transformation from Section 4 produces relative TRSs that are generally amenable to analysis by existing program analysis tools. (A standard concern with transformations for program analysis is that, although correct, their output might be hard to analyse for existing tools. Our experimental results alleviate this concern for the contributions of this paper, both for upper and for lower bounds on pirc.)

  3. Tight bounds for runtime complexity of parallel-innermost rewriting

    Tool Θ(1) Θ(n) Θ(n2) Θ(n3) Total
    AProVE pirc Sections 3 and 4 2610356140

    Finally, the third table shows that for overall 140 TRSs, the bounds that were found are asymptotically precise.

Result summary: parallelisable examples

Out of the above 663 TRSs, 294 TRSs have potential for parallelism, indicated by the occurrence of two function calls at parallel positions in the right-hand side of at least one rule of the TRS. If this is not given, the parallel-innermost rewrite relation and the (sequential) innermost rewrite relation from the considered start terms (i.e., basic terms) are identical. On the level of our analysis, this manifests as the set of Parallel Dependency Tuples being identical to the set of standard Dependency Tuples for sequential rewriting. Details are available here. We now focus on this subset of 294 parallelisable TRSs, with the data taken from the same experiments as above. The correspondingly filtered data are available here:
  1. Upper bounds for runtime complexity of (parallel-)innermost rewriting

    Tool O(1) ≤ O(n) ≤ O(n2) ≤ O(n3) ≤ O(n≥4)
    TcT irc 428394444
    AProVE irc 550110123127
    AProVE pirc Section 3 565125140142
    AProVE pirc Sections 3 and 4 569125139141

    We again observe that upper complexity bounds improve in a noticeable number of cases, e.g., linear bounds on pirc can now be inferred for 69 TRSs rather than for 50 TRSs, an improvement by 38%.

    A closer inspection of the results shows that our dedicated analysis for complexity of parallel rewriting improves upper bounds obtained from state-of-the-art tools sequential-complexity analysis for 27 TRSs. Of these 27 TRSs, 15 cannot be handled by tools for sequential complexity at all. This gives tighter bounds for 27/(127+15) = 19.0% of TRSs with (now) known upper bounds.

  2. Lower bounds for runtime complexity of parallel-innermost rewriting

    Tool Confluent ≥ Ω(n) ≥ Ω(n2) ≥ Ω(n3) ≥ Ω(n≥4)
    AProVE pirc Sections 3 and 4 1861332351

    We observe that non-trivial lower bounds can be inferred for 133 out of 294 examples (45.2%).

  3. Tight bounds for runtime complexity of parallel-innermost rewriting

    Tool Θ(1) Θ(n) Θ(n2) Θ(n3) Total
    AProVE pirc Sections 3 and 4 5321341

    Finally, the third table shows that for overall 41 of the 234 TRSs, the bounds that were found are asymptotically precise.