{"title":"Enabling direct manipulation of plain-text output for template programs","authors":"Tao Zan , Xiao He , Zhenjiang Hu","doi":"10.1016/j.jss.2025.112754","DOIUrl":null,"url":null,"abstract":"<div><div>In modern software development, templates are widely used to generate artifacts, enhancing productivity and consistency. However, developers often face a tedious run-modify-run loop to verify template correctness, as outputs are only inspectable after execution. This issue is exacerbated when templates involve complex logic, highlighting the need for a solution that supports both artifact generation and user-friendly modifications. We propose <span>BIT2</span>, a framework enabling direct manipulation of plain-text output to modify template programs. A key challenge is that plain-text output lack structural information, making it difficult to map updates back to the template. <span>BIT2</span> addresses this by generating computation-structured output, preserving the underlying logic, and supporting update operations (insertion, replacement, deletion) with carefully designed fusion semantics. Our implementation, written in TypeScript (18,000 lines of code), is available as an NPM module, complemented by a VSCode plugin, LiveT, for seamless template editing. Experimental results demonstrate that <span>BIT2</span> achieves efficient evaluation and supports diverse update scenarios, significantly enhancing expressiveness in template development.</div></div>","PeriodicalId":51099,"journal":{"name":"Journal of Systems and Software","volume":"235 ","pages":"Article 112754"},"PeriodicalIF":3.8000,"publicationDate":"2026-05-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Journal of Systems and Software","FirstCategoryId":"94","ListUrlMain":"https://www.sciencedirect.com/science/article/pii/S0164121225004236","RegionNum":2,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"2025/12/30 0:00:00","PubModel":"Epub","JCR":"Q1","JCRName":"COMPUTER SCIENCE, SOFTWARE ENGINEERING","Score":null,"Total":0}
引用次数: 0
Abstract
In modern software development, templates are widely used to generate artifacts, enhancing productivity and consistency. However, developers often face a tedious run-modify-run loop to verify template correctness, as outputs are only inspectable after execution. This issue is exacerbated when templates involve complex logic, highlighting the need for a solution that supports both artifact generation and user-friendly modifications. We propose BIT2, a framework enabling direct manipulation of plain-text output to modify template programs. A key challenge is that plain-text output lack structural information, making it difficult to map updates back to the template. BIT2 addresses this by generating computation-structured output, preserving the underlying logic, and supporting update operations (insertion, replacement, deletion) with carefully designed fusion semantics. Our implementation, written in TypeScript (18,000 lines of code), is available as an NPM module, complemented by a VSCode plugin, LiveT, for seamless template editing. Experimental results demonstrate that BIT2 achieves efficient evaluation and supports diverse update scenarios, significantly enhancing expressiveness in template development.
期刊介绍:
The Journal of Systems and Software publishes papers covering all aspects of software engineering and related hardware-software-systems issues. All articles should include a validation of the idea presented, e.g. through case studies, experiments, or systematic comparisons with other approaches already in practice. Topics of interest include, but are not limited to:
•Methods and tools for, and empirical studies on, software requirements, design, architecture, verification and validation, maintenance and evolution
•Agile, model-driven, service-oriented, open source and global software development
•Approaches for mobile, multiprocessing, real-time, distributed, cloud-based, dependable and virtualized systems
•Human factors and management concerns of software development
•Data management and big data issues of software systems
•Metrics and evaluation, data mining of software development resources
•Business and economic aspects of software development processes
The journal welcomes state-of-the-art surveys and reports of practical experience for all of these topics.