Skip to content

Commit b2c938c

Browse files
Document show_vcc function
No functional change.
1 parent 4ec9350 commit b2c938c

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

src/goto-symex/show_vcc.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ Author: Daniel Kroening, [email protected]
2323
#include <util/json_irep.h>
2424
#include <util/ui_message.h>
2525

26+
/// Output equations from \p equation in plain text format to the given output
27+
/// stream \p out.
28+
/// Each equation is prefixed by a negative index, formatted `{-N}`
2629
static void
2730
show_vcc_plain(messaget::mstreamt &out, const symex_target_equationt &equation)
2831
{
@@ -98,6 +101,14 @@ show_vcc_plain(messaget::mstreamt &out, const symex_target_equationt &equation)
98101
}
99102
}
100103

104+
/// Output equations from \p equation in the JSON format to the given output
105+
/// stream \p out.
106+
/// The format is an array `vccs`, containing fields:
107+
/// - constraints, which is an array containing the constraints which apply
108+
/// to that equation
109+
/// - expression, a string containing the formatted expression
110+
/// - sourceLocation (optional), the corresponding location in the program
111+
/// - comment (optional)
101112
static void
102113
show_vcc_json(std::ostream &out, const symex_target_equationt &equation)
103114
{

src/goto-symex/show_vcc.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@ Author: Daniel Kroening, [email protected]
1717
class optionst;
1818
class symex_target_equationt;
1919

20+
/// Output equations from \p equation to a file or to the standard output.
21+
/// The name of the output file is given by the `outfile` option from
22+
/// \p options, the standard input is used if it is not provided.
23+
/// The format is either JSON or plain text depending on \p ui_message_handler;
24+
/// XML is not supported.
25+
/// See \link show_vcc_json \endlink and \link show_vcc_plain \endlink
2026
void show_vcc(
2127
const optionst &options,
2228
ui_message_handlert &ui_message_handler,

0 commit comments

Comments
 (0)