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.
- Author: Anonymous
- Labels: IP, RC, NCF, Rem, CDR, CDE
- Description:
This benchmark consists in a program with a database of singers. It returns a set of information of each singer (Name,Age,Last Album Name, and Location and Year of their next concert) by retrieving a number between 1 and 6 as input. - Metrics:
LOC Functions Benchmark 166 12 Slice 91 5
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: bench1_intra.erl
- Author: Anonymous
- Labels: IP, AF, HOF, DC, NCF
- Description:
This benchmark receives two input parameters and executes a call to a function using fun expressions. These expressions are stored in variables and are called later. - Metrics:
LOC Functions Benchmark 40 4 Slice 1 14 2 Slice 2 8 3
Source code-based program slicing
original program
minimal slice 1 (proof of minimality 1)
minimal slice 2 (proof of minimality 2)
Erlang Dependence Graph-based program slicing
JPG: original program, minimal slice 1, minimal slice 2
DOT: original program, minimal slice 1, minimal slice 2
- Author: Anonymous
- Labels: IP, DC, URC, UP
- Description:
This benchmark contains a function that receives two tuples with two elements as inputs and calls another one named ft with two condicional statements. Note that the third clause of the second conditional statement is unreachable. - Metrics:
LOC Functions Benchmark 21 2 Slice 10 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: bench3_intra.erl
- 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
- Author: Anonymous
- Labels: IP, UP, UMF, URF
- Description:
This benchmark contains a function that receives two lists as inputs. These lists are processed in a call using their elements in a case statement. Another function can be called in the case using as input the tail of one of the lists. - Metrics:
LOC Functions Benchmark 21 3 Slice 18 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: bench5_intra.erl
- Author: Anonymous
- Labels: IP, UMF, URF, UP, NCF
- Description:
This benchmark contains a function that receives two tuples as input. It calls another two functions that contain a case statement with unreachable clauses. One of this functions also makes a call to another function with unreachable and unmatcheable clauses. - Metrics:
LOC Functions Benchmark 38 4 Slice 1 11 3 Slice 2 8 2
Source code-based program slicing
original program
minimal slice 1 (proof of minimality 1)
minimal slice 2 (proof of minimality 2)
Erlang Dependence Graph-based program slicing
JPG: original program, minimal slice 1, minimal slice 2
DOT: original program, minimal slice 1, minimal slice 2
Intraprocedural version: bench6_intra.erl
- Author: Anonymous
- Labels: IP, DC, UP
- Description:
This benchmark contains a function that receives two numbers as inputs and calls another one with a conditional structure that contains a dead code statement. - Metrics:
LOC Functions Benchmark 12 2 Slice 9 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
- Author: Anonymous
- Labels: IP, RC
- Description:
This benchmark receives a list of movements in a saving account with the format {Movement, Amount, User} and a user Who. It returns two lists, one list for user's deposits greater than 300 and another one for the withdraws greater than 100. - Metrics:
LOC Functions Benchmark 17 3 Slice 13 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
- 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
- Author: Tamarit (Github)
- Labels: IP, RC, Rem
- Description:
This benchmark receives a list with pairs of integers and compute the number of common divisors of each pair. The program returns a list with the number of common divisors in the same order as the input pairs. - Metrics:
LOC Functions Benchmark 28 5 Slice 23 5
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
- Author: Anonymous
- Labels: IP, NCF, UP
- Description:
This benchmark contains a function receives two lists as inputs and calls another one named fl with a conditional structure. There is also another function gl that is not called by lists or fl. - Metrics:
LOC Functions Benchmark 13 3 Slice 11 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: bench11_intra.erl
- Author: Tamarit-Emartinm (Rosetta Code)
- Labels: IP, Char, RC, LC, Rem, UP
- Description:
The program performs translations and operations with balanced ternary. Its inputs are two numbers in balanced ternary representation and a decimal number. It converts the three numbers to the oposite representation and performs an operation with their balanced ternary representation. The output is a tuple that contains the input numbers and the result in both representations. - Metrics:
LOC Functions Benchmark 70 16 Slice 1 23 6 Slice 2 21 5
Source code-based program slicing
original program, minimal slice 1 (proof of minimality 1)
minimal slice 2 (proof of minimality 2)
Erlang Dependence Graph-based program slicing
JPG: original program, minimal slice 1, minimal slice 2
DOT: original program, minimal slice 1, minimal slice 2
Intraprocedural version: bench12_intra.erl
- Author: Susan Horwitz
- Labels: IP, RC
- Description:
The program proposed by Susan Horwitz was designed to ilustrate the problem of the Weiser's slicing algorithm in interprocedural slicing. The program makes a recursive call to add up the first 11 naturals. - Metrics:
LOC Functions Benchmark 17 4 Slice 12 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
- Author: Anonymous
- Labels: IP, URF, URC, UP, NCF, CDE
- Description:
The program plans a set of difficult slicing problems like unreachable clauses in case statements or never called function clauses. It receives two inputs of any nature and processes them with a suit of case statements and function calls to obtain a final result. - Metrics:
LOC Functions Benchmark 38 7 Slice 1 19 5 Slice 2 14 2 Slice 3 13 1
Source code-based program slicing
original program, minimal slice 1 (proof of minimality 1)
minimal slice 2 (proof of minimality 2)
minimal slice 3 (proof of minimality 3)
Erlang Dependence Graph-based program slicing
JPG: original program, minimal slice 1, minimal slice 2, minimal slice 3
DOT: original program, minimal slice 1, minimal slice 2, minimal slice 3
Intraprocedural version: bench14_intra.erl
- 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
- Author: K.B. Gallagher and J.R. Lyle
- Labels: IP, RC, Rem
- Description:
The word count program, computes the number of lines, words, and characters in an input text file. - Metrics:
LOC Functions Benchmark 39 3 Slice 15 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: bench16_intra.erl
- 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
- 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