idris-bi icon indicating copy to clipboard operation
idris-bi copied to clipboard

Direct compilation for BIP / view for Data.Bits?

Open clayrat opened this issue 8 years ago • 5 comments

Might be quite useful to link Bip/Bin/Biz to un/signed machine words, perhaps by making a covering function for Data.Bits.

clayrat avatar Aug 28 '17 11:08 clayrat

Agreed, and this is something that I can work on.

sbp avatar Aug 29 '17 10:08 sbp

One thing that we definitely need for this to happen are the bounded versions (the analogue of Prelude's Fin), so that we could fix the byte length. This however will definitely mess up the arithmetics, wonder if Coq has some solution here? One way out would be to define it as modular arithmetics, just have to figure out if real-world bytes behave like that :)

clayrat avatar Sep 13 '17 11:09 clayrat

This looks relevant: https://github.com/AbsInt/CompCert/blob/master/lib/Integers.v

clayrat avatar Sep 13 '17 12:09 clayrat

https://github.com/maximedenes/native-coq/tree/master/theories/Numbers also looks fitting

clayrat avatar Oct 03 '17 13:10 clayrat

As well as https://github.com/artart78/coq-bits It even has an accompanying paper https://pages.lip6.fr/Pierre-Evariste.Dagand/stuffs/coq-bitset/flops/paper.pdf

clayrat avatar Oct 03 '17 13:10 clayrat