Skip to content

Commit 94b792c

Browse files
committed
Implement necessary changes for goto-analyzer-develop branch.
1 parent 846bb68 commit 94b792c

13 files changed

+114
-185
lines changed

src/cbmc/all_properties.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -207,8 +207,9 @@ void bmc_all_propertiest::report(const cover_goalst &cover_goals)
207207

208208
case ui_message_handlert::uit::JSON_UI:
209209
{
210-
json_stream_objectt &json_result = result().json_stream().push_back_stream_object();
211-
json_stream_arrayt &result_array =
210+
json_stream_objectt &json_result=
211+
result().json_stream().push_back_stream_object();
212+
json_stream_arrayt &result_array=
212213
json_result.push_back_stream_array("result");
213214

214215
for(const auto &g : goal_map)
@@ -221,7 +222,7 @@ void bmc_all_propertiest::report(const cover_goalst &cover_goals)
221222
if(g.second.status==goalt::statust::FAILURE)
222223
{
223224
json_stream_arrayt &json_trace=result.push_back_stream_array("trace");
224-
convert<json_stream_arrayt>(bmc.ns, g.second.goto_trace, json_trace, bmc.trace_options());
225+
convert<json_stream_arrayt>(bmc.ns, g.second.goto_trace, json_trace);
225226
}
226227
}
227228
}

src/cbmc/bmc.cpp

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -72,15 +72,17 @@ void bmct::error_trace()
7272

7373
case ui_message_handlert::uit::JSON_UI:
7474
{
75-
json_stream_objectt &json_result = status().json_stream().push_back_stream_object();
75+
json_stream_objectt &json_result=
76+
status().json_stream().push_back_stream_object();
7677
const goto_trace_stept &step=goto_trace.steps.back();
77-
result["property"]=
78+
json_result["property"]=
7879
json_stringt(id2string(step.pc->source_location.get_property_id()));
79-
result["description"]=
80+
json_result["description"]=
8081
json_stringt(id2string(step.pc->source_location.get_comment()));
81-
result["status"]=json_stringt("failed");
82-
json_stream_arrayt &json_trace=json_result.push_back_stream_array("trace");
83-
convert<json_stream_arrayt>(ns, goto_trace, json_trace, trace_options());
82+
json_result["status"]=json_stringt("failed");
83+
json_stream_arrayt &json_trace=
84+
json_result.push_back_stream_array("trace");
85+
convert<json_stream_arrayt>(ns, goto_trace, json_trace);
8486
}
8587
break;
8688
}

src/goto-programs/interpreter.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ Author: Daniel Kroening, [email protected]
1919

2020
#include "interpreter.h"
2121
#include "interpreter_class.h"
22-
#include "json_goto_trace.h"
2322

2423
void interpretert::operator()()
2524
{
@@ -80,8 +79,6 @@ void interpretert::command()
8079

8180
if(ch=='q')
8281
done=true;
83-
json_arrayt json_steps;
84-
convert<json_arrayt>(ns, steps, json_steps);
8582
}
8683

8784
void interpretert::step()

src/goto-programs/json_goto_trace.cpp

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,12 @@ Author: Daniel Kroening
1111
/// \file
1212
/// Traces of GOTO Programs
1313

14+
#include <cassert>
15+
16+
#include <util/json_expr.h>
17+
18+
#include <langapi/language_util.h>
19+
1420
#include "json_goto_trace.h"
15-
/// Produce a json representation of a trace.
16-
/// \param ns: a namespace
17-
jsont &dest,
18-
19-
DATA_INVARIANT(
20-
step.full_lhs.is_not_nil(),
21-
void operator()(exprt &expr) override
22-
{
23-
if(expr.id() == ID_symbol)
24-
{
25-
full_lhs_string=from_expr(ns, identifier, simplified);
26-
full_lhs_value = json(step.full_lhs_value, ns);
27-
json_values.push_back(json(arg, ns, mode));
28-
json_values.push_back(json(arg, ns, mode));
21+
22+

0 commit comments

Comments
 (0)