Ad Hoc Syntax-Guided Program Reduction

Jia Le Tian, Mengxiao Zhang, Zhenyang Xu, Yongqiang Tian, Yiwen Dong, Chengnian Sun

Research output: Chapter in Book/Report/Conference proceedingConference PaperResearchpeer-review

5 Citations (Scopus)

Abstract

Program reduction is a widely adopted, indispensable technique for debugging language implementations such as compilers and interpreters. Given a program and a bug triggered by , a program reducer can produce a minimized program - that is derived from and still triggers the same bug. Perses is one of the state-of-the-art program reducers. It leverages the syntax of to guide the reduction process for efficiency and effectiveness. It is language-agnostic as its reduction algorithm is independent of any language-specific syntax. Conceptually to support a new language, Perses only needs the context-free grammar of the language; in practice, it is not easy. One needs to first manually transform into a special grammar form PNF with a tool provided by Perses, second manually change the code base of Perses to integrate the new language, and lastly build a binary of Perses. This paper presents our latest work to improve the usability of Perses by extending Perses to perform ad hoc program reduction for any new language as long as the language has a context-free grammar . With this extended version (referred to as Persesadhoc), the difficulty of supporting new languages is significantly reduced: a user only needs to write a configuration file and execute one command to support a new language in Perses, compared to manually transforming the grammar format, modifying the code base, and re-building Perses. Our case study demonstrates that with Persesadhoc, the Perses related infrastructure code required for supporting GLSL can be reduced from 190 lines of code to 20. Our extensive evaluations also show that Persesadhoc is as effective and efficient as Perses in reducing hoc programs, and only takes 10 seconds to support a new language, which is negligible compared to the manual effort required in Perses. A video demonstration of the tool can be found at https://youtu.be/trYwOT0mXhU.

Original languageEnglish
Title of host publicationESEC/FSE 2023 - Proceedings of the 31st ACM Joint Meeting European Software Engineering Conference and Symposium on the Foundations of Software Engineering
EditorsSatish Chandra, Kelly Blincoe, Paolo Tonella
Place of PublicationNew York NY USA
PublisherAssociation for Computing Machinery (ACM)
Pages2137-2141
Number of pages5
ISBN (Electronic)9798400703270
DOIs
Publication statusPublished - 2023
Externally publishedYes
EventJoint Meeting of the European Software Engineering Conference and the ACM SIGSOFT Symposium on the Foundations of Software Engineering 2023 - San Francisco, United States of America
Duration: 3 Dec 20239 Dec 2023
Conference number: 31st
https://dl.acm.org/doi/proceedings/10.1145/3611643 (Proceedings)
https://conf.researchr.org/home/fse-2023 (Website)

Conference

ConferenceJoint Meeting of the European Software Engineering Conference and the ACM SIGSOFT Symposium on the Foundations of Software Engineering 2023
Abbreviated titleESEC/FSE 2023
Country/TerritoryUnited States of America
CitySan Francisco
Period3/12/239/12/23
Internet address

Keywords

  • program reduction

Cite this