{"title":"Complexity checking of ARM programs, by deduction","authors":"Mário Pereira, S. Sousa","doi":"10.1145/2554850.2555012","DOIUrl":null,"url":null,"abstract":"In this paper we address two main questions: how to reason about the correctness of unstructured programs (particularly programs written in ARM Assembly) and how to use a proof-based system to check computational complexity of such programs. We approach the correctness issue by applying a flow sequentialization methodology and a formalized semantics of ARM instructions. An annotated ARM program is turned into a set of purely sequential programs, then each instruction is mapped into the corresponding formalized opcodes and finally Why3's VCGen is employed to generate proper Verification Conditions. Regarding complexity checking, we propose a methodology, based on the sequentialization process, by encoding instructions CPU-cost into their semantics and checking the program's calculated cost against user-supplied cost information (cost properties will be treated as normal functional annotations). Along with the formalization of correctness and complexity reasoning techniques, a prototype tool has been implemented and used to verify both the correctness and complexity of some practical examples.","PeriodicalId":285655,"journal":{"name":"Proceedings of the 29th Annual ACM Symposium on Applied Computing","volume":"18 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2014-03-24","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"2","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Proceedings of the 29th Annual ACM Symposium on Applied Computing","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/2554850.2555012","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 2
Abstract
In this paper we address two main questions: how to reason about the correctness of unstructured programs (particularly programs written in ARM Assembly) and how to use a proof-based system to check computational complexity of such programs. We approach the correctness issue by applying a flow sequentialization methodology and a formalized semantics of ARM instructions. An annotated ARM program is turned into a set of purely sequential programs, then each instruction is mapped into the corresponding formalized opcodes and finally Why3's VCGen is employed to generate proper Verification Conditions. Regarding complexity checking, we propose a methodology, based on the sequentialization process, by encoding instructions CPU-cost into their semantics and checking the program's calculated cost against user-supplied cost information (cost properties will be treated as normal functional annotations). Along with the formalization of correctness and complexity reasoning techniques, a prototype tool has been implemented and used to verify both the correctness and complexity of some practical examples.