Skip to content

Commit a97ba0b

Browse files
committed
Rename core?goto to symex?ready?goto
This does a rename from the term "core goto" to "symex ready goto" to more accurately denote what this goto form is. Renaming also updates documentation.
1 parent 9986ed4 commit a97ba0b

File tree

11 files changed

+54
-53
lines changed

11 files changed

+54
-53
lines changed

doc/ADR/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ where taken at the time they were, so that future maintainers
66
can more easily identify constraints that shaped the architecture
77
of the system and the surrounding infrastructure.
88

9-
## Core goto form
10-
\subpage core-goto
9+
## Symex ready goto form
10+
\subpage symex-ready-goto
1111

1212
## Release & Packaging
1313

doc/ADR/core_goto.md renamed to doc/ADR/symex_ready_goto.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
\page core-goto Core goto definition
1+
\page symex-ready-goto Symex ready goto definition
22

33
During the analysis of a program CBMC transforms the input program in an intermediate language
44
called extended goto. Then the tool performs a series of simplifications on the obtained goto
55
program until the program is given to the solver.
66

7-
We say that a program is in the **core goto form** when all the extended goto features have
7+
We say that a program is in the **symex ready goto form** when all the extended goto features have
88
been simplified.
99

10-
More specifically, a program that is in **core goto form** is one that can be passed to **symex** by
10+
More specifically, a program that is in **symex ready goto form** is one that can be passed to **symex** by
1111
using any solver deriving from `goto_verifiert` without requiring any lowering step.
1212

1313
At the time of writing, verifiers extending `goto_verifiert` are:

doc/architectural/goto-program-transformations.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
\section required-transforms Core Transformation Passes
66

77
This section lists the transformation passes that must have been applied for the
8-
goto model to be in core goto format.
8+
goto model to be in symex ready goto format.
99

1010
Note that the passes are listed below in the order they are currently called in
1111
CBMC. While all dependencies on the ordering are not fully documented, the
@@ -184,11 +184,11 @@ nondet-transform if it is being used.</em>
184184

185185
This transformation removes skip instructions. Note that this transformation is
186186
called in many places and may be called as part of other transformations. This
187-
instance here is part of the mandatory transformation to reach core goto format.
188-
If there is a use case where it is desirable to preserve a "no operation"
189-
instruction, a `LOCATION` type instruction may be used in place of a `SKIP`
190-
instruction. The `LOCATION` instruction has the same semantics as the `SKIP`
191-
instruction, but is not removed by the remove skip instructions pass.
187+
instance here is part of the mandatory transformation to reach symex ready goto
188+
format. If there is a use case where it is desirable to preserve a "no
189+
operation" instruction, a `LOCATION` type instruction may be used in place of a
190+
`SKIP` instruction. The `LOCATION` instruction has the same semantics as the
191+
`SKIP` instruction, but is not removed by the remove skip instructions pass.
192192

193193
The implementation of this pass is called via \ref remove_skip(goto_modelt &)
194194

@@ -215,7 +215,7 @@ coverage-transform if it is being used.</em>
215215

216216
The sections lists the optional transformation passes that are optional and will
217217
modify a goto model. Note that these are documented here for consistency, but
218-
not required for core goto format.
218+
not required for symex ready goto format.
219219

220220
Note for each optional pass there is a listed predeceesor pass. This is the pass
221221
currently called before the listed pass in CBMC. While the ordering may not be

doc/man/cbmc.1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -525,8 +525,8 @@ give a stack trace only
525525
\fB\-\-flush\fR
526526
flush every line of output
527527
.TP
528-
\fB\-\-export\-core\-goto\fR filename
529-
export the lowered version of the goto-model into the given filename
528+
\fB\-\-export\-symex\-ready\-goto\fR filename
529+
export the symex ready version of the goto-model into the given filename
530530
.TP
531531
\fB\-\-verbosity\fR #
532532
verbosity level

regression/cbmc/export-core-goto/test-bad-usage.desc

Lines changed: 0 additions & 9 deletions
This file was deleted.

regression/cbmc/export-core-goto/test-correct.desc

