[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"detail-sidebar-cat-0-en-105":3,"doc-seo-657573-105":59,"doc-detail-657573-en":130},{"code":4,"msg":5,"data":6},0,"success",[7,13,18,23,28,33,38,43,48,51,55],{"id":8,"doc_module":4,"doc_module_name":9,"category_name":10,"show_sort_weight":11,"slug":12},1,"Document","Story & Novel",90,"story-novel",{"id":14,"doc_module":4,"doc_module_name":9,"category_name":15,"show_sort_weight":16,"slug":17},2,"Literature",80,"literature",{"id":19,"doc_module":4,"doc_module_name":9,"category_name":20,"show_sort_weight":21,"slug":22},4,"Exam",70,"exam",{"id":24,"doc_module":4,"doc_module_name":9,"category_name":25,"show_sort_weight":26,"slug":27},5,"Comic",60,"comic",{"id":29,"doc_module":4,"doc_module_name":9,"category_name":30,"show_sort_weight":31,"slug":32},6,"Technology",50,"technology",{"id":34,"doc_module":4,"doc_module_name":9,"category_name":35,"show_sort_weight":36,"slug":37},7,"Healthcare",40,"healthcare",{"id":39,"doc_module":4,"doc_module_name":9,"category_name":40,"show_sort_weight":41,"slug":42},8,"Research & Report",30,"research-report",{"id":44,"doc_module":4,"doc_module_name":9,"category_name":45,"show_sort_weight":46,"slug":47},9,"Religion & Spirituality",20,"religion-spirituality",{"id":46,"doc_module":4,"doc_module_name":9,"category_name":49,"show_sort_weight":46,"slug":50},"World Cup","world-cup",{"id":52,"doc_module":4,"doc_module_name":9,"category_name":53,"show_sort_weight":52,"slug":54},10,"Lifestyle","lifestyle",{"id":56,"doc_module":4,"doc_module_name":9,"category_name":57,"show_sort_weight":24,"slug":58},19,"General","general",{"code":4,"msg":60,"data":61},"ok",{"site_id":62,"language":63,"slug":64,"title":65,"keywords":66,"description":67,"schema_data":68,"social_meta":123,"head_meta":125,"extra_data":127,"updated_unix":129},105,"en","constructing-a-static-program-slicer-for-r-programs-masters-thesis","Constructing a Static Program Slicer for R Programs - Master’s Thesis","","In this master’s thesis we describe the construction of a backward program slicer for the R programming language. Given a variable at a specific program point, a “slicing criterion” yields the subset of the program that might affect the variable’s value. Because existing tools for R are limited, the thesis proposes flowR, a static analyzer and program slicer supporting assignments, loops, and function calls. It also counts common language constructs, builds a new dataflow analysis algorithm, evaluates flowR on real-world programs, and summarizes R syntax and semantics.",{"@graph":69,"@context":122},[70,84,105],{"@type":71,"itemListElement":72},"BreadcrumbList",[73,77,79,82],{"item":74,"name":75,"@type":76,"position":8},"https://docshare.wps.com","Home","ListItem",{"item":78,"name":9,"@type":76,"position":14},"https://docshare.wps.com/document/",{"item":80,"name":40,"@type":76,"position":81},"https://docshare.wps.com/document/research-report/",3,{"item":83,"name":65,"@type":76,"position":19},"https://docshare.wps.com/document/constructing-a-static-program-slicer-for-r-programs-masters-thesis/657573/",{"url":83,"name":65,"@type":85,"image":86,"author":91,"headline":65,"publisher":94,"fileFormat":97,"inLanguage":63,"description":67,"dateModified":98,"datePublished":99,"encodingFormat":97,"isAccessibleForFree":100,"interactionStatistic":101},"DigitalDocument",{"url":87,"@type":88,"width":89,"height":90},"https://docshare.wps.com/thumbnails/constructing-a-static-program-slicer-for-r-programs-masters-thesis/657573.png","ImageObject",300,407,{"name":92,"@type":93},"Franzy","Person",{"url":74,"name":95,"@type":96},"DocShare","Organization","application/pdf","2026-10-29","2026-10-26",true,{"@type":102,"interactionType":103,"userInteractionCount":14},"InteractionCounter",{"@type":104},"ViewAction",{"@type":106,"mainEntity":107},"FAQPage",[108,114,118],{"name":109,"@type":110,"acceptedAnswer":111},"What does flowR do in the thesis?","Question",{"text":112,"@type":113},"flowR is a static analyzer and backward program slicer for R programs. It returns the subset of code that might affect a variable at a chosen program point.","Answer",{"name":115,"@type":110,"acceptedAnswer":116},"What language constructs does flowR support?",{"text":117,"@type":113},"The thesis states that flowR supports assignments, loops, and function calls.",{"name":119,"@type":110,"acceptedAnswer":120},"How is slicing formulated and implemented?",{"text":121,"@type":113},"Slicing is formulated as a reachability problem on the program’s dataflow graph, built using the program’s AST with normalization of the interpreter-produced AST before dataflow analysis.","https://schema.org",{"og:url":83,"og:type":124,"og:title":65,"og:site_name":95,"og:description":67},"article",{"robots":126,"canonical":83},"index,follow",{"doc_id":128,"site_id":62},657573,1792983588,{"code":4,"msg":5,"data":131},{"doc_id":128,"user_id":132,"nickname":92,"user_avatar":133,"doc_module":4,"category_id":39,"category_name":40,"doc_title":65,"doc_description":67,"doc_content":134,"file_id":135,"file_url":136,"file_type":137,"file_size":138,"view_count":14,"is_deleted":4,"is_public":8,"is_downloadable":8,"audit_status":8,"page_count":139,"language":140,"language_code":63,"site_id":62,"html_lang":63,"table_of_contents":141,"faqs":142,"seo_title":143,"seo_description":67,"update_tm":129,"read_time":144},2336478945519,"https://ap-avatar.wpscdn.com/davatar_085a072bc5b1113ac321206ff7593b45","flow R  \nParsing Normalization Dataflow Slicing Reconstruction  \nprint  \nf0  \nf 0 ← function (a 0 , b 0 = 3) { print (a 1 )  \na 2 + b 1  \nf}1  (39)  \na0  \na2  \nunnamed-arg  \nConstructing a Static Program Slicer for R Programs  \nFlorian Sihler  \nMaster’s Thesis  \nInstitute of Software Engineering and Programming Languages  \nMaster’s Thesis in Computer Science  \nDate of Submission: August 13, 2023  \nInstitution: Ulm University  \nExaminers  \n• Prof. Dr. Matthias Tichy  \nInstitute of Software Engineering and Programming Languages  \n• Prof. Dr. Thomas Thüm  \nInstitute of Software Engineering and Programming Languages  \n© 2023 Florian Sihler  \nConstructing a Static Program Slicerfor R Programs  \ncb This work is licenced under the Creative Commons Attribution 4.0 license.To view a copy of this license, visit [https://creativecommons. org/licenses/by/4.0/](https://creativecommons. org/licenses/by/4.0/ or)[ or](https://creativecommons. org/licenses/by/4.0/ or)[ ](https://creativecommons. org/licenses/by/4.0/ or)send a letter to Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.  \nAbstract  \nIn this master  \nslicer for the  \nthesis we describe the construction of a backward program R programming language. Given a variable at a specific  \npoint in the program, a so-called “slicing criterion”, the slicer returns the subset of the program that might affect the value of the variable.  \nProgrammers 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.  \nWithout 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 i) identify the commonly used language constructs, ii) propose anew algorithm for the dataflow analysis of R programs, iii) evaluate flowRon a set of real-world programs, and iv) present an overview of the syntax and semantics of R.  \nTo 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 offlowR, focusing on the dataflow analysis due to the amount of effort required. Moreover, we relate each part of the explanation to its corresponding implementation.1 Afterward, we evaluate the theoretical capabilities offlowR and measure the required processing time as well asthe 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.  \nThe capabilities of our program slicer are limited to a subset of what is possible in the R programming language mainly due to the limited scope of this master’s thesis. Furthermore, there exists no formal specification of R and most semantics are defined implicitly. Therefore, every claim we present is inherently based on our understanding of the language.  \nWe find that R scripts are on average more than twice as long as the code in packages. Furthermore, scripts contain on average more assignments, loops, and function calls, but fewer if-constructs for branching. For the return value of functions, most definitions do not rely on an explicit exit point with return. Instead, they implicitly return the result of the last expression they evaluate.  \nWe formulate slicing as a reachability problem on the dataflow graph of the program, including everything that can be reached from the slicing criterion. Our algorithm to construct this graph relies on the AST of the input program. Essentially, it works as a fold, with the inner no","cbCaijoV23J0v0kZ","https://ap.wps.com/l/cbCaijoV23J0v0kZ","pdf",1973407,147,"English","## Abstract\n## Context\n## Objective\n## Method\n## Limitations\n## Results\n## Acknowledgements","[{\"question\":\"What does flowR do in the thesis?\",\"answer\":\"flowR is a static analyzer and backward program slicer for R programs. It returns the subset of code that might affect a variable at a chosen program point.\"},{\"question\":\"What language constructs does flowR support?\",\"answer\":\"The thesis states that flowR supports assignments, loops, and function calls.\"},{\"question\":\"How is slicing formulated and implemented?\",\"answer\":\"Slicing is formulated as a reachability problem on the program’s dataflow graph, built using the program’s AST with normalization of the interpreter-produced AST before dataflow analysis.\"}]","Constructing a Static Program Slicer for R Programs - Master’s Thesis | PDF",370]