Skip to content

Commit

Permalink
Update prompts
Browse files Browse the repository at this point in the history
  • Loading branch information
gt22 committed Nov 28, 2024
1 parent f5731d2 commit 70e5f4a
Show file tree
Hide file tree
Showing 9 changed files with 44 additions and 0 deletions.
5 changes: 5 additions & 0 deletions prompts/dafny_eval/ask_for_fixed.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
This answer got Dafny verification error:
{error}
Please try again by taking the Dafny feedback.

If an error appears in one of method ending with `_valid`, that means annotations of an existing function were altered.
6 changes: 6 additions & 0 deletions prompts/dafny_eval/rewrite.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Given a Dafny program with function signature, preconditions, postconditions, and code, but with annotations missing.
Please return a complete Dafny program with the strongest possible annotations (loop invariants, assert statements, etc.) filled back in.
Do not explain.
Please use exactly the same function signature, preconditions, and postconditions. Do not ever modify the given lines.
Below is the program:
{program}
3 changes: 3 additions & 0 deletions prompts/dafny_eval/sys.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
You are an expert in Dafny.
You will be given tasks dealing with Dafny programs including precise annotations.
You respond only with code blocks.
5 changes: 5 additions & 0 deletions prompts/dafny_eval_comment/ask_for_fixed.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
This answer got Dafny verification error:
{error}
Please try again by taking the Dafny feedback.

If an error appears in one of method ending with `_valid`, that means annotations of an existing function were altered.
6 changes: 6 additions & 0 deletions prompts/dafny_eval_comment/rewrite.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Given a Dafny program with function signature, preconditions, postconditions, and code, but with annotations missing.
Please return a complete Dafny program with the strongest possible annotations (loop invariants, assert statements, etc.) filled back in.
Use extensive comments in the code, but don't explain anything outside of it.
Please use exactly the same function signature, preconditions, and postconditions. Do not ever modify the given lines.
Below is the program:
{program}
4 changes: 4 additions & 0 deletions prompts/dafny_eval_comment/sys.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
You are an expert in Dafny.
You will be given tasks dealing with Dafny programs including precise annotations.
You respond only with code blocks.
You will write a comment explaining each significant point of the program on a line before.
5 changes: 5 additions & 0 deletions prompts/dafny_eval_comment_without_impls/ask_for_fixed.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
This answer got Dafny verification error:
{error}
Please try again by taking the Dafny feedback.

If an error appears in one of method ending with `_valid`, that means annotations of an existing function were altered.
6 changes: 6 additions & 0 deletions prompts/dafny_eval_comment_without_impls/rewrite.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Given a Dafny program with function signature, preconditions and postconditions, but with some implementations and annotations missing.
Please return a complete Dafny program with all functions implemented, and annotated using the strongest possible annotations (loop invariants, assert statements, etc.).
Use extensive comments in the code, but don't explain anything outside of it.
Please use exactly the same function signature, preconditions, and postconditions. Do not ever modify the given lines.
Below is the program:
{program}
4 changes: 4 additions & 0 deletions prompts/dafny_eval_comment_without_impls/sys.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
You are an expert in Dafny.
You will be given tasks dealing with Dafny programs including precise annotations.
You respond only with code blocks.
You will write a comment explaining each significant point of the program on a line before.

0 comments on commit 70e5f4a

Please sign in to comment.