Parametric Bit-Vector Lab

Visualize Bit-Vector operations with symbolic width k.

Elimination Rule

This operator is eliminated by rewriting it into Addition and Bitwise AND.

ร—

Algorithm 1: Function ADM

Recursively constructs admissibility constraints.

Match Expression eConstraint
x (PBV variable)Bw(e) > 0
z (Int constant)True (โŠค)
to-pbv(k, t)Bw(e) > 0 โˆง ADM(t)
|t|ADM(t)
t[i:j]0 โ‰ค j โ‰ค i < Bw(t) โˆง ADM(t)
ext_z(n, t)n โ‰ฅ 0 โˆง ADM(t)
ext_s(n, t)n โ‰ฅ 0 โˆง ADM(t)
t1 โˆ˜ t2ADM(t1) โˆง ADM(t2)
itePBV(t1, t2, t3)Bw(t2) โ‰ˆ Bw(t3) โˆง โ‹€ ADM(ti)
Other Binary Ops (x โ‹„ y)Bw(t1) โ‰ˆ Bw(t2) โˆง ADM(t1) โˆง ADM(t2)

Algorithm 2: Function Bw

Computes the bit-width of PBV-terms.

Match Expression eWidth
x (PBV variable)|x|
to-pbv(k, t)k
t[i:j]i - j + 1
ext_z(n, t)Bw(t) + n
ext_s(n, t)Bw(t) + n
t1 โˆ˜ t2Bw(t1) + Bw(t2)
itePBV(t1, t2, t3)Bw(t2)
Other Ops (โ‹„(t1...tn))Bw(t1)
ร—

Parametric Bit-Vector Theory Signatures

Table 1: Signature ฮฃIA (Integer Arithmetic)

SymbolSMT-LIB SyntaxArity
โ‰ˆInt, โ‰‰Int=, distinctInt ร— Int โ†’ Bool
0, 1, 2, ...0, 1, 2, ...Int
+, -, ยท, div, mod+, -, *, div, modInt ร— Int โ†’ Int
โ‰ค, โ‰ฅ, <, ><=, >=, <, >Int ร— Int โ†’ Bool

Table 2: Signatures ฮฃPBV and ฮฃIA(pow2, &โ„•)

ฮฃPBV = ฮฃIA + the following operators
SymbolSMT-LIB SyntaxArity
โ‰ˆPBV, โ‰‰PBV=, distinctPBV ร— PBV โ†’ Bool
<u, >u, <s, >sbvult, bvugt, bvslt, bvsgtPBV ร— PBV โ†’ Bool
โ‰คu, โ‰ฅu, โ‰คs, โ‰ฅsbvule, bvuge, bvsle, bvsgePBV ร— PBV โ†’ Bool
~, -Bbvnot, bvnegPBV โ†’ PBV
&, |, โŠ•bvand, bvor, bvxorPBV ร— PBV โ†’ PBV
<<, >>, >>abvshl, bvlshr, bvashrPBV ร— PBV โ†’ PBV
+B, -Bbvadd, bvsubPBV ร— PBV โ†’ PBV
ยทB, modB, divBbvmul, bvurem, bvudivPBV ร— PBV โ†’ PBV
_[_ : _]pextractPBV ร— Int ร— Int โ†’ PBV
โˆ˜concatPBV ร— PBV โ†’ PBV
extzpzero_extendInt ร— PBV โ†’ PBV
extspsign_extendInt ร— PBV โ†’ PBV
|_|bvsizePBV โ†’ Int
to-pbvint_to_pbvInt ร— Int โ†’ PBV
ฮฃIA(pow2, &โ„•) = ฮฃIA + the following operators
SymbolSMT-LIB SyntaxArity
&โ„•piandInt ร— Int ร— Int โ†’ Int
pow2pow2Int โ†’ Int
ร—

Performance Evaluation

Main Results (Table 6)
Configurations (Table 5)
Benchmark # BASELINE EAGER PBV (Ours) VBS
alive2007193107124
ic18043587781
rewrite2006658122113311382
syrew1500558720912951
lemmas7012142323
icfb46191212
mut9441669108448634915
TOTAL134432012319973257488
sat0036413641
unsat2012319936843847
unique245742224303
time [s]709k634k375k355k
Key Insights:
  • PBV Dominance: Configuration PBV solves 7,325 instances, more than 3.5x the Baseline (2,012) and 2x the Eager approach (3,199).
  • Speed: On common instances, PBV is more than 18x faster than the Eager approach (375k seconds vs 634k seconds).
  • Unsat Performance: PBV excels at finding UNSAT results (3,684 vs 2,012 for Baseline).
  • Satisfiability: Baseline and Eager solve 0 satisfiable instances due to quantifier overhead. PBV solves 3,641.
ร—

System Architecture

Click any component to see its internal logic (tables/algorithms).

ฯ†0
โ†’
RWB
ฯ†1 โ†’
TRANS
smt-switch
โ†’ ฯ†2 โ†’
SOLVEโ˜…
pow2-solver
&โ„•-solver
cvc5
PBV Formula x โˆ˜ y
Integer Translation x ยท 2k + y
Range Constraints
Admissibility Constraints
โˆ’
Left Click: Rotate | Right Click: Pan | Scroll: Zoom