-
Notifications
You must be signed in to change notification settings - Fork 256
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
Pre-test of Dafny 4 #3466
Pre-test of Dafny 4 #3466
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just got through Source
for now, will tackle the rest separately.
Note that there will be other options changing defaults for 4.0, but those can be made after we fork the 4.x
branch (which is where this PR will need to land once it's ready).
Source/IntegrationTests/LitTests.cs
Outdated
@@ -151,6 +151,7 @@ public class LitTests { | |||
[FileTheory] | |||
[FileData(Includes = new[] { "**/*.dfy", "**/*.transcript" }, | |||
Excludes = new[] { "**/Inputs/**/*", "**/Output/**/*", | |||
"**/libraries/**", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This shouldn't be necessary now that dafny-lang/libraries#97 is merged if we update the submodule pointer, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, it seemed odd that the CI tests should run lit on the library when there is a library nightly that runs anyway. So it seems they ought to be excluded here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The original intention of adding the submodule was to ensure Dafny changes didn't break that code, so it's not the same as relying on that code testing itself as it evolves. I'm not 100% sure that makes sense and we could consider dropping it (i.e. we're moving towards testing against nightly Dafny releases to catch such breakages instead), but not as part of the scope of this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK - I'll push a commit that omits that exclusion.
Co-authored-by: Robin Salkeld <[email protected]>
…cok-3459-dafny4test
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did at least a good spot check of all the test files and with the fixes I pushed to master already, they LGTM. Several nits but I think this is basically ready to merge with main-4.x
once I create that.
Are there no other pieces of documentation that need to change for 4.0 as well, or were those already merged to master? We may need to relocate some so that we can still release 3.Last at the same time as 4.0.
A _Named Type_ is used to specify a user-defined type by a (possibly module- or class-qualified) name. | ||
Named types are introduced by |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't a Dafny 4.0 difference is it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No - just a clarification.
// RUN: ! %baredafny test %args --no-verify --target:go "%s" >> "%t" | ||
// RUN: ! %baredafny test %args --no-verify --target:js "%s" >> "%t" | ||
// RUN: ! %baredafny test %args --no-verify --target:py "%s" >> "%t" | ||
// RUN: ! %baredafny test %args --unicode-char:false --no-verify --target:cs "%s" >> "%t" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good change since #3608 adds a copy of this test that uses --unicode-char
.
This test is failing at the moment. | ||
- It works locally | ||
- It fails in CI | ||
- I suspect it has something to do with dotnet test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shoot, I should have deleted this file in my PR, will address separately
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll take it out in these changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feel free, but it should be taken out in 3.X anyway
public FunctionSyntaxOptions FunctionSyntax = FunctionSyntaxOptions.Version3; | ||
public QuantifierSyntaxOptions QuantifierSyntax = QuantifierSyntaxOptions.Version3; | ||
public FunctionSyntaxOptions FunctionSyntax = FunctionSyntaxOptions.Version4; | ||
public QuantifierSyntaxOptions QuantifierSyntax = QuantifierSyntaxOptions.Version4; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new CLI option documentation still says "[default: Version3]" for me for some reason.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll investigate
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When I compile in this branch I get [default: 4]. But found some places in help text to change -- pushed those commits also.
Test/git-issues/model
Outdated
@@ -0,0 +1,859 @@ | |||
*** MODEL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Accidental checkin?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't where this keeps coming from. I'll commit the removal.
Test/lit.site.cfg
Outdated
# Unlimited errors (instead of just 5) | ||
#'errorLimit:0', | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# Unlimited errors (instead of just 5) | |
#'errorLimit:0', | |
# Unlimited errors (instead of just 5) | |
#'errorLimit:0', | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Github won't take this suggestion. I'll add the newline manually. Actually there already is a blank line after.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# Unlimited errors (instead of just 5) | |
#'errorLimit:0', |
Oops, I was actually trying to suggest removing commented out configuration. Or do you think it's helpful to leave this here for debugging?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK. I removed it. It was not there before.
@@ -153,7 +156,7 @@ def buildCmd(args): | |||
|
|||
dafny = addParams(buildCmd(dafnyArgs)) | |||
|
|||
standardArguments = addParams(' '.join(newDafnyArgs)) | |||
standardArguments = addParams(' '.join([])) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should these edits be in master as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll investigate (for a different PR)
@@ -103,8 +103,8 @@ Usage: dafny [ option ... ] [ filename ... ] | |||
---- Language feature selection -------------------------------------------- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should end up with two other corresponding changes somehow too. We might want to more explicitly document what the default is for /functionSyntax and /quantifierSyntax in the legacy hooks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK. Options.txt is a generated file (that is then committed) -- only used in generating the pdf of the RefMan.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup I know, I was pointing out the fact that CI should have forced us to update it with changes for the other two options, which suggests that we didn't in fact update the /help output for them yet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And when I did I had a failure for not having updated the documentation sources...
Co-authored-by: Robin Salkeld <[email protected]>
… into cok-3459-dafny4test
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks so much for slogging through this. I pointed out a couple of things to clean up before merging but the actual content is good to go.
Only requesting changes because this needs to target the main-4.x
branch you're cutting instead, ping me once that's changed and I'll actually approve.
.github/workflows/deep-tests.yml
Outdated
push: | ||
branches: | ||
[ cok-3459-dafny4test ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
push: | |
branches: | |
[ cok-3459-dafny4test ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed.
`predicate method`. Ghost functions are written `function` and | ||
`predicate`. | ||
4 - Compiled functions are written `function` and `predicate`. Ghost | ||
4 (default) - Compiled functions are written `function` and `predicate`. Ghost |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI I pushed a commit that does the same for /quantifierSyntax below as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK
@@ -186,19 +186,26 @@ To aid in explaining the grammar we have added some additional productions | |||
that are not present in the original grammar. We name these with a trailing | |||
underscore. Inlining these where they are referenced will reconstruct the original grammar. | |||
|
|||
### 17.2.1. Programs ([discussion](#sec-program)) {#g-program} | |||
<!-- A note on formatting the sections below: LaTex renders the 'discussion' link in line with the heading for level-4 and higher headings. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just flagging all these edits as relevant for master
as well, but I can live with them only in main-4.x
if too much of a pain to separate out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll port them over to master separately
One other thing, we need to update the various |
Co-authored-by: Robin Salkeld <[email protected]>
… into cok-3459-dafny4test
Fixes #3459
Changed the defaults for
--function-syntax to 4
--quantifier-syntax to 4
--unicode-char to true
By submitting this pull request, I confirm that my contribution is made under the terms of the MIT license.