Skip to content

Commit 85193a0

Browse files
authored
Merge pull request #1694 from NathanJPhillips/feature/add-raw-lhs-to-trace
Add raw irept dump of lhs to trace
2 parents d9122dc + a9c4e4f commit 85193a0

File tree

19 files changed

+141
-6
lines changed

19 files changed

+141
-6
lines changed
500 Bytes
Binary file not shown.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
public class Test {
2+
public static void main(int x) {
3+
assert(x == 0);
4+
}
5+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
CORE
2+
Test.class
3+
--trace --json-ui --trace-json-extended
4+
^EXIT=10$
5+
^SIGNAL=0$
6+
rawLhs
7+
--
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
CORE
2+
Test.class
3+
--trace --json-ui
4+
^EXIT=10$
5+
^SIGNAL=0$
6+
--
7+
rawLhs
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
CORE
2+
test.c
3+
--trace --json-ui --trace-json-extended
4+
^EXIT=10$
5+
^SIGNAL=0$
6+
rawLhs
7+
--
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
CORE
2+
test.c
3+
--trace --json-ui
4+
^EXIT=10$
5+
^SIGNAL=0$
6+
--
7+
rawLhs
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#include <assert.h>
2+
3+
int main(int argc, char *argv[])
4+
{
5+
assert(argc == 0);
6+
}

src/cbmc/all_properties.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ void bmc_all_propertiest::report(const cover_goalst &cover_goals)
219219
if(g.second.status==goalt::statust::FAILURE)
220220
{
221221
jsont &json_trace=result["trace"];
222-
convert(bmc.ns, g.second.goto_trace, json_trace);
222+
convert(bmc.ns, g.second.goto_trace, json_trace, bmc.trace_options());
223223
}
224224
}
225225

src/cbmc/bmc.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ void bmct::error_trace()
9191
json_stringt(id2string(step.pc->source_location.get_comment()));
9292
json_result["status"]=json_stringt("failed");
9393
jsont &json_trace=json_result["trace"];
94-
convert(ns, goto_trace, json_trace);
94+
convert(ns, goto_trace, json_trace, trace_options());
9595
status() << json_result;
9696
}
9797
break;

src/cbmc/bmc.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ Author: Daniel Kroening, [email protected]
2525
#include <solvers/smt1/smt1_dec.h>
2626
#include <solvers/smt2/smt2_dec.h>
2727

28+
#include <goto-programs/goto_trace.h>
29+
2830
#include <goto-symex/symex_target_equation.h>
2931
#include <goto-programs/safety_checker.h>
3032
#include <goto-symex/memory_model.h>
@@ -98,6 +100,11 @@ class bmct:public safety_checkert
98100
virtual void show_vcc_plain(std::ostream &out);
99101
virtual void show_vcc_json(std::ostream &out);
100102

103+
trace_optionst trace_options()
104+
{
105+
return trace_optionst(options);
106+
}
107+
101108
virtual resultt all_properties(
102109
const goto_functionst &goto_functions,
103110
prop_convt &solver);

0 commit comments

Comments
 (0)