Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 6fe0d8f

Browse files
committedSep 24, 2024·
Remove infinity_exprt
This removes `infinity_exprt` together with all its uses, where were all about array size. Any such arrays were replaced by arrays of the maximum viable size.
1 parent d2b4455 commit 6fe0d8f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+91
-204
lines changed
 

‎jbmc/src/java_bytecode/java_string_library_preprocess.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,7 @@ refined_string_exprt java_string_library_preprocesst::replace_char_array(
450450
get_length(array, symbol_table), char_array, refined_string_type);
451451

452452
const dereference_exprt inf_array(
453-
char_array, array_typet(java_char_type(), infinity_exprt(java_int_type())));
453+
char_array, array_typet(java_char_type(), java_int_type().largest_expr()));
454454

455455
add_pointer_to_array_association(
456456
string_expr.content(), inf_array, symbol_table, loc, function_id, code);
@@ -619,7 +619,7 @@ exprt make_nondet_infinite_char_array(
619619
code_blockt &code)
620620
{
621621
const array_typet array_type(
622-
java_char_type(), infinity_exprt(java_int_type()));
622+
java_char_type(), java_int_type().largest_expr());
623623
const symbolt data_sym = fresh_java_symbol(
624624
pointer_type(array_type),
625625
"nondet_infinite_array_pointer",

‎jbmc/unit/solvers/strings/string_constraint_instantiation/instantiate_not_contains.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -40,21 +40,21 @@ class tt
4040
{
4141
return java_char_type();
4242
}
43-
typet length_type() const
43+
signedbv_typet length_type() const
4444
{
4545
return java_int_type();
4646
}
4747
array_typet array_type() const
4848
{
49-
return array_typet(char_type(), infinity_exprt(length_type()));
49+
return array_typet(char_type(), length_type().largest_expr());
5050
}
5151
refined_string_typet string_type() const
5252
{
5353
return refined_string_typet(length_type(), pointer_type(char_type()));
5454
}
5555
array_typet witness_type() const
5656
{
57-
return array_typet(length_type(), infinity_exprt(length_type()));
57+
return array_typet(length_type(), length_type().largest_expr());
5858
}
5959
};
6060

0 commit comments

Comments
 (0)
Please sign in to comment.