@@ -515,10 +515,6 @@ void goto_convertt::convert(
515
515
convert_atomic_begin (code, dest);
516
516
else if (statement==ID_atomic_end)
517
517
convert_atomic_end (code, dest);
518
- else if (statement==ID_bp_enforce)
519
- convert_bp_enforce (code, dest);
520
- else if (statement==ID_bp_abortif)
521
- convert_bp_abortif (code, dest);
522
518
else if (statement==ID_cpp_delete ||
523
519
statement==" cpp_delete[]" )
524
520
convert_cpp_delete (code, dest);
@@ -1604,88 +1600,6 @@ void goto_convertt::convert_atomic_end(
1604
1600
copy (code, ATOMIC_END, dest);
1605
1601
}
1606
1602
1607
- void goto_convertt::convert_bp_enforce (
1608
- const codet &code,
1609
- goto_programt &dest)
1610
- {
1611
- if (code.operands ().size ()!=2 )
1612
- {
1613
- error ().source_location =code.find_source_location ();
1614
- error () << " bp_enfroce expects two arguments" << eom;
1615
- throw 0 ;
1616
- }
1617
-
1618
- // do an assume
1619
- exprt op=code.op0 ();
1620
-
1621
- clean_expr (op, dest);
1622
-
1623
- goto_programt::targett t=dest.add_instruction (ASSUME);
1624
- t->guard =op;
1625
- t->source_location =code.source_location ();
1626
-
1627
- // change the assignments
1628
-
1629
- goto_programt tmp;
1630
- convert (to_code (code.op1 ()), tmp);
1631
-
1632
- if (!op.is_true ())
1633
- {
1634
- exprt constraint (op);
1635
- make_next_state (constraint);
1636
-
1637
- Forall_goto_program_instructions (it, tmp)
1638
- {
1639
- if (it->is_assign ())
1640
- {
1641
- assert (it->code .get (ID_statement)==ID_assign);
1642
-
1643
- // add constrain
1644
- codet constrain (ID_bp_constrain);
1645
- constrain.reserve_operands (2 );
1646
- constrain.move_to_operands (it->code );
1647
- constrain.copy_to_operands (constraint);
1648
- it->code .swap (constrain);
1649
-
1650
- it->type =OTHER;
1651
- }
1652
- else if (it->is_other () &&
1653
- it->code .get (ID_statement)==ID_bp_constrain)
1654
- {
1655
- // add to constraint
1656
- assert (it->code .operands ().size ()==2 );
1657
- it->code .op1 ()=
1658
- and_exprt (it->code .op1 (), constraint);
1659
- }
1660
- }
1661
- }
1662
-
1663
- dest.destructive_append (tmp);
1664
- }
1665
-
1666
- void goto_convertt::convert_bp_abortif (
1667
- const codet &code,
1668
- goto_programt &dest)
1669
- {
1670
- if (code.operands ().size ()!=1 )
1671
- {
1672
- error ().source_location =code.find_source_location ();
1673
- error () << " bp_abortif expects one argument" << eom;
1674
- throw 0 ;
1675
- }
1676
-
1677
- // do an assert
1678
- exprt op=code.op0 ();
1679
-
1680
- clean_expr (op, dest);
1681
-
1682
- op.make_not ();
1683
-
1684
- goto_programt::targett t=dest.add_instruction (ASSERT);
1685
- t->guard .swap (op);
1686
- t->source_location =code.source_location ();
1687
- }
1688
-
1689
1603
void goto_convertt::convert_ifthenelse (
1690
1604
const code_ifthenelset &code,
1691
1605
goto_programt &dest)
0 commit comments