diff --git a/src/goto-programs/Makefile b/src/goto-programs/Makefile index 3dfa58eed2b..9fb7f85537f 100644 --- a/src/goto-programs/Makefile +++ b/src/goto-programs/Makefile @@ -19,7 +19,6 @@ SRC = adjust_float_expressions.cpp \ goto_inline_class.cpp \ goto_inline.cpp \ goto_program.cpp \ - goto_program_template.cpp \ goto_trace.cpp \ graphml_witness.cpp \ initialize_goto_model.cpp \ diff --git a/src/goto-programs/goto_program.cpp b/src/goto-programs/goto_program.cpp index 48a99d276bd..310e85c6d46 100644 --- a/src/goto-programs/goto_program.cpp +++ b/src/goto-programs/goto_program.cpp @@ -698,3 +698,66 @@ bool goto_programt::equals(const goto_programt &other) const return true; } + +/// Outputs a string representation of a `goto_program_instruction_typet` +std::ostream &operator<<(std::ostream &out, goto_program_instruction_typet t) +{ + switch(t) + { + case NO_INSTRUCTION_TYPE: + out << "NO_INSTRUCTION_TYPE"; + break; + case GOTO: + out << "GOTO"; + break; + case ASSUME: + out << "ASSUME"; + break; + case ASSERT: + out << "ASSERT"; + break; + case OTHER: + out << "OTHER"; + break; + case DECL: + out << "DECL"; + break; + case DEAD: + out << "DEAD"; + break; + case SKIP: + out << "SKIP"; + break; + case START_THREAD: + out << "START_THREAD"; + break; + case END_THREAD: + out << "END_THREAD"; + break; + case LOCATION: + out << "LOCATION"; + break; + case END_FUNCTION: + out << "END_FUNCTION"; + break; + case ATOMIC_BEGIN: + out << "ATOMIC_BEGIN"; + break; + case ATOMIC_END: + out << "ATOMIC_END"; + break; + case RETURN: + out << "RETURN"; + break; + case ASSIGN: + out << "ASSIGN"; + break; + case FUNCTION_CALL: + out << "FUNCTION_CALL"; + break; + default: + out << "?"; + } + + return out; +} diff --git a/src/goto-programs/goto_program_template.cpp b/src/goto-programs/goto_program_template.cpp deleted file mode 100644 index 53dfafaf32a..00000000000 --- a/src/goto-programs/goto_program_template.cpp +++ /dev/null @@ -1,42 +0,0 @@ -/*******************************************************************\ - -Module: Goto Program Template - -Author: Daniel Kroening, kroening@kroening.com - -\*******************************************************************/ - -/// \file -/// Goto Program Template - -#include "goto_program.h" - -#include - -std::ostream &operator<<(std::ostream &out, goto_program_instruction_typet t) -{ - switch(t) - { - case NO_INSTRUCTION_TYPE: out << "NO_INSTRUCTION_TYPE"; break; - case GOTO: out << "GOTO"; break; - case ASSUME: out << "ASSUME"; break; - case ASSERT: out << "ASSERT"; break; - case OTHER: out << "OTHER"; break; - case DECL: out << "DECL"; break; - case DEAD: out << "DEAD"; break; - case SKIP: out << "SKIP"; break; - case START_THREAD: out << "START_THREAD"; break; - case END_THREAD: out << "END_THREAD"; break; - case LOCATION: out << "LOCATION"; break; - case END_FUNCTION: out << "END_FUNCTION"; break; - case ATOMIC_BEGIN: out << "ATOMIC_BEGIN"; break; - case ATOMIC_END: out << "ATOMIC_END"; break; - case RETURN: out << "RETURN"; break; - case ASSIGN: out << "ASSIGN"; break; - case FUNCTION_CALL: out << "FUNCTION_CALL"; break; - default: - out << "?"; - } - - return out; -}