{"title":"Reducing Partial Equivalence to Partial Correctness","authors":"Stefan Ciobaca","doi":"10.1109/SYNASC.2014.30","DOIUrl":null,"url":null,"abstract":"Two programs P and Q are partially equivalent if, when both terminate on the same input, they end up with equivalent outputs. Establishing partial equivalence is useful in, e.g., Compiler verification, when P is the source program and Q is the target program, or in compiler optimisation, when P is the initial program and Q is the optimised program. A program R is partially correct if, when it terminates, it ends up in a \"good\" state. We show that, somewhat surprisingly, the problem of establishing partial equivalence can be reduced to the problem of showing partial correctness in an aggregated language, where programs R consist of pairs of programs 〈P, Q〉. Our method is crucially based on the recently-introduced matching logic, which allows to faithfully define the operational semantics of any language. We show that we can construct the aggregated language mechanically, from the semantics of the initial languages. Furthermore, matching logic gives us for free a proof system for partial correctness for the resulting language. This proof system can then be used to prove partial equivalence.","PeriodicalId":150575,"journal":{"name":"2014 16th International Symposium on Symbolic and Numeric Algorithms for Scientific Computing","volume":"55 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2014-09-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"9","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"2014 16th International Symposium on Symbolic and Numeric Algorithms for Scientific Computing","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/SYNASC.2014.30","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 9
Abstract
Two programs P and Q are partially equivalent if, when both terminate on the same input, they end up with equivalent outputs. Establishing partial equivalence is useful in, e.g., Compiler verification, when P is the source program and Q is the target program, or in compiler optimisation, when P is the initial program and Q is the optimised program. A program R is partially correct if, when it terminates, it ends up in a "good" state. We show that, somewhat surprisingly, the problem of establishing partial equivalence can be reduced to the problem of showing partial correctness in an aggregated language, where programs R consist of pairs of programs 〈P, Q〉. Our method is crucially based on the recently-introduced matching logic, which allows to faithfully define the operational semantics of any language. We show that we can construct the aggregated language mechanically, from the semantics of the initial languages. Furthermore, matching logic gives us for free a proof system for partial correctness for the resulting language. This proof system can then be used to prove partial equivalence.