This research paper delves into the intricacies of designing Satisfiability Modulo Theories (SMT), focusing on the specific case of the theory of sequences. The authors argue that the design choices made for an SMT theory, particularly its signature and semantics, significantly impact its usability and the feasibility of developing efficient reasoning procedures for it.
The paper begins by providing a comprehensive overview of existing theories of sequences found in the literature and implemented in state-of-the-art SMT solvers like CVC5 and Z3. It highlights the similarities and differences between these theories, emphasizing the lack of standardization and the presence of inconsistencies in handling partial functions.
The authors then propose a set of design criteria for SMT theories, emphasizing:
The theory should have a rich signature that includes all necessary functions and predicates to express properties and perform common operations, minimizing the need for user-defined axioms.
The theory's design should facilitate the development of efficient and reasonably implementable reasoning procedures within the constraints of SMT theory combination frameworks.
The theory's semantics should be clear, consistent, and predictable, with minimal special cases or unexpected behavior to ensure ease of understanding and use.
The paper further delves into the challenges of handling partial functions in SMT theories, discussing three common approaches:
Returning an uninterpreted value when a function is applied outside its domain.
Returning a predetermined constant value for undefined behavior.
Allowing the user to specify the return value for undefined behavior by adding an argument to the function.
The authors advocate for the "returned value as an argument" approach, arguing that it offers a good compromise between the flexibility of underspecification and the predictability of overspecification.
Based on their analysis and the proposed design criteria, the authors propose specific modifications to the theory of sequences, aiming to improve its overall design. These modifications include:
seq.get
function with underspecification for out-of-bounds access.seq.set
function for setting values at specific indices.seq.slice
and seq.update
for consistent handling of edge cases.seq.map
and seq.mapi
functions for enhanced expressiveness.Furthermore, the authors suggest defining a minimal fragment of the theory of sequences that is sufficient for reasoning about array-like data structures commonly found in programming languages. This fragment could serve as a basis for developing specialized and more efficient reasoning procedures.
In conclusion, the paper provides valuable insights into the design of SMT theories, using the theory of sequences as a case study. The proposed refinements and the emphasis on user-friendliness and implementability aim to contribute to the standardization and wider adoption of SMT solvers for program verification and other applications.
Naar een andere taal
vanuit de broninhoud
arxiv.org
Belangrijkste Inzichten Gedestilleerd Uit
by Hich... om arxiv.org 11-05-2024
https://arxiv.org/pdf/2411.01961.pdfDiepere vragen