aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChantal Keller <Chantal.Keller@inria.fr>2020-06-30 13:02:54 +0200
committerChantal Keller <Chantal.Keller@inria.fr>2020-06-30 13:02:54 +0200
commit29dcd6133fd1f6f90d099e605759140fa1b52a1c (patch)
treeefe3dfa6e25deb239709ce817aa281dc99d9c5d8 /src
parent2047f81d05ba46c82d9c503358c4eec17dff7d27 (diff)
downloadsmtcoq-29dcd6133fd1f6f90d099e605759140fa1b52a1c.tar.gz
smtcoq-29dcd6133fd1f6f90d099e605759140fa1b52a1c.zip
Empty bit-vectors are not valid in SMT (fixes #76)
Diffstat (limited to 'src')
-rw-r--r--src/trace/smtAtom.ml2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/trace/smtAtom.ml b/src/trace/smtAtom.ml
index c20a75d..ae44b8d 100644
--- a/src/trace/smtAtom.ml
+++ b/src/trace/smtAtom.ml
@@ -649,7 +649,7 @@ module Atom =
to_smt_atom (atom h)
and to_smt_atom = function
- | Acop (CO_BV bv) -> Format.fprintf fmt "#b%a" bv_to_smt bv
+ | Acop (CO_BV bv) -> if List.length bv = 0 then Structures.error "Empty bit-vectors are not valid in SMT" else Format.fprintf fmt "#b%a" bv_to_smt bv
| Acop _ as a -> to_smt_int fmt (compute_int a)
| Auop (op,h) -> to_smt_uop op h
| Abop (op,h1,h2) -> to_smt_bop op h1 h2