MCPcopy Create free account
hub / github.com/BasisResearch/lean.py / test_bv_arithmetic

Method test_bv_arithmetic

tests/test_z3_ported.py:649–655  ·  view source on GitHub ↗

Guide: BitVec arithmetic wraps modularly.

(self)

Source from the content-addressed store, hash-verified

647 """From z3py guide: machine arithmetic (bit-vectors)."""
648
649 def test_bv_arithmetic(self):
650 """Guide: BitVec arithmetic wraps modularly."""
651 x = BitVec("x", 16)
652 y = BitVec("y", 16)
653 expr = x + y
654 assert isinstance(expr, BitVecRef)
655 assert expr.size() == 16
656
657 def test_bv_signed_vs_unsigned_comparison(self):
658 """Guide: signed < is different from ULT."""

Callers

nothing calls this directly

Calls 2

BitVecFunction · 0.90
sizeMethod · 0.45

Tested by

no test coverage detected