Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add script to run Boogie with the args Dafny uses #4492

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
Prev Previous commit
Next Next commit
Move prover path out of Boogie args config file
  • Loading branch information
atomb committed Aug 31, 2023
commit 2fb6f876277352f6908bd188d6592f64579a3cdf
2 changes: 1 addition & 1 deletion Source/IntegrationTests/LitTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public class LitTests {

DefaultBoogieArguments =
File.ReadAllLines(RepositoryRoot + "Test/boogie-args.cfg")
.Select(arg => "-" + arg.Replace("{ROOT}", RepositoryRoot))
.Append("/proverOpt:PROVER_PATH:" + RepositoryRoot + $"../unzippedRelease/dafny/z3/bin/z3-{DafnyOptions.DefaultZ3Version}")
.ToArray();

var commands = new Dictionary<string, Func<IEnumerable<string>, LitTestConfiguration, ILitCommand>> {
Expand Down
1 change: 0 additions & 1 deletion Test/boogie-args.cfg
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this deserves to be under Source somewhere rather than hidden under Test, since it's an alternate expression of how Dafny configures Boogie.

On that note, is there any way to assert that these are equivalent to what options Dafny actually sets through the library interface?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would really like to be able to guarantee that they're equivalent. I haven't thought of a good way to do it yet, but that doesn't mean there isn't one!

Until there is one, it feels weird to put it under Source when nothing in that directory uses it, but stuff in Test does.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this fix issue 2800, or would a slight addition to this PR fix it?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's still some more work we'd need to do to ensure that's correct. We could add some code to copy the contents of this new file to the top of the generated Boogie file, but there's currently no guarantee that that would match what Dafny uses.

Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@ proverOpt:O:smt.case_split=3
proverOpt:O:smt.qi.eager_threshold=100
proverOpt:O:smt.delay_units=true
proverOpt:O:smt.arith.solver=2
proverOpt:PROVER_PATH:{ROOT}/Binaries/z3/bin/z3-4.12.1
2 changes: 1 addition & 1 deletion Test/lit.site.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ dafnyArgs = [

boogieArgs = ""
with open(repositoryRoot + '/Test/boogie-args.cfg', 'r') as boogieArgFile:
boogieArgs = boogieArgFile.read().replace('{ROOT}', repositoryRoot).splitlines()
boogieArgs = boogieArgFile.read().splitlines() + ["proverOpt:PROVER_PATH=" + solverPath]

# Add standard parameters
def addParams(cmd):
Expand Down
Loading