Extract bits [hi:lo] from a bit-vector.
(hi: int, lo: int, x: BitVecRef)
| 1544 | |
| 1545 | |
| 1546 | def Extract(hi: int, lo: int, x: BitVecRef) -> BitVecRef: |
| 1547 | """Extract bits [hi:lo] from a bit-vector.""" |
| 1548 | width = hi - lo + 1 |
| 1549 | return BitVecRef( |
| 1550 | ExtractNode(hi, lo, x._ast), |
| 1551 | BitVecSort(width), |
| 1552 | x._vars, |
| 1553 | ) |
| 1554 | |
| 1555 | |
| 1556 | def Concat(*args: BitVecRef) -> BitVecRef: |