Skip to content

Add bitvector number notations

Thibaut Pérami requested to merge tperami/stdpp:bv-notations into master

This adds number notations into bv_scope that expand to Z_to_bv _ {number}. This notation is parsing only, printing will print the full Z_to_bv call. Also the bitvector is not computed: The term 4%bv is literally of the shape (Z_to_bv _ 4), it is NOT evaluated to a shape of BV _ 4 _. On the other hand this allows to write ((-1)%bv : bv 32) to get something that reduces to BV 32 0xFFFFFFFF.

Merge request reports

Loading