Skip to content

Commit b76b116

Browse files
Minor improvements in string preprocessing
Remove declaration of unimplemented function. Correcting typo. Update documentation of convert_exprt_to_string_exprt.
1 parent 05a6b09 commit b76b116

File tree

2 files changed

+15
-17
lines changed

2 files changed

+15
-17
lines changed

src/java_bytecode/java_string_library_preprocess.cpp

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -293,10 +293,17 @@ exprt::operandst java_string_library_preprocesst::process_parameters(
293293
/// sequence
294294
/// \param loc: location in the source
295295
/// \param symbol_table: symbol table
296-
/// \param init_code: code block, in which declaration of some arguments may be
297-
/// added
298-
/// \return the processed operand
299-
exprt java_string_library_preprocesst::convert_exprt_to_string_exprt(
296+
/// \param init_code: code block, in which declaration will be added:
297+
/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
298+
/// char *cprover_string_content;
299+
/// int cprover_string_length;
300+
/// cprover_string_length = a->length;
301+
/// cprover_string_content = a->data;
302+
/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
303+
/// \return the processed operand:
304+
/// {content=cprover_string_content, length=cprover_string_length}
305+
refined_string_exprt
306+
java_string_library_preprocesst::convert_exprt_to_string_exprt(
300307
const exprt &expr_to_process,
301308
const source_locationt &loc,
302309
symbol_tablet &symbol_table,
@@ -358,6 +365,7 @@ exprt::operandst
358365
code_blockt &init_code)
359366
{
360367
PRECONDITION(operands.size()==2);
368+
exprt::operandst ops;
361369
const exprt &op0=operands[0];
362370
const exprt &op1 = operands[1];
363371
PRECONDITION(implements_java_char_sequence_pointer(op0.type()));
@@ -650,8 +658,8 @@ exprt make_nondet_infinite_char_array(
650658
java_char_type(), infinity_exprt(java_int_type()));
651659
const symbolt data_sym = get_fresh_aux_symbol(
652660
array_type,
653-
"nondet_inifinite_array",
654-
"nondet_inifinite_array",
661+
"nondet_infinite_array",
662+
"nondet_infinite_array",
655663
loc,
656664
ID_java,
657665
symbol_table);

src/java_bytecode/java_string_library_preprocess.h

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -169,16 +169,6 @@ class java_string_library_preprocesst:public messaget
169169
const source_locationt &loc,
170170
symbol_tablet &symbol_table);
171171

172-
// Auxiliary functions
173-
codet code_for_scientific_notation(
174-
const exprt &arg,
175-
const ieee_float_spect &float_spec,
176-
const refined_string_exprt &string_expr,
177-
const exprt &tmp_string,
178-
const refined_string_typet &refined_string_type,
179-
const source_locationt &loc,
180-
symbol_tablet &symbol_table);
181-
182172
// Helper functions
183173
exprt::operandst process_parameters(
184174
const code_typet::parameterst &params,
@@ -193,7 +183,7 @@ class java_string_library_preprocesst:public messaget
193183
symbol_tablet &symbol_table,
194184
code_blockt &init_code);
195185

196-
exprt convert_exprt_to_string_exprt(
186+
refined_string_exprt convert_exprt_to_string_exprt(
197187
const exprt &deref,
198188
const source_locationt &loc,
199189
symbol_tablet &symbol_table,

0 commit comments

Comments
 (0)