Iteratively Composing Statically Verified Traits

Isaac Oscar Gariano, Marco Servetto, Alex Potanin, Hrshikesh Arora

Research output: Chapter in Book/Report/Conference proceedingConference Paperpeer-review

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.
Original languageEnglish
Title of host publicationProceedings Seventh International Workshop on Verification and Program Transformation (VPT 2019)
EditorsAlexei Lisitsa, Andrei Nemytykh
Place of PublicationGenova, Italy
PublisherElectronic Proceedings in Theoretical Computer Science
Pages49-55
Number of pages7
DOIs
Publication statusPublished - 20 Aug 2019
Externally publishedYes
Event7th International Workshop on Verification and Program Transformation, VPT 2019 - Genova, Italy
Duration: 2 Apr 20192 Apr 2019
https://cgi.cse.unsw.edu.au/~eptcs/content.cgi?VPT2019
http://dx.doi.org/10.4204/EPTCS.299

Publication series

NameElectronic Proceedings in Theoretical Computer Science, EPTCS
PublisherOpen Publishing Association
Volume299
ISSN (Print)2075-2180

Conference

Conference7th International Workshop on Verification and Program Transformation, VPT 2019
Country/TerritoryItaly
CityGenova
Period2/04/192/04/19
Internet address

Fingerprint

Dive into the research topics of 'Iteratively Composing Statically Verified Traits'. Together they form a unique fingerprint.

Cite this