-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use multiprocessing in several modes
- Loading branch information
Showing
14 changed files
with
163 additions
and
105 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/bash | ||
|
||
vcmd=${1:-"dafny verify --allow-warnings --verification-time-limit 10"} | ||
prompts_dir=${2:-"prompts/humaneval-dafny"} | ||
dir=${3:-"benches/HumanEval-Dafny"} | ||
ext=${4:-"dfy"} | ||
|
||
PYLOG_LEVEL=INFO NOFILE=1 poetry run several_modes \ | ||
--insert-conditions-mode=llm-single-step \ | ||
--llm-profile=anthropic-claude-3.5-sonnet \ | ||
--bench-type validating \ | ||
--tries 10 \ | ||
--runs 5 \ | ||
--verifier-command="dafny verify --verification-time-limit 20" \ | ||
--filter-by-ext dfy \ | ||
--output-logging \ | ||
--dir benches/HumanEval-Dafny \ | ||
--modes mode1 mode2 mode3 mode4 mode5 mode6 \ | ||
--prompts-directory prompts/dafny_eval prompts/dafny_eval prompts/dafny_eval_without_impls prompts/dafny_eval_without_impls_textd prompts/dafny_eval_without_impls_textd prompts/dafny_eval_without_impls_textd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
verified_cogen/runners/rewriters/nagini_rewriter_fixing_ast.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
from verified_cogen.several_modes.several_modes import main | ||
|
||
if __name__ == "__main__": | ||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
from verified_cogen.runners.languages import AnnotationType | ||
|
||
MODE_MAPPING = { | ||
"mode1": [AnnotationType.INVARIANTS, AnnotationType.ASSERTS], | ||
"mode2": [ | ||
AnnotationType.INVARIANTS, | ||
AnnotationType.ASSERTS, | ||
AnnotationType.PRE_CONDITIONS, | ||
AnnotationType.POST_CONDITIONS, | ||
], | ||
"mode3": [ | ||
AnnotationType.INVARIANTS, | ||
AnnotationType.ASSERTS, | ||
AnnotationType.IMPLS, | ||
], | ||
"mode4": [ | ||
AnnotationType.INVARIANTS, | ||
AnnotationType.ASSERTS, | ||
AnnotationType.IMPLS, | ||
], | ||
"mode5": [ | ||
AnnotationType.INVARIANTS, | ||
AnnotationType.ASSERTS, | ||
AnnotationType.PRE_CONDITIONS, | ||
AnnotationType.POST_CONDITIONS, | ||
AnnotationType.IMPLS, | ||
], | ||
"mode6": [ | ||
AnnotationType.INVARIANTS, | ||
AnnotationType.ASSERTS, | ||
AnnotationType.PRE_CONDITIONS, | ||
AnnotationType.POST_CONDITIONS, | ||
AnnotationType.IMPLS, | ||
AnnotationType.PURE, | ||
], | ||
} | ||
|
||
REMOVE_IMPLS_MAPPING = { | ||
"mode1": False, | ||
"mode2": False, | ||
"mode3": True, | ||
"mode4": True, | ||
"mode5": True, | ||
"mode6": True, | ||
} | ||
|
||
TEXT_DESCRIPTIONS = { | ||
"mode1": False, | ||
"mode2": False, | ||
"mode3": False, | ||
"mode4": True, | ||
"mode5": True, | ||
"mode6": True, | ||
} |
Oops, something went wrong.