Skip to content

Commit 5b8d9a3

Browse files
Output options in JBMC
1 parent 5741a43 commit 5b8d9a3

File tree

4 files changed

+52
-0
lines changed

4 files changed

+52
-0
lines changed
340 Bytes
Binary file not shown.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
public class Main {
2+
public static void main(String[] args) {
3+
for(String arg : args) {
4+
}
5+
}
6+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
CORE symex-driven-lazy-loading-expected-failure
2+
Main.class
3+
--verbosity 10 --unwind 2 --disable-uncaught-exception-check --throw-assertion-error
4+
^VERIFICATION SUCCESSFUL$
5+
^EXIT=0$
6+
^SIGNAL=0$
7+
assertions: "1"
8+
assumptions: "1"
9+
java-threading: "0"
10+
lazy-methods: "1"
11+
propagation: "1"
12+
refine-strings: "1"
13+
sat-preprocessor: "1"
14+
simplify: "1"
15+
simplify-if: "1"
16+
symex-driven-lazy-loading: "0"
17+
throw-assertion-error: "1"
18+
throw-runtime-exceptions: "0"
19+
uncaught-exception-check: "0"
20+
unwind: "2"
21+
--
22+
--
23+
Symex-driven lazy loading would expect symex-driven-lazy-loading: "1".

jbmc/src/jbmc/jbmc_parse_options.cpp

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ Author: Daniel Kroening, [email protected]
2020
#include <util/exit_codes.h>
2121
#include <util/invariant.h>
2222
#include <util/unicode.h>
23+
#include <util/xml.h>
2324
#include <util/version.h>
2425

2526
#include <langapi/language.h>
@@ -422,6 +423,28 @@ int jbmc_parse_optionst::doit()
422423
<< "-bit " << config.this_architecture() << " "
423424
<< config.this_operating_system() << eom;
424425

426+
// output the options
427+
switch(ui_message_handler.get_ui())
428+
{
429+
case ui_message_handlert::uit::PLAIN:
430+
conditional_output(debug(), [&options](messaget::mstreamt &mstream) {
431+
mstream << "\nOptions: \n";
432+
options.output(mstream);
433+
mstream << messaget::eom;
434+
});
435+
break;
436+
case ui_message_handlert::uit::JSON_UI:
437+
{
438+
json_objectt json_options;
439+
json_options["options"] = options.to_json();
440+
debug() << json_options;
441+
break;
442+
}
443+
case ui_message_handlert::uit::XML_UI:
444+
debug() << options.to_xml();
445+
break;
446+
}
447+
425448
register_language(new_ansi_c_language);
426449
register_language(new_java_bytecode_language);
427450

0 commit comments

Comments
 (0)