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: (99,Res)/(Node 414)
where 99 is the line number, and Res is the name of the variable of interest. For those slicers based on the Erlang Dependence Graph (EDG), we also provide the node in the EDG that corresponds to the slicing criterion (in the example, node 414).
- 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.
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, 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.
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.
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, 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.
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, 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.
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, 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.
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, 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.
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.
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.
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: 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.
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.
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: 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.
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: 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.
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.
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
- 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.
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: 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.
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, 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)
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: 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.
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