Hakki, Aran (2026) Petra: A compositional, contract-based, Correct-by-Construction OOP language, using explainable, layered abstractions, for scalable V&V. University of Southampton, Doctoral Thesis, 234pp.
Abstract
This thesis presents Petra, a new correct-by-construction OOP language which aims to democratise the application of formal software methods, by integrating simplified, scalable, comprehensive, fully-automated formal verification and validation (V&V). Petra has default null-safety, determinism, parallel processing and decision branch level pre/post condition reachability checks. Objects are verified by verifying that their methods behave as total functions which transition object states such that the method pre/post conditions are satisfied. Objects are structured using explainable and modular objects which help to decompose the problem space in such a way that it becomes easier to validate their behaviour and to verify them efficiently. This is achieved using a simple yet expressive syntax structure for expressions and statements, which are explainable and map to a simple controlled English language, and with a semantics that allows for layered abstractions which means verification for an entire program can be achieved by verifying independent trees of objects, branches and methods, separately. We define both a denotational semantics to model the concrete and symbolic state transitions of a correct program, and an operational semantics that captures the unconstrained behaviour of a program at run-time. We prove soundness between correct symbolic and operational semantics through a structural induction that is designed to prove that a correct symbolic semantics implies a correct operational semantics. This is split into two parts, first by proving correct symbolic implies correct concrete, and then by proving correct concrete implies correct operational. Correct operational semantics provides strong properties which include total correctness and determinism, whilst supporting parallel processing. A key limitation of Petra is the lack of direct support for verification of loops, however loops over compositions of primitive fields, within the branches of base object methods, can be assumed or proved using alternative methods. In addition to contributing the Petra language, semantics, and soundness proof, we developed a Java tool that automatically verifies Petra with a theoretical complexity of O(k(net + mct(nt^2 + b(q + z + t^b)))), where k is the number of objects in the program, each object has up to n private symbolic states, up to b fields, up to t predicates (each of expression size at most e), and up to m methods (each with up to c cases,
each case having a parallel composition of up to z statements and a sequential composition of up to q statements). This is in P (Polynomial Time), however Petra favours many small objects to leverage abstraction, yielding near-linear performance in practice.
More information
Identifiers
Catalogue record
Export record
Altmetrics
Contributors
Download statistics
Downloads from ePrints over the past year. Other digital versions may also be available to download e.g. from the publisher's website.
