-
Notifications
You must be signed in to change notification settings - Fork 285
Closed
Labels
during 2: compilation of correct programDafny rejects a valid program during compilationDafny rejects a valid program during compilationkind: bugCrashes, unsoundness, incorrect output, etc. If possible, add a `part:` labelCrashes, unsoundness, incorrect output, etc. If possible, add a `part:` labellang: rustDafny's transpiler to Rust and its runtimeDafny's transpiler to Rust and its runtime
Description
Dafny version
4.10 and also HEAD of master
Code to produce this issue
https://github.com/aws/aws-database-encryption-sdk-dynamodb/Command to run and resulting output
clone https://github.com/aws/aws-database-encryption-sdk-dynamodb/
cd DynamoDbEncryption
make polymorph_rust transpile_rust test_rust
note that test_rust successfully compiles
Edit the file dafny/DynamoDbEncryption/src/FilterExpr.dfy
In the definition of apply_function on line 1267 (or so) change
returns (result : Result<StackValue, Error>)
to
returns (ret : Result<StackValue, Error>)
make transpile_rust test_rust
note that test_rust does not compile, even though it should, and in fact does in all the other languages.
It seems that code on 1274 that starts
var ret :-
confuses Dafny, in that the variable has the same name as the return variable
What happened?
Generated rust code does not compile.
I expected it to compile, or at a minimum Dafny should have complained at transpilation time.
What type of operating system are you experiencing the problem on?
Mac
Metadata
Metadata
Assignees
Labels
during 2: compilation of correct programDafny rejects a valid program during compilationDafny rejects a valid program during compilationkind: bugCrashes, unsoundness, incorrect output, etc. If possible, add a `part:` labelCrashes, unsoundness, incorrect output, etc. If possible, add a `part:` labellang: rustDafny's transpiler to Rust and its runtimeDafny's transpiler to Rust and its runtime