Skip to content

Conversation

@MikaelMayer
Copy link
Member

Only refactorings +

  • Enable raw pointer equality as it was previously possible but not yet tested
  • Fix a potential bug in the new resolver but wasn't enough to use it for DafnyCore.

By submitting this pull request, I confirm that my contribution is made under the terms of the MIT license.

Allow pointer equality now that it's implemented
Crashes current Dafny resolver
@MikaelMayer MikaelMayer enabled auto-merge (squash) September 23, 2024 17:47
Copy link
Contributor

@alex-chew alex-chew left a comment

Choose a reason for hiding this comment

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

The refactorings look good, but do we have any checked-in tests for the two non-refactoring changes you mentioned (raw pointer equality and a potential bug in the new resolver)?

if (referential) {
if pointerType.Raw? {
r := Error("Cannot compare raw pointers yet - need to wrap them with a structure to ensure they are compared properly");
r := Error("Raw pointer comparison not properly implemented yet (need to make comp/rust/traits.dfy to pass with --raw-pointer)");
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: It seems strange to mention this implementation detail in the error message.

Suggested change
r := Error("Raw pointer comparison not properly implemented yet (need to make comp/rust/traits.dfy to pass with --raw-pointer)");
// Need to make comp/rust/traits.dfy to pass with --raw-pointer)
r := Error("Raw pointer comparison not properly implemented yet");

echo "$$count test files found."; \
for file in $$files; do \
filedir=$$(dirname "$$file"); \
(cd "${DIR}/Source/IntegrationTests/TestFiles/LitTests/LitTest/$${filedir}"; "${DIR}"/Binaries/Dafny $(action) "$$(basename $$file)" ); \
Copy link
Contributor

Choose a reason for hiding this comment

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

Not blocking since this doesn't appear to be used for any automation, but I would suggest using dotnet run ... instead of Binaries/Dafny to prevent the mistake of running make test-run ... on an outdated binary.

@MikaelMayer MikaelMayer merged commit 7b1e402 into master Sep 24, 2024
22 checks passed
@MikaelMayer MikaelMayer deleted the chore-refactorings branch September 24, 2024 20:40
MikaelMayer added a commit that referenced this pull request Sep 25, 2024
Follow-up of #5786 with two
changes

<small>By submitting this pull request, I confirm that my contribution
is made under the terms of the [MIT
license](https://github.com/dafny-lang/dafny/blob/master/LICENSE.txt).</small>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants