Skip to content

Commit 953e2df

Browse files
committed
Enable show-properties with symex-driven lazy loading
This can be accommodated using the same post-symex reporting phase as show-goto-functions et al. The one cbmc-java test that uses --show-properties is consequently re-enabled.
1 parent 6c79494 commit 953e2df

File tree

2 files changed

+28
-14
lines changed

2 files changed

+28
-14
lines changed
+17-13
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
CORE symex-driven-lazy-loading-expected-failure
1+
CORE
22
covered1.class
3-
--cover location --json-ui --show-properties
3+
--cover location --json-ui --show-properties --function 'covered1.<init>'
44
^EXIT=0$
55
^SIGNAL=0$
66
.*\"coveredLines\": \"22\",$
7-
.*\"coveredLines\": \"4\",$
8-
.*\"coveredLines\": \"6\",$
9-
.*\"coveredLines\": \"7\",$
10-
.*\"coveredLines\": \"23\",$
11-
.*\"coveredLines\": \"24\",$
12-
.*\"coveredLines\": \"25\",$
13-
.*\"coveredLines\": \"31\",$
14-
.*\"coveredLines\": \"32\",$
15-
.*\"coveredLines\": \"33\",$
16-
.*\"coveredLines\": \"36\",$
7+
(.*\"coveredLines\": \"4\")|(\"coveredLines\": \"4,6,7,23-25,31-33,36\"),$
8+
.*\"coveredLines\": \"6\"|(\"coveredLines\": \"4,6,7,23-25,31-33,36\"),$
9+
.*\"coveredLines\": \"7\"|(\"coveredLines\": \"4,6,7,23-25,31-33,36\"),$
10+
.*\"coveredLines\": \"23\"|(\"coveredLines\": \"4,6,7,23-25,31-33,36\"),$
11+
.*\"coveredLines\": \"24\"|(\"coveredLines\": \"4,6,7,23-25,31-33,36\"),$
12+
.*\"coveredLines\": \"25\"|(\"coveredLines\": \"4,6,7,23-25,31-33,36\"),$
13+
.*\"coveredLines\": \"31\"|(\"coveredLines\": \"4,6,7,23-25,31-33,36\"),$
14+
.*\"coveredLines\": \"32\"|(\"coveredLines\": \"4,6,7,23-25,31-33,36\"),$
15+
.*\"coveredLines\": \"33\"|(\"coveredLines\": \"4,6,7,23-25,31-33,36\"),$
16+
.*\"coveredLines\": \"36\"|(\"coveredLines\": \"4,6,7,23-25,31-33,36\"),$
1717
.*\"coveredLines\": \"26\",$
1818
.*\"coveredLines\": \"28\",$
1919
.*\"coveredLines\": \"28\",$
@@ -26,4 +26,8 @@ covered1.class
2626
--
2727
^warning: ignoring
2828
--
29-
This fails with symex-driven lazy loading because it does not currently support --show-properties.
29+
The alternation between the grouped and ungrouped reporting formats for coveredLines accommodates the
30+
difference between symex-driven-lazy-loading (which currently causes jbmc to use the grouped format)
31+
and normal loading (which uses the ungrouped format).
32+
The cause of the difference appears to be symex-driven loading being more pessimistic about possible
33+
exceptions coming from callees, which in turn changes the shape of the CFG.

src/jbmc/jbmc_parse_options.cpp

+11-1
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,6 @@ void jbmc_parse_optionst::get_command_line_options(optionst &options)
384384
for(const char *opt :
385385
{ "nondet-static",
386386
"full-slice",
387-
"show-properties",
388387
"lazy-methods" })
389388
{
390389
if(cmdline.isset(opt))
@@ -851,6 +850,17 @@ bool jbmc_parse_optionst::show_loaded_functions(
851850
return true;
852851
}
853852

853+
if(cmdline.isset("show-properties"))
854+
{
855+
namespacet ns(goto_model.get_symbol_table());
856+
show_properties(
857+
ns,
858+
get_message_handler(),
859+
ui_message_handler.get_ui(),
860+
goto_model.get_goto_functions());
861+
return true;
862+
}
863+
854864
return false;
855865
}
856866

0 commit comments

Comments
 (0)