Skip to content

Commit

Permalink
Remove unused and inconsistent pointer_object_has_type
Browse files Browse the repository at this point in the history
Its definition was incomplete and necessarily unused as it didn't match its
declaration.
  • Loading branch information
tautschnig committed Jun 24, 2018
1 parent d6bdee6 commit 0e9aa90
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 40 deletions.
23 changes: 0 additions & 23 deletions src/ansi-c/expr2c.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1164,26 +1164,6 @@ std::string expr2ct::convert_unary(
return dest;
}

std::string expr2ct::convert_pointer_object_has_type(
const exprt &src,
unsigned precedence)
{
if(src.operands().size()!=1)
return convert_norep(src, precedence);

unsigned p0;
std::string op0=convert_with_precedence(src.op0(), p0);

std::string dest="POINTER_OBJECT_HAS_TYPE";
dest+='(';
dest+=op0;
dest+=", ";
dest+=convert(static_cast<const typet &>(src.find("object_type")));
dest+=')';

return dest;
}

std::string expr2ct::convert_allocate(const exprt &src, unsigned &precedence)
{
if(src.operands().size() != 2)
Expand Down Expand Up @@ -3579,9 +3559,6 @@ std::string expr2ct::convert_with_precedence(
else if(src.id()=="object_value")
return convert_function(src, "OBJECT_VALUE", precedence=16);

else if(src.id()=="pointer_object_has_type")
return convert_pointer_object_has_type(src, precedence=16);

else if(src.id()==ID_array_of)
return convert_array_of(src, precedence=16);

Expand Down
3 changes: 0 additions & 3 deletions src/ansi-c/expr2c_class.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,6 @@ class expr2ct
std::string convert_member(
const member_exprt &src, unsigned precedence);

std::string convert_pointer_object_has_type(
const exprt &src, unsigned precedence);

std::string convert_array_of(const exprt &src, unsigned precedence);

std::string convert_trinary(
Expand Down
7 changes: 0 additions & 7 deletions src/solvers/smt2/smt2_conv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1383,13 +1383,6 @@ void smt2_convt::convert_expr(const exprt &expr)
out << ") (_ bv" << pointer_logic.get_invalid_object()
<< " " << config.bv_encoding.object_bits << "))";
}
else if(expr.id()=="pointer_object_has_type")
{
assert(expr.operands().size()==1);

out << "false"; // TODO
SMT2_TODO("pointer_object_has_type not implemented");
}
else if(expr.id()==ID_string_constant)
{
defined_expressionst::const_iterator it=defined_expressions.find(expr);
Expand Down
5 changes: 0 additions & 5 deletions src/util/pointer_predicates.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,6 @@ exprt dynamic_size(const namespacet &ns)
return ns.lookup(CPROVER_PREFIX "malloc_size").symbol_expr();
}

exprt pointer_object_has_type(const exprt &pointer, const typet &type)
{
return false_exprt();
}

exprt dynamic_object(const exprt &pointer)
{
exprt dynamic_expr(ID_dynamic_object, bool_typet());
Expand Down
2 changes: 0 additions & 2 deletions src/util/pointer_predicates.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ exprt pointer_offset(const exprt &pointer);
exprt pointer_object(const exprt &pointer);
exprt malloc_object(const exprt &pointer, const namespacet &);
exprt object_size(const exprt &pointer);
exprt pointer_object_has_type(
const exprt &pointer, const typet &type, const namespacet &);
exprt dynamic_object(const exprt &pointer);
exprt good_pointer(const exprt &pointer);
exprt good_pointer_def(const exprt &pointer, const namespacet &);
Expand Down

0 comments on commit 0e9aa90

Please sign in to comment.