@@ -81,15 +81,20 @@ trait SMTLIBParser {
81
81
case _ => IntegerLiteral (n)
82
82
}
83
83
84
- case FixedSizeBitVectors .BitVectorLit (bs) => otpe match {
85
- case Some (BVType (signed, _)) =>
86
- BVLiteral (signed, BitSet .empty ++ bs.reverse.zipWithIndex.collect { case (true , i) => i + 1 }, bs.size)
87
- case _ =>
88
- BVLiteral (true , BitSet .empty ++ bs.reverse.zipWithIndex.collect { case (true , i) => i + 1 }, bs.size)
89
- }
84
+ case FixedSizeBitVectors .BitVectorLit (bs) =>
85
+ otpe match {
86
+ case Some (BVType (signed, _)) =>
87
+ BVLiteral (signed, BitSet .empty ++ bs.reverse.zipWithIndex.collect { case (true , i) => i + 1 }, bs.size)
88
+ case Some (CharType ()) =>
89
+ val bv = BVLiteral (true , BitSet .empty ++ bs.reverse.zipWithIndex.collect { case (true , i) => i + 1 }, 16 )
90
+ CharLiteral (bv.toBigInt.toInt.toChar)
91
+ case _ =>
92
+ BVLiteral (true , BitSet .empty ++ bs.reverse.zipWithIndex.collect { case (true , i) => i + 1 }, bs.size)
93
+ }
90
94
91
95
case FixedSizeBitVectors .BitVectorConstant (n, size) => otpe match {
92
96
case Some (BVType (signed, _)) => BVLiteral (signed, n, size.intValue)
97
+ case Some (CharType ()) => CharLiteral (n.toChar)
93
98
case _ => BVLiteral (true , n, size.intValue)
94
99
}
95
100
0 commit comments