@@ -556,6 +556,40 @@ convert_expr_to_smt(const count_trailing_zeros_exprt &count_trailing_zeros)
556
556
count_trailing_zeros.pretty ());
557
557
}
558
558
559
+ static smt_termt convert_expr_to_smt (const greater_than_exprt &greater_than)
560
+ {
561
+ return convert_relational_to_smt (
562
+ greater_than,
563
+ smt_bit_vector_theoryt::unsigned_greater_than,
564
+ smt_bit_vector_theoryt::signed_greater_than);
565
+ }
566
+
567
+ static smt_termt
568
+ convert_expr_to_smt (const greater_than_or_equal_exprt &greater_than_or_equal)
569
+ {
570
+ return convert_relational_to_smt (
571
+ greater_than_or_equal,
572
+ smt_bit_vector_theoryt::unsigned_greater_than_or_equal,
573
+ smt_bit_vector_theoryt::signed_greater_than_or_equal);
574
+ }
575
+
576
+ static smt_termt convert_expr_to_smt (const less_than_exprt &less_than)
577
+ {
578
+ return convert_relational_to_smt (
579
+ less_than,
580
+ smt_bit_vector_theoryt::unsigned_less_than,
581
+ smt_bit_vector_theoryt::signed_less_than);
582
+ }
583
+
584
+ static smt_termt
585
+ convert_expr_to_smt (const less_than_or_equal_exprt &less_than_or_equal)
586
+ {
587
+ return convert_relational_to_smt (
588
+ less_than_or_equal,
589
+ smt_bit_vector_theoryt::unsigned_less_than_or_equal,
590
+ smt_bit_vector_theoryt::signed_less_than_or_equal);
591
+ }
592
+
559
593
smt_termt convert_expr_to_smt (const exprt &expr)
560
594
{
561
595
if (const auto symbol = expr_try_dynamic_cast<symbol_exprt>(expr))
@@ -704,35 +738,23 @@ smt_termt convert_expr_to_smt(const exprt &expr)
704
738
#endif
705
739
if (const auto &greater_than = expr_try_dynamic_cast<greater_than_exprt>(expr))
706
740
{
707
- return convert_relational_to_smt (
708
- *greater_than,
709
- smt_bit_vector_theoryt::unsigned_greater_than,
710
- smt_bit_vector_theoryt::signed_greater_than);
741
+ return convert_expr_to_smt (*greater_than);
711
742
}
712
743
if (
713
744
const auto &greater_than_or_equal =
714
745
expr_try_dynamic_cast<greater_than_or_equal_exprt>(expr))
715
746
{
716
- return convert_relational_to_smt (
717
- *greater_than_or_equal,
718
- smt_bit_vector_theoryt::unsigned_greater_than_or_equal,
719
- smt_bit_vector_theoryt::signed_greater_than_or_equal);
747
+ return convert_expr_to_smt (*greater_than_or_equal);
720
748
}
721
749
if (const auto &less_than = expr_try_dynamic_cast<less_than_exprt>(expr))
722
750
{
723
- return convert_relational_to_smt (
724
- *less_than,
725
- smt_bit_vector_theoryt::unsigned_less_than,
726
- smt_bit_vector_theoryt::signed_less_than);
751
+ return convert_expr_to_smt (*less_than);
727
752
}
728
753
if (
729
754
const auto &less_than_or_equal =
730
755
expr_try_dynamic_cast<less_than_or_equal_exprt>(expr))
731
756
{
732
- return convert_relational_to_smt (
733
- *less_than_or_equal,
734
- smt_bit_vector_theoryt::unsigned_less_than_or_equal,
735
- smt_bit_vector_theoryt::signed_less_than_or_equal);
757
+ return convert_expr_to_smt (*less_than_or_equal);
736
758
}
737
759
if (const auto address_of = expr_try_dynamic_cast<address_of_exprt>(expr))
738
760
{
0 commit comments