text
stringlengths 0
89.3k
|
---|
35 Availability and Usage
|
We have published our benchmark as a public dataset on Huggingface including a link to our
|
example benchmarking code The TIP repo our benchmark is based on uses the BSD3Clause
|
license permitting reuse and modification with license redistribution we therefore use the same
|
Given the information in Table 2 there are many possible tasks relevant for testing an agents proof
|
generation capabilities We propose the following as interesting evaluation modes
|
1Proof State only Past work has trained nextstep tactic prediction models taking only the
|
proof state provided by the proof assistant as input 16192135 This input is justifiable
|
in contexts such as mathematical theorem proving where most proofs involve a shared
|
mathematical library because agents will be exposed to most of the definitions and lemmas
|
used in the goal during training We expect this input to be insufficient for many proofs
|
about programs as the programs referenced in the proof state are only described in the file
|
context However this mode will test an agents ability to apply reasonable proof techniques
|
when lacking knowledge of certain terms in the proof state
|
7Model Medley Easy Termination Med Sorting Hard
|
llmstep Pythia28B 35 4486 128 063
|
llmstep Llemma7B 25 4686 228 063
|
llmstep ntpcontext13B 36 3886 028 063
|
GPT4turbo 4486 128 063
|
Table 3 miniCodeProps results Number of specifications proven when applying nextstep tactic
|
generation with LLMStep and full proof generation with GPT4 to the problem of verifying program
|
specifications The Medley section contains mostly of specifications that can be proven in several
|
lines Proofs of the sorting algorithm properties and termination lemmas are expected to require at
|
least tens of lines and hours of programmer effort
|
2Proof State Dependencies In this mode agents have access to all newly written ie not
|
from Lean core or Mathlib code and lemmas required to define the given code property
|
This can be accomplished with the deps and proof_state fields of each benchmark entry
|
3Proof State Full File Context In this mode the full contents of the files prior to the
|
property definition are made available Similar to Proof State Dependencies mode this
|
input form gives an agent access to all definitions in the proof state However full file
|
context mode requires the agent to filter its input for useful context and additionally may
|
give the agent access to potentially useful lemmas defined in the file that were not necessary
|
to define the property Further this mode most closely matches what a human expert must
|
do when proving such properties
|
4Feedback Refinement In this mode error feedback from potentially partial proof sugges
|
tions is used as input to continued attempts at proving the property until a given number of
|
attempts is reached In practice Lean is intended to be used interactively Even for simple
|
proofs it may take human experts several iterations of error feedback from Lean to construct
|
a correct proof Enabling this feedback loop for theorem proving agents allows more fair
|
comparison of current neural theorem proving approaches with human capabilities
|
4 Baselines
|
We use two main approaches full proof generation via fewshot prompting a language model and
|
nextstep tactic generation In the fullproof context the model generates one or more potential proofs
|
that are verified by the proof checker in our case the Lean 4 kernel For nextstep tactic prediction
|
we follow the common practice of taking the proof state and optionally file context as input and
|
returning suggestions for the next tactic to use in the proof Each suggestion is then given as input to
|
the Lean 4 kernel and the resulting proof state is used to prompt the model for the next tactic
|
Experimental Setup NextStep Tactic Generation Our experiments with nextstep tactic genera
|
tion used the LLMStep 35 framework modified to return cumulative log probabilities in addition to
|
next step suggestions from each backend language model The Pythia28B experiments were run
|
with proof state only as input to match the models finetuning set The remaining models received
|
proof state dependencies as input These experiments were run on a single A100 GPU running
|
Ubuntu 2004 with 30 CPU cores rented from LambdaLabs
|
Experimental Setup Full Proof Generation We employed a fewshot prompting approach Our
|
prompt contained examples of code properties and proofs of properties not seen in the benchmark
|
As such the evaluation mode used was proof state dependencies although in practice we opted to
|
use only the dependencies and the theorem statement itself All experiments were performed using
|
the OpenAI chat completions API with GPT4turbo using pass8
|
Results Our baseline results are displayed in Table 3 As expected our baseline approaches were
|
unable to prove complex function properties such as those in Section 343 However failures on
|
many of the comparatively simple Medley properties support the claim that current approaches to
|
neural theorem for mathematics transfer imperfectly to the domain of ITP code verification However
|
small measures of success on the termination lemmas indicate that neural theorem proving approaches
|
have the potential to improve on miniCodeProps in the near future
|
85 Discussion
|
Baselines Interpretation The baselines we present are a reasonable representation of the state of
|
neural theorem proving on code properties at the moment Current systems can prove the simpler
|
lemmas in the Medley section especially those with closer ties to math and are only able to prove
|
the simpler types of lemmas one might use in a larger proof in practice Proofs of more complex
|
properties requiring understanding larger bodies of code the Sorting section remain out of reach for
|
the time being
|
Scope We chose to source miniCodeProps from the TIP dataset to provide some assurance that the
|
code and properties involved were of interest to the broader code verification community However
|
we selected a subset of the properties in TIP we judged to be relevant to code along with termination
|
lemmas which is a subset of all code properties Clearly performing well on this subset is only
|
a proxy for the ability to perform well on all realistic code properties However we designed
|
miniCodeProps to target a minimal set of code properties that we would expect a reasonable
|
automated system to be able to prove
|
Societal Context The broader goal of our work is to facilitate the development of automated likely
|
neural theorem proving agents that can prove properties of code in ITPs Verification engineers
|
already draw from a wide variety of automated tools in their work An automated version of ITP
|
still requires a human in the loop to generate or validate the statement of the property to be proven
|
similar to the type of work these engineers perform while using SMTbased verification Arguably
|
the main benefit to society of the ITP approach is that it induces our automated tools to use different
|
reasoning patterns than the ones commonly used in Automated Reasoning SATSMT approaches
|
which may in turn lead to different subsets of formal guarantees that can be obtained in practice
|
6 Conclusion
|
miniCodeProps is intended as a meaningful benchmark for evaluating techniques that automate
|
ITPbased code verification It contains a diverse array of functions and properties from Tons
|
of Inductive Problems allowing the possibility of incremental progress in verifying the types of
|
programs contained in TIP We show that simple baseline approaches from mathematical neural
|
theorem proving currently fall short on much of our benchmark and hope that miniCodeProps
|
spurs development of future ITP code verification agents
|
References
|
1Rustan Leino Dafny An automatic program verifier for functional correctness In 16th
|
International Conference LPAR16 Dakar Senegal pages 348370 Springer Berlin Heidelberg
|
April 2010
|
2Rustan Leino and Philipp Rümmer A polymorphic intermediate verification language Design
|
and logical encoding In Conference Tools and Algorithms for the Construction and Analysis
|
of Systems 16th International Conference TACAS 2010 Held as Part of the Joint European
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.