Benchmark Suite

Name Description Classification
Benchmark 1 Compression and decompression of complex structures IP, RC, NCF, Rem, CDR, CDE
Benchmark 2 Anonymous functions and higher order functions IP, AF, HOF, DC, NCF
Benchmark 3 Conditional statements with unreachable clauses IP, DC, URC, UP
Benchmark 4 Block structures and list comprehensions IP, LC, Block, DC, Rem
Benchmark 5 If statements and calls with defined input types IP, UP, UMF, URF
Benchmark 6 Unreachable clauses in functions and case statements IP, UMF, URF, UP, NCF
Benchmark 7 Conditional statements with unused variable declarations IP, DC, UP
Benchmark 8 Tail recursion and conditional statements IP, RC
Benchmark 9 Defined types and spec statements IP
Benchmark 10 Common divisors between pairs of numbers IP, RC, Rem
Benchmark 11 Conditional statements with non-called functions IP, NCF, UP
Benchmark 12 Balanced ternary operations IP, Char, RC, LC, Rem, UP
Benchmark 13 Horwitz interprocedural slicing test IP, RC
Benchmark 14 Challenging slicing situations IP, URF, URC, UP, NCF, CDE
Benchmark 15 Permutations and combinations IP, LC, AF, Rem
Benchmark 16 Word count program IP, RC, Rem
Benchmark 17 SCAM mug program IP, RC, Rem
Benchmark 18 Montréal boat example program IP, RC, Rem

For each benchmark, we provide the original Erlang source code and, at least, one slice associated with a slicing criterion. The slicing criterion is specified in the header of the slice file with a line such as the following:

%-- SLICING CRITERION: (65,Shown)

where 65 is the line number, and Shown is the name of the variable of interest.

  • Benchmark 1

  • Benchmark 2

  • Benchmark 3

  • Benchmark 4
    • Author: Anonymous
    • Labels: IP, LC, Block, DC, Rem
    • Description:
      The program receives a list of chemical elements with their abbreviation and their melt temperature in the format {Element,Abbreviation,Melting_Temp} and a temperature. It returns a list with the elements whose melt temperature is lower than the given temperature, the format of each object is {Element,Melting_Temp}. It also returns a list with the abbreviations of the selected elements when their length is one character.
    • Metrics:
      LOC Functions
      Benchmark 15 3
      Slice 12 3

      Source code-based program slicing
      original program, minimal slice (proof of minimality)
      Erlang Dependence Graph-based program slicing
      JPG: original program, minimal slice
      DOT: original program, minimal slice
      Intraprocedural version: bench4_intra.erl

  • Benchmark 5

  • Benchmark 6

  • Benchmark 7

  • Benchmark 8

  • Benchmark 9
    • Author: Anonymous
    • Labels: IP
    • Description:
      This benchmark receives a number and a state to switch the stove as inputs. If the state is ON and the number is greater than twenty, the program returns a success message, if it is ON and the number is less than or equal to twenty the program returns an error message. The OFF input state always provides a success message.
    • Metrics:
      LOC Functions
      Benchmark 31 3
      Slice 13 2

      Source code-based program slicing
      original program, minimal slice (proof of minimality)
      Erlang Dependence Graph-based program slicing
      JPG: original program, minimal slice
      DOT: original program, minimal slice
      Intraprocedural version: bench9_intra.erl

  • Benchmark 10

  • Benchmark 11

  • Benchmark 12

  • Benchmark 13

  • Benchmark 14

  • Benchmark 15
    • Author: Tamarit (Rosetta Code)
    • Labels: IP, LC, AF, Rem
    • Description:
      The program implements the procedure for making permutations and combinations in an interval of given numbers. The inputs are the first and last numbers of the permutation interval and the first and last numbers of the combination interval. The output is a set of the permutations and combinations calculated.
    • Metrics:
      LOC Functions
      Benchmark 35 8
      Slice 31 8

      Source code-based program slicing
      original program, minimal slice (proof of minimality)
      Erlang Dependence Graph-based program slicing
      JPG: original program, minimal slice
      DOT: original program, minimal slice
      Intraprocedural version: bench15_intra.erl

  • Benchmark 16

  • Benchmark 17
    • Author: Anonymous
    • Labels: IP, RC, Rem
    • Description:
      The SCAM Mug Example, Predicates p and q, and function h depend only on their single parameter while functions f and g return (unknown) constant values. The key point in this code is that in any terminating execution the final value of X is independent of the case q(c) expression: if it is initially false, it remains false and thus X retains its initial value. If it is true, one or more times then X will have the value assigned at Line 43. In the latter case, it does not matter how often q(c) is true and thus the assignment at Line 44 does not impact the value of x at Line 52. (Description taken from "ORBS and the Limits of Static Slicing" and adapted to Erlang)
    • Metrics:
      LOC Functions
      Benchmark 28 4
      Slice 24 4

      Source code-based program slicing
      original program, minimal slice (proof of minimality)
      Erlang Dependence Graph-based program slicing
      JPG: original program, minimal slice
      DOT: original program, minimal slice
      Intraprocedural version: bench17_intra.erl

  • Benchmark 18
    • Author: Sebastian Danicic and John Howroyd
    • Labels: IP, RC, Rem
    • Description:
      The program proposed by Danicic and Howroyd was designed to ilustrate an interesting slicing problem. In this program redicates p and q, and functions f1, f2, and f3 depend only on their formal parameter. The relevant observation is that in any terminating execution, the computation of K is irrelevant to the computation of J.
    • Metrics:
      LOC Functions
      Benchmark 30 6
      Slice 22 3

      Source code-based program slicing
      original program, minimal slice (proof of minimality)
      Erlang Dependence Graph-based program slicing
      JPG: original program, minimal slice
      DOT: original program, minimal slice
      Intraprocedural version: bench18_intra.erl