Skip to content

Commit 77c8b9c

Browse files
author
Daniel Kroening
committed
remove translation for certain boolean program constructs
1 parent 1bac484 commit 77c8b9c

File tree

2 files changed

+0
-88
lines changed

2 files changed

+0
-88
lines changed

src/goto-programs/goto_convert.cpp

Lines changed: 0 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -515,10 +515,6 @@ void goto_convertt::convert(
515515
convert_atomic_begin(code, dest);
516516
else if(statement==ID_atomic_end)
517517
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);
522518
else if(statement==ID_cpp_delete ||
523519
statement=="cpp_delete[]")
524520
convert_cpp_delete(code, dest);
@@ -1604,88 +1600,6 @@ void goto_convertt::convert_atomic_end(
16041600
copy(code, ATOMIC_END, dest);
16051601
}
16061602

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-
16891603
void goto_convertt::convert_ifthenelse(
16901604
const code_ifthenelset &code,
16911605
goto_programt &dest)

src/goto-programs/goto_convert_class.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,8 +234,6 @@ class goto_convertt:public messaget
234234
void convert_end_thread(const codet &code, goto_programt &dest);
235235
void convert_atomic_begin(const codet &code, goto_programt &dest);
236236
void convert_atomic_end(const codet &code, goto_programt &dest);
237-
void convert_bp_enforce(const codet &code, goto_programt &dest);
238-
void convert_bp_abortif(const codet &code, goto_programt &dest);
239237
void convert_msc_try_finally(const codet &code, goto_programt &dest);
240238
void convert_msc_try_except(const codet &code, goto_programt &dest);
241239
void convert_msc_leave(const codet &code, goto_programt &dest);

0 commit comments

Comments
 (0)