RFC: crucible-llvm: Don't represent architecture at the type level #1046
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.
It's necessary to represent the pointer width at the type level in order to statically prevent the formation of ill-typed Crucible/What4 expressions. However, there is no similar motivation for representing architectures at the type level.
The previous state of affairs was incoherent in the sense that we always provided an
ArchRepr
signaling the use of x86, without actually checking that this architecture was in use:crucible/crucible-llvm/src/Lang/Crucible/LLVM/Translation/Monad.hs
Line 113 in 041975a
We could have fixed this by checking the target triple (functionality recently added to llvm-pretty{,-bc-parser}) and adding constructors for more architectures to
ArchRepr
, but as discussed above there's no motivation to actually do this.If we want to move forward with this, we should make a follow-up issue for removing all of the
LLVMArch
stuff.