{"title":"A nesting-preserving transformation of SIMP programs into logically constrained term rewrite systems","authors":"Naoki Nishida, Misaki Kojima , Ayuka Matsumi","doi":"10.1016/j.jlamp.2025.101045","DOIUrl":null,"url":null,"abstract":"<div><div>In the last decade, several transformations of an imperative program into a logically constrained term rewrite system (LCTRS, for short) have been investigated and extended. They do not preserve the nesting of statements, generating rewrite rules like transition systems, while function calls are represented by the nesting of function symbols. Structural features of the original program must often be useful in analyzing the transformed LCTRS. To use such features, we have to know how to transform the program into the LCTRS by keeping the correspondence between statements in the program and the introduced auxiliary function symbols in the LCTRS, or by transforming the LCTRS into a control flow graph to, e.g., recover loop information. In this paper, we propose a nesting-preserving transformation of a SIMP program (a C-like integer program) into an LCTRS. The transformation is mostly based on previous work and introduces the nesting of function symbols that correspond to the nesting of statements in the original program. To be more precise, we propose a construction of a tree homomorphism which is used as a post-process of the transformation in previous work, i.e., which is applied to the LCTRS obtained from the program. As a correctness statement for the nesting-preserving transformation, we show that the tree homomorphism is sound and complete for the reduction of the LCTRS.</div></div>","PeriodicalId":48797,"journal":{"name":"Journal of Logical and Algebraic Methods in Programming","volume":"144 ","pages":"Article 101045"},"PeriodicalIF":0.7000,"publicationDate":"2025-01-28","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/S2352220825000112","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
In the last decade, several transformations of an imperative program into a logically constrained term rewrite system (LCTRS, for short) have been investigated and extended. They do not preserve the nesting of statements, generating rewrite rules like transition systems, while function calls are represented by the nesting of function symbols. Structural features of the original program must often be useful in analyzing the transformed LCTRS. To use such features, we have to know how to transform the program into the LCTRS by keeping the correspondence between statements in the program and the introduced auxiliary function symbols in the LCTRS, or by transforming the LCTRS into a control flow graph to, e.g., recover loop information. In this paper, we propose a nesting-preserving transformation of a SIMP program (a C-like integer program) into an LCTRS. The transformation is mostly based on previous work and introduces the nesting of function symbols that correspond to the nesting of statements in the original program. To be more precise, we propose a construction of a tree homomorphism which is used as a post-process of the transformation in previous work, i.e., which is applied to the LCTRS obtained from the program. As a correctness statement for the nesting-preserving transformation, we show that the tree homomorphism is sound and complete for the reduction of the LCTRS.
期刊介绍:
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.