命令式程序的约束逻辑转换验证

E. D. Angelis, F. Fioravanti, A. Pettorossi, M. Proietti
{"title":"命令式程序的约束逻辑转换验证","authors":"E. D. Angelis, F. Fioravanti, A. Pettorossi, M. Proietti","doi":"10.4204/EPTCS.129.12","DOIUrl":null,"url":null,"abstract":"We present a method for verifying partial correctness properties of imperative programs that manipulate integers and arrays by using techniques based on the transformation of constraint logic programs (CLP). We use CLP as a metalanguage for representing imperative programs, their executions, and their properties. First, we encode the correctne ss of an imperative program, say prog, as the negation of a predicate incorrect defined by a CLP program T . By construction, incorrect holds in the least model of T if and only if the execution of prog from an initial configuration eventually halts in an error configuration. Then, we apply to progra m T a sequence of transformations that preserve its least model semantics. These transformations are based on well-known transformation rules, such as unfolding and folding, guided by suitable transformation strategies, such as specialization and generalization. The objective of the transformations is to derive a new CLP program TransfT where the predicate incorrect is defined either by (i) the fact ‘ incorrect.’ (and in this case prog is not correct), or by (ii) the empty set of clauses (and in this case prog is correct). In the case where we derive a CLP program such that neither (i) nor (ii) holds, we iterate the transformation. Since the problem is undecidable, this process may not terminate. We show through examples that our method can be applied in a rather systematic way, and is amenable to automation by transferring to the field of program verification many techniques developed in the fiel d of program transformation.","PeriodicalId":411813,"journal":{"name":"Festschrift for Dave Schmidt","volume":"16 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2013-09-19","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"9","resultStr":"{\"title\":\"Verification of Imperative Programs by Constraint Logic Program Transformation\",\"authors\":\"E. D. Angelis, F. Fioravanti, A. Pettorossi, M. Proietti\",\"doi\":\"10.4204/EPTCS.129.12\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"We present a method for verifying partial correctness properties of imperative programs that manipulate integers and arrays by using techniques based on the transformation of constraint logic programs (CLP). We use CLP as a metalanguage for representing imperative programs, their executions, and their properties. First, we encode the correctne ss of an imperative program, say prog, as the negation of a predicate incorrect defined by a CLP program T . By construction, incorrect holds in the least model of T if and only if the execution of prog from an initial configuration eventually halts in an error configuration. Then, we apply to progra m T a sequence of transformations that preserve its least model semantics. These transformations are based on well-known transformation rules, such as unfolding and folding, guided by suitable transformation strategies, such as specialization and generalization. The objective of the transformations is to derive a new CLP program TransfT where the predicate incorrect is defined either by (i) the fact ‘ incorrect.’ (and in this case prog is not correct), or by (ii) the empty set of clauses (and in this case prog is correct). In the case where we derive a CLP program such that neither (i) nor (ii) holds, we iterate the transformation. Since the problem is undecidable, this process may not terminate. We show through examples that our method can be applied in a rather systematic way, and is amenable to automation by transferring to the field of program verification many techniques developed in the fiel d of program transformation.\",\"PeriodicalId\":411813,\"journal\":{\"name\":\"Festschrift for Dave Schmidt\",\"volume\":\"16 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2013-09-19\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"9\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Festschrift for Dave Schmidt\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.4204/EPTCS.129.12\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Festschrift for Dave Schmidt","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.4204/EPTCS.129.12","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 9

摘要

本文提出了一种基于约束逻辑程序(CLP)转换的技术来验证操作整数和数组的命令式程序部分正确性的方法。我们使用CLP作为元语言来表示命令式程序、它们的执行和它们的属性。首先,我们将命令式程序(例如prog)的正确部分编码为CLP程序T定义的谓词不正确的否定。通过构造,当且仅当从初始配置开始的程序执行最终在错误配置中停止时,不正确在T的最小模型中成立。然后,我们对程序T应用一系列保持其最小模型语义的转换。这些转换基于众所周知的转换规则,例如展开和折叠,并由合适的转换策略(例如专门化和泛化)指导。转换的目标是派生一个新的CLP程序TransfT,其中谓词不正确由(i)事实不正确定义。’(在这种情况下,prog是不正确的),或者通过(ii)子句的空集(在这种情况下,prog是正确的)。在这种情况下,我们得到一个CLP程序,使得(i)和(ii)都不成立,我们迭代转换。由于问题是不确定的,这个过程可能不会终止。我们通过实例表明,我们的方法可以以一种相当系统的方式应用,并且可以通过将在程序转换领域中开发的许多技术转移到程序验证领域来实现自动化。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
Verification of Imperative Programs by Constraint Logic Program Transformation
We present a method for verifying partial correctness properties of imperative programs that manipulate integers and arrays by using techniques based on the transformation of constraint logic programs (CLP). We use CLP as a metalanguage for representing imperative programs, their executions, and their properties. First, we encode the correctne ss of an imperative program, say prog, as the negation of a predicate incorrect defined by a CLP program T . By construction, incorrect holds in the least model of T if and only if the execution of prog from an initial configuration eventually halts in an error configuration. Then, we apply to progra m T a sequence of transformations that preserve its least model semantics. These transformations are based on well-known transformation rules, such as unfolding and folding, guided by suitable transformation strategies, such as specialization and generalization. The objective of the transformations is to derive a new CLP program TransfT where the predicate incorrect is defined either by (i) the fact ‘ incorrect.’ (and in this case prog is not correct), or by (ii) the empty set of clauses (and in this case prog is correct). In the case where we derive a CLP program such that neither (i) nor (ii) holds, we iterate the transformation. Since the problem is undecidable, this process may not terminate. We show through examples that our method can be applied in a rather systematic way, and is amenable to automation by transferring to the field of program verification many techniques developed in the fiel d of program transformation.
求助全文
通过发布文献求助,成功后即可免费获取论文全文。 去求助
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术官方微信