Open aa755 opened 6 years ago
I'm in favor of this. See the discussion in #21
I already did this for riscv-coq, see here.
I use the following representation:
Record word_record{sz: Z} := Build_word {
word_val: Z;
word_mod: word_val mod 2 ^ sz = word_val
}.
It seems to work well in the sense that I use it everywhere in riscv-coq and in bedrock2, without any problems.
If you want to use that too, we should incorporate this into bbv, PRs welcome :wink:
Because of indices (which nest), every concrete 64 bit word has
2080
S
constructors, even though it has only 64WS
constructors. Should we opt for a less intrinisically dependently typed variant likeWord s := {n:N | log n< s}
?