CBMC
goto_program.h
Go to the documentation of this file.
1 /*******************************************************************\
2 
3 Module: Concrete Goto Program
4 
5 Author: Daniel Kroening, kroening@kroening.com
6 
7 \*******************************************************************/
8 
11 
12 #ifndef CPROVER_GOTO_PROGRAMS_GOTO_PROGRAM_H
13 #define CPROVER_GOTO_PROGRAMS_GOTO_PROGRAM_H
14 
15 #include "goto_instruction_code.h"
16 
17 #include <iosfwd>
18 #include <set>
19 #include <limits>
20 #include <string>
21 
22 #include <util/deprecate.h>
23 #include <util/invariant.h>
24 #include <util/namespace.h>
25 #include <util/source_location.h>
26 
27 class code_gotot;
28 enum class validation_modet;
29 
32 {
34  GOTO = 1, // branch, possibly guarded
35  ASSUME = 2, // non-failing guarded self loop
36  ASSERT = 3, // assertions
37  OTHER = 4, // anything else
38  SKIP = 5, // just advance the PC
39  START_THREAD = 6, // spawns an asynchronous thread
40  END_THREAD = 7, // end the current thread
41  LOCATION = 8, // semantically like SKIP
42  END_FUNCTION = 9, // exit point of a function
43  ATOMIC_BEGIN = 10, // marks a block without interleavings
44  ATOMIC_END = 11, // end of a block without interleavings
45  SET_RETURN_VALUE = 12, // set function return value (no control-flow change)
46  ASSIGN = 13, // assignment lhs:=rhs
47  DECL = 14, // declare a local variable
48  DEAD = 15, // marks the end-of-live of a local variable
49  FUNCTION_CALL = 16, // call a function
50  THROW = 17, // throw an exception
51  CATCH = 18, // push, pop or enter an exception handler
52  INCOMPLETE_GOTO = 19 // goto where target is yet to be determined
53 };
54 
55 std::ostream &operator<<(std::ostream &, goto_program_instruction_typet);
56 
73 {
74 public:
76  goto_programt(const goto_programt &)=delete;
77  goto_programt &operator=(const goto_programt &)=delete;
78 
79  // Move operations need to be explicitly enabled as they are deleted with the
80  // copy operations
81  // default for move operations isn't available on Windows yet, so define
82  // explicitly (see https://msdn.microsoft.com/en-us/library/hh567368.aspx
83  // under "Defaulted and Deleted Functions")
84 
86  instructions(std::move(other.instructions))
87  {
88  }
89 
91  {
92  instructions=std::move(other.instructions);
93  return *this;
94  }
95 
180  class instructiont final
181  {
182  protected:
185 
186  public:
188  DEPRECATED(SINCE(2021, 10, 12, "Use code() instead"))
190  {
191  return _code;
192  }
193 
196  {
197  return _code;
198  }
199 
202  {
203  return _code;
204  }
205 
207  const exprt &assign_lhs() const
208  {
210  return to_code_assign(_code).lhs();
211  }
212 
215  {
217  return to_code_assign(_code).lhs();
218  }
219 
221  const exprt &assign_rhs() const
222  {
224  return to_code_assign(_code).rhs();
225  }
226 
229  {
231  return to_code_assign(_code).rhs();
232  }
233 
235  const symbol_exprt &decl_symbol() const
236  {
238  auto &decl = expr_checked_cast<code_declt>(_code);
239  return decl.symbol();
240  }
241 
244  {
246  auto &decl = expr_checked_cast<code_declt>(_code);
247  return decl.symbol();
248  }
249 
251  const symbol_exprt &dead_symbol() const
252  {
254  return to_code_dead(_code).symbol();
255  }
256 
259  {
261  return to_code_dead(_code).symbol();
262  }
263 
265  const exprt &return_value() const
266  {
269  }
270 
273  {
276  }
277 
279  const exprt &call_function() const
280  {
283  }
284 
287  {
290  }
291 
293  const exprt &call_lhs() const
294  {
296  return to_code_function_call(_code).lhs();
297  }
298 
301  {
303  return to_code_function_call(_code).lhs();
304  }
305 
308  {
311  }
312 
315  {
318  }
319 
322  {
324  return _code;
325  }
326 
329  {
331  _code = std::move(c);
332  }
333 
336  protected:
338 
339  public:
341  {
342  return _source_location;
343  }
344 
346  {
347  return _source_location;
348  }
349 
352  {
353  return _type;
354  }
355 
356  protected:
357  // Use type() to access. To prevent malformed instructions, no non-const
358  // access method is provided.
360 
364 
365  public:
367  bool has_condition() const
368  {
369  return is_goto() || is_incomplete_goto() || is_assume() || is_assert();
370  }
371 
373  const exprt &condition() const
374  {
376  return guard;
377  }
378 
381  {
383  return guard;
384  }
385 
386  // The below will eventually become a single target only.
388  typedef std::list<instructiont>::iterator targett;
389  typedef std::list<instructiont>::const_iterator const_targett;
390  typedef std::list<targett> targetst;
391  typedef std::list<const_targett> const_targetst;
392 
395 
399  {
400  PRECONDITION(targets.size()==1);
401  return targets.front();
402  }
403 
407  {
408  targets.clear();
409  targets.push_back(t);
410  }
411 
412  bool has_target() const
413  {
414  return !targets.empty();
415  }
416 
418  typedef std::list<irep_idt> labelst;
420 
421  // will go away
422  std::set<targett> incoming_edges;
423 
425  bool is_target() const
426  { return target_number!=nil_target; }
427 
430  {
431  _type = __type;
432  targets.clear();
433  guard=true_exprt();
434  _code.make_nil();
435  }
436 
440  {
441  clear(SKIP);
442  }
443 
447  {
448  PRECONDITION(_type == GOTO || _type == ASSERT);
449  _type = ASSUME;
450  targets.clear();
451  _code.make_nil();
452  }
453 
454  void complete_goto(targett _target)
455  {
457  _code.make_nil();
458  targets.push_back(_target);
459  _type = GOTO;
460  }
461 
462  // clang-format off
463  bool is_goto () const { return _type == GOTO; }
464  bool is_set_return_value() const { return _type == SET_RETURN_VALUE; }
465  bool is_assign () const { return _type == ASSIGN; }
466  bool is_function_call () const { return _type == FUNCTION_CALL; }
467  bool is_throw () const { return _type == THROW; }
468  bool is_catch () const { return _type == CATCH; }
469  bool is_skip () const { return _type == SKIP; }
470  bool is_location () const { return _type == LOCATION; }
471  bool is_other () const { return _type == OTHER; }
472  bool is_decl () const { return _type == DECL; }
473  bool is_dead () const { return _type == DEAD; }
474  bool is_assume () const { return _type == ASSUME; }
475  bool is_assert () const { return _type == ASSERT; }
476  bool is_atomic_begin () const { return _type == ATOMIC_BEGIN; }
477  bool is_atomic_end () const { return _type == ATOMIC_END; }
478  bool is_start_thread () const { return _type == START_THREAD; }
479  bool is_end_thread () const { return _type == END_THREAD; }
480  bool is_end_function () const { return _type == END_FUNCTION; }
481  bool is_incomplete_goto () const { return _type == INCOMPLETE_GOTO; }
482  // clang-format on
483 
485  instructiont(NO_INSTRUCTION_TYPE) // NOLINT(runtime/explicit)
486  {
487  }
488 
490  : _code(static_cast<const goto_instruction_codet &>(get_nil_irep())),
492  _type(__type),
493  guard(true_exprt())
494  {
495  }
496 
499  goto_instruction_codet __code,
500  source_locationt __source_location,
502  exprt _guard,
503  targetst _targets)
504  : _code(std::move(__code)),
505  _source_location(std::move(__source_location)),
506  _type(__type),
507  guard(std::move(_guard)),
508  targets(std::move(_targets))
509  {
510  }
511 
513  void swap(instructiont &instruction)
514  {
515  using std::swap;
516  swap(instruction._code, _code);
517  swap(instruction._source_location, _source_location);
518  swap(instruction._type, _type);
519  swap(instruction.guard, guard);
520  swap(instruction.targets, targets);
521  swap(instruction.labels, labels);
522  }
523 
525  static const unsigned nil_target=
526  std::numeric_limits<unsigned>::max();
527 
531  unsigned location_number = 0;
532 
534  unsigned loop_number = 0;
535 
539 
541  bool is_backwards_goto() const
542  {
543  if(!is_goto())
544  return false;
545 
546  for(const auto &t : targets)
547  if(t->location_number<=location_number)
548  return true;
549 
550  return false;
551  }
552 
553  std::string to_string() const
554  {
555  std::ostringstream instruction_id_builder;
556  instruction_id_builder << _type;
557  return instruction_id_builder.str();
558  }
559 
564  bool equals(const instructiont &other) const;
565 
570  void validate(const namespacet &ns, const validation_modet vm) const;
571 
574  void transform(std::function<optionalt<exprt>(exprt)>);
575 
577  void apply(std::function<void(const exprt &)>) const;
578 
580  std::ostream &output(std::ostream &) const;
581  };
582 
583  // Never try to change this to vector-we mutate the list while iterating
584  typedef std::list<instructiont> instructionst;
585 
586  typedef instructionst::iterator targett;
587  typedef instructionst::const_iterator const_targett;
588  typedef std::list<targett> targetst;
589  typedef std::list<const_targett> const_targetst;
590 
593 
597  {
598  return instructions.erase(t, t);
599  }
600 
603  {
604  return t;
605  }
606 
607  template <typename Target>
608  std::list<Target> get_successors(Target target) const;
609 
610  void compute_incoming_edges();
611 
614  {
615  PRECONDITION(target!=instructions.end());
616  const auto next=std::next(target);
617  instructions.insert(next, instructiont())->swap(*target);
618  }
619 
638  void insert_before_swap(targett target, instructiont &instruction)
639  {
640  insert_before_swap(target);
641  target->swap(instruction);
642  }
643 
647  targett target,
648  goto_programt &p)
649  {
650  PRECONDITION(target!=instructions.end());
651  if(p.instructions.empty())
652  return;
653  insert_before_swap(target, p.instructions.front());
654  auto next=std::next(target);
655  p.instructions.erase(p.instructions.begin());
656  instructions.splice(next, p.instructions);
657  }
658 
663  {
664  return instructions.insert(target, instructiont());
665  }
666 
671  {
672  return instructions.insert(target, i);
673  }
674 
679  {
680  return instructions.insert(std::next(target), instructiont());
681  }
682 
687  {
688  return instructions.insert(std::next(target), i);
689  }
690 
693  {
694  instructions.splice(instructions.end(),
695  p.instructions);
696  }
697 
701  const_targett target,
702  goto_programt &p)
703  {
704  instructions.splice(target, p.instructions);
705  }
706 
709  targett add(instructiont &&instruction)
710  {
711  instructions.push_back(std::move(instruction));
712  return --instructions.end();
713  }
714 
718  {
719  return add(instructiont());
720  }
721 
725  {
726  return add(instructiont(type));
727  }
728 
730  DEPRECATED(SINCE(2022, 5, 29, "Use output(out) instead"))
731  std::ostream &output(
732  const namespacet &ns,
733  const irep_idt &identifier,
734  std::ostream &out) const
735  {
736  return output(out);
737  }
738 
740  std::ostream &output(std::ostream &out) const;
741 
743  DEPRECATED(SINCE(2022, 5, 29, "Use instruction.output(out) instead"))
744  std::ostream &output_instruction(
745  const namespacet &ns,
746  const irep_idt &identifier,
747  std::ostream &out,
748  const instructionst::value_type &instruction) const
749  {
750  return instruction.output(out);
751  }
752 
754  void compute_target_numbers();
755 
757  void compute_location_numbers(unsigned &nr)
758  {
759  for(auto &i : instructions)
760  {
761  INVARIANT(
762  nr != std::numeric_limits<unsigned>::max(),
763  "Too many location numbers assigned");
764  i.location_number=nr++;
765  }
766  }
767 
770  {
771  unsigned nr=0;
773  }
774 
776  void compute_loop_numbers();
777 
779  void update();
780 
782  static irep_idt
783  loop_id(const irep_idt &function_id, const instructiont &instruction)
784  {
785  return id2string(function_id) + "." +
786  std::to_string(instruction.loop_number);
787  }
788 
790  bool empty() const
791  {
792  return instructions.empty();
793  }
794 
797  {
798  }
799 
801  {
802  }
803 
805  void swap(goto_programt &program)
806  {
807  program.instructions.swap(instructions);
808  }
809 
811  void clear()
812  {
813  instructions.clear();
814  }
815 
819  {
820  PRECONDITION(!instructions.empty());
821  const auto end_function=std::prev(instructions.end());
822  DATA_INVARIANT(end_function->is_end_function(),
823  "goto program ends on END_FUNCTION");
824  return end_function;
825  }
826 
830  {
831  PRECONDITION(!instructions.empty());
832  const auto end_function=std::prev(instructions.end());
833  DATA_INVARIANT(end_function->is_end_function(),
834  "goto program ends on END_FUNCTION");
835  return end_function;
836  }
837 
839  void copy_from(const goto_programt &src);
840 
842  bool has_assertion() const;
843 
844  typedef std::set<irep_idt> decl_identifierst;
846  void get_decl_identifiers(decl_identifierst &decl_identifiers) const;
847 
851  bool equals(const goto_programt &other) const;
852 
857  void validate(const namespacet &ns, const validation_modet vm) const
858  {
859  for(const instructiont &ins : instructions)
860  {
861  ins.validate(ns, vm);
862  }
863  }
864 
866  exprt return_value,
868  {
869  return instructiont(
870  code_returnt(std::move(return_value)),
871  l,
873  nil_exprt(),
874  {});
875  }
876 
877  static instructiont make_set_return_value(
878  const code_returnt &code,
879  const source_locationt &l = source_locationt::nil()) = delete;
880 
881  static instructiont
883  {
884  return instructiont(
885  static_cast<const goto_instruction_codet &>(get_nil_irep()),
886  l,
887  SKIP,
888  nil_exprt(),
889  {});
890  }
891 
893  {
894  return instructiont(
895  static_cast<const goto_instruction_codet &>(get_nil_irep()),
896  l,
897  LOCATION,
898  nil_exprt(),
899  {});
900  }
901 
902  static instructiont
904  {
905  return instructiont(
906  static_cast<const goto_instruction_codet &>(get_nil_irep()),
907  l,
908  THROW,
909  nil_exprt(),
910  {});
911  }
912 
913  static instructiont
915  {
916  return instructiont(
917  static_cast<const goto_instruction_codet &>(get_nil_irep()),
918  l,
919  CATCH,
920  nil_exprt(),
921  {});
922  }
923 
925  const exprt &g,
927  {
928  return instructiont(
929  static_cast<const goto_instruction_codet &>(get_nil_irep()),
930  l,
931  ASSERT,
932  exprt(g),
933  {});
934  }
935 
937  const exprt &g,
939  {
940  return instructiont(
941  static_cast<const goto_instruction_codet &>(get_nil_irep()),
942  l,
943  ASSUME,
944  g,
945  {});
946  }
947 
949  const goto_instruction_codet &_code,
951  {
952  return instructiont(_code, l, OTHER, nil_exprt(), {});
953  }
954 
956  const symbol_exprt &symbol,
958  {
959  return instructiont(code_declt(symbol), l, DECL, nil_exprt(), {});
960  }
961 
963  const symbol_exprt &symbol,
965  {
966  return instructiont(code_deadt(symbol), l, DEAD, nil_exprt(), {});
967  }
968 
969  static instructiont
971  {
972  return instructiont(
973  static_cast<const goto_instruction_codet &>(get_nil_irep()),
974  l,
975  ATOMIC_BEGIN,
976  nil_exprt(),
977  {});
978  }
979 
980  static instructiont
982  {
983  return instructiont(
984  static_cast<const goto_instruction_codet &>(get_nil_irep()),
985  l,
986  ATOMIC_END,
987  nil_exprt(),
988  {});
989  }
990 
991  static instructiont
993  {
994  return instructiont(
995  static_cast<const goto_instruction_codet &>(get_nil_irep()),
996  l,
997  END_FUNCTION,
998  nil_exprt(),
999  {});
1000  }
1001 
1003  const exprt &_cond,
1005  {
1006  PRECONDITION(_cond.type().id() == ID_bool);
1007  return instructiont(
1008  static_cast<const goto_instruction_codet &>(get_nil_irep()),
1009  l,
1011  _cond,
1012  {});
1013  }
1014 
1015  static instructiont
1017  {
1018  return instructiont(
1019  static_cast<const goto_instruction_codet &>(get_nil_irep()),
1020  l,
1022  true_exprt(),
1023  {});
1024  }
1025 
1026  static instructiont make_incomplete_goto(
1027  const code_gotot &,
1029 
1031  targett _target,
1033  {
1034  return instructiont(
1035  static_cast<const goto_instruction_codet &>(get_nil_irep()),
1036  l,
1037  GOTO,
1038  true_exprt(),
1039  {_target});
1040  }
1041 
1043  targett _target,
1044  const exprt &g,
1046  {
1047  return instructiont(
1048  static_cast<const goto_instruction_codet &>(get_nil_irep()),
1049  l,
1050  GOTO,
1051  g,
1052  {_target});
1053  }
1054 
1057  const code_assignt &_code,
1059  {
1060  return instructiont(_code, l, ASSIGN, nil_exprt(), {});
1061  }
1062 
1065  exprt lhs,
1066  exprt rhs,
1068  {
1069  return instructiont(
1070  code_assignt(std::move(lhs), std::move(rhs)), l, ASSIGN, nil_exprt(), {});
1071  }
1072 
1074  const code_declt &_code,
1076  {
1077  return instructiont(_code, l, DECL, nil_exprt(), {});
1078  }
1079 
1082  const code_function_callt &_code,
1084  {
1085  return instructiont(_code, l, FUNCTION_CALL, nil_exprt(), {});
1086  }
1087 
1090  exprt lhs,
1091  exprt function,
1094  {
1095  return instructiont(
1096  code_function_callt(lhs, std::move(function), std::move(arguments)),
1097  l,
1098  FUNCTION_CALL,
1099  nil_exprt(),
1100  {});
1101  }
1102 };
1103 
1116 template <typename Target>
1118  Target target) const
1119 {
1120  if(target==instructions.end())
1121  return std::list<Target>();
1122 
1123  const auto next=std::next(target);
1124 
1125  const instructiont &i=*target;
1126 
1127  if(i.is_goto())
1128  {
1129  std::list<Target> successors(i.targets.begin(), i.targets.end());
1130 
1131  if(!i.condition().is_true() && next != instructions.end())
1132  successors.push_back(next);
1133 
1134  return successors;
1135  }
1136 
1137  if(i.is_start_thread())
1138  {
1139  std::list<Target> successors(i.targets.begin(), i.targets.end());
1140 
1141  if(next!=instructions.end())
1142  successors.push_back(next);
1143 
1144  return successors;
1145  }
1146 
1147  if(i.is_end_thread())
1148  {
1149  // no successors
1150  return std::list<Target>();
1151  }
1152 
1153  if(i.is_throw())
1154  {
1155  // the successors are non-obvious
1156  return std::list<Target>();
1157  }
1158 
1159  if(i.is_assume())
1160  {
1161  return !i.condition().is_false() && next != instructions.end()
1162  ? std::list<Target>{next}
1163  : std::list<Target>();
1164  }
1165 
1166  if(next!=instructions.end())
1167  {
1168  return std::list<Target>{next};
1169  }
1170 
1171  return std::list<Target>();
1172 }
1173 
1177 {
1178  const goto_programt::instructiont &_i1=*i1;
1179  const goto_programt::instructiont &_i2=*i2;
1180  return &_i1<&_i2;
1181 }
1182 
1183 // NOLINTNEXTLINE(readability/identifiers)
1185 {
1186  std::size_t operator()(
1187  const goto_programt::const_targett t) const
1188  {
1189  using hash_typet = decltype(&(*t));
1190  return std::hash<hash_typet>{}(&(*t));
1191  }
1192 };
1193 
1197 {
1198  template <class A, class B>
1199  bool operator()(const A &a, const B &b) const
1200  {
1201  return &(*a) == &(*b);
1202  }
1203 };
1204 
1205 template <typename GotoFunctionT, typename PredicateT, typename HandlerT>
1207  GotoFunctionT &&goto_function,
1208  PredicateT predicate,
1209  HandlerT handler)
1210 {
1211  auto &&instructions = goto_function.body.instructions;
1212  for(auto it = instructions.begin(); it != instructions.end(); ++it)
1213  {
1214  if(predicate(it))
1215  {
1216  handler(it);
1217  }
1218  }
1219 }
1220 
1221 template <typename GotoFunctionT, typename HandlerT>
1222 void for_each_instruction(GotoFunctionT &&goto_function, HandlerT handler)
1223 {
1224  using iterator_t = decltype(goto_function.body.instructions.begin());
1226  goto_function, [](const iterator_t &) { return true; }, handler);
1227 }
1228 
1229 #define forall_goto_program_instructions(it, program) \
1230  for(goto_programt::instructionst::const_iterator \
1231  it=(program).instructions.begin(); \
1232  it!=(program).instructions.end(); it++)
1233 
1234 #define Forall_goto_program_instructions(it, program) \
1235  for(goto_programt::instructionst::iterator \
1236  it=(program).instructions.begin(); \
1237  it!=(program).instructions.end(); it++)
1238 
1239 inline bool operator<(
1240  const goto_programt::const_targett &i1,
1241  const goto_programt::const_targett &i2)
1242 {
1243  return order_const_target(i1, i2);
1244 }
1245 
1246 inline bool operator<(
1247  const goto_programt::targett &i1,
1248  const goto_programt::targett &i2)
1249 {
1250  return &(*i1)<&(*i2);
1251 }
1252 
1253 std::list<exprt> objects_read(const goto_programt::instructiont &);
1254 std::list<exprt> objects_written(const goto_programt::instructiont &);
1255 
1256 std::list<exprt> expressions_read(const goto_programt::instructiont &);
1257 std::list<exprt> expressions_written(const goto_programt::instructiont &);
1258 
1259 std::string as_string(
1260  const namespacet &ns,
1261  const irep_idt &function,
1262  const goto_programt::instructiont &);
1263 
1264 #endif // CPROVER_GOTO_PROGRAMS_GOTO_PROGRAM_H
goto_programt::instructiont::is_skip
bool is_skip() const
Definition: goto_program.h:469
goto_programt::make_other
static instructiont make_other(const goto_instruction_codet &_code, const source_locationt &l=source_locationt::nil())
Definition: goto_program.h:948
goto_programt::instructiont::call_arguments
exprt::operandst & call_arguments()
Get the arguments of a FUNCTION_CALL.
Definition: goto_program.h:314
dstringt
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
Definition: dstring.h:36
goto_programt::instructiont::is_throw
bool is_throw() const
Definition: goto_program.h:467
goto_programt::instructiont::has_target
bool has_target() const
Definition: goto_program.h:412
goto_programt::~goto_programt
~goto_programt()
Definition: goto_program.h:800
operator<
bool operator<(const goto_programt::const_targett &i1, const goto_programt::const_targett &i2)
Definition: goto_program.h:1239
to_code_function_call
const code_function_callt & to_code_function_call(const goto_instruction_codet &code)
Definition: goto_instruction_code.h:385
goto_programt::instructiont::labelst
std::list< irep_idt > labelst
Goto target labels.
Definition: goto_program.h:418
goto_programt::instructiont::complete_goto
void complete_goto(targett _target)
Definition: goto_program.h:454
SET_RETURN_VALUE
@ SET_RETURN_VALUE
Definition: goto_program.h:45
goto_programt::instructiont::code
const goto_instruction_codet & code() const
Get the code represented by this instruction.
Definition: goto_program.h:195
goto_programt::instructiont::clear
void clear(goto_program_instruction_typet __type)
Clear the node.
Definition: goto_program.h:429
goto_programt::insert_after
targett insert_after(const_targett target, const instructiont &i)
Insertion after the instruction pointed-to by the given instruction iterator target.
Definition: goto_program.h:686
goto_programt::make_dead
static instructiont make_dead(const symbol_exprt &symbol, const source_locationt &l=source_locationt::nil())
Definition: goto_program.h:962
goto_instruction_code.h
goto_programt::instructiont::output
std::ostream & output(std::ostream &) const
Output this instruction to the given stream.
Definition: goto_program.cpp:47
goto_programt::instructiont::to_string
std::string to_string() const
Definition: goto_program.h:553
goto_programt::instructiont::get_other
const goto_instruction_codet & get_other() const
Get the statement for OTHER.
Definition: goto_program.h:321
goto_programt::instructiont::is_other
bool is_other() const
Definition: goto_program.h:471
goto_programt::instructiont::source_location_nonconst
source_locationt & source_location_nonconst()
Definition: goto_program.h:345
irept::make_nil
void make_nil()
Definition: irep.h:454
goto_programt::instructiont::swap
void swap(instructiont &instruction)
Swap two instructions.
Definition: goto_program.h:513
goto_programt::const_cast_target
const_targett const_cast_target(const_targett t) const
Dummy for templates with possible const contexts.
Definition: goto_program.h:602
code_assignt::rhs
exprt & rhs()
Definition: goto_instruction_code.h:48
goto_programt::make_set_return_value
static instructiont make_set_return_value(exprt return_value, const source_locationt &l=source_locationt::nil())
Definition: goto_program.h:865
goto_programt::compute_loop_numbers
void compute_loop_numbers()
Compute loop numbers.
Definition: goto_program.cpp:609
goto_programt::const_targetst
std::list< const_targett > const_targetst
Definition: goto_program.h:589
to_code_dead
const code_deadt & to_code_dead(const goto_instruction_codet &code)
Definition: goto_instruction_code.h:186
goto_programt::instructionst
std::list< instructiont > instructionst
Definition: goto_program.h:584
for_each_instruction_if
void for_each_instruction_if(GotoFunctionT &&goto_function, PredicateT predicate, HandlerT handler)
Definition: goto_program.h:1206
goto_programt::instructiont::is_dead
bool is_dead() const
Definition: goto_program.h:473
goto_programt::instructiont::assign_lhs_nonconst
exprt & assign_lhs_nonconst()
Get the lhs of the assignment for ASSIGN.
Definition: goto_program.h:214
source_locationt::nil
static const source_locationt & nil()
Definition: source_location.h:177
expressions_read
std::list< exprt > expressions_read(const goto_programt::instructiont &)
Definition: goto_program.cpp:360
goto_programt::instructiont::decl_symbol
symbol_exprt & decl_symbol()
Get the declared symbol for DECL.
Definition: goto_program.h:243
goto_programt::instructiont::is_catch
bool is_catch() const
Definition: goto_program.h:468
goto_programt::update
void update()
Update all indices.
Definition: goto_program.cpp:617
goto_programt::instructiont::_code
goto_instruction_codet _code
Do not read or modify directly – use code() and code_nonconst() instead.
Definition: goto_program.h:184
goto_programt::copy_from
void copy_from(const goto_programt &src)
Copy a full goto program, preserving targets.
Definition: goto_program.cpp:699
goto_programt::instructiont::apply
void apply(std::function< void(const exprt &)>) const
Apply given function to all expressions.
Definition: goto_program.cpp:1086
invariant.h
code_declt
A goto_instruction_codet representing the declaration of a local variable.
Definition: goto_instruction_code.h:204
goto_programt::instructiont::instructiont
instructiont(goto_instruction_codet __code, source_locationt __source_location, goto_program_instruction_typet __type, exprt _guard, targetst _targets)
Constructor that can set all members, passed by value.
Definition: goto_program.h:498
goto_programt::make_end_function
static instructiont make_end_function(const source_locationt &l=source_locationt::nil())
Definition: goto_program.h:992
goto_programt::add
targett add(instructiont &&instruction)
Adds a given instruction at the end.
Definition: goto_program.h:709
goto_programt::instructiont::transform
void transform(std::function< optionalt< exprt >(exprt)>)
Apply given transformer to all expressions; no return value means no change needed.
Definition: goto_program.cpp:982
goto_programt::empty
bool empty() const
Is the program empty?
Definition: goto_program.h:790
exprt
Base class for all expressions.
Definition: expr.h:55
pointee_address_equalt
Functor to check whether iterators from different collections point at the same object.
Definition: goto_program.h:1196
goto_programt::insert_before_swap
void insert_before_swap(targett target, goto_programt &p)
Insertion that preserves jumps to "target".
Definition: goto_program.h:646
goto_programt::get_decl_identifiers
void get_decl_identifiers(decl_identifierst &decl_identifiers) const
get the variables in decl statements
Definition: goto_program.cpp:317
objects_written
std::list< exprt > objects_written(const goto_programt::instructiont &)
Definition: goto_program.cpp:500
goto_programt::has_assertion
bool has_assertion() const
Does the goto program have an assertion?
Definition: goto_program.cpp:740
to_string
std::string to_string(const string_not_contains_constraintt &expr)
Used for debug printing.
Definition: string_constraint.cpp:58
goto_programt::instructiont::targets
targetst targets
The list of successor instructions.
Definition: goto_program.h:394
goto_programt::instructiont::is_incomplete_goto
bool is_incomplete_goto() const
Definition: goto_program.h:481
goto_programt::get_successors
std::list< Target > get_successors(Target target) const
Get control-flow successors of a given instruction.
Definition: goto_program.h:1117
exprt::is_true
bool is_true() const
Return whether the expression is a constant representing true.
Definition: expr.cpp:34
goto_programt::instructiont::condition_nonconst
exprt & condition_nonconst()
Get the condition of gotos, assume, assert.
Definition: goto_program.h:380
goto_programt::insert_before_swap
void insert_before_swap(targett target, instructiont &instruction)
Insertion that preserves jumps to "target".
Definition: goto_program.h:638
goto_programt::instructiont::is_end_thread
bool is_end_thread() const
Definition: goto_program.h:479
goto_programt::instructiont::code_nonconst
goto_instruction_codet & code_nonconst()
Set the code represented by this instruction.
Definition: goto_program.h:201
symbol_exprt
Expression to hold a symbol (variable)
Definition: std_expr.h:112
goto_programt::make_decl
static instructiont make_decl(const symbol_exprt &symbol, const source_locationt &l=source_locationt::nil())
Definition: goto_program.h:955
namespace.h
goto_programt::instructiont::decl_symbol
const symbol_exprt & decl_symbol() const
Get the declared symbol for DECL.
Definition: goto_program.h:235
goto_programt::instructiont::is_atomic_end
bool is_atomic_end() const
Definition: goto_program.h:477
code_function_callt::lhs
exprt & lhs()
Definition: goto_instruction_code.h:297
goto_programt::instructiont::call_arguments
const exprt::operandst & call_arguments() const
Get the arguments of a FUNCTION_CALL.
Definition: goto_program.h:307
goto_programt::instructiont::instructiont
instructiont()
Definition: goto_program.h:484
objects_read
std::list< exprt > objects_read(const goto_programt::instructiont &)
Definition: goto_program.cpp:473
goto_programt::get_end_function
const_targett get_end_function() const
Get an instruction iterator pointing to the END_FUNCTION instruction of the goto program.
Definition: goto_program.h:829
goto_programt::make_assignment
static instructiont make_assignment(const code_assignt &_code, const source_locationt &l=source_locationt::nil())
Create an assignment instruction.
Definition: goto_program.h:1056
goto_programt::make_goto
static instructiont make_goto(targett _target, const source_locationt &l=source_locationt::nil())
Definition: goto_program.h:1030
exprt::is_false
bool is_false() const
Return whether the expression is a constant representing false.
Definition: expr.cpp:43
goto_programt::instructiont::const_targett
std::list< instructiont >::const_iterator const_targett
Definition: goto_program.h:389
goto_programt::loop_id
static irep_idt loop_id(const irep_idt &function_id, const instructiont &instruction)
Human-readable loop name.
Definition: goto_program.h:783
goto_programt::instructiont::is_atomic_begin
bool is_atomic_begin() const
Definition: goto_program.h:476
coverage_criteriont::ASSUME
@ ASSUME
goto_programt::targetst
std::list< targett > targetst
Definition: goto_program.h:588
namespacet
A namespacet is essentially one or two symbol tables bound together, to allow for symbol lookups in t...
Definition: namespace.h:90
goto_programt::make_function_call
static instructiont make_function_call(const code_function_callt &_code, const source_locationt &l=source_locationt::nil())
Create a function call instruction.
Definition: goto_program.h:1081
goto_programt::add_instruction
targett add_instruction()
Adds an instruction at the end.
Definition: goto_program.h:717
exprt::type
typet & type()
Return the type of the expression.
Definition: expr.h:84
THROW
@ THROW
Definition: goto_program.h:50
code_function_callt
goto_instruction_codet representation of a function call statement.
Definition: goto_instruction_code.h:271
goto_programt::make_function_call
static instructiont make_function_call(exprt lhs, exprt function, code_function_callt::argumentst arguments, const source_locationt &l=source_locationt::nil())
Create a function call instruction.
Definition: goto_program.h:1089
coverage_criteriont::LOCATION
@ LOCATION
goto_programt::insert_before
targett insert_before(const_targett target)
Insertion before the instruction pointed-to by the given instruction iterator target.
Definition: goto_program.h:662
GOTO
@ GOTO
Definition: goto_program.h:34
goto_programt::equals
bool equals(const goto_programt &other) const
Syntactic equality: two goto_programt are equal if, and only if, they have the same number of instruc...
Definition: goto_program.cpp:1138
goto_programt::instructiont::validate
void validate(const namespacet &ns, const validation_modet vm) const
Check that the instruction is well-formed.
Definition: goto_program.cpp:782
goto_programt::instructiont::turn_into_skip
void turn_into_skip()
Transforms an existing instruction into a skip, retaining the source_location.
Definition: goto_program.h:439
goto_programt::make_assertion
static instructiont make_assertion(const exprt &g, const source_locationt &l=source_locationt::nil())
Definition: goto_program.h:924
goto_programt::compute_target_numbers
void compute_target_numbers()
Compute the target numbers.
Definition: goto_program.cpp:645
goto_programt::instructiont::type
goto_program_instruction_typet type() const
What kind of instruction?
Definition: goto_program.h:351
goto_programt::instructiont::get_code
const goto_instruction_codet & get_code() const
Get the code represented by this instruction.
Definition: goto_program.h:189
goto_programt::make_decl
static instructiont make_decl(const code_declt &_code, const source_locationt &l=source_locationt::nil())
Definition: goto_program.h:1073
DATA_INVARIANT
#define DATA_INVARIANT(CONDITION, REASON)
This condition should be used to document that assumptions that are made on goto_functions,...
Definition: invariant.h:510
goto_programt::destructive_insert
void destructive_insert(const_targett target, goto_programt &p)
Inserts the given program p before target.
Definition: goto_program.h:700
goto_programt::instructiont::dead_symbol
const symbol_exprt & dead_symbol() const
Get the symbol for DEAD.
Definition: goto_program.h:251
id2string
const std::string & id2string(const irep_idt &d)
Definition: irep.h:47
deprecate.h
goto_programt::goto_programt
goto_programt(goto_programt &&other)
Definition: goto_program.h:85
goto_programt::instructiont::source_location
const source_locationt & source_location() const
Definition: goto_program.h:340
goto_programt::instructiont::call_function
exprt & call_function()
Get the function that is called for FUNCTION_CALL.
Definition: goto_program.h:286
goto_programt::instructiont::targett
std::list< instructiont >::iterator targett
The target for gotos and for start_thread nodes.
Definition: goto_program.h:388
goto_programt::make_skip
static instructiont make_skip(const source_locationt &l=source_locationt::nil())
Definition: goto_program.h:882
goto_programt::instructiont::is_decl
bool is_decl() const
Definition: goto_program.h:472
goto_programt::instructiont::instructiont
instructiont(goto_program_instruction_typet __type)
Definition: goto_program.h:489
code_gotot
codet representation of a goto statement.
Definition: std_code.h:840
PRECONDITION
#define PRECONDITION(CONDITION)
Definition: invariant.h:463
goto_programt::compute_location_numbers
void compute_location_numbers(unsigned &nr)
Compute location numbers.
Definition: goto_program.h:757
goto_programt::instructiont::_type
goto_program_instruction_typet _type
Definition: goto_program.h:359
nil_exprt
The NIL expression.
Definition: std_expr.h:3025
goto_programt::instructiont::is_backwards_goto
bool is_backwards_goto() const
Returns true if the instruction is a backwards branch.
Definition: goto_program.h:541
goto_programt::instructiont::is_location
bool is_location() const
Definition: goto_program.h:470
pointee_address_equalt::operator()
bool operator()(const A &a, const B &b) const
Definition: goto_program.h:1199
code_assignt::lhs
exprt & lhs()
Definition: goto_instruction_code.h:43
goto_programt::instructiont::labels
labelst labels
Definition: goto_program.h:419
goto_programt::instructiont::_source_location
source_locationt _source_location
The location of the instruction in the source file.
Definition: goto_program.h:337
goto_programt::instructiont::equals
bool equals(const instructiont &other) const
Syntactic equality: two instructiont are equal if they have the same type, code, guard,...
Definition: goto_program.cpp:770
expressions_written
std::list< exprt > expressions_written(const goto_programt::instructiont &)
Definition: goto_program.cpp:409
goto_programt::output
std::ostream & output(const namespacet &ns, const irep_idt &identifier, std::ostream &out) const
Output goto program to given stream.
Definition: goto_program.h:731
source_location.h
goto_programt::instructiont::has_condition
bool has_condition() const
Does this instruction have a condition?
Definition: goto_program.h:367
NO_INSTRUCTION_TYPE
@ NO_INSTRUCTION_TYPE
Definition: goto_program.h:33
goto_programt::instructiont::is_set_return_value
bool is_set_return_value() const
Definition: goto_program.h:464
goto_programt::make_atomic_begin
static instructiont make_atomic_begin(const source_locationt &l=source_locationt::nil())
Definition: goto_program.h:970
OTHER
@ OTHER
Definition: goto_program.h:37
goto_programt::goto_programt
goto_programt()
Constructor.
Definition: goto_program.h:796
validation_modet
validation_modet
Definition: validation_mode.h:12
code_deadt::symbol
symbol_exprt & symbol()
Definition: goto_instruction_code.h:139
irept::id
const irep_idt & id() const
Definition: irep.h:396
goto_programt::instructiont::is_end_function
bool is_end_function() const
Definition: goto_program.h:480
goto_programt::validate
void validate(const namespacet &ns, const validation_modet vm) const
Check that the goto program is well-formed.
Definition: goto_program.h:857
exprt::operandst
std::vector< exprt > operandst
Definition: expr.h:58
code_function_callt::argumentst
exprt::operandst argumentst
Definition: goto_instruction_code.h:281
const_target_hash
Definition: goto_program.h:1184
goto_programt::add_instruction
targett add_instruction(goto_program_instruction_typet type)
Adds an instruction of given type at the end.
Definition: goto_program.h:724
goto_programt::instructiont::call_lhs
const exprt & call_lhs() const
Get the lhs of a FUNCTION_CALL (may be nil)
Definition: goto_program.h:293
goto_programt::instructiont::assign_rhs
const exprt & assign_rhs() const
Get the rhs of the assignment for ASSIGN.
Definition: goto_program.h:221
END_FUNCTION
@ END_FUNCTION
Definition: goto_program.h:42
SKIP
@ SKIP
Definition: goto_program.h:38
code_deadt
A goto_instruction_codet representing the removal of a local variable going out of scope.
Definition: goto_instruction_code.h:131
goto_programt::instructiont::set_target
void set_target(targett t)
Sets the first (and only) successor for the usual case of a single target.
Definition: goto_program.h:406
SINCE
#define SINCE(year, month, day, msg)
Definition: deprecate.h:26
goto_programt::instructiont::return_value
exprt & return_value()
Get the return value of a SET_RETURN_VALUE instruction.
Definition: goto_program.h:272
goto_programt::compute_incoming_edges
void compute_incoming_edges()
Compute for each instruction the set of instructions it is a successor of.
Definition: goto_program.cpp:750
code_function_callt::arguments
argumentst & arguments()
Definition: goto_instruction_code.h:317
optionalt
nonstd::optional< T > optionalt
Definition: optional.h:35
goto_programt::instructiont::turn_into_assume
void turn_into_assume()
Transforms either an assertion or a GOTO instruction into an assumption, with the same condition.
Definition: goto_program.h:446
goto_programt::instructiont::targetst
std::list< targett > targetst
Definition: goto_program.h:390
goto_programt::clear
void clear()
Clear the goto program.
Definition: goto_program.h:811
goto_programt::instructiont::return_value
const exprt & return_value() const
Get the return value of a SET_RETURN_VALUE instruction.
Definition: goto_program.h:265
goto_programt::destructive_append
void destructive_append(goto_programt &p)
Appends the given program p to *this. p is destroyed.
Definition: goto_program.h:692
goto_program_instruction_typet
goto_program_instruction_typet
The type of an instruction in a GOTO program.
Definition: goto_program.h:31
goto_programt::instructiont::is_goto
bool is_goto() const
Definition: goto_program.h:463
source_locationt
Definition: source_location.h:18
goto_programt::get_end_function
targett get_end_function()
Get an instruction iterator pointing to the END_FUNCTION instruction of the goto program.
Definition: goto_program.h:818
goto_programt::compute_location_numbers
void compute_location_numbers()
Compute location numbers.
Definition: goto_program.h:769
goto_programt::make_goto
static instructiont make_goto(targett _target, const exprt &g, const source_locationt &l=source_locationt::nil())
Definition: goto_program.h:1042
goto_programt::instructions
instructionst instructions
The list of instructions in the goto program.
Definition: goto_program.h:592
ASSIGN
@ ASSIGN
Definition: goto_program.h:46
goto_programt::instructiont::is_assert
bool is_assert() const
Definition: goto_program.h:475
goto_programt::instructiont::target_number
unsigned target_number
A number to identify branch targets.
Definition: goto_program.h:538
goto_programt::operator=
goto_programt & operator=(goto_programt &&other)
Definition: goto_program.h:90
CATCH
@ CATCH
Definition: goto_program.h:51
DEPRECATED
#define DEPRECATED(msg)
Definition: deprecate.h:23
code_returnt
goto_instruction_codet representation of a "return from a function" statement.
Definition: goto_instruction_code.h:494
DECL
@ DECL
Definition: goto_program.h:47
goto_programt::instructiont::incoming_edges
std::set< targett > incoming_edges
Definition: goto_program.h:422
goto_programt::instructiont::assign_lhs
const exprt & assign_lhs() const
Get the lhs of the assignment for ASSIGN.
Definition: goto_program.h:207
goto_programt::instructiont::location_number
unsigned location_number
A globally unique number to identify a program location.
Definition: goto_program.h:531
goto_programt::insert_before
targett insert_before(const_targett target, const instructiont &i)
Insertion before the instruction pointed-to by the given instruction iterator target.
Definition: goto_program.h:670
goto_programt::const_cast_target
targett const_cast_target(const_targett t)
Convert a const_targett to a targett - use with care and avoid whenever possible.
Definition: goto_program.h:596
as_string
std::string as_string(const namespacet &ns, const irep_idt &function, const goto_programt::instructiont &)
goto_programt::instructiont::dead_symbol
symbol_exprt & dead_symbol()
Get the symbol for DEAD.
Definition: goto_program.h:258
goto_programt::instructiont::call_lhs
exprt & call_lhs()
Get the lhs of a FUNCTION_CALL (may be nil)
Definition: goto_program.h:300
ASSUME
@ ASSUME
Definition: goto_program.h:35
goto_programt::instructiont::assign_rhs_nonconst
exprt & assign_rhs_nonconst()
Get the rhs of the assignment for ASSIGN.
Definition: goto_program.h:228
goto_programt::make_incomplete_goto
static instructiont make_incomplete_goto(const source_locationt &l=source_locationt::nil())
Definition: goto_program.h:1016
goto_programt::instructiont::guard
exprt guard
Guard for gotos, assume, assert Use condition() method to access.
Definition: goto_program.h:363
goto_programt::instructiont::is_assign
bool is_assign() const
Definition: goto_program.h:465
order_const_target
bool order_const_target(const goto_programt::const_targett i1, const goto_programt::const_targett i2)
Definition: goto_program.h:1174
goto_programt::instructiont::loop_number
unsigned loop_number
Number unique per function to identify loops.
Definition: goto_program.h:534
START_THREAD
@ START_THREAD
Definition: goto_program.h:39
FUNCTION_CALL
@ FUNCTION_CALL
Definition: goto_program.h:49
goto_programt
A generic container class for the GOTO intermediate representation of one function.
Definition: goto_program.h:72
operator<<
std::ostream & operator<<(std::ostream &, goto_program_instruction_typet)
Outputs a string representation of a goto_program_instruction_typet
Definition: goto_program.cpp:1170
goto_programt::insert_after
targett insert_after(const_targett target)
Insertion after the instruction pointed-to by the given instruction iterator target.
Definition: goto_program.h:678
ATOMIC_END
@ ATOMIC_END
Definition: goto_program.h:44
goto_programt::const_targett
instructionst::const_iterator const_targett
Definition: goto_program.h:587
get_nil_irep
const irept & get_nil_irep()
Definition: irep.cpp:20
goto_programt::instructiont::condition
const exprt & condition() const
Get the condition of gotos, assume, assert.
Definition: goto_program.h:373
goto_programt::make_assumption
static instructiont make_assumption(const exprt &g, const source_locationt &l=source_locationt::nil())
Definition: goto_program.h:936
DEAD
@ DEAD
Definition: goto_program.h:48
goto_programt::instructiont::const_targetst
std::list< const_targett > const_targetst
Definition: goto_program.h:391
goto_programt::operator=
goto_programt & operator=(const goto_programt &)=delete
goto_programt::output_instruction
std::ostream & output_instruction(const namespacet &ns, const irep_idt &identifier, std::ostream &out, const instructionst::value_type &instruction) const
Output a single instruction.
Definition: goto_program.h:744
ATOMIC_BEGIN
@ ATOMIC_BEGIN
Definition: goto_program.h:43
goto_programt::instructiont::is_assume
bool is_assume() const
Definition: goto_program.h:474
goto_programt::insert_before_swap
void insert_before_swap(targett target)
Insertion that preserves jumps to "target".
Definition: goto_program.h:613
goto_programt::instructiont::set_other
void set_other(goto_instruction_codet &c)
Set the statement for OTHER.
Definition: goto_program.h:328
goto_programt::make_throw
static instructiont make_throw(const source_locationt &l=source_locationt::nil())
Definition: goto_program.h:903
for_each_instruction
void for_each_instruction(GotoFunctionT &&goto_function, HandlerT handler)
Definition: goto_program.h:1222
code_returnt::return_value
const exprt & return_value() const
Definition: goto_instruction_code.h:502
code_assignt
A goto_instruction_codet representing an assignment in the program.
Definition: goto_instruction_code.h:22
goto_programt::instructiont::is_start_thread
bool is_start_thread() const
Definition: goto_program.h:478
true_exprt
The Boolean constant true.
Definition: std_expr.h:3007
LOCATION
@ LOCATION
Definition: goto_program.h:41
goto_programt::instructiont::is_function_call
bool is_function_call() const
Definition: goto_program.h:466
ASSERT
@ ASSERT
Definition: goto_program.h:36
goto_programt::decl_identifierst
std::set< irep_idt > decl_identifierst
Definition: goto_program.h:844
goto_programt::instructiont
This class represents an instruction in the GOTO intermediate representation.
Definition: goto_program.h:180
goto_programt::instructiont::is_target
bool is_target() const
Is this node a branch target?
Definition: goto_program.h:425
to_code_return
const code_returnt & to_code_return(const goto_instruction_codet &code)
Definition: goto_instruction_code.h:537
goto_programt::instructiont::nil_target
static const unsigned nil_target
Uniquely identify an invalid target or location.
Definition: goto_program.h:525
goto_programt::make_location
static instructiont make_location(const source_locationt &l)
Definition: goto_program.h:892
goto_programt::instructiont::call_function
const exprt & call_function() const
Get the function that is called for FUNCTION_CALL.
Definition: goto_program.h:279
goto_programt::instructiont::get_target
targett get_target() const
Returns the first (and only) successor for the usual case of a single target.
Definition: goto_program.h:398
END_THREAD
@ END_THREAD
Definition: goto_program.h:40
goto_programt::swap
void swap(goto_programt &program)
Swap the goto program.
Definition: goto_program.h:805
INCOMPLETE_GOTO
@ INCOMPLETE_GOTO
Definition: goto_program.h:52
goto_programt::make_assignment
static instructiont make_assignment(exprt lhs, exprt rhs, const source_locationt &l=source_locationt::nil())
Create an assignment instruction.
Definition: goto_program.h:1064
goto_programt::targett
instructionst::iterator targett
Definition: goto_program.h:586
code_function_callt::function
exprt & function()
Definition: goto_instruction_code.h:307
goto_programt::make_incomplete_goto
static instructiont make_incomplete_goto(const exprt &_cond, const source_locationt &l=source_locationt::nil())
Definition: goto_program.h:1002
to_code_assign
const code_assignt & to_code_assign(const goto_instruction_codet &code)
Definition: goto_instruction_code.h:115
validation_modet::INVARIANT
@ INVARIANT
const_target_hash::operator()
std::size_t operator()(const goto_programt::const_targett t) const
Definition: goto_program.h:1186
goto_programt::make_catch
static instructiont make_catch(const source_locationt &l=source_locationt::nil())
Definition: goto_program.h:914
goto_programt::make_atomic_end
static instructiont make_atomic_end(const source_locationt &l=source_locationt::nil())
Definition: goto_program.h:981
codet
Data structure for representing an arbitrary statement in a program.
Definition: std_code_base.h:28