The University of Southampton
University of Southampton Institutional Repository

Compiling higher-order specifications to SMT solvers: how to deal with rejection constructively

Compiling higher-order specifications to SMT solvers: how to deal with rejection constructively
Compiling higher-order specifications to SMT solvers: how to deal with rejection constructively

Modern verification tools frequently rely on compiling high-level specifications to SMT queries. However, the high-level specification language is usually more expressive than the available solvers and therefore some syntactically valid specifications must be rejected by the tool. In such cases, the challenge is to provide a comprehensible error message to the user that relates the original syntactic form of the specification to the semantic reason it has been rejected. In this paper we demonstrate how this analysis may be performed by combining a standard unification-based type-checker with type classes and automatic generalisation. Concretely, type-checking is used as a constructive procedure for under-approximating whether a given specification lies in the subset of problems supported by the solver. Any resulting proof of rejection can be transformed into a detailed explanation to the user. The approach is compositional and does not require the user to add extra typing annotations to their program. We subsequently describe how the type system may be leveraged to provide a sound and complete compilation procedure from suitably typed expressions to SMT queries, which we have verified in Agda.

Agda, compilers, domain specific languages, SMT solvers, type-checking, verification
102-120
Association for Computing Machinery
Daggitt, Matthew L.
f23cd3b8-5fa5-47d1-b5c7-f12a710ebfd0
Atkey, Robert
ce1c4893-d028-4be1-9888-b268e8fa18d8
Kokke, Wen
94b622bd-ee25-4f29-87db-9bb0344d95a7
Komendantskaya, Ekaterina
f12d9c23-5589-40b8-bcf9-a04fe9dedf61
Arnaboldi, Luca
b7ba4883-52bd-4950-b63d-2e993c951b5b
Krebbers, Robbert
Traytel, Dmitriy
Pientka, Brigitte
Zdancewic, Steve
Daggitt, Matthew L.
f23cd3b8-5fa5-47d1-b5c7-f12a710ebfd0
Atkey, Robert
ce1c4893-d028-4be1-9888-b268e8fa18d8
Kokke, Wen
94b622bd-ee25-4f29-87db-9bb0344d95a7
Komendantskaya, Ekaterina
f12d9c23-5589-40b8-bcf9-a04fe9dedf61
Arnaboldi, Luca
b7ba4883-52bd-4950-b63d-2e993c951b5b
Krebbers, Robbert
Traytel, Dmitriy
Pientka, Brigitte
Zdancewic, Steve

Daggitt, Matthew L., Atkey, Robert, Kokke, Wen, Komendantskaya, Ekaterina and Arnaboldi, Luca (2023) Compiling higher-order specifications to SMT solvers: how to deal with rejection constructively. Krebbers, Robbert, Traytel, Dmitriy, Pientka, Brigitte and Zdancewic, Steve (eds.) In CPP 2023 - Proceedings of the 12th ACM SIGPLAN International Conference on Certified Programs and Proofs, co-located with POPL 2023. Association for Computing Machinery. pp. 102-120 . (doi:10.1145/3573105.3575674).

Record type: Conference or Workshop Item (Paper)

Abstract

Modern verification tools frequently rely on compiling high-level specifications to SMT queries. However, the high-level specification language is usually more expressive than the available solvers and therefore some syntactically valid specifications must be rejected by the tool. In such cases, the challenge is to provide a comprehensible error message to the user that relates the original syntactic form of the specification to the semantic reason it has been rejected. In this paper we demonstrate how this analysis may be performed by combining a standard unification-based type-checker with type classes and automatic generalisation. Concretely, type-checking is used as a constructive procedure for under-approximating whether a given specification lies in the subset of problems supported by the solver. Any resulting proof of rejection can be transformed into a detailed explanation to the user. The approach is compositional and does not require the user to add extra typing annotations to their program. We subsequently describe how the type system may be leveraged to provide a sound and complete compilation procedure from suitably typed expressions to SMT queries, which we have verified in Agda.

This record has no associated files available for download.

More information

Published date: 11 January 2023
Additional Information: Funding Information: This work was funded by the AISEC grant under Engineering and Physical Sciences Research Council. Grant numbers: EP/T026952/1, EP/T026960/1, and EP/T027037/1. For the purpose of open access, the authors have applied a Creative Commons Attribution (CC BY) licence to any Author Accepted Manuscript version arising from this submission. Publisher Copyright: © 2023 ACM.
Venue - Dates: 12th ACM SIGPLAN International Conference on Certified Programs and Proofs, , Boston, United States, 2023-01-16 - 2023-01-17
Keywords: Agda, compilers, domain specific languages, SMT solvers, type-checking, verification

Identifiers

Local EPrints ID: 482771
URI: http://eprints.soton.ac.uk/id/eprint/482771
PURE UUID: cf818da3-9b68-4fb1-a600-6d43c001057a

Catalogue record

Date deposited: 12 Oct 2023 16:43
Last modified: 17 Mar 2024 13:32

Export record

Altmetrics

Contributors

Author: Matthew L. Daggitt
Author: Robert Atkey
Author: Wen Kokke
Author: Ekaterina Komendantskaya
Author: Luca Arnaboldi
Editor: Robbert Krebbers
Editor: Dmitriy Traytel
Editor: Brigitte Pientka
Editor: Steve Zdancewic

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.

View more statistics

Atom RSS 1.0 RSS 2.0

Contact ePrints Soton: eprints@soton.ac.uk

ePrints Soton supports OAI 2.0 with a base URL of http://eprints.soton.ac.uk/cgi/oai2

This repository has been built using EPrints software, developed at the University of Southampton, but available to everyone to use.

We use cookies to ensure that we give you the best experience on our website. If you continue without changing your settings, we will assume that you are happy to receive cookies on the University of Southampton website.

×