Skip to content

Commit eb403a6

Browse files
author
Daniel Kroening
committed
remove CBMC_trace
This has no known users.
1 parent 7ef8430 commit eb403a6

File tree

4 files changed

+2
-47
lines changed

4 files changed

+2
-47
lines changed

src/ansi-c/cprover_builtin_headers.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,6 @@ void __CPROVER_atomic_begin();
3333
void __CPROVER_atomic_end();
3434
void __CPROVER_fence(const char *kind, ...);
3535

36-
// traces
37-
void CBMC_trace(int lvl, const char *event, ...);
38-
3936
// pointers
4037
__CPROVER_size_t __CPROVER_POINTER_OBJECT(const void *);
4138
__CPROVER_ssize_t __CPROVER_POINTER_OFFSET(const void *);

src/goto-symex/goto_symex.h

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -468,8 +468,7 @@ class goto_symext
468468
virtual void symex_end_of_function(statet &);
469469

470470
/// Symbolic execution of a call to a function call.
471-
/// For functions \c CBMC_trace and functions starting with \c __CPROVER_fkt
472-
/// see \ref goto_symext::symex_trace and
471+
/// For functions starting with \c __CPROVER_fkt
473472
/// \ref goto_symext::symex_fkt
474473
/// For non-special functions see
475474
/// \ref goto_symext::symex_function_call_code
@@ -678,11 +677,6 @@ class goto_symext
678677
/// \param state: Symbolic execution state for current instruction
679678
/// \param code: The function call instruction
680679
virtual void symex_fkt(statet &state, const code_function_callt &code);
681-
/// Symbolically execute a FUNCTION_CALL instruction for the `CBMC_trace`
682-
/// function
683-
/// \param state: Symbolic execution state for current instruction
684-
/// \param code: The function call instruction
685-
virtual void symex_trace(statet &state, const code_function_callt &code);
686680
/// Symbolically execute an OTHER instruction that does a CPP `printf`
687681
/// \param state: Symbolic execution state for current instruction
688682
/// \param rhs: The cleaned up CPP `printf` instruction

src/goto-symex/symex_builtin_functions.cpp

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -545,38 +545,6 @@ void goto_symext::symex_cpp_delete(
545545
#endif
546546
}
547547

548-
void goto_symext::symex_trace(
549-
statet &state,
550-
const code_function_callt &code)
551-
{
552-
PRECONDITION(code.arguments().size() >= 2);
553-
554-
mp_integer debug_lvl;
555-
optionalt<mp_integer> maybe_debug =
556-
numeric_cast<mp_integer>(code.arguments()[0]);
557-
DATA_INVARIANT(
558-
maybe_debug.has_value(), "CBMC_trace expects constant as first argument");
559-
debug_lvl = maybe_debug.value();
560-
561-
DATA_INVARIANT(
562-
code.arguments()[1].id() == "implicit_address_of" &&
563-
code.arguments()[1].operands().size() == 1 &&
564-
code.arguments()[1].op0().id() == ID_string_constant,
565-
"CBMC_trace expects string constant as second argument");
566-
567-
if(symex_config.debug_level >= debug_lvl)
568-
{
569-
std::list<renamedt<exprt, L2>> vars;
570-
571-
irep_idt event = to_string_constant(code.arguments()[1].op0()).get_value();
572-
573-
for(std::size_t j=2; j<code.arguments().size(); j++)
574-
vars.push_back(state.rename(code.arguments()[j], ns));
575-
576-
target.output(state.guard.as_expr(), state.source, event, vars);
577-
}
578-
}
579-
580548
void goto_symext::symex_fkt(
581549
statet &,
582550
const code_function_callt &)

src/goto-symex/symex_function_call.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -211,11 +211,7 @@ void goto_symext::symex_function_call_symbol(
211211
const irep_idt &identifier=
212212
to_symbol_expr(code.function()).get_identifier();
213213

214-
if(identifier=="CBMC_trace")
215-
{
216-
symex_trace(state, code);
217-
}
218-
else if(has_prefix(id2string(identifier), CPROVER_FKT_PREFIX))
214+
if(has_prefix(id2string(identifier), CPROVER_FKT_PREFIX))
219215
{
220216
symex_fkt(state, code);
221217
}

0 commit comments

Comments
 (0)