Skip to content

Commit

Permalink
use goto_modelt
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Kroening committed Sep 8, 2017
1 parent 9469552 commit fc4d44a
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions unit/analyses/call_graph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ SCENARIO("call_graph",
// void C() { }
// void D() { }

symbol_tablet symbol_table;
goto_modelt goto_model;
code_typet void_function_type;

{
Expand All @@ -68,7 +68,8 @@ SCENARIO("call_graph",
calls.move_to_operands(call1);
calls.move_to_operands(call2);

symbol_table.add(create_void_function_symbol("A", calls));
goto_model.symbol_table.add(
create_void_function_symbol("A", calls));
}

{
Expand All @@ -80,17 +81,19 @@ SCENARIO("call_graph",
calls.move_to_operands(call1);
calls.move_to_operands(call2);

symbol_table.add(create_void_function_symbol("B", calls));
goto_model.symbol_table.add(
create_void_function_symbol("B", calls));
}

symbol_table.add(create_void_function_symbol("C", code_skipt()));
symbol_table.add(create_void_function_symbol("D", code_skipt()));
goto_model.symbol_table.add(
create_void_function_symbol("C", code_skipt()));
goto_model.symbol_table.add(
create_void_function_symbol("D", code_skipt()));

goto_functionst goto_functions;
stream_message_handlert msg(std::cout);
goto_convert(symbol_table, goto_functions, msg);
goto_convert(goto_model, msg);

call_grapht call_graph_from_goto_functions(goto_functions);
call_grapht call_graph_from_goto_functions(goto_model);

WHEN("A call graph is constructed from the GOTO functions")
{
Expand Down

0 comments on commit fc4d44a

Please sign in to comment.