Skip to content

Commit 0c55a08

Browse files
authored
Merge pull request #3028 from peterschrammel/move-goto-program-template
Move contents of goto_program_template.cpp to goto_program.cpp
2 parents 246879e + e98d8b9 commit 0c55a08

File tree

3 files changed

+63
-43
lines changed

3 files changed

+63
-43
lines changed

src/goto-programs/Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ SRC = adjust_float_expressions.cpp \
1919
goto_inline_class.cpp \
2020
goto_inline.cpp \
2121
goto_program.cpp \
22-
goto_program_template.cpp \
2322
goto_trace.cpp \
2423
graphml_witness.cpp \
2524
initialize_goto_model.cpp \

src/goto-programs/goto_program.cpp

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -698,3 +698,66 @@ bool goto_programt::equals(const goto_programt &other) const
698698

699699
return true;
700700
}
701+
702+
/// Outputs a string representation of a `goto_program_instruction_typet`
703+
std::ostream &operator<<(std::ostream &out, goto_program_instruction_typet t)
704+
{
705+
switch(t)
706+
{
707+
case NO_INSTRUCTION_TYPE:
708+
out << "NO_INSTRUCTION_TYPE";
709+
break;
710+
case GOTO:
711+
out << "GOTO";
712+
break;
713+
case ASSUME:
714+
out << "ASSUME";
715+
break;
716+
case ASSERT:
717+
out << "ASSERT";
718+
break;
719+
case OTHER:
720+
out << "OTHER";
721+
break;
722+
case DECL:
723+
out << "DECL";
724+
break;
725+
case DEAD:
726+
out << "DEAD";
727+
break;
728+
case SKIP:
729+
out << "SKIP";
730+
break;
731+
case START_THREAD:
732+
out << "START_THREAD";
733+
break;
734+
case END_THREAD:
735+
out << "END_THREAD";
736+
break;
737+
case LOCATION:
738+
out << "LOCATION";
739+
break;
740+
case END_FUNCTION:
741+
out << "END_FUNCTION";
742+
break;
743+
case ATOMIC_BEGIN:
744+
out << "ATOMIC_BEGIN";
745+
break;
746+
case ATOMIC_END:
747+
out << "ATOMIC_END";
748+
break;
749+
case RETURN:
750+
out << "RETURN";
751+
break;
752+
case ASSIGN:
753+
out << "ASSIGN";
754+
break;
755+
case FUNCTION_CALL:
756+
out << "FUNCTION_CALL";
757+
break;
758+
default:
759+
out << "?";
760+
}
761+
762+
return out;
763+
}

src/goto-programs/goto_program_template.cpp

Lines changed: 0 additions & 42 deletions
This file was deleted.

0 commit comments

Comments
 (0)