{"title":"Transforming imperative programs into bisimilar logically constrained term rewrite systems via injective functions from configurations to terms","authors":"Naoki Nishida, Misaki Kojima , Takumi Kato","doi":"10.1016/j.jlamp.2025.101056","DOIUrl":null,"url":null,"abstract":"<div><div>To transform an imperative program into a logically constrained term rewrite system (LCTRS, for short), previous work transforms a list of statements into rewrite rules in a stepwise manner, and proves the correctness along the transformation and the big-step semantics of the program. On the other hand, the small-step semantics of a programming language consists of inference rules that define single transitions of configurations. Partial instances of such inference rules are almost the same as rewrite rules in the transformed LCTRS. In this paper, we aim at establishing a framework for simpler definitions and correctness proofs of transformations from programs into LCTRSs. To this end, for the transformation in previous work as an example, we show the existence of an injective function from configurations of a given program to terms, and reformulate the transformation by means of the injective function. The injective function enables us to make a one-to-one correspondence between single small-step transitions and reduction steps, and provides bisimilarity between the program and transformed LCTRS, resulting in a simpler correctness proof.</div></div>","PeriodicalId":48797,"journal":{"name":"Journal of Logical and Algebraic Methods in Programming","volume":"145 ","pages":"Article 101056"},"PeriodicalIF":0.7000,"publicationDate":"2025-02-24","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Journal of Logical and Algebraic Methods in Programming","FirstCategoryId":"94","ListUrlMain":"https://www.sciencedirect.com/science/article/pii/S2352220825000227","RegionNum":4,"RegionCategory":"数学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q3","JCRName":"COMPUTER SCIENCE, THEORY & METHODS","Score":null,"Total":0}
引用次数: 0
Abstract
To transform an imperative program into a logically constrained term rewrite system (LCTRS, for short), previous work transforms a list of statements into rewrite rules in a stepwise manner, and proves the correctness along the transformation and the big-step semantics of the program. On the other hand, the small-step semantics of a programming language consists of inference rules that define single transitions of configurations. Partial instances of such inference rules are almost the same as rewrite rules in the transformed LCTRS. In this paper, we aim at establishing a framework for simpler definitions and correctness proofs of transformations from programs into LCTRSs. To this end, for the transformation in previous work as an example, we show the existence of an injective function from configurations of a given program to terms, and reformulate the transformation by means of the injective function. The injective function enables us to make a one-to-one correspondence between single small-step transitions and reduction steps, and provides bisimilarity between the program and transformed LCTRS, resulting in a simpler correctness proof.
期刊介绍:
The Journal of Logical and Algebraic Methods in Programming is an international journal whose aim is to publish high quality, original research papers, survey and review articles, tutorial expositions, and historical studies in the areas of logical and algebraic methods and techniques for guaranteeing correctness and performability of programs and in general of computing systems. All aspects will be covered, especially theory and foundations, implementation issues, and applications involving novel ideas.