flowR: A Static Program Slicer for R

Context Many researchers rely on the R programming language to perform their statistical analyses and visualizations in the form of R scripts. However, recent research and experience show, that many of these scripts contain problems. From being hard to comprehend by combining several analyses and pl...

Full description

Saved in:
Bibliographic Details
Published in:IEEE/ACM International Conference on Automated Software Engineering : [proceedings] pp. 2390 - 2393
Main Authors: Sihler, Florian, Tichy, Matthias
Format: Conference Proceeding
Language:English
Published: ACM 27.10.2024
Subjects:
ISSN:2643-1572
Online Access:Get full text
Tags: Add Tag
No Tags, Be the first to tag this record!
Abstract Context Many researchers rely on the R programming language to perform their statistical analyses and visualizations in the form of R scripts. However, recent research and experience show, that many of these scripts contain problems. From being hard to comprehend by combining several analyses and plots into a single source file to being non-reproducible, with a lack of analysis tools supporting the writing of correct and maintainable code. Objective In this work, we address the problem of comprehending and maintaining R scripts by proposing flowR, a program slicer and static dataflow analyzer for the R programming language, which can be integrated directly into Visual Studio Code. Given a set of variables of interest, like the generation of a single figure in a script, flowR automatically reduces the program to the parts relevant for the output of interest, like the value of a variable. Method First, we use static program analysis to construct a detailed dataflow graph of the R script. The analysis supports loops, function calls, side effects, sourcing external files, and even redefinitions of R's primitive constructs. Subsequently, we calculate the program slice by solving a reachability problem on the graph, collecting all required parts and presenting them to the user. Results Providing several interactive ways of slicing the program, we require an average of 16 ms to calculate the slice on a given dataflow graph, reducing the code by around 94 % of tokens.The demonstration video is available at https://youtu.be/Zgq6rnbvvhk. For the full source code and extensive documentation, refer to https://github.com/Code-Inspect/flowr. To try the docker image, use docker run --rm -it eagleoutice/flowr.CCS CONCEPTS* Theory of computation → Program analysis; * Software and its engineering → General programming languages; Maintaining software.
AbstractList Context Many researchers rely on the R programming language to perform their statistical analyses and visualizations in the form of R scripts. However, recent research and experience show, that many of these scripts contain problems. From being hard to comprehend by combining several analyses and plots into a single source file to being non-reproducible, with a lack of analysis tools supporting the writing of correct and maintainable code. Objective In this work, we address the problem of comprehending and maintaining R scripts by proposing flowR, a program slicer and static dataflow analyzer for the R programming language, which can be integrated directly into Visual Studio Code. Given a set of variables of interest, like the generation of a single figure in a script, flowR automatically reduces the program to the parts relevant for the output of interest, like the value of a variable. Method First, we use static program analysis to construct a detailed dataflow graph of the R script. The analysis supports loops, function calls, side effects, sourcing external files, and even redefinitions of R's primitive constructs. Subsequently, we calculate the program slice by solving a reachability problem on the graph, collecting all required parts and presenting them to the user. Results Providing several interactive ways of slicing the program, we require an average of 16 ms to calculate the slice on a given dataflow graph, reducing the code by around 94 % of tokens.The demonstration video is available at https://youtu.be/Zgq6rnbvvhk. For the full source code and extensive documentation, refer to https://github.com/Code-Inspect/flowr. To try the docker image, use docker run --rm -it eagleoutice/flowr.CCS CONCEPTS* Theory of computation → Program analysis; * Software and its engineering → General programming languages; Maintaining software.
Author Tichy, Matthias
Sihler, Florian
Author_xml – sequence: 1
  givenname: Florian
  surname: Sihler
  fullname: Sihler, Florian
  email: florian.sihler@uni-ulm.de
  organization: Ulm University,Germany
