@@ -361,7 +361,16 @@ exprt string_refine_preprocesst::make_cprover_string_assign(
361
361
std::list<code_assignt> assignments;
362
362
363
363
// 1) cprover_string_length= *(rhs->length)
364
+ symbolt sym_length=get_fresh_aux_symbol (
365
+ length_type,
366
+ " cprover_string_length" ,
367
+ " cprover_string_length" ,
368
+ location,
369
+ ID_java,
370
+ symbol_table);
371
+ symbol_exprt cprover_length=sym_length.symbol_expr ();
364
372
member_exprt length (deref, " length" , length_type);
373
+ assignments.emplace_back (cprover_length, length);
365
374
366
375
// 2) cprover_string_array = *(rhs->data)
367
376
symbol_exprt array_lhs=fresh_array (data_type.subtype (), location);
@@ -373,7 +382,7 @@ exprt string_refine_preprocesst::make_cprover_string_assign(
373
382
// This assignment is useful for finding witnessing strings for counter
374
383
// examples
375
384
refined_string_typet ref_type (length_type, java_char_type ());
376
- string_exprt new_rhs (length , array_lhs, ref_type);
385
+ string_exprt new_rhs (cprover_length , array_lhs, ref_type);
377
386
378
387
symbol_exprt lhs=fresh_string (new_rhs.type (), location);
379
388
assignments.emplace_back (lhs, new_rhs);
0 commit comments