Skip to content

Commit 62ca8cf

Browse files
committed
Parse c object factory options
1 parent 7051848 commit 62ca8cf

File tree

3 files changed

+18
-0
lines changed

3 files changed

+18
-0
lines changed

src/ansi-c/ansi_c_language.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,18 @@ Author: Daniel Kroening, [email protected]
1818

1919
#include "ansi_c_parse_tree.h"
2020

21+
// clang-format off
22+
#define OPT_ANSI_C_LANGUAGE \
23+
"(max-nondet-tree-depth):" \
24+
"(min-null-tree-depth):"
25+
26+
#define HELP_ANSI_C_LANGUAGE \
27+
" --max-nondet-tree-depth N limit size of nondet (e.g. input) object tree;\n" /* NOLINT(*) */\
28+
" at level N pointers are set to null\n" \
29+
" --min-null-tree-depth N minimum level at which a pointer can first be\n" /* NOLINT(*) */\
30+
" NULL in a recursively nondet initialized struct\n" /* NOLINT(*) */
31+
// clang-format on
32+
2133
class ansi_c_languaget:public languaget
2234
{
2335
public:

src/cbmc/cbmc_parse_options.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ void cbmc_parse_optionst::get_command_line_options(optionst &options)
109109
}
110110

111111
cbmc_parse_optionst::set_default_options(options);
112+
parse_c_object_factory_options(cmdline, options);
112113

113114
if(cmdline.isset("cover") && cmdline.isset("unwinding-assertions"))
114115
{
@@ -933,6 +934,7 @@ void cbmc_parse_optionst::help()
933934
" --round-to-plus-inf rounding towards plus infinity\n"
934935
" --round-to-minus-inf rounding towards minus infinity\n"
935936
" --round-to-zero rounding towards zero\n"
937+
HELP_ANSI_C_LANGUAGE
936938
HELP_FUNCTIONS
937939
"\n"
938940
"Program representations:\n"

src/cbmc/cbmc_parse_options.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ Author: Daniel Kroening, [email protected]
1212
#ifndef CPROVER_CBMC_CBMC_PARSE_OPTIONS_H
1313
#define CPROVER_CBMC_CBMC_PARSE_OPTIONS_H
1414

15+
#include <ansi-c/ansi_c_language.h>
16+
#include <ansi-c/c_object_factory_parameters.h>
17+
1518
#include <util/parse_options.h>
1619
#include <util/timestamper.h>
1720
#include <util/ui_message.h>
@@ -75,6 +78,7 @@ class optionst;
7578
"(localize-faults)(localize-faults-method):" \
7679
OPT_GOTO_TRACE \
7780
OPT_VALIDATE \
81+
OPT_ANSI_C_LANGUAGE \
7882
"(claim):(show-claims)(floatbv)(all-claims)(all-properties)" // legacy, and will eventually disappear // NOLINT(whitespace/line_length)
7983
// clang-format on
8084

0 commit comments

Comments
 (0)