– sequence: 2
  givenname: Matthias
  surname: Tichy
  fullname: Tichy, Matthias
  email: matthias.tichy@uni-ulm.de
  organization: Ulm University,Germany
BookMark eNotjktLAzEURqMoWOus3bjIwu20ubnJTeKuFB-FgtLqumTykIFpRzID4r93QFfnW53vXLOLU39KjN2CWAAovURyQFIsJmrU7oxVzjirhDAglTXnbCZJYQ3ayCtWDUPbiGlqAqAZu89d_7174Cu-H_3YBv5W-s_ij3zftSEVnvvCdzfsMvtuSNU_5-zj6fF9_VJvX58369W29tPRWCsnYiMhKo8uaalTCFbGEAkVJjLgQhDSmDBF52CUilY6TTZSDKJBk3HO7v68bUrp8FXaoy8_BxCGlCPEXyioP8Q
CODEN IEEPAD
ContentType Conference Proceeding
DBID 6IE
6IL
CBEJK
RIE
RIL
DOI 10.1145/3691620.3695359
DatabaseName IEEE Electronic Library (IEL) Conference Proceedings
IEEE Xplore POP ALL
IEEE Xplore All Conference Proceedings
IEEE Electronic Library (IEL)
IEEE Proceedings Order Plans (POP All) 1998-Present
DatabaseTitleList
Database_xml – sequence: 1
  dbid: RIE
  name: IEEE Electronic Library (IEL)
  url: https://ieeexplore.ieee.org/
  sourceTypes: Publisher
DeliveryMethod fulltext_linktorsrc
Discipline Computer Science
EISBN 9798400712487
EISSN 2643-1572
EndPage 2393
ExternalDocumentID 10764963
Genre orig-research
GroupedDBID 6IE
6IF
6IH
6IK
6IL
6IM
6IN
6J9
AAJGR
AAWTH
ABLEC
ACREN
ADYOE
ADZIZ
AFYQB
ALMA_UNASSIGNED_HOLDINGS
AMTXH
BEFXN
BFFAM
BGNUA
BKEBE
BPEOZ
CBEJK
CHZPO
IEGSK
IPLJI
M43
OCL
RIE
RIL
ID FETCH-LOGICAL-a248t-490db21d4a39e525ecc82dcd6343e6719cc0277c145fc744d829568d6dc0b37f3
IEDL.DBID RIE
ISICitedReferencesCount 0
ISICitedReferencesURI http://www.webofscience.com/api/gateway?GWVersion=2&SrcApp=Summon&SrcAuth=ProQuest&DestLinkType=CitingArticles&DestApp=WOS_CPL&KeyUT=001353105400220&url=https%3A%2F%2Fcvtisr.summon.serialssolutions.com%2F%23%21%2Fsearch%3Fho%3Df%26include.ft.matches%3Dt%26l%3Dnull%26q%3D
IngestDate Wed Jan 15 06:20:43 EST 2025
IsDoiOpenAccess false
IsOpenAccess true
IsPeerReviewed false
IsScholarly true
Language English
LinkModel DirectLink
MergedId FETCHMERGED-LOGICAL-a248t-490db21d4a39e525ecc82dcd6343e6719cc0277c145fc744d829568d6dc0b37f3
PageCount 4
ParticipantIDs ieee_primary_10764963
PublicationCentury 2000
PublicationDate 2024-Oct.-27
PublicationDateYYYYMMDD 2024-10-27
PublicationDate_xml – month: 10
  year: 2024
  text: 2024-Oct.-27
  day: 27
