Abstract
Static verification relying on an automated theorem prover can be very slow and brittle: since static verification is undecidable, correct code may not pass a particular static verifier. In this work we use metaprogramming to generate code that is correct by construction. A theorem prover is used only to verify initial "traits": units of code that can be used to compose bigger programs.
In our work, meta-programming is done by trait composition, which starting from correct code, is guaranteed to produce correct code. We do this by extending conventional traits with pre- and post-conditions for the methods; we also extend the traditional trait composition (+) operator to check the compatibility of contracts. In this way, there is no need to re-verify the produced code.
We show how our approach can be applied to the standard "power" function example, where metaprogramming generates optimised, and correct, versions when the exponent is known in advance.
In our work, meta-programming is done by trait composition, which starting from correct code, is guaranteed to produce correct code. We do this by extending conventional traits with pre- and post-conditions for the methods; we also extend the traditional trait composition (+) operator to check the compatibility of contracts. In this way, there is no need to re-verify the produced code.
We show how our approach can be applied to the standard "power" function example, where metaprogramming generates optimised, and correct, versions when the exponent is known in advance.
| Original language | English |
|---|---|
| Title of host publication | Proceedings Seventh International Workshop on Verification and Program Transformation (VPT 2019) |
| Editors | Alexei Lisitsa, Andrei Nemytykh |
| Place of Publication | Genova, Italy |
| Publisher | Electronic Proceedings in Theoretical Computer Science |
| Pages | 49-55 |
| Number of pages | 7 |
| DOIs | |
| Publication status | Published - 20 Aug 2019 |
| Externally published | Yes |
| Event | 7th International Workshop on Verification and Program Transformation, VPT 2019 - Genova, Italy Duration: 2 Apr 2019 → 2 Apr 2019 https://cgi.cse.unsw.edu.au/~eptcs/content.cgi?VPT2019 http://dx.doi.org/10.4204/EPTCS.299 |
Publication series
| Name | Electronic Proceedings in Theoretical Computer Science, EPTCS |
|---|---|
| Publisher | Open Publishing Association |
| Volume | 299 |
| ISSN (Print) | 2075-2180 |
Conference
| Conference | 7th International Workshop on Verification and Program Transformation, VPT 2019 |
|---|---|
| Country/Territory | Italy |
| City | Genova |
| Period | 2/04/19 → 2/04/19 |
| Internet address |
Fingerprint
Dive into the research topics of 'Iteratively Composing Statically Verified Traits'. Together they form a unique fingerprint.Cite this
- APA
- Author
- BIBTEX
- Harvard
- Standard
- RIS
- Vancouver