Skip to content

Commit 5d52290

Browse files
Add json/xml-interface to JBMC
1 parent 16ba254 commit 5d52290

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

jbmc/src/jbmc/jbmc_parse_options.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,8 @@ jbmc_parse_optionst::jbmc_parse_optionst(int argc, const char **argv)
8181
argv,
8282
std::string("JBMC ") + CBMC_VERSION)
8383
{
84+
json_interface(cmdline, ui_message_handler);
85+
xml_interface(cmdline, ui_message_handler);
8486
}
8587

8688
::jbmc_parse_optionst::jbmc_parse_optionst(
@@ -93,6 +95,8 @@ ::jbmc_parse_optionst::jbmc_parse_optionst(
9395
argv,
9496
std::string("JBMC ") + CBMC_VERSION)
9597
{
98+
json_interface(cmdline, ui_message_handler);
99+
xml_interface(cmdline, ui_message_handler);
96100
}
97101

98102
void jbmc_parse_optionst::set_default_options(optionst &options)
@@ -1090,8 +1094,8 @@ void jbmc_parse_optionst::help()
10901094
"\n"
10911095
"Other options:\n"
10921096
" --version show version and exit\n"
1093-
" --xml-ui use XML-formatted output\n"
1094-
" --json-ui use JSON-formatted output\n"
1097+
HELP_XML_INTERFACE
1098+
HELP_JSON_INTERFACE
10951099
HELP_VALIDATE
10961100
HELP_GOTO_TRACE
10971101
HELP_FLUSH

jbmc/src/jbmc/jbmc_parse_options.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ Author: Daniel Kroening, [email protected]
3434

3535
#include <java_bytecode/java_bytecode_language.h>
3636

37+
#include <json/json_interface.h>
38+
#include <xmllang/xml_interface.h>
39+
3740
class goto_functionst;
3841
class optionst;
3942

@@ -49,7 +52,8 @@ class optionst;
4952
"(object-bits):" \
5053
"(classpath):(cp):(main-class):" \
5154
"(no-assertions)(no-assumptions)" \
52-
"(xml-ui)(json-ui)" \
55+
OPT_XML_INTERFACE \
56+
OPT_JSON_INTERFACE \
5357
"(smt1)(smt2)(fpa)(cvc3)(cvc4)(boolector)(yices)(z3)(mathsat)" \
5458
"(no-sat-preprocessor)" \
5559
"(beautify)" \

jbmc/src/jbmc/module_dependencies.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ goto-programs
66
goto-symex
77
java_bytecode
88
jbmc
9+
json
910
langapi # should go away
1011
linking
1112
pointer-analysis
@@ -15,3 +16,4 @@ solvers/prop
1516
solvers/sat
1617
solvers/strings
1718
util
19+
xmllang

0 commit comments

Comments
 (0)