-
Notifications
You must be signed in to change notification settings - Fork 15
Translating rust array type [T;C] into struct arr { T[C] data; } #252
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
Closed
Closed
Changes from 38 commits
Commits
Show all changes
59 commits
Select commit
Hold shift + click to select a range
e5df76b
added DeclObli type and an update of the mutable field in env
Lin23299 2436209
changed type, added capture of obligations
Lin23299 81af396
added logs for debugging
Lin23299 7a4af25
wip: updating transaltion of array
Lin23299 36a3318
updated type of ObliMap and use a function to add oblis
Lin23299 9739fe4
commented redundent special case in expr_of_operand, changed final li…
Lin23299 afda93f
added translation of AggregatedArray
Lin23299 27a8839
fixed addrof for array
Lin23299 337adeb
use K definitions in DeclObli
Lin23299 a4547a3
minor: Log for obli adding
Lin23299 bb109a9
changed to generic Arr struct
Lin23299 fc2835d
first fix for from_fn
Lin23299 9bed4e1
minor: bug fix
Lin23299 6733647
similar update to array map
Lin23299 6b01dd5
slightly changed array.rs to avoid unused variable warning
Lin23299 74d6c1f
fixed a missing recursive case(bug?) in 'remove_implicit_array_copies'
Lin23299 09da11e
defined lid and type of generic struct type for array in Builtin.ml a…
Lin23299 35af6fe
leaving signatures in Builtin.ml unchanged since we cannot return arr…
Lin23299 fbf03d6
Revert "leaving signatures in Builtin.ml unchanged since we cannot re…
Lin23299 4f89b03
Merge branch 'AeneasVerif:main' into array_handling
Lin23299 083dee6
updated the builtin implementations in glue.h, anded a cleanup to fix…
Lin23299 73556be
moved the decl deletion to Cleanup3 cus it fails the check
Lin23299 48c4a1a
Merge branch 'AeneasVerif:main' into array_handling
Lin23299 ad0b5df
updated translation in CastUnsize to support dst.rs
Lin23299 7eb7448
minor to prevent unused variable
Lin23299 8be4b91
bug fix in builtin type
Lin23299 8652d58
Merge branch 'AeneasVerif:main' into array_handling
Lin23299 44a90c3
wip: updated '
Lin23299 f9b16d6
minor bug fix
Lin23299 048fb9a
update remove_array_repeat: added EbufCreateL case in expand_repeat f…
Lin23299 4676d5e
Merge branch 'AeneasVerif:main' into array_handling
Lin23299 ba9ac59
minors after debugging of fncg
Lin23299 f91c003
minor
Lin23299 dbf2a57
added a macro def for empty array
Lin23299 15dcf23
typo fix
Lin23299 a4d6207
updated test cases
Lin23299 da58586
updated CastUnsize for 4 cases with new test case
Lin23299 69fef58
cleanup
Lin23299 3bb4e2c
Merge branch 'main' of github.com:AeneasVerif/eurydice into array_han…
Lin23299 ec2c900
added test case issue_212.rs
Lin23299 d66bbf9
cleanup and comments
Lin23299 208e31e
comments
Lin23299 fce0d1d
minor
Lin23299 53888c3
Merge branch 'main' of github.com:AeneasVerif/eurydice into array_han…
Lin23299 fffc447
Merge branch 'main' into array_handling
msprotz a3ea6ec
updated define of empty_array to avoid UB in struct initialization
Lin23299 51632a6
small cleanups in Cleanup2.ml
Lin23299 eefbfdf
a first fix of expand_repeat
Lin23299 26e76c9
removal of comments in Builtin.ml
Lin23299 4593892
removed the special case for nested array in from_fn
Lin23299 ee3d0c1
Merge branch 'main' of github.com:AeneasVerif/eurydice into array_han…
Lin23299 a504e42
updated expand_repeat with visit_DGlobal in remove_array_repeat
Lin23299 3a88cf3
Merge branch 'AeneasVerif:main' into array_handling
Lin23299 080d3a0
simplification in visit_EGlobal
Lin23299 2bebcad
Added test for array_eq in array.rs
Lin23299 390d23d
Merge branch 'AeneasVerif:main' into array_handling
Lin23299 96cda91
Merge branch 'main' of github.com:AeneasVerif/eurydice into array_han…
Lin23299 39a167e
Merge branch 'main' of github.com:AeneasVerif/eurydice into array_han…
Lin23299 02ad68d
Merge branch 'main' into array_handling
ssyram File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
can you say more in this comment? I don't understand from the comment whether it's a default initializer for any array, or just for an array of size zero?
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 made this macro specifically for the 0-length arrays. Because direct empty array creation causes complains from the Krml checker. Also, thanks for pointing out the UB problem, but we then have no idea how to implement it. Or, is it still safe to have this UB as the value is of 0-length and shall never be used? (The only concern here may be the unexpected raising errors, or simply reported as bug by the compiler / some analysers?)
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.
Of course, a safer way would be to simply match and turn 0-len arrays be simply some other types, e.g.:
typedef Eurydice::ZeroLenArr void *;.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 may have to do that -- let's wait until the PR is updated and other questions are addressed, and then we can have maybe a special type for zero-sized arrays (something like
typedef struct { char data[1]; } Eurydice_zero_arr)