Dice Question Streamline Icon: https://streamlinehq.com

Similarity-based locality of relevant helper assertions

Ascertain whether helper assertions relevant to repairing a given Dafny lemma are more likely to be found within lemmas that are structurally similar to the target lemma in the same codebase, thereby motivating selection of in-context examples based on lemma similarity.

Information Square Streamline Icon: https://streamlinehq.com

Background

Selecting useful in-context examples is critical because codebases may contain hundreds of assertions, and providing too many examples to the LLM is infeasible. The paper introduces a lemma similarity metric to identify structurally similar contexts and hypothesizes that assertions from similar lemmas will better guide synthesis.

This conjecture underpins the example selection strategy in Laurel: by choosing assertions from lemmas similar to the target lemma, the tool aims to improve the likelihood that generated assertions match the structure and needs of the failing verification condition.

References

We further conjecture that relevant example assertions are likely to appear in lemmas that are similar to the target lemma.

Laurel: Unblocking Automated Verification with Large Language Models (2405.16792 - Mugnier et al., 27 May 2024) in Section 2.2 (Selecting Example Assertions)