Lines changed: 0 additions & 15 deletions
This file was deleted.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
CORE
2+
test.c
3+
--export-symex-ready-goto ""
4+
^ERROR: Please provide a filename to write the goto-binary to.$
5+
^EXIT=6$
6+
^SIGNAL=0$
7+
--
8+
--
9+
Ensure that --export-symex-ready-goto exported.symex-ready.goto terminates with error when incorrectly used.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
CORE
2+
test.c
3+
--export-symex-ready-goto exported.symex.ready.goto
4+
^Parsing test.c$
5+
^Converting$
6+
^Type-checking test$
7+
^Generating GOTO Program$
8+
^Removal of function pointers and virtual functions$
9+
^Generic Property Instrumentation$
10+
Exported goto-program in symex-ready-goto form at exported.symex.ready.goto
11+
^EXIT=0$
12+
^SIGNAL=0$
13+
--
14+
--
15+
Ensure that --export-symex-ready-goto exported.symex.ready.goto terminates successfully and logs this.

src/cbmc/cbmc_parse_options.cpp

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -245,11 +245,11 @@ void cbmc_parse_optionst::get_command_line_options(optionst &options)
245245
options.set_option("trace", true);
246246
}
247247

248-
if(cmdline.isset("export-core-goto"))
248+
if(cmdline.isset("export-symex-ready-goto"))
249249
{
250250
options.set_option(
251-
"export-core-goto", cmdline.get_value("export-core-goto"));
252-
if(options.get_option("export-core-goto").empty())
251+
"export-symex-ready-goto", cmdline.get_value("export-symex-ready-goto"));
252+
if(options.get_option("export-symex-ready-goto").empty())
253253
{
254254
log.error()
255255
<< "ERROR: Please provide a filename to write the goto-binary to."
@@ -559,26 +559,27 @@ int cbmc_parse_optionst::doit()
559559
if(set_properties())
560560
return CPROVER_EXIT_SET_PROPERTIES_FAILED;
561561

562-
// At this point, our goto-model should be in core-goto form (all of the
563-
// transformations have been run and the program is ready to be given to the
564-
// solver).
565-
if(options.is_set("export-core-goto"))
562+
// At this point, our goto-model should be in symex-ready-goto form (all of
563+
// the transformations have been run and the program is ready to be given
564+
// to the solver).
565+
if(options.is_set("export-symex-ready-goto"))
566566
{
567-
auto core_goto_filename = options.get_option("export-core-goto");
567+
auto symex_ready_goto_filename =
568+
options.get_option("export-symex-ready-goto");
568569

569-
bool success =
570-
!write_goto_binary(core_goto_filename, goto_model, ui_message_handler);
570+
bool success = !write_goto_binary(
571+
symex_ready_goto_filename, goto_model, ui_message_handler);
571572

572573
if(!success)
573574
{
574575
log.error() << "ERROR: Unable to export goto-program in file "
575-
<< core_goto_filename << messaget::eom;
576+
<< symex_ready_goto_filename << messaget::eom;
576577
return CPROVER_EXIT_INTERNAL_ERROR;
577578
}
578579
else
579580
{
580-
log.status() << "Exported goto-program in core-goto form at "
581-
<< core_goto_filename << messaget::eom;
581+
log.status() << "Exported goto-program in symex-ready-goto form at "
582+
<< symex_ready_goto_filename << messaget::eom;
582583
return CPROVER_EXIT_SUCCESS;
583584
}
584585
}
@@ -967,7 +968,7 @@ void cbmc_parse_optionst::help()
967968
" --show-symbol-table show loaded symbol table\n"
968969
HELP_SHOW_GOTO_FUNCTIONS
969970
HELP_VALIDATE
970-
" --export-core-goto f serialise goto-program in core-goto form in f\n" // NOLINT(*)
971+
" --export-symex-ready-goto f serialise goto-program in symex-ready-goto form in f\n" // NOLINT(*)
971972
"\n"
972973
"Program instrumentation options:\n"
973974
HELP_GOTO_CHECK

src/cbmc/cbmc_parse_options.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ class optionst;
5959
"(verbosity):(no-library)" \
6060
"(nondet-static)" \
6161
"(version)" \
62-
"(export-core-goto):" \
62+
"(export-symex-ready-goto):" \
6363
OPT_COVER \
6464
"(symex-coverage-report):" \
6565
"(mm):" \

0 commit comments

Comments
 (0)