From 29dcd6133fd1f6f90d099e605759140fa1b52a1c Mon Sep 17 00:00:00 2001 From: Chantal Keller Date: Tue, 30 Jun 2020 13:02:54 +0200 Subject: Empty bit-vectors are not valid in SMT (fixes #76) --- src/trace/smtAtom.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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 -- cgit