PublicationDecade 2020
PublicationTitle IEEE/ACM International Conference on Automated Software Engineering : [proceedings]
PublicationTitleAbbrev ASE
PublicationYear 2024
Publisher ACM
Publisher_xml – name: ACM
SSID ssib057256116
ssj0051577
Score 2.2927327
Snippet Context Many researchers rely on the R programming language to perform their statistical analyses and visualizations in the form of R scripts. However, recent...
SourceID ieee
SourceType Publisher
StartPage 2390
SubjectTerms Codes
Computer languages
Documentation
Program Slicing
R Programming Language
Software
Software engineering
Source coding
Static Analysis
Statistical analysis
Visualization
Title flowR: A Static Program Slicer for R
URI https://ieeexplore.ieee.org/document/10764963
WOSCitedRecordID wos001353105400220&url=https%3A%2F%2Fcvtisr.summon.serialssolutions.com%2F%23%21%2Fsearch%3Fho%3Df%26include.ft.matches%3Dt%26l%3Dnull%26q%3D
hasFullText 1
inHoldings 1
isFullTextHit
isPrint
link http://cvtisr.summon.serialssolutions.com/2.0.0/link/0/eLvHCXMwlV1LS8NAEB5s8eCpPiq-2UOv0WRfk3gTsXgqpSr0VpLdDRRKKrGtf9-ZNFUvHryFhcDOZme-bzP7zQAMOCMaUmMjV2ARaeuSiFgrnXk8kXOlcq4f0jSbwNEonU6zcStWb7QwIYTm8lm45ccml--Xbs2_ysjD0WraMR3oINqtWGu3eQwSeCfMdbZhmHAasa3lk2hzpywRIUlnVJsZxZVJfzVTabBk2PvnLA6h_6PKE-NvvDmCvVAdQ2_XlkG0XnoCg3Kx_JzciwfBTHLu-CW-gyVeFhQVakE0VUz68DZ8en18jtpmCFEudbqKdBb7QiZe5yoLRhpa-lR6563SKlhMMuc4HevI1tKh1j6VrAT01ru4UFiqU-hWyyqcgeB6PVksHbkfalsQQyxcKHUwJcsp4_wc-mz17H1b72K2M_jij_FLOJAE9RzRJV5Bd1WvwzXsu81q_lHfNF_pC0NgjjI
linkProvider IEEE
linkToHtml http://cvtisr.summon.serialssolutions.com/2.0.0/link/0/eLvHCXMwlV1LS8NAEB60Cnqqj4pv99BrNNln4k3EUrGGUiv0VpLdDRRKKzXVv-9MmqoXD97CQmBnszPft5n9ZgDalBH1sdKBzU0eSG2jAFkrnnkcknMhMqofUjWbMGkaj0ZJvxarV1oY7311-cxf02OVy3dzu6RfZejhRkvcMZuwRa2zarnWevsog_AdEdtZBWJEamPqaj6RVDdCIxXieErViRJUm_RXO5UKTTrNf85jD1o_ujzW_0acfdjwswNorhszsNpPD6FdTOefg1t2x4hLTiy9RLew2MsU48KCIVFlgxa8dh6G992gbocQZFzGZSCT0OU8cjITiVdc4eLH3FmnhRRemyixlhKyFm0trJHSxZy0gE47G-bCFOIIGrP5zB8Do4o9ScgtOqCROkeOmFtfSK8KElSG2Qm0yOrx26rixXht8Okf41ew0x0-98a9x_TpDHY5Aj_Fd27OoVEulv4Ctu1HOXlfXFZf7AvjkpF7
openUrl ctx_ver=Z39.88-2004&ctx_enc=info%3Aofi%2Fenc%3AUTF-8&rfr_id=info%3Asid%2Fsummon.serialssolutions.com&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=proceeding&rft.title=IEEE%2FACM+International+Conference+on+Automated+Software+Engineering+%3A+%5Bproceedings%5D&rft.atitle=flowR%3A+A+Static+Program+Slicer+for+R&rft.au=Sihler%2C+Florian&rft.au=Tichy%2C+Matthias&rft.date=2024-10-27&rft.pub=ACM&rft.eissn=2643-1572&rft.spage=2390&rft.epage=2393&rft_id=info:doi/10.1145%2F3691620.3695359&rft.externalDocID=10764963