@@ -173,6 +173,8 @@ void code_contractst::check_apply_loop_contracts(
173
173
initial_invariant_val, invariant};
174
174
initial_invariant_value_assignment.add_source_location () =
175
175
loop_head_location;
176
+
177
+ goto_convertt converter (symbol_table, log.get_message_handler ());
176
178
converter.goto_convert (
177
179
initial_invariant_value_assignment, pre_loop_head_instrs, mode);
178
180
}
@@ -293,6 +295,8 @@ void code_contractst::check_apply_loop_contracts(
293
295
assertion.add_source_location () = loop_head_location;
294
296
assertion.add_source_location ().set_comment (
295
297
" Check loop invariant before entry" );
298
+
299
+ goto_convertt converter (symbol_table, log.get_message_handler ());
296
300
converter.goto_convert (assertion, pre_loop_head_instrs, mode);
297
301
}
298
302
@@ -338,6 +342,8 @@ void code_contractst::check_apply_loop_contracts(
338
342
{
339
343
code_assumet assumption{invariant};
340
344
assumption.add_source_location () = loop_head_location;
345
+
346
+ goto_convertt converter (symbol_table, log.get_message_handler ());
341
347
converter.goto_convert (assumption, pre_loop_head_instrs, mode);
342
348
}
343
349
@@ -393,6 +399,8 @@ void code_contractst::check_apply_loop_contracts(
393
399
code_assignt old_decreases_assignment{
394
400
old_decreases_vars[i], decreases_clause_exprs[i]};
395
401
old_decreases_assignment.add_source_location () = loop_head_location;
402
+
403
+ goto_convertt converter (symbol_table, log.get_message_handler ());
396
404
converter.goto_convert (
397
405
old_decreases_assignment, pre_loop_head_instrs, mode);
398
406
}
@@ -441,6 +449,8 @@ void code_contractst::check_apply_loop_contracts(
441
449
assertion.add_source_location () = loop_head_location;
442
450
assertion.add_source_location ().set_comment (
443
451
" Check that loop invariant is preserved" );
452
+
453
+ goto_convertt converter (symbol_table, log.get_message_handler ());
444
454
converter.goto_convert (assertion, pre_loop_end_instrs, mode);
445
455
}
446
456
@@ -453,6 +463,8 @@ void code_contractst::check_apply_loop_contracts(
453
463
code_assignt new_decreases_assignment{
454
464
new_decreases_vars[i], decreases_clause_exprs[i]};
455
465
new_decreases_assignment.add_source_location () = loop_head_location;
466
+
467
+ goto_convertt converter (symbol_table, log.get_message_handler ());
456
468
converter.goto_convert (
457
469
new_decreases_assignment, pre_loop_end_instrs, mode);
458
470
}
@@ -465,6 +477,8 @@ void code_contractst::check_apply_loop_contracts(
465
477
monotonic_decreasing_assertion.add_source_location () = loop_head_location;
466
478
monotonic_decreasing_assertion.add_source_location ().set_comment (
467
479
" Check decreases clause on loop iteration" );
480
+
481
+ goto_convertt converter (symbol_table, log.get_message_handler ());
468
482
converter.goto_convert (
469
483
monotonic_decreasing_assertion, pre_loop_end_instrs, mode);
470
484
@@ -706,6 +720,7 @@ void code_contractst::apply_function_contract(
706
720
.append (" in " )
707
721
.append (function.c_str ()));
708
722
_location.set_property_class (ID_precondition);
723
+ goto_convertt converter (symbol_table, log.get_message_handler ());
709
724
generate_contract_constraints (
710
725
symbol_table,
711
726
converter,
@@ -785,6 +800,8 @@ void code_contractst::apply_function_contract(
785
800
source_locationt _location = clause.source_location ();
786
801
_location.set_comment (" Assume ensures clause" );
787
802
_location.set_property_class (ID_assume);
803
+
804
+ goto_convertt converter (symbol_table, log.get_message_handler ());
788
805
generate_contract_constraints (
789
806
symbol_table,
790
807
converter,
@@ -1355,6 +1372,7 @@ void code_contractst::add_contract_check(
1355
1372
source_locationt _location = clause.source_location ();
1356
1373
_location.set_comment (" Assume requires clause" );
1357
1374
_location.set_property_class (ID_assume);
1375
+ goto_convertt converter (symbol_table, log.get_message_handler ());
1358
1376
generate_contract_constraints (
1359
1377
symbol_table,
1360
1378
converter,
@@ -1388,6 +1406,7 @@ void code_contractst::add_contract_check(
1388
1406
source_locationt _location = clause.source_location ();
1389
1407
_location.set_comment (" Check ensures clause" );
1390
1408
_location.set_property_class (ID_postcondition);
1409
+ goto_convertt converter (symbol_table, log.get_message_handler ());
1391
1410
generate_contract_constraints (
1392
1411
symbol_table,
1393
1412
converter,
0 commit comments