Abstract
dc:description.abstractLarge Language Models generate code from descriptions in natural language, and the correctness of what they produce is assessed almost entirely by executing unit tests. A finite test suite establishes only partial semantic correctness, and formal verification is commonly proposed as the stricter alternative, on the assumption that a proof against a specification settles what a test suite can only sample. This dissertation examines that assumption empirically. Code was generated in Java, Python and C++ by four open-weight models and one proprietary model over the HumanEval, HumanEval+ and MBPP benchmarks under zero-shot and few-shot prompting, with the verification path covering four of the five. The Java implementations were verified against Java Modeling Language specifications discharged by OpenJML, reported as Verify@k, an estimator analogous to Pass@k. The specifications were not written by the models under evaluation. They were derived from the canonical solution by three separate models and selected by mutation score, which measures how many semantically altered versions of a correct program each specification rejects. The same generated code was submitted to both criteria without alteration. Over 81 tasks and four models, verification exposed no defect that the extended test suite had missed, every model verified more often than it passed, and the verification-based criterion registered differences between the models 3.7 times smaller than the test-based one. The cause is traced to the step at which each specification is adapted to the implementation it judges, which restores the dependence that separating authorship was intended to remove. A Verify@k reported without the provenance and the measured strength of its specification is therefore not a statement about a model.
Author and committee
dc:creator, dc:contributor.*- Author dc:creator
-
- Tavares, Tomás Logrado
- Advisor dc:contributor.advisor
-
- Cerveira, Frederico Manuel Duarte
Subjects
dc:subject × 9Rights
dc:rights- Statement dc:rights
-
- openAccess
- Language dc:language.iso
- eng
Identifiers
dc:identifier.*- Dc Identifier Tid
- 204415004