• Media type: Electronic Resource
  • Title: Constructing a Static Program Slicer for R Programs
  • Contributor: Sihler, Florian [Author]
  • imprint: Universität Ulm, 2023-08-23T13:04:26Z
  • Language: English
  • DOI: https://doi.org/10.18725/OPARU-50107
  • ISBN: 1857757831
  • Keywords: Programmverstehen ; Program Slicing ; Data flow computing ; R (Computer program language) ; Data-Flow ; Dataflow ; DDC 004 / Data processing & computer science ; R (Programm) ; Programmanalyse
  • Origination:
  • Footnote: Diese Datenquelle enthält auch Bestandsnachweise, die nicht zu einem Volltext führen.
  • Description: In this master thesis we describe the construction of a backward program slicer for the R programming language. Given a variable at a specific point in the program, a so-called "slicing criterion", the slicer returns the subset of the program that might affect the value of the variable. CONTEXT: Programmers spend a huge part of their time trying to understand code, which led to the development of various tools to support them. For example, linters and program slicers, that analyze the program to identify potential problems or answer questions regarding its variables. However, the R programming language enjoys only a small set of existing tools. OBJECTIVE: Without any existing program slicer for the R programming language, we propose flowR, a static analyzer and program slicer for R programs. It supports, among others, assignments, loops, and function calls. Alongside flowR, we 1) identify the commonly used language constructs, 2) propose a new algorithm for the dataflow analysis of R programs, 3) evaluate flowR on a set of real-world programs, and 4) present an overview of the syntax and semantics of R. METHOD: To identify the most common language constructs we count their usage in the source code of R packages and R scripts published in the area of social science and compare the results. Next, we explain the five-step architecture of flowR, focusing on the dataflow analysis due to the amount of effort required. Moreover, we relate each part of the explanation to its corresponding implementation (https://github.com/Code-Inspect/flowr/releases/tag/v1.0.0). Afterward, we evaluate the theoretical capabilities of flowR and measure the required processing time as well as the achieved reduction in the size of the program slice using all possible slicing points in a set of real-world R files. For the overview of R's syntax and semantics, we use the R language definition and the related literature. LIMITATIONS: The capabilities of our program slicer are limited to a subset of what is possible in the R programming ...
  • Access State: Open Access
  • Rights information: Attribution (CC BY)