Skip to content

Commit 0ba0833

Browse files
Add report_error and report_inconclusive to report_util
1 parent 0ba2e84 commit 0ba0833

File tree

2 files changed

+58
-0
lines changed

2 files changed

+58
-0
lines changed

src/goto-checker/report_util.cpp

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,62 @@ void report_failure(ui_message_handlert &ui_message_handler)
7373
}
7474
}
7575

76+
void report_inconclusive(ui_message_handlert &ui_message_handler)
77+
{
78+
messaget msg(ui_message_handler);
79+
msg.result() << "VERIFICATION INCONCLUSIVE" << messaget::eom;
80+
81+
switch(ui_message_handler.get_ui())
82+
{
83+
case ui_message_handlert::uit::PLAIN:
84+
break;
85+
86+
case ui_message_handlert::uit::XML_UI:
87+
{
88+
xmlt xml("cprover-status");
89+
xml.data = "INCONCLUSIVE";
90+
msg.result() << xml;
91+
}
92+
break;
93+
94+
case ui_message_handlert::uit::JSON_UI:
95+
{
96+
json_objectt json_result;
97+
json_result["cProverStatus"] = json_stringt("inconclusive");
98+
msg.result() << json_result;
99+
}
100+
break;
101+
}
102+
}
103+
104+
void report_error(ui_message_handlert &ui_message_handler)
105+
{
106+
messaget msg(ui_message_handler);
107+
msg.result() << "VERIFICATION ERROR" << messaget::eom;
108+
109+
switch(ui_message_handler.get_ui())
110+
{
111+
case ui_message_handlert::uit::PLAIN:
112+
break;
113+
114+
case ui_message_handlert::uit::XML_UI:
115+
{
116+
xmlt xml("cprover-status");
117+
xml.data = "ERROR";
118+
msg.result() << xml;
119+
}
120+
break;
121+
122+
case ui_message_handlert::uit::JSON_UI:
123+
{
124+
json_objectt json_result;
125+
json_result["cProverStatus"] = json_stringt("error");
126+
msg.result() << json_result;
127+
}
128+
break;
129+
}
130+
}
131+
76132
void output_properties(
77133
const propertiest &properties,
78134
ui_message_handlert &ui_message_handler)

src/goto-checker/report_util.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ class ui_message_handlert;
1818

1919
void report_success(ui_message_handlert &);
2020
void report_failure(ui_message_handlert &);
21+
void report_inconclusive(ui_message_handlert &);
22+
void report_error(ui_message_handlert &);
2123

2224
void output_properties(
2325
const propertiest &properties,

0 commit comments

Comments
 (0)